r2623 - replaced svn:externals with versioned files within trunk/externals

r2623 - replaced svn:externals with versioned files within trunk/externals

Author: joern.zaefferer
Date: Wed May 27 10:50:56 2009
New Revision: 2623
Added:
trunk/external/jquery.bgiframe-2.1.1.js
trunk/external/jquery.cookie-r6165.js
trunk/external/jquery.simulate-r6163.js
trunk/external/jsdiff.js (contents, props changed)
- copied, changed from r2622, /trunk/external/jsdiff/jsdiff.js
trunk/external/testrunner-r6343.js
trunk/external/testsuite-r6164.css
Removed:
trunk/external/bgiframe/
trunk/external/jsdiff/
Modified:
trunk/demos/dialog/animated.html
trunk/demos/dialog/default.html
trunk/demos/dialog/modal-confirmation.html
trunk/demos/dialog/modal-form.html
trunk/demos/dialog/modal-message.html
trunk/demos/dialog/modal.html
trunk/demos/index.html
trunk/external/ (props changed)
trunk/tests/index.html
trunk/tests/slider.html
trunk/tests/unit/accordion/accordion.html
trunk/tests/unit/all/all.html
trunk/tests/unit/all/all_2.html
trunk/tests/unit/core/core.html
trunk/tests/unit/datepicker/datepicker.html
trunk/tests/unit/defaults.html
trunk/tests/unit/dialog/dialog.html
trunk/tests/unit/draggable/draggable.html
trunk/tests/unit/droppable/droppable.html
trunk/tests/unit/progressbar/progressbar.html
trunk/tests/unit/resizable/resizable.html
trunk/tests/unit/selectable/selectable.html
trunk/tests/unit/slider/slider.html
trunk/tests/unit/sortable/sortable.html
trunk/tests/unit/tabs/tabs.html
Log:
replaced svn:externals with versioned files within trunk/externals
Modified: trunk/demos/dialog/animated.html
==============================================================================
--- trunk/demos/dialog/animated.html    (original)
+++ trunk/demos/dialog/animated.html    Wed May 27 10:50:56 2009
@@ -11,7 +11,7 @@
    <script type="text/javascript" src="../../ui/effects.core.js"></script>
    <script type="text/javascript" src="../../ui/effects.blind.js"></script>
    <script type="text/javascript" src="../../ui/effects.explode.js"></script>
-    <script type="text/javascript"
src="../../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../../external/jquery.bgiframe-2.1.1.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $.ui.dialog.defaults.bgiframe = true;
Modified: trunk/demos/dialog/default.html
==============================================================================
--- trunk/demos/dialog/default.html    (original)
+++ trunk/demos/dialog/default.html    Wed May 27 10:50:56 2009
@@ -8,7 +8,7 @@
    <script type="text/javascript" src="../../ui/ui.draggable.js"></script>
    <script type="text/javascript" src="../../ui/ui.resizable.js"></script>
    <script type="text/javascript" src="../../ui/ui.dialog.js"></script>
-    <script type="text/javascript"
src="../../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../../external/jquery.bgiframe-2.1.1.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $.ui.dialog.defaults.bgiframe = true;
Modified: trunk/demos/dialog/modal-confirmation.html
==============================================================================
--- trunk/demos/dialog/modal-confirmation.html    (original)
+++ trunk/demos/dialog/modal-confirmation.html    Wed May 27 10:50:56 2009
@@ -8,7 +8,7 @@
    <script type="text/javascript" src="../../ui/ui.draggable.js"></script>
    <script type="text/javascript" src="../../ui/ui.resizable.js"></script>
    <script type="text/javascript" src="../../ui/ui.dialog.js"></script>
-    <script type="text/javascript"
src="../../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../../external/jquery.bgiframe-2.1.1.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
Modified: trunk/demos/dialog/modal-form.html
==============================================================================
--- trunk/demos/dialog/modal-form.html    (original)
+++ trunk/demos/dialog/modal-form.html    Wed May 27 10:50:56 2009
@@ -10,7 +10,7 @@
    <script type="text/javascript" src="../../ui/ui.dialog.js"></script>
    <script type="text/javascript" src="../../ui/effects.core.js"></script>
    <script type="text/javascript"
src="../../ui/effects.highlight.js"></script>
-    <script type="text/javascript"
src="../../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../../external/jquery.bgiframe-2.1.1.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <style type="text/css">
        body { font-size: 62.5%; }
Modified: trunk/demos/dialog/modal-message.html
==============================================================================
--- trunk/demos/dialog/modal-message.html    (original)
+++ trunk/demos/dialog/modal-message.html    Wed May 27 10:50:56 2009
@@ -8,7 +8,7 @@
    <script type="text/javascript" src="../../ui/ui.draggable.js"></script>
    <script type="text/javascript" src="../../ui/ui.resizable.js"></script>
    <script type="text/javascript" src="../../ui/ui.dialog.js"></script>
-    <script type="text/javascript"
src="../../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../../external/jquery.bgiframe-2.1.1.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
Modified: trunk/demos/dialog/modal.html
==============================================================================
--- trunk/demos/dialog/modal.html    (original)
+++ trunk/demos/dialog/modal.html    Wed May 27 10:50:56 2009
@@ -8,7 +8,7 @@
    <script type="text/javascript" src="../../ui/ui.draggable.js"></script>
    <script type="text/javascript" src="../../ui/ui.resizable.js"></script>
    <script type="text/javascript" src="../../ui/ui.dialog.js"></script>
-    <script type="text/javascript"
src="../../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../../external/jquery.bgiframe-2.1.1.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
Modified: trunk/demos/index.html
==============================================================================
--- trunk/demos/index.html    (original)
+++ trunk/demos/index.html    Wed May 27 10:50:56 2009
@@ -6,7 +6,7 @@
    <link type="text/css" href="../themes/base/ui.all.css" rel="stylesheet" />
    <link type="text/css" href="demos.css" rel="stylesheet" />
    <script type="text/javascript" src="../jquery-1.3.2.js"></script>
-    <script type="text/javascript"
src="../external/bgiframe/jquery.bgiframe.js"></script>
+    <script type="text/javascript"
src="../external/jquery.bgiframe-2.1.1.js"></script>
    <script type="text/javascript" src="../ui/ui.core.js"></script>
    <script type="text/javascript" src="../ui/ui.accordion.js"></script>
    <script type="text/javascript" src="../ui/ui.datepicker.js"></script>
Added: trunk/external/jquery.bgiframe-2.1.1.js
==============================================================================
--- (empty file)
+++ trunk/external/jquery.bgiframe-2.1.1.js    Wed May 27 10:50:56 2009
@@ -0,0 +1,100 @@
+/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
+ * Dual licensed under the MIT
(http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
+ * $Rev: 2446 $
+ *
+ * Version 2.1.1
+ */
+
+(function($){
+
+/**
+ * The bgiframe is chainable and applies the iframe hack to get
+ * around zIndex issues in IE6. It will only apply itself in IE6
+ * and adds a class to the iframe called 'bgiframe'. The iframe
+ * is appeneded as the first child of the matched element(s)
+ * with a tabIndex and zIndex of -1.
+ *
+ * By default the plugin will take borders, sized with pixel units,
+ * into account. If a different unit is used for the border's width,
+ * then you will need to use the top and left settings as explained below.
+ *
+ * NOTICE: This plugin has been reported to cause perfromance problems
+ * when used on elements that change properties (like width, height and
+ * opacity) a lot in IE6. Most of these problems have been caused by
+ * the expressions used to calculate the elements width, height and
+ * borders. Some have reported it is due to the opacity filter. All
+ * these settings can be changed if needed as explained below.
+ *
+ * @example $('div').bgiframe();
+ * @before <div>

Paragraph

</div>
+ * @result <div><iframe class="bgiframe".../>

Paragraph

</div>
+ *
+ * @param Map settings Optional settings to configure the iframe.
+ * @option String|Number top The iframe must be offset to the top
+ *         by the width of the top border. This should be a negative
+ * number representing the border-top-width. If a number is
+ *         is used here, pixels will be assumed. Otherwise, be sure
+ *        to specify a unit. An expression could also be used.
+ *         By default the value is "auto" which will use an expression
+ *         to get the border-top-width if it is in pixels.
+ * @option String|Number left The iframe must be offset to the left
+ *         by the width of the left border. This should be a negative
+ * number representing the border-left-width. If a number is
+ *         is used here, pixels will be assumed. Otherwise, be sure
+ *        to specify a unit. An expression could also be used.
+ *         By default the value is "auto" which will use an expression
+ *         to get the border-left-width if it is in pixels.
+ * @option String|Number width This is the width of the iframe. If
+ *        a number is used here, pixels will be assume. Otherwise, be sure
+ *         to specify a unit. An experssion could also be used.
+ *        By default the value is "auto" which will use an experssion
+ *         to get the offsetWidth.
+ * @option String|Number height This is the height of the iframe. If
+ *        a number is used here, pixels will be assume. Otherwise, be sure
+ *         to specify a unit. An experssion could also be used.
+ *        By default the value is "auto" which will use an experssion
+ *         to get the offsetHeight.
+ * @option Boolean opacity This is a boolean representing whether or not
+ *         to use opacity. If set to true, the opacity of 0 is applied. If
+ *        set to false, the opacity filter is not applied. Default: true.
+ * @option String src This setting is provided so that one could change
+ *        the src of the iframe to whatever they need.
+ *        Default: "javascript:false;"
+ *
+ * @name bgiframe
+ * @type jQuery
+ * @cat Plugins/bgiframe
+ * @author Brandon Aaron (brandon.aaron@gmail.com ||
http://brandonaaron.net)
+ */
+$.fn.bgIframe = $.fn.bgiframe = function(s) {
+    // This is only for IE6
+    if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) {
+        s = $.extend({
+            top : 'auto', // auto == .currentStyle.borderTopWidth
+            left : 'auto', // auto == .currentStyle.borderLeftWidth
+            width : 'auto', // auto == offsetWidth
+            height : 'auto', // auto == offsetHeight
+            opacity : true,
+            src : 'javascript:false;'
+        }, s || {});
+        var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
+         html = '<iframe
class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
+         'style="display:block;position:absolute;z-index:-1;'+
+             (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
+                
     'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)|
|0)*-1)+\'px\')':prop(s.top))+';'+
+                
     'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)|
|0)*-1)+\'px\')':prop(s.left))+';'+
+                
     'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
+                
     'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
+                    '"/>';
+        return this.each(function() {
+            if ( $('> iframe.bgiframe', this).length == 0 )
+                this.insertBefore( document.createElement(html), this.firstChild );
+        });
+    }
+    return this;
+};
+
+})(jQuery);
\ No newline at end of file
Added: trunk/external/jquery.cookie-r6165.js
==============================================================================
--- (empty file)
+++ trunk/external/jquery.cookie-r6165.js    Wed May 27 10:50:56 2009
@@ -0,0 +1,97 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional
parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/',
domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you
have to use the same path and domain
+ * used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to
provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration
date from now on in days or a Date object.
+ * If a negative value is specified (e.g. a
date in the past), the cookie will be deleted.
+ * If set to null or omitted, the cookie will
be a session cookie and will not be retained
+ * when the the browser exits.
+ * @option String path The value of the path atribute of the cookie
(default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie
(default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will
be set and the cookie transmission will
+ * require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+ if (typeof value != 'undefined') { // name and value given, set cookie
+ options = options || {};
+ if (value === null) {
+ value = '';
+ options = $.extend({}, options); // clone object since it's
unexpected behavior if the expired property were changed
+ options.expires = -1;
+ }
+ var expires = '';
+ if (options.expires && (typeof options.expires == 'number' ||
options.expires.toUTCString)) {
+ var date;
+ if (typeof options.expires == 'number') {
+ date = new Date();
+ date.setTime(date.getTime() + (options.expires * 24 * 60 *
60 * 1000));
+ } else {
+ date = options.expires;
+ }
+ expires = '; expires=' + date.toUTCString(); // use expires
attribute, max-age is not supported by IE
+ }
+ // NOTE Needed to parenthesize options.path and options.domain
+ // in the following expressions, otherwise they evaluate to
undefined
+ // in the packed version for some reason...
+ var path = options.path ? '; path=' + (options.path) : '';
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
+ var secure = options.secure ? '; secure' : '';
+ document.cookie = [name, '=', encodeURIComponent(value), expires,
path, domain, secure].join('');
+ } else { // only name given, get cookie
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue =
decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+ }
+};
\ No newline at end of file
Added: trunk/external/jquery.simulate-r6163.js
==============================================================================
--- (empty file)
+++ trunk/external/jquery.simulate-r6163.js    Wed May 27 10:50:56 2009
@@ -0,0 +1,152 @@
+/*
+ * jquery.simulate - simulate browser mouse and keyboard events
+ *
+ * Copyright (c) 2009 Eduardo Lundgren (eduardolundgren@gmail.com)
+ * and Richard D. Worth (rdworth@gmail.com)
+ *
+ * Dual licensed under the MIT
(http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ */
+
+;(function($) {
+
+$.fn.extend({
+    simulate: function(type, options) {
+        return this.each(function() {
+            var opt = $.extend({}, $.simulate.defaults, options || {});
+            new $.simulate(this, type, opt);
+        });
+    }
+});
+
+$.simulate = function(el, type, options) {
+    this.target = el;
+    this.options = options;
+
+    if (/^drag$/.test(type)) {
+        this[type].apply(this, [this.target, options]);
+    } else {
+        this.simulateEvent(el, type, options);
+    }
+}
+
+$.extend($.simulate.prototype, {
+    simulateEvent: function(el, type, options) {
+        var evt = this.createEvent(type, options);
+        this.dispatchEvent(el, type, evt, options);
+        return evt;
+    },
+    createEvent: function(type, options) {
+        if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) {
+            return this.mouseEvent(type, options);
+        } else if (/^key(up|down|press)$/.test(type)) {
+            return this.keyboardEvent(type, options);
+        }
+    },
+    mouseEvent: function(type, options) {
+        var evt;
+        var e = $.extend({
+            bubbles: true, cancelable: (type != "mousemove"), view: window, detail:
0,
+            screenX: 0, screenY: 0, clientX: 0, clientY: 0,
+            ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
+            button: 0, relatedTarget: undefined
+        }, options);
+
+        var relatedTarget = $(e.relatedTarget)[0];
+
+        if ($.isFunction(document.createEvent)) {
+            evt = document.createEvent("MouseEvents");
+            evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,
+                e.screenX, e.screenY, e.clientX, e.clientY,
+                e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
+                e.button, e.relatedTarget || document.body.parentNode);
+        } else if (document.createEventObject) {
+            evt = document.createEventObject();
+            $.extend(evt, e);
+            evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;
+        }
+        return evt;
+    },
+    keyboardEvent: function(type, options) {
+        var evt;
+
+        var e = $.extend({ bubbles: true, cancelable: true, view: window,
+            ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
+            keyCode: 0, charCode: 0
+        }, options);
+
+        if ($.isFunction(document.createEvent)) {
+            try {
+                evt = document.createEvent("KeyEvents");
+                evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view,
+                    e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
+                    e.keyCode, e.charCode);
+            } catch(err) {
+                evt = document.createEvent("Events");
+                evt.initEvent(type, e.bubbles, e.cancelable);
+                $.extend(evt, { view: e.view,
+                    ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey:
e.metaKey,
+                    keyCode: e.keyCode, charCode: e.charCode
+                });
+            }
+        } else if (document.createEventObject) {
+            evt = document.createEventObject();
+            $.extend(evt, e);
+        }
+        if ($.browser.msie || $.browser.opera) {
+            evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode;
+            evt.charCode = undefined;
+        }
+        return evt;
+    },
+
+    dispatchEvent: function(el, type, evt) {
+        if (el.dispatchEvent) {
+            el.dispatchEvent(evt);
+        } else if (el.fireEvent) {
+            el.fireEvent('on' + type, evt);
+        }
+        return evt;
+    },
+
+    drag: function(el) {
+        var self = this, center = this.findCenter(this.target),
+            options = this.options,    x = Math.floor(center.x), y =
Math.floor(center.y),
+            dx = options.dx || 0, dy = options.dy || 0, target = this.target;
+        var coord = { clientX: x, clientY: y };
+        this.simulateEvent(target, "mousedown", coord);
+        coord = { clientX: x + 1, clientY: y + 1 };
+        this.simulateEvent(document, "mousemove", coord);
+        coord = { clientX: x + dx, clientY: y + dy };
+        this.simulateEvent(document, "mousemove", coord);
+        this.simulateEvent(document, "mousemove", coord);
+        this.simulateEvent(target, "mouseup", coord);
+    },
+    findCenter: function(el) {
+        var el = $(this.target), o = el.offset();
+        return {
+            x: o.left + el.outerWidth() / 2,
+            y: o.top + el.outerHeight() / 2
+        };
+    }
+});
+
+$.extend($.simulate, {
+    defaults: {
+        speed: 'sync'
+    },
+    VK_TAB: 9,
+    VK_ENTER: 13,
+    VK_ESC: 27,
+    VK_PGUP: 33,
+    VK_PGDN: 34,
+    VK_END: 35,
+    VK_HOME: 36,
+    VK_LEFT: 37,
+    VK_UP: 38,
+    VK_RIGHT: 39,
+    VK_DOWN: 40
+});
+
+})(jQuery);
Copied: trunk/external/jsdiff.js (from r2622,
/trunk/external/jsdiff/jsdiff.js)
==============================================================================
Added: trunk/external/testrunner-r6343.js
==============================================================================
--- (empty file)
+++ trunk/external/testrunner-r6343.js    Wed May 27 10:50:56 2009
@@ -0,0 +1,790 @@
+/*
+ * QUnit - jQuery unit testrunner
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2008 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Id: testrunner.js 6343 2009-05-06 15:09:22Z joern.zaefferer $
+ */
+
+(function($) {
+
+// Tests for equality any JavaScript type and structure without unexpected
results.
+// Discussions and reference: http://philrathe.com/articles/equiv
+// Test suites: http://philrathe.com/tests/equiv
+// Author: Philippe Rathé <prathe@gmail.com>
+var equiv = function () {
+
+ var innerEquiv; // the real equiv function
+ var callers = []; // stack to decide between skip/abort functions
+
+ // Determine what is o.
+ function hoozit(o) {
+ if (typeof o === "string") {
+ return "string";
+
+ } else if (typeof o === "boolean") {
+ return "boolean";
+
+ } else if (typeof o === "number") {
+
+ if (isNaN(o)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+
+ } else if (typeof o === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ } else if (o === null) {
+ return "null";
+
+ // consider: typeof [] === object
+ } else if (o instanceof Array) {
+ return "array";
+
+ // consider: typeof new Date() === object
+ } else if (o instanceof Date) {
+ return "date";
+
+ // consider: /./ instanceof Object;
+ // /./ instanceof RegExp;
+ // typeof /./ === "function"; // => false in IE and Opera,
+ // true in FF and Safari
+ } else if (o instanceof RegExp) {
+ return "regexp";
+
+ } else if (typeof o === "object") {
+ return "object";
+
+ } else if (o instanceof Function) {
+ return "function";
+ }
+ }
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks(o, callbacks, args) {
+ var prop = hoozit(o);
+ if (prop) {
+ if (hoozit(callbacks[prop]) === "function") {
+ return callbacks[prop].apply(callbacks, args);
+ } else {
+ return callbacks[prop]; // or undefined
+ }
+ }
+ }
+
+ var callbacks = function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality(b, a) {
+ return a === b;
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function (b) {