+ },
+
+ special: {
+ ready: {
+ setup: function() {
+ var handler = jQuery.event.special.ready.handler;
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener )
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", handler, false );
+
+ // If Safari or IE is used
+ // Continually check to see if the document is ready
+ if (jQuery.browser.msie || jQuery.browser.safari ) (function(){
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ if ( jQuery.browser.msie || document.readyState != "loaded" && document.readyState != "complete" )
+ document.documentElement.doScroll("left");
+ } catch( error ) {
+ setTimeout( arguments.callee, 0 );
+ return;
+ }
+
+ // and execute any waiting functions
+ handler();
+ })();
+
+ // A fallback to window.onload, that will always work
+ jQuery.event.add( window, "load", handler );
+ },
+
+ teardown: function() {return;},
+
+ handler: function() {
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.isReady ) {
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+ jQuery(document).triggerHandler("ready");
+ jQuery(document).unbind("ready");
+ }
+ }
+ },
+
+ mouseenter: {
+ setup: function() {
+ if (jQuery.browser.msie) return false;
+ jQuery(this).bind('mouseover', jQuery.event.special.mouseenter.handler);
+ return true;
+ },
+
+ teardown: function() {
+ if (jQuery.browser.msie) return false;
+ jQuery(this).unbind('mouseover', jQuery.event.special.mouseenter.handler);
+ return true;
+ },
+
+ handler: function(event) {
+ var args = Array.prototype.slice.call( arguments, 1 );
+ // If we actually just moused on to a sub-element, ignore it
+ if ( withinElement(event, this) ) return true;
+ // Execute the right handlers by setting the event type to mouseenter
+ event.type = 'mouseenter';
+ // Include the event object as the first argument
+ args.unshift(event);
+ var val = jQuery.event.handle.apply(this, args);
+ return val;
+ }
+ },
+
+ mouseleave: {
+ setup: function() {
+ if (jQuery.browser.msie) return false;
+ jQuery(this).bind('mouseout', jQuery.event.special.mouseleave.handler);
+ return true;
+ },
+
+ teardown: function() {
+ if (jQuery.browser.msie) return false;
+ jQuery(this).unbind('mouseout', jQuery.event.special.mouseleave.handler);
+ return true;
+ },
+
+ handler: function(event) {
+ var args = Array.prototype.slice.call( arguments, 1 );
+ // If we actually just moused on to a sub-element, ignore it
+ if ( withinElement(event, this) ) return true;
+ // Execute the right handlers by setting the event type to mouseleave
+ event.type = 'mouseleave';
+ // Include the event object as the first argument
+ args.unshift(event);
+ var val = jQuery.event.handle.apply(this, args);
+ return val;
+ }
+ }