+ /**
+ * Removes a bound mousemove event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unmousemove( myFunction );
+ * @before <p onmousemove="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unmousemove
+ * @type jQuery
+ * @param Function fn A function to unbind from the mousemove event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound mousemove events from each of the matched elements.
+ *
+ * @example $("p").unmousemove();
+ * @before <p onmousemove="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unmousemove
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the mouseover event of each matched element.
+ *
+ * @example $("p").mouseover( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onmouseover="alert('Hello');">Hello</p>
+ *
+ * @name mouseover
+ * @type jQuery
+ * @param Function fn A function to bind to the mouseover event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the mouseover event of each matched element. This causes all of the functions
+ * that have been bound to thet mouseover event to be executed.
+ *
+ * @example $("p").mouseover();
+ * @before <p onmouseover="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name mouseover
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the mouseover event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .mouseover() method, calling .onemouseover() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onemouseover( function() { alert("Hello"); } );
+ * @before <p onmouseover="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first mouseover
+ *
+ * @name onemouseover
+ * @type jQuery
+ * @param Function fn A function to bind to the mouseover event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound mouseover event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unmouseover( myFunction );
+ * @before <p onmouseover="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unmouseover
+ * @type jQuery
+ * @param Function fn A function to unbind from the mouseover event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound mouseover events from each of the matched elements.
+ *
+ * @example $("p").unmouseover();
+ * @before <p onmouseover="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unmouseover
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the mouseout event of each matched element.
+ *
+ * @example $("p").mouseout( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onmouseout="alert('Hello');">Hello</p>
+ *
+ * @name mouseout
+ * @type jQuery
+ * @param Function fn A function to bind to the mouseout event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the mouseout event of each matched element. This causes all of the functions
+ * that have been bound to thet mouseout event to be executed.
+ *
+ * @example $("p").mouseout();
+ * @before <p onmouseout="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name mouseout
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the mouseout event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .mouseout() method, calling .onemouseout() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onemouseout( function() { alert("Hello"); } );
+ * @before <p onmouseout="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first mouseout
+ *
+ * @name onemouseout
+ * @type jQuery
+ * @param Function fn A function to bind to the mouseout event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound mouseout event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unmouseout( myFunction );
+ * @before <p onmouseout="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unmouseout
+ * @type jQuery
+ * @param Function fn A function to unbind from the mouseout event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound mouseout events from each of the matched elements.
+ *
+ * @example $("p").unmouseout();
+ * @before <p onmouseout="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unmouseout
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the change event of each matched element.
+ *
+ * @example $("p").change( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onchange="alert('Hello');">Hello</p>
+ *
+ * @name change
+ * @type jQuery
+ * @param Function fn A function to bind to the change event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the change event of each matched element. This causes all of the functions
+ * that have been bound to thet change event to be executed.
+ *
+ * @example $("p").change();
+ * @before <p onchange="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name change
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the change event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .change() method, calling .onechange() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onechange( function() { alert("Hello"); } );
+ * @before <p onchange="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first change
+ *
+ * @name onechange
+ * @type jQuery
+ * @param Function fn A function to bind to the change event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound change event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unchange( myFunction );
+ * @before <p onchange="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unchange
+ * @type jQuery
+ * @param Function fn A function to unbind from the change event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound change events from each of the matched elements.
+ *
+ * @example $("p").unchange();
+ * @before <p onchange="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unchange
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the reset event of each matched element.
+ *
+ * @example $("p").reset( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onreset="alert('Hello');">Hello</p>
+ *
+ * @name reset
+ * @type jQuery
+ * @param Function fn A function to bind to the reset event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the reset event of each matched element. This causes all of the functions
+ * that have been bound to thet reset event to be executed.
+ *
+ * @example $("p").reset();
+ * @before <p onreset="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name reset
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the reset event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .reset() method, calling .onereset() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onereset( function() { alert("Hello"); } );
+ * @before <p onreset="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first reset
+ *
+ * @name onereset
+ * @type jQuery
+ * @param Function fn A function to bind to the reset event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound reset event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unreset( myFunction );
+ * @before <p onreset="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unreset
+ * @type jQuery
+ * @param Function fn A function to unbind from the reset event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound reset events from each of the matched elements.
+ *
+ * @example $("p").unreset();
+ * @before <p onreset="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unreset
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the select event of each matched element.
+ *
+ * @example $("p").select( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onselect="alert('Hello');">Hello</p>
+ *
+ * @name select
+ * @type jQuery
+ * @param Function fn A function to bind to the select event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the select event of each matched element. This causes all of the functions
+ * that have been bound to thet select event to be executed.
+ *
+ * @example $("p").select();
+ * @before <p onselect="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name select
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the select event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .select() method, calling .oneselect() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").oneselect( function() { alert("Hello"); } );
+ * @before <p onselect="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first select
+ *
+ * @name oneselect
+ * @type jQuery
+ * @param Function fn A function to bind to the select event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound select event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unselect( myFunction );
+ * @before <p onselect="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unselect
+ * @type jQuery
+ * @param Function fn A function to unbind from the select event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound select events from each of the matched elements.
+ *
+ * @example $("p").unselect();
+ * @before <p onselect="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unselect
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the submit event of each matched element.
+ *
+ * @example $("p").submit( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onsubmit="alert('Hello');">Hello</p>
+ *
+ * @name submit
+ * @type jQuery
+ * @param Function fn A function to bind to the submit event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the submit event of each matched element. This causes all of the functions
+ * that have been bound to thet submit event to be executed.
+ *
+ * @example $("p").submit();
+ * @before <p onsubmit="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name submit
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the submit event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .submit() method, calling .onesubmit() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onesubmit( function() { alert("Hello"); } );
+ * @before <p onsubmit="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first submit
+ *
+ * @name onesubmit
+ * @type jQuery
+ * @param Function fn A function to bind to the submit event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound submit event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unsubmit( myFunction );
+ * @before <p onsubmit="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unsubmit
+ * @type jQuery
+ * @param Function fn A function to unbind from the submit event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound submit events from each of the matched elements.
+ *
+ * @example $("p").unsubmit();
+ * @before <p onsubmit="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unsubmit
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the keydown event of each matched element.
+ *
+ * @example $("p").keydown( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onkeydown="alert('Hello');">Hello</p>
+ *
+ * @name keydown
+ * @type jQuery
+ * @param Function fn A function to bind to the keydown event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the keydown event of each matched element. This causes all of the functions
+ * that have been bound to thet keydown event to be executed.
+ *
+ * @example $("p").keydown();
+ * @before <p onkeydown="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name keydown
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the keydown event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .keydown() method, calling .onekeydown() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onekeydown( function() { alert("Hello"); } );
+ * @before <p onkeydown="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first keydown
+ *
+ * @name onekeydown
+ * @type jQuery
+ * @param Function fn A function to bind to the keydown event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound keydown event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unkeydown( myFunction );
+ * @before <p onkeydown="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unkeydown
+ * @type jQuery
+ * @param Function fn A function to unbind from the keydown event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound keydown events from each of the matched elements.
+ *
+ * @example $("p").unkeydown();
+ * @before <p onkeydown="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unkeydown
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the keypress event of each matched element.
+ *
+ * @example $("p").keypress( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onkeypress="alert('Hello');">Hello</p>
+ *
+ * @name keypress
+ * @type jQuery
+ * @param Function fn A function to bind to the keypress event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the keypress event of each matched element. This causes all of the functions
+ * that have been bound to thet keypress event to be executed.
+ *
+ * @example $("p").keypress();
+ * @before <p onkeypress="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name keypress
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the keypress event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .keypress() method, calling .onekeypress() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onekeypress( function() { alert("Hello"); } );
+ * @before <p onkeypress="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first keypress
+ *
+ * @name onekeypress
+ * @type jQuery
+ * @param Function fn A function to bind to the keypress event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound keypress event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unkeypress( myFunction );
+ * @before <p onkeypress="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unkeypress
+ * @type jQuery
+ * @param Function fn A function to unbind from the keypress event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound keypress events from each of the matched elements.
+ *
+ * @example $("p").unkeypress();
+ * @before <p onkeypress="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unkeypress
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the keyup event of each matched element.
+ *
+ * @example $("p").keyup( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onkeyup="alert('Hello');">Hello</p>
+ *
+ * @name keyup
+ * @type jQuery
+ * @param Function fn A function to bind to the keyup event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the keyup event of each matched element. This causes all of the functions
+ * that have been bound to thet keyup event to be executed.
+ *
+ * @example $("p").keyup();
+ * @before <p onkeyup="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name keyup
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the keyup event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .keyup() method, calling .onekeyup() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").onekeyup( function() { alert("Hello"); } );
+ * @before <p onkeyup="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first keyup
+ *
+ * @name onekeyup
+ * @type jQuery
+ * @param Function fn A function to bind to the keyup event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound keyup event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unkeyup( myFunction );
+ * @before <p onkeyup="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unkeyup
+ * @type jQuery
+ * @param Function fn A function to unbind from the keyup event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound keyup events from each of the matched elements.
+ *
+ * @example $("p").unkeyup();
+ * @before <p onkeyup="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unkeyup
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the error event of each matched element.
+ *
+ * @example $("p").error( function() { alert("Hello"); } );
+ * @before <p>Hello</p>
+ * @result <p onerror="alert('Hello');">Hello</p>
+ *
+ * @name error
+ * @type jQuery
+ * @param Function fn A function to bind to the error event on each of the matched elements.
+ */
+
+ /**
+ * Trigger the error event of each matched element. This causes all of the functions
+ * that have been bound to thet error event to be executed.
+ *
+ * @example $("p").error();
+ * @before <p onerror="alert('Hello');">Hello</p>
+ * @result alert('Hello');
+ *
+ * @name error
+ * @type jQuery
+ */
+
+ /**
+ * Bind a function to the error event of each matched element, which will only be executed once.
+ * Unlike a call to the normal .error() method, calling .oneerror() causes the bound function to be
+ * only executed the first time it is triggered, and never again (unless it is re-bound).
+ *
+ * @example $("p").oneerror( function() { alert("Hello"); } );
+ * @before <p onerror="alert('Hello');">Hello</p>
+ * @result alert('Hello'); // Only executed for the first error
+ *
+ * @name oneerror
+ * @type jQuery
+ * @param Function fn A function to bind to the error event on each of the matched elements.
+ */
+
+ /**
+ * Removes a bound error event from each of the matched
+ * elements. You must pass the identical function that was used in the original
+ * bind method.
+ *
+ * @example $("p").unerror( myFunction );
+ * @before <p onerror="myFunction">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unerror
+ * @type jQuery
+ * @param Function fn A function to unbind from the error event on each of the matched elements.
+ */
+
+ /**
+ * Removes all bound error events from each of the matched elements.
+ *
+ * @example $("p").unerror();
+ * @before <p onerror="alert('Hello');">Hello</p>
+ * @result <p>Hello</p>
+ *
+ * @name unerror
+ * @type jQuery
+ */
+
+ var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," +
+ "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," +
+ "submit,keydown,keypress,keyup,error").split(",");
+
+ // Go through all the event names, but make sure that
+ // it is enclosed properly
+ for ( var i = 0; i < e.length; i++ ) new function(){
+
+ var o = e[i];
+
+ // Handle event binding
+ jQuery.fn[o] = function(f){
+ return f ? this.bind(o, f) : this.trigger(o);
+ };
+
+ // Handle event unbinding
+ jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); };
+
+ // Finally, handle events that only fire once
+ jQuery.fn["one"+o] = function(f){
+ // Attach the event listener
+ return this.each(function(){
+
+ var count = 0;
+
+ // Add the event
+ jQuery.event.add( this, o, function(e){
+ // If this function has already been executed, stop
+ if ( count++ ) return;
+
+ // And execute the bound function
+ return f.apply(this, [e]);
+ });
+ });
+ };
+
+ }
+
+ // If Mozilla is used
+ if ( jQuery.browser.mozilla || jQuery.browser.opera ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+ // If IE is used, use the excellent hack by Matthias Miller
+ // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
+ } else if ( jQuery.browser.msie ) {
+
+ // Only works if you document.write() it
+ document.write("<scr" + "ipt id=__ie_init defer=true " +
+ "src=//:><\/script>");
+
+ // Use the defer script hack
+ var script = document.getElementById("__ie_init");
+ script.onreadystatechange = function() {
+ if ( this.readyState == "complete" )
+ jQuery.ready();
+ };
+
+ // Clear from memory
+ script = null;
+
+ // If Safari is used
+ } else if ( jQuery.browser.safari ) {
+ // Continually check to see if the document.readyState is valid
+ jQuery.safariTimer = setInterval(function(){
+ // loaded and complete are both valid states
+ if ( document.readyState == "loaded" ||
+ document.readyState == "complete" ) {
+
+ // If either one are found, remove the timer
+ clearInterval( jQuery.safariTimer );
+ jQuery.safariTimer = null;
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ }, 10);
+ }
+
+ // A fallback to window.onload, that will always work
+ jQuery.event.add( window, "load", jQuery.ready );
+
+}