test runner: the changes are:
[jquery.git] / test / unit / core.js
index 37eee5d..eba9ce5 100644 (file)
@@ -8,20 +8,20 @@ test("Basic requirements", function() {
        ok( document.getElementsByTagName, "getElementsByTagName" );\r
        ok( RegExp, "RegExp" );\r
        ok( jQuery, "jQuery" );\r
-       ok( $, "$()" );\r
+       ok( $, "$" );\r
 });\r
 \r
-test("$()", function() {\r
+test("jQuery()", function() {\r
        expect(8);\r
 \r
-       var main = $("#main");\r
-       isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );\r
+       var main = jQuery("#main");\r
+       isSet( jQuery("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );\r
 \r
 /*\r
        // disabled since this test was doing nothing. i tried to fix it but i'm not sure\r
        // what the expected behavior should even be. FF returns "\n" for the text node\r
        // make sure this is handled\r
-       var crlfContainer = $('<p>\r\n</p>');\r
+       var crlfContainer = jQuery('<p>\r\n</p>');\r
        var x = crlfContainer.contents().get(0).nodeValue;\r
        equals( x, what???, "Check for \\r and \\n in jQuery()" );\r
 */\r
@@ -29,27 +29,27 @@ test("$()", function() {
        /* // Disabled until we add this functionality in\r
        var pass = true;\r
        try {\r
-               $("<div>Testing</div>").appendTo(document.getElementById("iframe").contentDocument.body);\r
+               jQuery("<div>Testing</div>").appendTo(document.getElementById("iframe").contentDocument.body);\r
        } catch(e){\r
                pass = false;\r
        }\r
-       ok( pass, "$('&lt;tag&gt;') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );*/\r
+       ok( pass, "jQuery('&lt;tag&gt;') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );*/\r
 \r
-       var code = $("<code/>");\r
+       var code = jQuery("<code/>");\r
        equals( code.length, 1, "Correct number of elements generated for code" );\r
-       var img = $("<img/>");\r
+       var img = jQuery("<img/>");\r
        equals( img.length, 1, "Correct number of elements generated for img" );\r
-       var div = $("<div/><hr/><code/><b/>");\r
+       var div = jQuery("<div/><hr/><code/><b/>");\r
        equals( div.length, 4, "Correct number of elements generated for div hr code b" );\r
 \r
        // can actually yield more than one, when iframes are included, the window is an array as well\r
-       equals( $(window).length, 1, "Correct number of elements generated for window" );\r
+       equals( jQuery(window).length, 1, "Correct number of elements generated for window" );\r
 \r
-       equals( $(document).length, 1, "Correct number of elements generated for document" );\r
+       equals( jQuery(document).length, 1, "Correct number of elements generated for document" );\r
 \r
-       equals( $([1,2,3]).get(1), 2, "Test passing an array to the factory" );\r
+       equals( jQuery([1,2,3]).get(1), 2, "Test passing an array to the factory" );\r
 \r
-       equals( $(document.body).get(0), $('body').get(0), "Test passing an html node to the factory" );\r
+       equals( jQuery(document.body).get(0), jQuery('body').get(0), "Test passing an html node to the factory" );\r
 });\r
 \r
 test("browser", function() {\r
@@ -91,22 +91,19 @@ test("browser", function() {
 test("noConflict", function() {\r
        expect(6);\r
 \r
-       var old = jQuery;\r
-       var newjQuery = jQuery.noConflict();\r
+       var $$ = jQuery;\r
 \r
-       equals( newjQuery, old, "noConflict returned the jQuery object" );\r
-       equals( jQuery, old, "Make sure jQuery wasn't touched." );\r
-       equals( $, "$", "Make sure $ was reverted." );\r
+       equals( jQuery, jQuery.noConflict(), "noConflict returned the jQuery object" );\r
+       equals( jQuery, $$, "Make sure jQuery wasn't touched." );\r
+       equals( $, original$, "Make sure $ was reverted." );\r
 \r
-       jQuery = $ = old;\r
+       jQuery = $ = $$;\r
 \r
-       newjQuery = jQuery.noConflict(true);\r
+       equals( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" );\r
+       equals( jQuery, originaljQuery, "Make sure jQuery was reverted." );\r
+       equals( $, original$, "Make sure $ was reverted." );\r
 \r
-       equals( newjQuery, old, "noConflict returned the jQuery object" );\r
-       equals( jQuery, "jQuery", "Make sure jQuery was reverted." );\r
-       equals( $, "$", "Make sure $ was reverted." );\r
-\r
-       jQuery = $ = old;\r
+       jQuery = $$;\r
 });\r
 \r
 test("isFunction", function() {\r
@@ -196,45 +193,45 @@ test("isFunction", function() {
 \r
 var foo = false;\r
 \r
-test("$('html')", function() {\r
+test("jQuery('html')", function() {\r
        expect(6);\r
 \r
        reset();\r
        foo = false;\r
-       var s = $("<script>var foo='test';</script>")[0];\r
+       var s = jQuery("<script>var foo='test';</script>")[0];\r
        ok( s, "Creating a script" );\r
        ok( !foo, "Make sure the script wasn't executed prematurely" );\r
-       $("body").append(s);\r
+       jQuery("body").append(s);\r
        ok( foo, "Executing a scripts contents in the right context" );\r
 \r
        reset();\r
-       ok( $("<link rel='stylesheet'/>")[0], "Creating a link" );\r
+       ok( jQuery("<link rel='stylesheet'/>")[0], "Creating a link" );\r
 \r
        reset();\r
 \r
-       var j = $("<span>hi</span> there <!-- mon ami -->");\r
+       var j = jQuery("<span>hi</span> there <!-- mon ami -->");\r
        ok( j.length >= 2, "Check node,textnode,comment creation (some browsers delete comments)" );\r
 \r
-       ok( !$("<option>test</option>")[0].selected, "Make sure that options are auto-selected #2050" );\r
+       ok( !jQuery("<option>test</option>")[0].selected, "Make sure that options are auto-selected #2050" );\r
 });\r
 \r
-test("$('html', context)", function() {\r
+test("jQuery('html', context)", function() {\r
        expect(1);\r
 \r
-       var $div = $("<div/>");\r
-       var $span = $("<span/>", $div);\r
+       var $div = jQuery("<div/>");\r
+       var $span = jQuery("<span/>", $div);\r
        equals($span.length, 1, "Verify a span created with a div context works, #1763");\r
 });\r
 \r
 if ( !isLocal ) {\r
-test("$(selector, xml).text(str) - Loaded via XML document", function() {\r
+test("jQuery(selector, xml).text(str) - Loaded via XML document", function() {\r
        expect(2);\r
        stop();\r
-       $.get('data/dashboard.xml', function(xml) {\r
+       jQuery.get('data/dashboard.xml', function(xml) {\r
                // tests for #1419 where IE was a problem\r
-               equals( $("tab:first", xml).text(), "blabla", "Verify initial text correct" );\r
-               $("tab:first", xml).text("newtext");\r
-               equals( $("tab:first", xml).text(), "newtext", "Verify new text correct" );\r
+               equals( jQuery("tab:first", xml).text(), "blabla", "Verify initial text correct" );\r
+               jQuery("tab:first", xml).text("newtext");\r
+               equals( jQuery("tab:first", xml).text(), "newtext", "Verify new text correct" );\r
                start();\r
        });\r
 });\r
@@ -242,55 +239,55 @@ test("$(selector, xml).text(str) - Loaded via XML document", function() {
 \r
 test("length", function() {\r
        expect(1);\r
-       equals( $("p").length, 6, "Get Number of Elements Found" );\r
+       equals( jQuery("p").length, 6, "Get Number of Elements Found" );\r
 });\r
 \r
 test("size()", function() {\r
        expect(1);\r
-       equals( $("p").size(), 6, "Get Number of Elements Found" );\r
+       equals( jQuery("p").size(), 6, "Get Number of Elements Found" );\r
 });\r
 \r
 test("get()", function() {\r
        expect(1);\r
-       isSet( $("p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" );\r
+       isSet( jQuery("p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" );\r
 });\r
 \r
 test("get(Number)", function() {\r
        expect(1);\r
-       equals( $("p").get(0), document.getElementById("firstp"), "Get A Single Element" );\r
+       equals( jQuery("p").get(0), document.getElementById("firstp"), "Get A Single Element" );\r
 });\r
 \r
 test("add(String|Element|Array|undefined)", function() {\r
        expect(12);\r
-       isSet( $("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );\r
-       isSet( $("#sndp").add( $("#en")[0] ).add( $("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" );\r
-       ok( $([]).add($("#form")[0].elements).length >= 13, "Check elements from array" );\r
+       isSet( jQuery("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );\r
+       isSet( jQuery("#sndp").add( jQuery("#en")[0] ).add( jQuery("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" );\r
+       ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" );\r
 \r
-       // For the time being, we're discontinuing support for $(form.elements) since it's ambiguous in IE\r
-       // use $([]).add(form.elements) instead.\r
-       //equals( $([]).add($("#form")[0].elements).length, $($("#form")[0].elements).length, "Array in constructor must equals array in add()" );\r
+       // For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE\r
+       // use jQuery([]).add(form.elements) instead.\r
+       //equals( jQuery([]).add(jQuery("#form")[0].elements).length, jQuery(jQuery("#form")[0].elements).length, "Array in constructor must equals array in add()" );\r
 \r
-       var x = $([]).add($("<p id='x1'>xxx</p>")).add($("<p id='x2'>xxx</p>"));\r
+       var x = jQuery([]).add(jQuery("<p id='x1'>xxx</p>")).add(jQuery("<p id='x2'>xxx</p>"));\r
        equals( x[0].id, "x1", "Check on-the-fly element1" );\r
        equals( x[1].id, "x2", "Check on-the-fly element2" );\r
 \r
-       var x = $([]).add("<p id='x1'>xxx</p>").add("<p id='x2'>xxx</p>");\r
+       var x = jQuery([]).add("<p id='x1'>xxx</p>").add("<p id='x2'>xxx</p>");\r
        equals( x[0].id, "x1", "Check on-the-fly element1" );\r
        equals( x[1].id, "x2", "Check on-the-fly element2" );\r
 \r
        var notDefined;\r
-       equals( $([]).add(notDefined).length, 0, "Check that undefined adds nothing" );\r
+       equals( jQuery([]).add(notDefined).length, 0, "Check that undefined adds nothing" );\r
 \r
        // Added after #2811\r
-       equals( $([]).add([window,document,document.body,document]).length, 3, "Pass an array" );\r
-       equals( $(document).add(document).length, 1, "Check duplicated elements" );\r
-       equals( $(window).add(window).length, 1, "Check duplicated elements using the window" );\r
-       ok( $([]).add( document.getElementById('form') ).length >= 13, "Add a form (adds the elements)" );\r
+       equals( jQuery([]).add([window,document,document.body,document]).length, 3, "Pass an array" );\r
+       equals( jQuery(document).add(document).length, 1, "Check duplicated elements" );\r
+       equals( jQuery(window).add(window).length, 1, "Check duplicated elements using the window" );\r
+       ok( jQuery([]).add( document.getElementById('form') ).length >= 13, "Add a form (adds the elements)" );\r
 });\r
 \r
 test("each(Function)", function() {\r
        expect(1);\r
-       var div = $("div");\r
+       var div = jQuery("div");\r
        div.each(function(){this.foo = 'zoo';});\r
        var pass = true;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
@@ -302,8 +299,8 @@ test("each(Function)", function() {
 test("index(Object)", function() {\r
        expect(10);\r
 \r
-       var elements = $([window, document]),\r
-               inputElements = $('#radio1,#radio2,#check1,#check2');\r
+       var elements = jQuery([window, document]),\r
+               inputElements = jQuery('#radio1,#radio2,#check1,#check2');\r
 \r
        equals( elements.index(window), 0, "Check for index of elements" );\r
        equals( elements.index(document), 1, "Check for index of elements" );\r
@@ -321,32 +318,32 @@ test("index(Object)", function() {
 \r
 test("attr(String)", function() {\r
        expect(26);\r
-       equals( $('#text1').attr('value'), "Test", 'Check for value attribute' );\r
-       equals( $('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' );\r
-       equals( $('#text1').attr('type'), "text", 'Check for type attribute' );\r
-       equals( $('#radio1').attr('type'), "radio", 'Check for type attribute' );\r
-       equals( $('#check1').attr('type'), "checkbox", 'Check for type attribute' );\r
-       equals( $('#simon1').attr('rel'), "bookmark", 'Check for rel attribute' );\r
-       equals( $('#google').attr('title'), "Google!", 'Check for title attribute' );\r
-       equals( $('#mark').attr('hreflang'), "en", 'Check for hreflang attribute' );\r
-       equals( $('#en').attr('lang'), "en", 'Check for lang attribute' );\r
-       equals( $('#simon').attr('class'), "blog link", 'Check for class attribute' );\r
-       equals( $('#name').attr('name'), "name", 'Check for name attribute' );\r
-       equals( $('#text1').attr('name'), "action", 'Check for name attribute' );\r
-       ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
-       equals( $('#text1').attr('maxlength'), '30', 'Check for maxlength attribute' );\r
-       equals( $('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' );\r
-       equals( $('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' );\r
-       equals( $('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' );\r
-       equals( $('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' );\r
-       equals( $('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' );\r
-\r
-       $('<a id="tAnchor5"></a>').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path\r
-       equals( $('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' );\r
+       equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' );\r
+       equals( jQuery('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' );\r
+       equals( jQuery('#text1').attr('type'), "text", 'Check for type attribute' );\r
+       equals( jQuery('#radio1').attr('type'), "radio", 'Check for type attribute' );\r
+       equals( jQuery('#check1').attr('type'), "checkbox", 'Check for type attribute' );\r
+       equals( jQuery('#simon1').attr('rel'), "bookmark", 'Check for rel attribute' );\r
+       equals( jQuery('#google').attr('title'), "Google!", 'Check for title attribute' );\r
+       equals( jQuery('#mark').attr('hreflang'), "en", 'Check for hreflang attribute' );\r
+       equals( jQuery('#en').attr('lang'), "en", 'Check for lang attribute' );\r
+       equals( jQuery('#simon').attr('class'), "blog link", 'Check for class attribute' );\r
+       equals( jQuery('#name').attr('name'), "name", 'Check for name attribute' );\r
+       equals( jQuery('#text1').attr('name'), "action", 'Check for name attribute' );\r
+       ok( jQuery('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
+       equals( jQuery('#text1').attr('maxlength'), '30', 'Check for maxlength attribute' );\r
+       equals( jQuery('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' );\r
+       equals( jQuery('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' );\r
+       equals( jQuery('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' );\r
+       equals( jQuery('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' );\r
+       equals( jQuery('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' );\r
+\r
+       jQuery('<a id="tAnchor5"></a>').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path\r
+       equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' );\r
 \r
 \r
        // Related to [5574] and [5683]\r
-       var body = document.body, $body = $(body);\r
+       var body = document.body, $body = jQuery(body);\r
 \r
        ok( $body.attr('foo') === undefined, 'Make sure that a non existent attribute returns undefined' );\r
        ok( $body.attr('nextSibling') === null, 'Make sure a null expando returns null' );\r
@@ -370,9 +367,9 @@ if ( !isLocal ) {
        test("attr(String) in XML Files", function() {\r
                expect(2);\r
                stop();\r
-               $.get("data/dashboard.xml", function(xml) {\r
-                       equals( $("locations", xml).attr("class"), "foo", "Check class attribute in XML document" );\r
-                       equals( $("location", xml).attr("for"), "bar", "Check for attribute in XML document" );\r
+               jQuery.get("data/dashboard.xml", function(xml) {\r
+                       equals( jQuery("locations", xml).attr("class"), "foo", "Check class attribute in XML document" );\r
+                       equals( jQuery("location", xml).attr("for"), "bar", "Check for attribute in XML document" );\r
                        start();\r
                });\r
        });\r
@@ -380,14 +377,14 @@ if ( !isLocal ) {
 \r
 test("attr(String, Function)", function() {\r
        expect(2);\r
-       equals( $('#text1').attr('value', function() { return this.id })[0].value, "text1", "Set value from id" );\r
-       equals( $('#text1').attr('title', function(i) { return i }).attr('title'), "0", "Set value with an index");\r
+       equals( jQuery('#text1').attr('value', function() { return this.id })[0].value, "text1", "Set value from id" );\r
+       equals( jQuery('#text1').attr('title', function(i) { return i }).attr('title'), "0", "Set value with an index");\r
 });\r
 \r
 test("attr(Hash)", function() {\r
        expect(1);\r
        var pass = true;\r
-       $("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){\r
+       jQuery("div").attr({foo: 'baz', zoo: 'ping'}).each(function(){\r
                if ( this.getAttribute('foo') != "baz" && this.getAttribute('zoo') != "ping" ) pass = false;\r
        });\r
        ok( pass, "Set Multiple Attributes" );\r
@@ -395,7 +392,7 @@ test("attr(Hash)", function() {
 \r
 test("attr(String, Object)", function() {\r
        expect(17);\r
-       var div = $("div").attr("foo", "bar");\r
+       var div = jQuery("div").attr("foo", "bar");\r
                fail = false;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
                if ( div.get(i).getAttribute('foo') != "bar" ){\r
@@ -405,33 +402,33 @@ test("attr(String, Object)", function() {
        }\r
        equals( fail, false, "Set Attribute, the #"+fail+" element didn't get the attribute 'foo'" );\r
 \r
-       ok( $("#foo").attr({"width": null}), "Try to set an attribute to nothing" );\r
+       ok( jQuery("#foo").attr({"width": null}), "Try to set an attribute to nothing" );\r
 \r
-       $("#name").attr('name', 'something');\r
-       equals( $("#name").attr('name'), 'something', 'Set name attribute' );\r
-       $("#check2").attr('checked', true);\r
+       jQuery("#name").attr('name', 'something');\r
+       equals( jQuery("#name").attr('name'), 'something', 'Set name attribute' );\r
+       jQuery("#check2").attr('checked', true);\r
        equals( document.getElementById('check2').checked, true, 'Set checked attribute' );\r
-       $("#check2").attr('checked', false);\r
+       jQuery("#check2").attr('checked', false);\r
        equals( document.getElementById('check2').checked, false, 'Set checked attribute' );\r
-       $("#text1").attr('readonly', true);\r
+       jQuery("#text1").attr('readonly', true);\r
        equals( document.getElementById('text1').readOnly, true, 'Set readonly attribute' );\r
-       $("#text1").attr('readonly', false);\r
+       jQuery("#text1").attr('readonly', false);\r
        equals( document.getElementById('text1').readOnly, false, 'Set readonly attribute' );\r
-       $("#name").attr('maxlength', '5');\r
+       jQuery("#name").attr('maxlength', '5');\r
        equals( document.getElementById('name').maxLength, '5', 'Set maxlength attribute' );\r
-       $("#name").attr('maxLength', '10');\r
+       jQuery("#name").attr('maxLength', '10');\r
        equals( document.getElementById('name').maxLength, '10', 'Set maxlength attribute' );\r
 \r
        // for #1070\r
-       $("#name").attr('someAttr', '0');\r
-       equals( $("#name").attr('someAttr'), '0', 'Set attribute to a string of "0"' );\r
-       $("#name").attr('someAttr', 0);\r
-       equals( $("#name").attr('someAttr'), 0, 'Set attribute to the number 0' );\r
-       $("#name").attr('someAttr', 1);\r
-       equals( $("#name").attr('someAttr'), 1, 'Set attribute to the number 1' );\r
+       jQuery("#name").attr('someAttr', '0');\r
+       equals( jQuery("#name").attr('someAttr'), '0', 'Set attribute to a string of "0"' );\r
+       jQuery("#name").attr('someAttr', 0);\r
+       equals( jQuery("#name").attr('someAttr'), 0, 'Set attribute to the number 0' );\r
+       jQuery("#name").attr('someAttr', 1);\r
+       equals( jQuery("#name").attr('someAttr'), 1, 'Set attribute to the number 1' );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
 \r
        j.attr("name", "attrvalue");\r
        equals( j.attr("name"), "attrvalue", "Check node,textnode,comment for attr" );\r
@@ -439,35 +436,35 @@ test("attr(String, Object)", function() {
 \r
        reset();\r
 \r
-       var type = $("#check2").attr('type');\r
+       var type = jQuery("#check2").attr('type');\r
        var thrown = false;\r
        try {\r
-               $("#check2").attr('type','hidden');\r
+               jQuery("#check2").attr('type','hidden');\r
        } catch(e) {\r
                thrown = true;\r
        }\r
        ok( thrown, "Exception thrown when trying to change type property" );\r
-       equals( type, $("#check2").attr('type'), "Verify that you can't change the type of an input element" );\r
+       equals( type, jQuery("#check2").attr('type'), "Verify that you can't change the type of an input element" );\r
 \r
        var check = document.createElement("input");\r
        var thrown = true;\r
        try {\r
-               $(check).attr('type','checkbox');\r
+               jQuery(check).attr('type','checkbox');\r
        } catch(e) {\r
                thrown = false;\r
        }\r
        ok( thrown, "Exception thrown when trying to change type property" );\r
-       equals( "checkbox", $(check).attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" );\r
+       equals( "checkbox", jQuery(check).attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" );\r
 });\r
 \r
 if ( !isLocal ) {\r
        test("attr(String, Object) - Loaded via XML document", function() {\r
                expect(2);\r
                stop();\r
-               $.get('data/dashboard.xml', function(xml) {\r
+               jQuery.get('data/dashboard.xml', function(xml) {\r
                        var titles = [];\r
-                       $('tab', xml).each(function() {\r
-                               titles.push($(this).attr('title'));\r
+                       jQuery('tab', xml).each(function() {\r
+                               titles.push(jQuery(this).attr('title'));\r
                        });\r
                        equals( titles[0], 'Location', 'attr() in XML context: Check first title' );\r
                        equals( titles[1], 'Users', 'attr() in XML context: Check second title' );\r
@@ -479,90 +476,90 @@ if ( !isLocal ) {
 test("css(String|Hash)", function() {\r
        expect(19);\r
 \r
-       equals( $('#main').css("display"), 'none', 'Check for css property "display"');\r
-\r
-       ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');\r
-       $('#foo').css({display: 'none'});\r
-       ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');\r
-       $('#foo').css({display: 'block'});\r
-       ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible');\r
-\r
-       $('#floatTest').css({styleFloat: 'right'});\r
-       equals( $('#floatTest').css('styleFloat'), 'right', 'Modified CSS float using "styleFloat": Assert float is right');\r
-       $('#floatTest').css({cssFloat: 'left'});\r
-       equals( $('#floatTest').css('cssFloat'), 'left', 'Modified CSS float using "cssFloat": Assert float is left');\r
-       $('#floatTest').css({'float': 'right'});\r
-       equals( $('#floatTest').css('float'), 'right', 'Modified CSS float using "float": Assert float is right');\r
-       $('#floatTest').css({'font-size': '30px'});\r
-       equals( $('#floatTest').css('font-size'), '30px', 'Modified CSS font-size: Assert font-size is 30px');\r
-\r
-       $.each("0,0.25,0.5,0.75,1".split(','), function(i, n) {\r
-               $('#foo').css({opacity: n});\r
-               equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" );\r
-               $('#foo').css({opacity: parseFloat(n)});\r
-               equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" );\r
+       equals( jQuery('#main').css("display"), 'none', 'Check for css property "display"');\r
+\r
+       ok( jQuery('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');\r
+       jQuery('#foo').css({display: 'none'});\r
+       ok( !jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');\r
+       jQuery('#foo').css({display: 'block'});\r
+       ok( jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is visible');\r
+\r
+       jQuery('#floatTest').css({styleFloat: 'right'});\r
+       equals( jQuery('#floatTest').css('styleFloat'), 'right', 'Modified CSS float using "styleFloat": Assert float is right');\r
+       jQuery('#floatTest').css({cssFloat: 'left'});\r
+       equals( jQuery('#floatTest').css('cssFloat'), 'left', 'Modified CSS float using "cssFloat": Assert float is left');\r
+       jQuery('#floatTest').css({'float': 'right'});\r
+       equals( jQuery('#floatTest').css('float'), 'right', 'Modified CSS float using "float": Assert float is right');\r
+       jQuery('#floatTest').css({'font-size': '30px'});\r
+       equals( jQuery('#floatTest').css('font-size'), '30px', 'Modified CSS font-size: Assert font-size is 30px');\r
+\r
+       jQuery.each("0,0.25,0.5,0.75,1".split(','), function(i, n) {\r
+               jQuery('#foo').css({opacity: n});\r
+               equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" );\r
+               jQuery('#foo').css({opacity: parseFloat(n)});\r
+               equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" );\r
        });\r
-       $('#foo').css({opacity: ''});\r
-       equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" );\r
+       jQuery('#foo').css({opacity: ''});\r
+       equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" );\r
 });\r
 \r
 test("css(String, Object)", function() {\r
        expect(21);\r
-       ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');\r
-       $('#foo').css('display', 'none');\r
-       ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');\r
-       $('#foo').css('display', 'block');\r
-       ok( $('#foo').is(':visible'), 'Modified CSS display: Assert element is visible');\r
-\r
-       $('#floatTest').css('styleFloat', 'left');\r
-       equals( $('#floatTest').css('styleFloat'), 'left', 'Modified CSS float using "styleFloat": Assert float is left');\r
-       $('#floatTest').css('cssFloat', 'right');\r
-       equals( $('#floatTest').css('cssFloat'), 'right', 'Modified CSS float using "cssFloat": Assert float is right');\r
-       $('#floatTest').css('float', 'left');\r
-       equals( $('#floatTest').css('float'), 'left', 'Modified CSS float using "float": Assert float is left');\r
-       $('#floatTest').css('font-size', '20px');\r
-       equals( $('#floatTest').css('font-size'), '20px', 'Modified CSS font-size: Assert font-size is 20px');\r
-\r
-       $.each("0,0.25,0.5,0.75,1".split(','), function(i, n) {\r
-               $('#foo').css('opacity', n);\r
-               equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" );\r
-               $('#foo').css('opacity', parseFloat(n));\r
-               equals( $('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" );\r
+       ok( jQuery('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');\r
+       jQuery('#foo').css('display', 'none');\r
+       ok( !jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');\r
+       jQuery('#foo').css('display', 'block');\r
+       ok( jQuery('#foo').is(':visible'), 'Modified CSS display: Assert element is visible');\r
+\r
+       jQuery('#floatTest').css('styleFloat', 'left');\r
+       equals( jQuery('#floatTest').css('styleFloat'), 'left', 'Modified CSS float using "styleFloat": Assert float is left');\r
+       jQuery('#floatTest').css('cssFloat', 'right');\r
+       equals( jQuery('#floatTest').css('cssFloat'), 'right', 'Modified CSS float using "cssFloat": Assert float is right');\r
+       jQuery('#floatTest').css('float', 'left');\r
+       equals( jQuery('#floatTest').css('float'), 'left', 'Modified CSS float using "float": Assert float is left');\r
+       jQuery('#floatTest').css('font-size', '20px');\r
+       equals( jQuery('#floatTest').css('font-size'), '20px', 'Modified CSS font-size: Assert font-size is 20px');\r
+\r
+       jQuery.each("0,0.25,0.5,0.75,1".split(','), function(i, n) {\r
+               jQuery('#foo').css('opacity', n);\r
+               equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a String" );\r
+               jQuery('#foo').css('opacity', parseFloat(n));\r
+               equals( jQuery('#foo').css('opacity'), parseFloat(n), "Assert opacity is " + parseFloat(n) + " as a Number" );\r
        });\r
-       $('#foo').css('opacity', '');\r
-       equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" );\r
+       jQuery('#foo').css('opacity', '');\r
+       equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when set to an empty String" );\r
        // for #1438, IE throws JS error when filter exists but doesn't have opacity in it\r
        if (jQuery.browser.msie) {\r
-               $('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');");\r
+               jQuery('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');");\r
        }\r
-       equals( $('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" );\r
+       equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.css("padding-left", "1px");\r
        equals( j.css("padding-left"), "1px", "Check node,textnode,comment css works" );\r
 \r
        // opera sometimes doesn't update 'display' correctly, see #2037\r
-       $("#t2037")[0].innerHTML = $("#t2037")[0].innerHTML\r
-       equals( $("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" );\r
+       jQuery("#t2037")[0].innerHTML = jQuery("#t2037")[0].innerHTML\r
+       equals( jQuery("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" );\r
 });\r
 \r
 test("jQuery.css(elem, 'height') doesn't clear radio buttons (bug #1095)", function () {\r
        expect(4);\r
 \r
-       var $checkedtest = $("#checkedtest");\r
+       var $checkedtest = jQuery("#checkedtest");\r
        // IE6 was clearing "checked" in jQuery.css(elem, "height");\r
        jQuery.css($checkedtest[0], "height");\r
-       ok( !! $(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." );\r
-       ok( ! $(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." );\r
-       ok( !! $(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." );\r
-       ok( ! $(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." );\r
+       ok( !! jQuery(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." );\r
+       ok( ! jQuery(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." );\r
+       ok( !! jQuery(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." );\r
+       ok( ! jQuery(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." );\r
 });\r
 \r
 test("width()", function() {\r
        expect(9);\r
 \r
-       var $div = $("#nothiddendiv");\r
+       var $div = jQuery("#nothiddendiv");\r
        $div.width(30);\r
        equals($div.width(), 30, "Test set to 30 correctly");\r
        $div.width(-1); // handle negative numbers by ignoring #1599\r
@@ -582,15 +579,15 @@ test("width()", function() {
 \r
        $div.css({ display: "", border: "", padding: "" });\r
 \r
-       $("#nothiddendivchild").css({ padding: "3px", border: "2px solid #fff" });\r
-       equals($("#nothiddendivchild").width(), 20, "Test child width with border and padding");\r
-       $("#nothiddendiv, #nothiddendivchild").css({ border: "", padding: "", width: "" });\r
+       jQuery("#nothiddendivchild").css({ padding: "3px", border: "2px solid #fff" });\r
+       equals(jQuery("#nothiddendivchild").width(), 20, "Test child width with border and padding");\r
+       jQuery("#nothiddendiv, #nothiddendivchild").css({ border: "", padding: "", width: "" });\r
 });\r
 \r
 test("height()", function() {\r
        expect(8);\r
 \r
-       var $div = $("#nothiddendiv");\r
+       var $div = jQuery("#nothiddendiv");\r
        $div.height(30);\r
        equals($div.height(), 30, "Test set to 30 correctly");\r
        $div.height(-1); // handle negative numbers by ignoring #1599\r
@@ -614,116 +611,116 @@ test("height()", function() {
 test("text()", function() {\r
        expect(1);\r
        var expected = "This link has class=\"blog\": Simon Willison's Weblog";\r
-       equals( $('#sap').text(), expected, 'Check for merged text of more then one element.' );\r
+       equals( jQuery('#sap').text(), expected, 'Check for merged text of more then one element.' );\r
 });\r
 \r
 test("wrap(String|Element)", function() {\r
        expect(8);\r
        var defaultText = 'Try them out:'\r
-       var result = $('#first').wrap('<div class="red"><span></span></div>').text();\r
+       var result = jQuery('#first').wrap('<div class="red"><span></span></div>').text();\r
        equals( defaultText, result, 'Check for wrapping of on-the-fly html' );\r
-       ok( $('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' );\r
+       ok( jQuery('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' );\r
 \r
        reset();\r
        var defaultText = 'Try them out:'\r
-       var result = $('#first').wrap(document.getElementById('empty')).parent();\r
+       var result = jQuery('#first').wrap(document.getElementById('empty')).parent();\r
        ok( result.is('ol'), 'Check for element wrapping' );\r
        equals( result.text(), defaultText, 'Check for element wrapping' );\r
 \r
        reset();\r
-       $('#check1').click(function() {\r
+       jQuery('#check1').click(function() {\r
                var checkbox = this;\r
                ok( checkbox.checked, "Checkbox's state is erased after wrap() action, see #769" );\r
-               $(checkbox).wrap( '<div id="c1" style="display:none;"></div>' );\r
+               jQuery(checkbox).wrap( '<div id="c1" style="display:none;"></div>' );\r
                ok( checkbox.checked, "Checkbox's state is erased after wrap() action, see #769" );\r
        }).click();\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.wrap("<i></i>");\r
-       equals( $("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" );\r
-       equals( $("#nonnodes > i").text(), j.text() + j[1].nodeValue, "Check node,textnode,comment wraps doesn't hurt text" );\r
+       equals( jQuery("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" );\r
+       equals( jQuery("#nonnodes > i").text(), j.text() + j[1].nodeValue, "Check node,textnode,comment wraps doesn't hurt text" );\r
 });\r
 \r
 test("wrapAll(String|Element)", function() {\r
        expect(8);\r
-       var prev = $("#first")[0].previousSibling;\r
-       var p = $("#first")[0].parentNode;\r
-       var result = $('#first,#firstp').wrapAll('<div class="red"><div id="tmp"></div></div>');\r
+       var prev = jQuery("#first")[0].previousSibling;\r
+       var p = jQuery("#first")[0].parentNode;\r
+       var result = jQuery('#first,#firstp').wrapAll('<div class="red"><div id="tmp"></div></div>');\r
        equals( result.parent().length, 1, 'Check for wrapping of on-the-fly html' );\r
-       ok( $('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' );\r
-       ok( $('#firstp').parent().parent().is('.red'), 'Check if wrapper has class "red"' );\r
-       equals( $("#first").parent().parent()[0].previousSibling, prev, "Correct Previous Sibling" );\r
-       equals( $("#first").parent().parent()[0].parentNode, p, "Correct Parent" );\r
+       ok( jQuery('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' );\r
+       ok( jQuery('#firstp').parent().parent().is('.red'), 'Check if wrapper has class "red"' );\r
+       equals( jQuery("#first").parent().parent()[0].previousSibling, prev, "Correct Previous Sibling" );\r
+       equals( jQuery("#first").parent().parent()[0].parentNode, p, "Correct Parent" );\r
 \r
        reset();\r
-       var prev = $("#first")[0].previousSibling;\r
-       var p = $("#first")[0].parentNode;\r
-       var result = $('#first,#firstp').wrapAll(document.getElementById('empty'));\r
-       equals( $("#first").parent()[0], $("#firstp").parent()[0], "Same Parent" );\r
-       equals( $("#first").parent()[0].previousSibling, prev, "Correct Previous Sibling" );\r
-       equals( $("#first").parent()[0].parentNode, p, "Correct Parent" );\r
+       var prev = jQuery("#first")[0].previousSibling;\r
+       var p = jQuery("#first")[0].parentNode;\r
+       var result = jQuery('#first,#firstp').wrapAll(document.getElementById('empty'));\r
+       equals( jQuery("#first").parent()[0], jQuery("#firstp").parent()[0], "Same Parent" );\r
+       equals( jQuery("#first").parent()[0].previousSibling, prev, "Correct Previous Sibling" );\r
+       equals( jQuery("#first").parent()[0].parentNode, p, "Correct Parent" );\r
 });\r
 \r
 test("wrapInner(String|Element)", function() {\r
        expect(6);\r
-       var num = $("#first").children().length;\r
-       var result = $('#first').wrapInner('<div class="red"><div id="tmp"></div></div>');\r
-       equals( $("#first").children().length, 1, "Only one child" );\r
-       ok( $("#first").children().is(".red"), "Verify Right Element" );\r
-       equals( $("#first").children().children().children().length, num, "Verify Elements Intact" );\r
+       var num = jQuery("#first").children().length;\r
+       var result = jQuery('#first').wrapInner('<div class="red"><div id="tmp"></div></div>');\r
+       equals( jQuery("#first").children().length, 1, "Only one child" );\r
+       ok( jQuery("#first").children().is(".red"), "Verify Right Element" );\r
+       equals( jQuery("#first").children().children().children().length, num, "Verify Elements Intact" );\r
 \r
        reset();\r
-       var num = $("#first").children().length;\r
-       var result = $('#first').wrapInner(document.getElementById('empty'));\r
-       equals( $("#first").children().length, 1, "Only one child" );\r
-       ok( $("#first").children().is("#empty"), "Verify Right Element" );\r
-       equals( $("#first").children().children().length, num, "Verify Elements Intact" );\r
+       var num = jQuery("#first").children().length;\r
+       var result = jQuery('#first').wrapInner(document.getElementById('empty'));\r
+       equals( jQuery("#first").children().length, 1, "Only one child" );\r
+       ok( jQuery("#first").children().is("#empty"), "Verify Right Element" );\r
+       equals( jQuery("#first").children().children().length, num, "Verify Elements Intact" );\r
 });\r
 \r
 test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(21);\r
        var defaultText = 'Try them out:'\r
-       var result = $('#first').append('<b>buga</b>');\r
+       var result = jQuery('#first').append('<b>buga</b>');\r
        equals( result.text(), defaultText + 'buga', 'Check if text appending works' );\r
-       equals( $('#select3').append('<option value="appendTest">Append Test</option>').find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element');\r
+       equals( jQuery('#select3').append('<option value="appendTest">Append Test</option>').find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element');\r
 \r
        reset();\r
        var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";\r
-       $('#sap').append(document.getElementById('first'));\r
-       equals( expected, $('#sap').text(), "Check for appending of element" );\r
+       jQuery('#sap').append(document.getElementById('first'));\r
+       equals( expected, jQuery('#sap').text(), "Check for appending of element" );\r
 \r
        reset();\r
        expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";\r
-       $('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]);\r
-       equals( expected, $('#sap').text(), "Check for appending of array of elements" );\r
+       jQuery('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]);\r
+       equals( expected, jQuery('#sap').text(), "Check for appending of array of elements" );\r
 \r
        reset();\r
        expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";\r
-       $('#sap').append($("#first, #yahoo"));\r
-       equals( expected, $('#sap').text(), "Check for appending of jQuery object" );\r
+       jQuery('#sap').append(jQuery("#first, #yahoo"));\r
+       equals( expected, jQuery('#sap').text(), "Check for appending of jQuery object" );\r
 \r
        reset();\r
-       $("#sap").append( 5 );\r
-       ok( $("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );\r
+       jQuery("#sap").append( 5 );\r
+       ok( jQuery("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );\r
 \r
        reset();\r
-       $("#sap").append( " text with spaces " );\r
-       ok( $("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" );\r
+       jQuery("#sap").append( " text with spaces " );\r
+       ok( jQuery("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" );\r
 \r
        reset();\r
-       ok( $("#sap").append([]), "Check for appending an empty array." );\r
-       ok( $("#sap").append(""), "Check for appending an empty string." );\r
-       ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );\r
+       ok( jQuery("#sap").append([]), "Check for appending an empty array." );\r
+       ok( jQuery("#sap").append(""), "Check for appending an empty string." );\r
+       ok( jQuery("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );\r
 \r
        reset();\r
-       $("#sap").append(document.getElementById('form'));\r
-       equals( $("#sap>form").size(), 1, "Check for appending a form" ); // Bug #910\r
+       jQuery("#sap").append(document.getElementById('form'));\r
+       equals( jQuery("#sap>form").size(), 1, "Check for appending a form" ); // Bug #910\r
 \r
        reset();\r
        var pass = true;\r
        try {\r
-               $( $("#iframe")[0].contentWindow.document.body ).append("<div>test</div>");\r
+               jQuery( jQuery("#iframe")[0].contentWindow.document.body ).append("<div>test</div>");\r
        } catch(e) {\r
                pass = false;\r
        }\r
@@ -731,115 +728,115 @@ test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
        ok( pass, "Test for appending a DOM node to the contents of an IFrame" );\r
 \r
        reset();\r
-       $('<fieldset/>').appendTo('#form').append('<legend id="legend">test</legend>');\r
+       jQuery('<fieldset/>').appendTo('#form').append('<legend id="legend">test</legend>');\r
        t( 'Append legend', '#legend', ['legend'] );\r
 \r
        reset();\r
-       $('#select1').append('<OPTION>Test</OPTION>');\r
-       equals( $('#select1 option:last').text(), "Test", "Appending &lt;OPTION&gt; (all caps)" );\r
+       jQuery('#select1').append('<OPTION>Test</OPTION>');\r
+       equals( jQuery('#select1 option:last').text(), "Test", "Appending &lt;OPTION&gt; (all caps)" );\r
 \r
-       $('#table').append('<colgroup></colgroup>');\r
-       ok( $('#table colgroup').length, "Append colgroup" );\r
+       jQuery('#table').append('<colgroup></colgroup>');\r
+       ok( jQuery('#table colgroup').length, "Append colgroup" );\r
 \r
-       $('#table colgroup').append('<col/>');\r
-       ok( $('#table colgroup col').length, "Append col" );\r
+       jQuery('#table colgroup').append('<col/>');\r
+       ok( jQuery('#table colgroup col').length, "Append col" );\r
 \r
        reset();\r
-       $('#table').append('<caption></caption>');\r
-       ok( $('#table caption').length, "Append caption" );\r
+       jQuery('#table').append('<caption></caption>');\r
+       ok( jQuery('#table caption').length, "Append caption" );\r
 \r
        reset();\r
-       $('form:last')\r
+       jQuery('form:last')\r
                .append('<select id="appendSelect1"></select>')\r
                .append('<select id="appendSelect2"><option>Test</option></select>');\r
 \r
        t( "Append Select", "#appendSelect1, #appendSelect2", ["appendSelect1", "appendSelect2"] );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
-       var d = $("<div/>").appendTo("#nonnodes").append(j);\r
-       equals( $("#nonnodes").length, 1, "Check node,textnode,comment append moved leaving just the div" );\r
+       var j = jQuery("#nonnodes").contents();\r
+       var d = jQuery("<div/>").appendTo("#nonnodes").append(j);\r
+       equals( jQuery("#nonnodes").length, 1, "Check node,textnode,comment append moved leaving just the div" );\r
        ok( d.contents().length >= 2, "Check node,textnode,comment append works" );\r
        d.contents().appendTo("#nonnodes");\r
        d.remove();\r
-       ok( $("#nonnodes").contents().length >= 2, "Check node,textnode,comment append cleanup worked" );\r
+       ok( jQuery("#nonnodes").contents().length >= 2, "Check node,textnode,comment append cleanup worked" );\r
 });\r
 \r
 test("appendTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(6);\r
        var defaultText = 'Try them out:'\r
-       $('<b>buga</b>').appendTo('#first');\r
-       equals( $("#first").text(), defaultText + 'buga', 'Check if text appending works' );\r
-       equals( $('<option value="appendTest">Append Test</option>').appendTo('#select3').parent().find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element');\r
+       jQuery('<b>buga</b>').appendTo('#first');\r
+       equals( jQuery("#first").text(), defaultText + 'buga', 'Check if text appending works' );\r
+       equals( jQuery('<option value="appendTest">Append Test</option>').appendTo('#select3').parent().find('option:last-child').attr('value'), 'appendTest', 'Appending html options to select element');\r
 \r
        reset();\r
        var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";\r
-       $(document.getElementById('first')).appendTo('#sap');\r
-       equals( expected, $('#sap').text(), "Check for appending of element" );\r
+       jQuery(document.getElementById('first')).appendTo('#sap');\r
+       equals( expected, jQuery('#sap').text(), "Check for appending of element" );\r
 \r
        reset();\r
        expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";\r
-       $([document.getElementById('first'), document.getElementById('yahoo')]).appendTo('#sap');\r
-       equals( expected, $('#sap').text(), "Check for appending of array of elements" );\r
+       jQuery([document.getElementById('first'), document.getElementById('yahoo')]).appendTo('#sap');\r
+       equals( expected, jQuery('#sap').text(), "Check for appending of array of elements" );\r
 \r
        reset();\r
        expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";\r
-       $("#first, #yahoo").appendTo('#sap');\r
-       equals( expected, $('#sap').text(), "Check for appending of jQuery object" );\r
+       jQuery("#first, #yahoo").appendTo('#sap');\r
+       equals( expected, jQuery('#sap').text(), "Check for appending of jQuery object" );\r
 \r
        reset();\r
-       $('#select1').appendTo('#foo');\r
+       jQuery('#select1').appendTo('#foo');\r
        t( 'Append select', '#foo select', ['select1'] );\r
 });\r
 \r
 test("prepend(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(5);\r
        var defaultText = 'Try them out:'\r
-       var result = $('#first').prepend('<b>buga</b>');\r
+       var result = jQuery('#first').prepend('<b>buga</b>');\r
        equals( result.text(), 'buga' + defaultText, 'Check if text prepending works' );\r
-       equals( $('#select3').prepend('<option value="prependTest">Prepend Test</option>').find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element');\r
+       equals( jQuery('#select3').prepend('<option value="prependTest">Prepend Test</option>').find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element');\r
 \r
        reset();\r
        var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";\r
-       $('#sap').prepend(document.getElementById('first'));\r
-       equals( expected, $('#sap').text(), "Check for prepending of element" );\r
+       jQuery('#sap').prepend(document.getElementById('first'));\r
+       equals( expected, jQuery('#sap').text(), "Check for prepending of element" );\r
 \r
        reset();\r
        expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";\r
-       $('#sap').prepend([document.getElementById('first'), document.getElementById('yahoo')]);\r
-       equals( expected, $('#sap').text(), "Check for prepending of array of elements" );\r
+       jQuery('#sap').prepend([document.getElementById('first'), document.getElementById('yahoo')]);\r
+       equals( expected, jQuery('#sap').text(), "Check for prepending of array of elements" );\r
 \r
        reset();\r
        expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";\r
-       $('#sap').prepend($("#first, #yahoo"));\r
-       equals( expected, $('#sap').text(), "Check for prepending of jQuery object" );\r
+       jQuery('#sap').prepend(jQuery("#first, #yahoo"));\r
+       equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" );\r
 });\r
 \r
 test("prependTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(6);\r
        var defaultText = 'Try them out:'\r
-       $('<b>buga</b>').prependTo('#first');\r
-       equals( $('#first').text(), 'buga' + defaultText, 'Check if text prepending works' );\r
-       equals( $('<option value="prependTest">Prepend Test</option>').prependTo('#select3').parent().find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element');\r
+       jQuery('<b>buga</b>').prependTo('#first');\r
+       equals( jQuery('#first').text(), 'buga' + defaultText, 'Check if text prepending works' );\r
+       equals( jQuery('<option value="prependTest">Prepend Test</option>').prependTo('#select3').parent().find('option:first-child').attr('value'), 'prependTest', 'Prepending html options to select element');\r
 \r
        reset();\r
        var expected = "Try them out:This link has class=\"blog\": Simon Willison's Weblog";\r
-       $(document.getElementById('first')).prependTo('#sap');\r
-       equals( expected, $('#sap').text(), "Check for prepending of element" );\r
+       jQuery(document.getElementById('first')).prependTo('#sap');\r
+       equals( expected, jQuery('#sap').text(), "Check for prepending of element" );\r
 \r
        reset();\r
        expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";\r
-       $([document.getElementById('yahoo'), document.getElementById('first')]).prependTo('#sap');\r
-       equals( expected, $('#sap').text(), "Check for prepending of array of elements" );\r
+       jQuery([document.getElementById('yahoo'), document.getElementById('first')]).prependTo('#sap');\r
+       equals( expected, jQuery('#sap').text(), "Check for prepending of array of elements" );\r
 \r
        reset();\r
        expected = "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog";\r
-       $("#yahoo, #first").prependTo('#sap');\r
-       equals( expected, $('#sap').text(), "Check for prepending of jQuery object" );\r
+       jQuery("#yahoo, #first").prependTo('#sap');\r
+       equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" );\r
 \r
        reset();\r
-       $('<select id="prependSelect1"></select>').prependTo('form:last');\r
-       $('<select id="prependSelect2"><option>Test</option></select>').prependTo('form:last');\r
+       jQuery('<select id="prependSelect1"></select>').prependTo('form:last');\r
+       jQuery('<select id="prependSelect2"><option>Test</option></select>').prependTo('form:last');\r
 \r
        t( "Prepend Select", "#prependSelect1, #prependSelect2", ["prependSelect1", "prependSelect2"] );\r
 });\r
@@ -847,164 +844,164 @@ test("prependTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
 test("before(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(4);\r
        var expected = 'This is a normal link: bugaYahoo';\r
-       $('#yahoo').before('<b>buga</b>');\r
-       equals( expected, $('#en').text(), 'Insert String before' );\r
+       jQuery('#yahoo').before('<b>buga</b>');\r
+       equals( expected, jQuery('#en').text(), 'Insert String before' );\r
 \r
        reset();\r
        expected = "This is a normal link: Try them out:Yahoo";\r
-       $('#yahoo').before(document.getElementById('first'));\r
-       equals( expected, $('#en').text(), "Insert element before" );\r
+       jQuery('#yahoo').before(document.getElementById('first'));\r
+       equals( expected, jQuery('#en').text(), "Insert element before" );\r
 \r
        reset();\r
        expected = "This is a normal link: Try them out:diveintomarkYahoo";\r
-       $('#yahoo').before([document.getElementById('first'), document.getElementById('mark')]);\r
-       equals( expected, $('#en').text(), "Insert array of elements before" );\r
+       jQuery('#yahoo').before([document.getElementById('first'), document.getElementById('mark')]);\r
+       equals( expected, jQuery('#en').text(), "Insert array of elements before" );\r
 \r
        reset();\r
        expected = "This is a normal link: Try them out:diveintomarkYahoo";\r
-       $('#yahoo').before($("#first, #mark"));\r
-       equals( expected, $('#en').text(), "Insert jQuery before" );\r
+       jQuery('#yahoo').before(jQuery("#first, #mark"));\r
+       equals( expected, jQuery('#en').text(), "Insert jQuery before" );\r
 });\r
 \r
 test("insertBefore(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(4);\r
        var expected = 'This is a normal link: bugaYahoo';\r
-       $('<b>buga</b>').insertBefore('#yahoo');\r
-       equals( expected, $('#en').text(), 'Insert String before' );\r
+       jQuery('<b>buga</b>').insertBefore('#yahoo');\r
+       equals( expected, jQuery('#en').text(), 'Insert String before' );\r
 \r
        reset();\r
        expected = "This is a normal link: Try them out:Yahoo";\r
-       $(document.getElementById('first')).insertBefore('#yahoo');\r
-       equals( expected, $('#en').text(), "Insert element before" );\r
+       jQuery(document.getElementById('first')).insertBefore('#yahoo');\r
+       equals( expected, jQuery('#en').text(), "Insert element before" );\r
 \r
        reset();\r
        expected = "This is a normal link: Try them out:diveintomarkYahoo";\r
-       $([document.getElementById('first'), document.getElementById('mark')]).insertBefore('#yahoo');\r
-       equals( expected, $('#en').text(), "Insert array of elements before" );\r
+       jQuery([document.getElementById('first'), document.getElementById('mark')]).insertBefore('#yahoo');\r
+       equals( expected, jQuery('#en').text(), "Insert array of elements before" );\r
 \r
        reset();\r
        expected = "This is a normal link: Try them out:diveintomarkYahoo";\r
-       $("#first, #mark").insertBefore('#yahoo');\r
-       equals( expected, $('#en').text(), "Insert jQuery before" );\r
+       jQuery("#first, #mark").insertBefore('#yahoo');\r
+       equals( expected, jQuery('#en').text(), "Insert jQuery before" );\r
 });\r
 \r
 test("after(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(4);\r
        var expected = 'This is a normal link: Yahoobuga';\r
-       $('#yahoo').after('<b>buga</b>');\r
-       equals( expected, $('#en').text(), 'Insert String after' );\r
+       jQuery('#yahoo').after('<b>buga</b>');\r
+       equals( expected, jQuery('#en').text(), 'Insert String after' );\r
 \r
        reset();\r
        expected = "This is a normal link: YahooTry them out:";\r
-       $('#yahoo').after(document.getElementById('first'));\r
-       equals( expected, $('#en').text(), "Insert element after" );\r
+       jQuery('#yahoo').after(document.getElementById('first'));\r
+       equals( expected, jQuery('#en').text(), "Insert element after" );\r
 \r
        reset();\r
        expected = "This is a normal link: YahooTry them out:diveintomark";\r
-       $('#yahoo').after([document.getElementById('first'), document.getElementById('mark')]);\r
-       equals( expected, $('#en').text(), "Insert array of elements after" );\r
+       jQuery('#yahoo').after([document.getElementById('first'), document.getElementById('mark')]);\r
+       equals( expected, jQuery('#en').text(), "Insert array of elements after" );\r
 \r
        reset();\r
        expected = "This is a normal link: YahooTry them out:diveintomark";\r
-       $('#yahoo').after($("#first, #mark"));\r
-       equals( expected, $('#en').text(), "Insert jQuery after" );\r
+       jQuery('#yahoo').after(jQuery("#first, #mark"));\r
+       equals( expected, jQuery('#en').text(), "Insert jQuery after" );\r
 });\r
 \r
 test("insertAfter(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(4);\r
        var expected = 'This is a normal link: Yahoobuga';\r
-       $('<b>buga</b>').insertAfter('#yahoo');\r
-       equals( expected, $('#en').text(), 'Insert String after' );\r
+       jQuery('<b>buga</b>').insertAfter('#yahoo');\r
+       equals( expected, jQuery('#en').text(), 'Insert String after' );\r
 \r
        reset();\r
        expected = "This is a normal link: YahooTry them out:";\r
-       $(document.getElementById('first')).insertAfter('#yahoo');\r
-       equals( expected, $('#en').text(), "Insert element after" );\r
+       jQuery(document.getElementById('first')).insertAfter('#yahoo');\r
+       equals( expected, jQuery('#en').text(), "Insert element after" );\r
 \r
        reset();\r
        expected = "This is a normal link: YahooTry them out:diveintomark";\r
-       $([document.getElementById('mark'), document.getElementById('first')]).insertAfter('#yahoo');\r
-       equals( expected, $('#en').text(), "Insert array of elements after" );\r
+       jQuery([document.getElementById('mark'), document.getElementById('first')]).insertAfter('#yahoo');\r
+       equals( expected, jQuery('#en').text(), "Insert array of elements after" );\r
 \r
        reset();\r
        expected = "This is a normal link: YahooTry them out:diveintomark";\r
-       $("#mark, #first").insertAfter('#yahoo');\r
-       equals( expected, $('#en').text(), "Insert jQuery after" );\r
+       jQuery("#mark, #first").insertAfter('#yahoo');\r
+       equals( expected, jQuery('#en').text(), "Insert jQuery after" );\r
 });\r
 \r
 test("replaceWith(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(10);\r
-       $('#yahoo').replaceWith('<b id="replace">buga</b>');\r
-       ok( $("#replace")[0], 'Replace element with string' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after string' );\r
+       jQuery('#yahoo').replaceWith('<b id="replace">buga</b>');\r
+       ok( jQuery("#replace")[0], 'Replace element with string' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' );\r
 \r
        reset();\r
-       $('#yahoo').replaceWith(document.getElementById('first'));\r
-       ok( $("#first")[0], 'Replace element with element' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after element' );\r
+       jQuery('#yahoo').replaceWith(document.getElementById('first'));\r
+       ok( jQuery("#first")[0], 'Replace element with element' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after element' );\r
 \r
        reset();\r
-       $('#yahoo').replaceWith([document.getElementById('first'), document.getElementById('mark')]);\r
-       ok( $("#first")[0], 'Replace element with array of elements' );\r
-       ok( $("#mark")[0], 'Replace element with array of elements' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after array of elements' );\r
+       jQuery('#yahoo').replaceWith([document.getElementById('first'), document.getElementById('mark')]);\r
+       ok( jQuery("#first")[0], 'Replace element with array of elements' );\r
+       ok( jQuery("#mark")[0], 'Replace element with array of elements' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after array of elements' );\r
 \r
        reset();\r
-       $('#yahoo').replaceWith($("#first, #mark"));\r
-       ok( $("#first")[0], 'Replace element with set of elements' );\r
-       ok( $("#mark")[0], 'Replace element with set of elements' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after set of elements' );\r
+       jQuery('#yahoo').replaceWith(jQuery("#first, #mark"));\r
+       ok( jQuery("#first")[0], 'Replace element with set of elements' );\r
+       ok( jQuery("#mark")[0], 'Replace element with set of elements' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after set of elements' );\r
 });\r
 \r
 test("replaceAll(String|Element|Array&lt;Element&gt;|jQuery)", function() {\r
        expect(10);\r
-       $('<b id="replace">buga</b>').replaceAll("#yahoo");\r
-       ok( $("#replace")[0], 'Replace element with string' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after string' );\r
+       jQuery('<b id="replace">buga</b>').replaceAll("#yahoo");\r
+       ok( jQuery("#replace")[0], 'Replace element with string' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' );\r
 \r
        reset();\r
-       $(document.getElementById('first')).replaceAll("#yahoo");\r
-       ok( $("#first")[0], 'Replace element with element' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after element' );\r
+       jQuery(document.getElementById('first')).replaceAll("#yahoo");\r
+       ok( jQuery("#first")[0], 'Replace element with element' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after element' );\r
 \r
        reset();\r
-       $([document.getElementById('first'), document.getElementById('mark')]).replaceAll("#yahoo");\r
-       ok( $("#first")[0], 'Replace element with array of elements' );\r
-       ok( $("#mark")[0], 'Replace element with array of elements' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after array of elements' );\r
+       jQuery([document.getElementById('first'), document.getElementById('mark')]).replaceAll("#yahoo");\r
+       ok( jQuery("#first")[0], 'Replace element with array of elements' );\r
+       ok( jQuery("#mark")[0], 'Replace element with array of elements' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after array of elements' );\r
 \r
        reset();\r
-       $("#first, #mark").replaceAll("#yahoo");\r
-       ok( $("#first")[0], 'Replace element with set of elements' );\r
-       ok( $("#mark")[0], 'Replace element with set of elements' );\r
-       ok( !$("#yahoo")[0], 'Verify that original element is gone, after set of elements' );\r
+       jQuery("#first, #mark").replaceAll("#yahoo");\r
+       ok( jQuery("#first")[0], 'Replace element with set of elements' );\r
+       ok( jQuery("#mark")[0], 'Replace element with set of elements' );\r
+       ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after set of elements' );\r
 });\r
 \r
 test("end()", function() {\r
        expect(3);\r
-       equals( 'Yahoo', $('#yahoo').parent().end().text(), 'Check for end' );\r
-       ok( $('#yahoo').end(), 'Check for end with nothing to end' );\r
+       equals( 'Yahoo', jQuery('#yahoo').parent().end().text(), 'Check for end' );\r
+       ok( jQuery('#yahoo').end(), 'Check for end with nothing to end' );\r
 \r
-       var x = $('#yahoo');\r
+       var x = jQuery('#yahoo');\r
        x.parent();\r
-       equals( 'Yahoo', $('#yahoo').text(), 'Check for non-destructive behaviour' );\r
+       equals( 'Yahoo', jQuery('#yahoo').text(), 'Check for non-destructive behaviour' );\r
 });\r
 \r
 test("find(String)", function() {\r
        expect(2);\r
-       equals( 'Yahoo', $('#foo').find('.blogTest').text(), 'Check for find' );\r
+       equals( 'Yahoo', jQuery('#foo').find('.blogTest').text(), 'Check for find' );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        equals( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" );\r
 });\r
 \r
 test("clone()", function() {\r
        expect(20);\r
-       equals( 'This is a normal link: Yahoo', $('#en').text(), 'Assert text for #en' );\r
-       var clone = $('#yahoo').clone();\r
-       equals( 'Try them out:Yahoo', $('#first').append(clone).text(), 'Check for clone' );\r
-       equals( 'This is a normal link: Yahoo', $('#en').text(), 'Reassert text for #en' );\r
+       equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Assert text for #en' );\r
+       var clone = jQuery('#yahoo').clone();\r
+       equals( 'Try them out:Yahoo', jQuery('#first').append(clone).text(), 'Check for clone' );\r
+       equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Reassert text for #en' );\r
 \r
        var cloneTags = [\r
                "<table/>", "<tr/>", "<td/>", "<div/>",\r
@@ -1013,12 +1010,12 @@ test("clone()", function() {
                "<tbody/>", "<thead/>", "<tfoot/>", "<iframe/>"\r
        ];\r
        for (var i = 0; i < cloneTags.length; i++) {\r
-               var j = $(cloneTags[i]);\r
+               var j = jQuery(cloneTags[i]);\r
                equals( j[0].tagName, j.clone()[0].tagName, 'Clone a &lt;' + cloneTags[i].substring(1));\r
        }\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var cl = $("#nonnodes").contents().clone();\r
+       var cl = jQuery("#nonnodes").contents().clone();\r
        ok( cl.length >= 2, "Check node,textnode,comment clone works (some browsers delete comments on clone)" );\r
 });\r
 \r
@@ -1026,12 +1023,12 @@ if (!isLocal) {
 test("clone() on XML nodes", function() {\r
        expect(2);\r
        stop();\r
-       $.get("data/dashboard.xml", function (xml) {\r
-               var root = $(xml.documentElement).clone();\r
-               $("tab:first", xml).text("origval");\r
-               $("tab:first", root).text("cloneval");\r
-               equals($("tab:first", xml).text(), "origval", "Check original XML node was correctly set");\r
-               equals($("tab:first", root).text(), "cloneval", "Check cloned XML node was correctly set");\r
+       jQuery.get("data/dashboard.xml", function (xml) {\r
+               var root = jQuery(xml.documentElement).clone();\r
+               jQuery("tab:first", xml).text("origval");\r
+               jQuery("tab:first", root).text("cloneval");\r
+               equals(jQuery("tab:first", xml).text(), "origval", "Check original XML node was correctly set");\r
+               equals(jQuery("tab:first", root).text(), "cloneval", "Check cloned XML node was correctly set");\r
                start();\r
        });\r
 });\r
@@ -1039,37 +1036,37 @@ test("clone() on XML nodes", function() {
 \r
 test("is(String)", function() {\r
        expect(26);\r
-       ok( $('#form').is('form'), 'Check for element: A form must be a form' );\r
-       ok( !$('#form').is('div'), 'Check for element: A form is not a div' );\r
-       ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' );\r
-       ok( !$('#mark').is('.link'), 'Check for class: Did not expect class "link"' );\r
-       ok( $('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' );\r
-       ok( !$('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' );\r
-       ok( $('#en').is('[lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' );\r
-       ok( !$('#en').is('[lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' );\r
-       ok( $('#text1').is('[type="text"]'), 'Check for attribute: Expected attribute type to be "text"' );\r
-       ok( !$('#text1').is('[type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' );\r
-       ok( $('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' );\r
-       ok( !$('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' );\r
-       ok( $('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' );\r
-       ok( !$('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' );\r
-       ok( $('#foo').is(':has(p)'), 'Check for child: Expected a child "p" element' );\r
-       ok( !$('#foo').is(':has(ul)'), 'Check for child: Did not expect "ul" element' );\r
-       ok( $('#foo').is(':has(p):has(a):has(code)'), 'Check for childs: Expected "p", "a" and "code" child elements' );\r
-       ok( !$('#foo').is(':has(p):has(a):has(code):has(ol)'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' );\r
-       ok( !$('#foo').is(0), 'Expected false for an invalid expression - 0' );\r
-       ok( !$('#foo').is(null), 'Expected false for an invalid expression - null' );\r
-       ok( !$('#foo').is(''), 'Expected false for an invalid expression - ""' );\r
-       ok( !$('#foo').is(undefined), 'Expected false for an invalid expression - undefined' );\r
+       ok( jQuery('#form').is('form'), 'Check for element: A form must be a form' );\r
+       ok( !jQuery('#form').is('div'), 'Check for element: A form is not a div' );\r
+       ok( jQuery('#mark').is('.blog'), 'Check for class: Expected class "blog"' );\r
+       ok( !jQuery('#mark').is('.link'), 'Check for class: Did not expect class "link"' );\r
+       ok( jQuery('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' );\r
+       ok( !jQuery('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' );\r
+       ok( jQuery('#en').is('[lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' );\r
+       ok( !jQuery('#en').is('[lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' );\r
+       ok( jQuery('#text1').is('[type="text"]'), 'Check for attribute: Expected attribute type to be "text"' );\r
+       ok( !jQuery('#text1').is('[type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' );\r
+       ok( jQuery('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' );\r
+       ok( !jQuery('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' );\r
+       ok( jQuery('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' );\r
+       ok( !jQuery('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' );\r
+       ok( jQuery('#foo').is(':has(p)'), 'Check for child: Expected a child "p" element' );\r
+       ok( !jQuery('#foo').is(':has(ul)'), 'Check for child: Did not expect "ul" element' );\r
+       ok( jQuery('#foo').is(':has(p):has(a):has(code)'), 'Check for childs: Expected "p", "a" and "code" child elements' );\r
+       ok( !jQuery('#foo').is(':has(p):has(a):has(code):has(ol)'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' );\r
+       ok( !jQuery('#foo').is(0), 'Expected false for an invalid expression - 0' );\r
+       ok( !jQuery('#foo').is(null), 'Expected false for an invalid expression - null' );\r
+       ok( !jQuery('#foo').is(''), 'Expected false for an invalid expression - ""' );\r
+       ok( !jQuery('#foo').is(undefined), 'Expected false for an invalid expression - undefined' );\r
 \r
        // test is() with comma-seperated expressions\r
-       ok( $('#en').is('[lang="en"],[lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
-       ok( $('#en').is('[lang="de"],[lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
-       ok( $('#en').is('[lang="en"] , [lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
-       ok( $('#en').is('[lang="de"] , [lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
+       ok( jQuery('#en').is('[lang="en"],[lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
+       ok( jQuery('#en').is('[lang="de"],[lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
+       ok( jQuery('#en').is('[lang="en"] , [lang="de"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
+       ok( jQuery('#en').is('[lang="de"] , [lang="en"]'), 'Comma-seperated; Check for lang attribute: Expect en or de' );\r
 });\r
 \r
-test("$.extend(Object, Object)", function() {\r
+test("jQuery.extend(Object, Object)", function() {\r
        expect(20);\r
 \r
        var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },\r
@@ -1144,25 +1141,25 @@ test("$.extend(Object, Object)", function() {
 \r
 test("val()", function() {\r
        expect(4);\r
-       equals( $("#text1").val(), "Test", "Check for value of input element" );\r
-       equals( !$("#text1").val(), "", "Check for value of input element" );\r
+       equals( jQuery("#text1").val(), "Test", "Check for value of input element" );\r
+       equals( !jQuery("#text1").val(), "", "Check for value of input element" );\r
        // ticket #1714 this caused a JS error in IE\r
-       equals( $("#first").val(), "", "Check a paragraph element to see if it has a value" );\r
-       ok( $([]).val() === undefined, "Check an empty jQuery object will return undefined from val" );\r
+       equals( jQuery("#first").val(), "", "Check a paragraph element to see if it has a value" );\r
+       ok( jQuery([]).val() === undefined, "Check an empty jQuery object will return undefined from val" );\r
 });\r
 \r
 test("val(String)", function() {\r
        expect(4);\r
        document.getElementById('text1').value = "bla";\r
-       equals( $("#text1").val(), "bla", "Check for modified value of input element" );\r
-       $("#text1").val('test');\r
+       equals( jQuery("#text1").val(), "bla", "Check for modified value of input element" );\r
+       jQuery("#text1").val('test');\r
        ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" );\r
 \r
-       $("#select1").val("3");\r
-       equals( $("#select1").val(), "3", "Check for modified (via val(String)) value of select element" );\r
+       jQuery("#select1").val("3");\r
+       equals( jQuery("#select1").val(), "3", "Check for modified (via val(String)) value of select element" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.val("asdf");\r
        equals( j.val(), "asdf", "Check node,textnode,comment with val()" );\r
        j.removeAttr("value");\r
@@ -1172,7 +1169,7 @@ var scriptorder = 0;
 \r
 test("html(String)", function() {\r
        expect(11);\r
-       var div = $("#main > div");\r
+       var div = jQuery("#main > div");\r
        div.html("<b>test</b>");\r
        var pass = true;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
@@ -1182,123 +1179,123 @@ test("html(String)", function() {
 \r
        reset();\r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.html("<b>bold</b>");\r
 \r
        // this is needed, or the expando added by jQuery unique will yield a different html\r
        j.find('b').removeData();\r
        equals( j.html().toLowerCase(), "<b>bold</b>", "Check node,textnode,comment with html()" );\r
 \r
-       $("#main").html("<select/>");\r
-       $("#main select").html("<option>O1</option><option selected='selected'>O2</option><option>O3</option>");\r
-       equals( $("#main select").val(), "O2", "Selected option correct" );\r
+       jQuery("#main").html("<select/>");\r
+       jQuery("#main select").html("<option>O1</option><option selected='selected'>O2</option><option>O3</option>");\r
+       equals( jQuery("#main select").val(), "O2", "Selected option correct" );\r
 \r
        stop();\r
 \r
-       $("#main").html('<script type="text/javascript">ok( true, "$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script>');\r
+       jQuery("#main").html('<script type="text/javascript">ok( true, "jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script>');\r
 \r
-       $("#main").html('foo <form><script type="text/javascript">ok( true, "$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script></form>');\r
+       jQuery("#main").html('foo <form><script type="text/javascript">ok( true, "jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script></form>');\r
 \r
        // it was decided that waiting to execute ALL scripts makes sense since nested ones have to wait anyway so this test case is changed, see #1959\r
-       $("#main").html("<script>equals(scriptorder++, 0, 'Script is executed in order');equals($('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equals(scriptorder++, 1, 'Script (nested) is executed in order');equals($('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equals(scriptorder++, 2, 'Script (unnested) is executed in order');equals($('#scriptorder').length, 1,'Execute after html')<\/script>");\r
+       jQuery("#main").html("<script>equals(scriptorder++, 0, 'Script is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equals(scriptorder++, 1, 'Script (nested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equals(scriptorder++, 2, 'Script (unnested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script>");\r
 \r
        setTimeout( start, 100 );\r
 });\r
 \r
 test("filter()", function() {\r
        expect(6);\r
-       isSet( $("#form input").filter(":checked").get(), q("radio2", "check1"), "filter(String)" );\r
-       isSet( $("p").filter("#ap, #sndp").get(), q("ap", "sndp"), "filter('String, String')" );\r
-       isSet( $("p").filter("#ap,#sndp").get(), q("ap", "sndp"), "filter('String,String')" );\r
-       isSet( $("p").filter(function() { return !$("a", this).length }).get(), q("sndp", "first"), "filter(Function)" );\r
+       isSet( jQuery("#form input").filter(":checked").get(), q("radio2", "check1"), "filter(String)" );\r
+       isSet( jQuery("p").filter("#ap, #sndp").get(), q("ap", "sndp"), "filter('String, String')" );\r
+       isSet( jQuery("p").filter("#ap,#sndp").get(), q("ap", "sndp"), "filter('String,String')" );\r
+       isSet( jQuery("p").filter(function() { return !jQuery("a", this).length }).get(), q("sndp", "first"), "filter(Function)" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        equals( j.filter("span").length, 1, "Check node,textnode,comment to filter the one span" );\r
        equals( j.filter("[name]").length, 0, "Check node,textnode,comment to filter the one span" );\r
 });\r
 \r
 test("not()", function() {\r
        expect(8);\r
-       equals( $("#main > p#ap > a").not("#google").length, 2, "not('selector')" );\r
-       equals( $("#main > p#ap > a").not(document.getElementById("google")).length, 2, "not(DOMElement)" );\r
-       isSet( $("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" );\r
-       isSet( $("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" );\r
-       isSet( $("p").not($("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" );\r
-       equals( $("p").not(document.getElementsByTagName("p")).length, 0, "not(Array-like DOM collection)" );\r
-       isSet( $("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d" ), "not('complex selector')");\r
-\r
-       var selects = $("#form select");\r
+       equals( jQuery("#main > p#ap > a").not("#google").length, 2, "not('selector')" );\r
+       equals( jQuery("#main > p#ap > a").not(document.getElementById("google")).length, 2, "not(DOMElement)" );\r
+       isSet( jQuery("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" );\r
+       isSet( jQuery("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" );\r
+       isSet( jQuery("p").not(jQuery("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" );\r
+       equals( jQuery("p").not(document.getElementsByTagName("p")).length, 0, "not(Array-like DOM collection)" );\r
+       isSet( jQuery("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d" ), "not('complex selector')");\r
+\r
+       var selects = jQuery("#form select");\r
        isSet( selects.not( selects[1] ), q("select1", "select3"), "filter out DOM element");\r
 });\r
 \r
 test("andSelf()", function() {\r
        expect(4);\r
-       isSet( $("#en").siblings().andSelf().get(), q("sndp", "sap","en"), "Check for siblings and self" );\r
-       isSet( $("#foo").children().andSelf().get(), q("sndp", "en", "sap", "foo"), "Check for children and self" );\r
-       isSet( $("#en, #sndp").parent().andSelf().get(), q("foo","en","sndp"), "Check for parent and self" );\r
-       isSet( $("#groups").parents("p, div").andSelf().get(), q("ap", "main", "groups"), "Check for parents and self" );\r
+       isSet( jQuery("#en").siblings().andSelf().get(), q("sndp", "sap","en"), "Check for siblings and self" );\r
+       isSet( jQuery("#foo").children().andSelf().get(), q("sndp", "en", "sap", "foo"), "Check for children and self" );\r
+       isSet( jQuery("#en, #sndp").parent().andSelf().get(), q("foo","en","sndp"), "Check for parent and self" );\r
+       isSet( jQuery("#groups").parents("p, div").andSelf().get(), q("ap", "main", "groups"), "Check for parents and self" );\r
 });\r
 \r
 test("siblings([String])", function() {\r
        expect(5);\r
-       isSet( $("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" );\r
-       isSet( $("#sndp").siblings(":has(code)").get(), q("sap"), "Check for filtered siblings (has code child element)" );\r
-       isSet( $("#sndp").siblings(":has(a)").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );\r
-       isSet( $("#foo").siblings("form, b").get(), q("form", "lengthtest", "testForm", "floatTest"), "Check for multiple filters" );\r
-       isSet( $("#en, #sndp").siblings().get(), q("sndp", "sap", "en"), "Check for unique results from siblings" );\r
+       isSet( jQuery("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" );\r
+       isSet( jQuery("#sndp").siblings(":has(code)").get(), q("sap"), "Check for filtered siblings (has code child element)" );\r
+       isSet( jQuery("#sndp").siblings(":has(a)").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" );\r
+       isSet( jQuery("#foo").siblings("form, b").get(), q("form", "lengthtest", "testForm", "floatTest"), "Check for multiple filters" );\r
+       isSet( jQuery("#en, #sndp").siblings().get(), q("sndp", "sap", "en"), "Check for unique results from siblings" );\r
 });\r
 \r
 test("children([String])", function() {\r
        expect(3);\r
-       isSet( $("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" );\r
-       isSet( $("#foo").children(":has(code)").get(), q("sndp", "sap"), "Check for filtered children" );\r
-       isSet( $("#foo").children("#en, #sap").get(), q("en", "sap"), "Check for multiple filters" );\r
+       isSet( jQuery("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" );\r
+       isSet( jQuery("#foo").children(":has(code)").get(), q("sndp", "sap"), "Check for filtered children" );\r
+       isSet( jQuery("#foo").children("#en, #sap").get(), q("en", "sap"), "Check for multiple filters" );\r
 });\r
 \r
 test("parent([String])", function() {\r
        expect(5);\r
-       equals( $("#groups").parent()[0].id, "ap", "Simple parent check" );\r
-       equals( $("#groups").parent("p")[0].id, "ap", "Filtered parent check" );\r
-       equals( $("#groups").parent("div").length, 0, "Filtered parent check, no match" );\r
-       equals( $("#groups").parent("div, p")[0].id, "ap", "Check for multiple filters" );\r
-       isSet( $("#en, #sndp").parent().get(), q("foo"), "Check for unique results from parent" );\r
+       equals( jQuery("#groups").parent()[0].id, "ap", "Simple parent check" );\r
+       equals( jQuery("#groups").parent("p")[0].id, "ap", "Filtered parent check" );\r
+       equals( jQuery("#groups").parent("div").length, 0, "Filtered parent check, no match" );\r
+       equals( jQuery("#groups").parent("div, p")[0].id, "ap", "Check for multiple filters" );\r
+       isSet( jQuery("#en, #sndp").parent().get(), q("foo"), "Check for unique results from parent" );\r
 });\r
 \r
 test("parents([String])", function() {\r
        expect(5);\r
-       equals( $("#groups").parents()[0].id, "ap", "Simple parents check" );\r
-       equals( $("#groups").parents("p")[0].id, "ap", "Filtered parents check" );\r
-       equals( $("#groups").parents("div")[0].id, "main", "Filtered parents check2" );\r
-       isSet( $("#groups").parents("p, div").get(), q("ap", "main"), "Check for multiple filters" );\r
-       isSet( $("#en, #sndp").parents().get(), q("foo", "main", "dl", "body", "html"), "Check for unique results from parents" );\r
+       equals( jQuery("#groups").parents()[0].id, "ap", "Simple parents check" );\r
+       equals( jQuery("#groups").parents("p")[0].id, "ap", "Filtered parents check" );\r
+       equals( jQuery("#groups").parents("div")[0].id, "main", "Filtered parents check2" );\r
+       isSet( jQuery("#groups").parents("p, div").get(), q("ap", "main"), "Check for multiple filters" );\r
+       isSet( jQuery("#en, #sndp").parents().get(), q("foo", "main", "dl", "body", "html"), "Check for unique results from parents" );\r
 });\r
 \r
 test("next([String])", function() {\r
        expect(4);\r
-       equals( $("#ap").next()[0].id, "foo", "Simple next check" );\r
-       equals( $("#ap").next("div")[0].id, "foo", "Filtered next check" );\r
-       equals( $("#ap").next("p").length, 0, "Filtered next check, no match" );\r
-       equals( $("#ap").next("div, p")[0].id, "foo", "Multiple filters" );\r
+       equals( jQuery("#ap").next()[0].id, "foo", "Simple next check" );\r
+       equals( jQuery("#ap").next("div")[0].id, "foo", "Filtered next check" );\r
+       equals( jQuery("#ap").next("p").length, 0, "Filtered next check, no match" );\r
+       equals( jQuery("#ap").next("div, p")[0].id, "foo", "Multiple filters" );\r
 });\r
 \r
 test("prev([String])", function() {\r
        expect(4);\r
-       equals( $("#foo").prev()[0].id, "ap", "Simple prev check" );\r
-       equals( $("#foo").prev("p")[0].id, "ap", "Filtered prev check" );\r
-       equals( $("#foo").prev("div").length, 0, "Filtered prev check, no match" );\r
-       equals( $("#foo").prev("p, div")[0].id, "ap", "Multiple filters" );\r
+       equals( jQuery("#foo").prev()[0].id, "ap", "Simple prev check" );\r
+       equals( jQuery("#foo").prev("p")[0].id, "ap", "Filtered prev check" );\r
+       equals( jQuery("#foo").prev("div").length, 0, "Filtered prev check, no match" );\r
+       equals( jQuery("#foo").prev("p, div")[0].id, "ap", "Multiple filters" );\r
 });\r
 \r
 test("show()", function() {\r
        expect(15);\r
-       var pass = true, div = $("div");\r
+       var pass = true, div = jQuery("div");\r
        div.show().each(function(){\r
                if ( this.style.display == "none" ) pass = false;\r
        });\r
        ok( pass, "Show" );\r
 \r
-       $("#main").append('<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>');\r
+       jQuery("#main").append('<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>');\r
        var test = {\r
                "div"      : "block",\r
                "p"        : "block",\r
@@ -1306,25 +1303,25 @@ test("show()", function() {
                "code"     : "inline",\r
                "pre"      : "block",\r
                "span"     : "inline",\r
-               "table"    : $.browser.msie ? "block" : "table",\r
-               "thead"    : $.browser.msie ? "block" : "table-header-group",\r
-               "tbody"    : $.browser.msie ? "block" : "table-row-group",\r
-               "tr"       : $.browser.msie ? "block" : "table-row",\r
-               "th"       : $.browser.msie ? "block" : "table-cell",\r
-               "td"       : $.browser.msie ? "block" : "table-cell",\r
+               "table"    : jQuery.browser.msie ? "block" : "table",\r
+               "thead"    : jQuery.browser.msie ? "block" : "table-header-group",\r
+               "tbody"    : jQuery.browser.msie ? "block" : "table-row-group",\r
+               "tr"       : jQuery.browser.msie ? "block" : "table-row",\r
+               "th"       : jQuery.browser.msie ? "block" : "table-cell",\r
+               "td"       : jQuery.browser.msie ? "block" : "table-cell",\r
                "ul"       : "block",\r
-               "li"       : $.browser.msie ? "block" : "list-item"\r
+               "li"       : jQuery.browser.msie ? "block" : "list-item"\r
        };\r
 \r
-       $.each(test, function(selector, expected) {\r
-               var elem = $(selector, "#show-tests").show();\r
+       jQuery.each(test, function(selector, expected) {\r
+               var elem = jQuery(selector, "#show-tests").show();\r
                equals( elem.css("display"), expected, "Show using correct display type for " + selector );\r
        });\r
 });\r
 \r
 test("addClass(String)", function() {\r
        expect(2);\r
-       var div = $("div");\r
+       var div = jQuery("div");\r
        div.addClass("test");\r
        var pass = true;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
@@ -1333,14 +1330,14 @@ test("addClass(String)", function() {
        ok( pass, "Add Class" );\r
 \r
        // using contents will get regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.addClass("asdf");\r
        ok( j.hasClass("asdf"), "Check node,textnode,comment for addClass" );\r
 });\r
 \r
 test("removeClass(String) - simple", function() {\r
        expect(4);\r
-       var div = $("div").addClass("test").removeClass("test"),\r
+       var div = jQuery("div").addClass("test").removeClass("test"),\r
                pass = true;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
                if ( div.get(i).className.indexOf("test") != -1 ) pass = false;\r
@@ -1348,7 +1345,7 @@ test("removeClass(String) - simple", function() {
        ok( pass, "Remove Class" );\r
 \r
        reset();\r
-       var div = $("div").addClass("test").addClass("foo").addClass("bar");\r
+       var div = jQuery("div").addClass("test").addClass("foo").addClass("bar");\r
        div.removeClass("test").removeClass("bar").removeClass("foo");\r
        var pass = true;\r
        for ( var i = 0; i < div.size(); i++ ) {\r
@@ -1357,18 +1354,18 @@ test("removeClass(String) - simple", function() {
        ok( pass, "Remove multiple classes" );\r
 \r
        reset();\r
-       var div = $("div:eq(0)").addClass("test").removeClass("");\r
+       var div = jQuery("div:eq(0)").addClass("test").removeClass("");\r
        ok( div.is('.test'), "Empty string passed to removeClass" );\r
 \r
        // using contents will get regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.removeClass("asdf");\r
        ok( !j.hasClass("asdf"), "Check node,textnode,comment for removeClass" );\r
 });\r
 \r
 test("toggleClass(String)", function() {\r
        expect(3);\r
-       var e = $("#firstp");\r
+       var e = jQuery("#firstp");\r
        ok( !e.is(".test"), "Assert class not present" );\r
        e.toggleClass("test");\r
        ok( e.is(".test"), "Assert class present" );\r
@@ -1378,32 +1375,32 @@ test("toggleClass(String)", function() {
 \r
 test("removeAttr(String", function() {\r
        expect(1);\r
-       equals( $('#mark').removeAttr("class")[0].className, "", "remove class" );\r
+       equals( jQuery('#mark').removeAttr("class")[0].className, "", "remove class" );\r
 });\r
 \r
 test("text(String)", function() {\r
        expect(4);\r
-       equals( $("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML, "&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; cruel world!&lt;/div&gt;", "Check escaped text" );\r
+       equals( jQuery("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML, "&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; cruel world!&lt;/div&gt;", "Check escaped text" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.text("hi!");\r
-       equals( $(j[0]).text(), "hi!", "Check node,textnode,comment with text()" );\r
+       equals( jQuery(j[0]).text(), "hi!", "Check node,textnode,comment with text()" );\r
        equals( j[1].nodeValue, " there ", "Check node,textnode,comment with text()" );\r
        equals( j[2].nodeType, 8, "Check node,textnode,comment with text()" );\r
 });\r
 \r
-test("$.each(Object,Function)", function() {\r
+test("jQuery.each(Object,Function)", function() {\r
        expect(12);\r
-       $.each( [0,1,2], function(i, n){\r
+       jQuery.each( [0,1,2], function(i, n){\r
                equals( i, n, "Check array iteration" );\r
        });\r
 \r
-       $.each( [5,6,7], function(i, n){\r
+       jQuery.each( [5,6,7], function(i, n){\r
                equals( i, n - 5, "Check array iteration" );\r
        });\r
 \r
-       $.each( { name: "name", lang: "lang" }, function(i, n){\r
+       jQuery.each( { name: "name", lang: "lang" }, function(i, n){\r
                equals( i, n, "Check object iteration" );\r
        });\r
 \r
@@ -1421,17 +1418,17 @@ test("$.each(Object,Function)", function() {
         equals( total, 3, "Looping over an object, with break" );\r
 });\r
 \r
-test("$.prop", function() {\r
+test("jQuery.prop", function() {\r
        expect(2);\r
        var handle = function() { return this.id };\r
-       equals( $.prop($("#ap")[0], handle), "ap", "Check with Function argument" );\r
-       equals( $.prop($("#ap")[0], "value"), "value", "Check with value argument" );\r
+       equals( jQuery.prop(jQuery("#ap")[0], handle), "ap", "Check with Function argument" );\r
+       equals( jQuery.prop(jQuery("#ap")[0], "value"), "value", "Check with value argument" );\r
 });\r
 \r
-test("$.className", function() {\r
+test("jQuery.className", function() {\r
        expect(6);\r
-       var x = $("<p>Hi</p>")[0];\r
-       var c = $.className;\r
+       var x = jQuery("<p>Hi</p>")[0];\r
+       var c = jQuery.className;\r
        c.add(x, "hi");\r
        equals( x.className, "hi", "Check single added class" );\r
        c.add(x, "foo bar");\r
@@ -1445,9 +1442,9 @@ test("$.className", function() {
        ok( c.has(x, "bar"), "Check has2" );\r
 });\r
 \r
-test("$.data", function() {\r
+test("jQuery.data", function() {\r
        expect(5);\r
-       var div = $("#foo")[0];\r
+       var div = jQuery("#foo")[0];\r
        equals( jQuery.data(div, "test"), undefined, "Check for no data exists" );\r
        jQuery.data(div, "test", "success");\r
        equals( jQuery.data(div, "test"), "success", "Check for added data" );\r
@@ -1461,7 +1458,7 @@ test("$.data", function() {
 \r
 test(".data()", function() {\r
        expect(18);\r
-       var div = $("#foo");\r
+       var div = jQuery("#foo");\r
        equals( div.data("test"), undefined, "Check for no data exists" );\r
        div.data("test", "success");\r
        equals( div.data("test"), "success", "Check for added data" );\r
@@ -1510,9 +1507,9 @@ test(".data()", function() {
        equals( div.data("test.bar"), "testroot", "Check for unmatched namespace" );\r
 });\r
 \r
-test("$.removeData", function() {\r
+test("jQuery.removeData", function() {\r
        expect(1);\r
-       var div = $("#foo")[0];\r
+       var div = jQuery("#foo")[0];\r
        jQuery.data(div, "test", "testing");\r
        jQuery.removeData(div, "test");\r
        equals( jQuery.data(div, "test"), undefined, "Check removal of data" );\r
@@ -1520,7 +1517,7 @@ test("$.removeData", function() {
 \r
 test(".removeData()", function() {\r
        expect(6);\r
-       var div = $("#foo");\r
+       var div = jQuery("#foo");\r
        div.data("test", "testing");\r
        div.removeData("test");\r
        equals( div.data("test"), undefined, "Check removal of data" );\r
@@ -1541,55 +1538,55 @@ test(".removeData()", function() {
 \r
 test("remove()", function() {\r
        expect(6);\r
-       $("#ap").children().remove();\r
-       ok( $("#ap").text().length > 10, "Check text is not removed" );\r
-       equals( $("#ap").children().length, 0, "Check remove" );\r
+       jQuery("#ap").children().remove();\r
+       ok( jQuery("#ap").text().length > 10, "Check text is not removed" );\r
+       equals( jQuery("#ap").children().length, 0, "Check remove" );\r
 \r
        reset();\r
-       $("#ap").children().remove("a");\r
-       ok( $("#ap").text().length > 10, "Check text is not removed" );\r
-       equals( $("#ap").children().length, 1, "Check filtered remove" );\r
+       jQuery("#ap").children().remove("a");\r
+       ok( jQuery("#ap").text().length > 10, "Check text is not removed" );\r
+       equals( jQuery("#ap").children().length, 1, "Check filtered remove" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       equals( $("#nonnodes").contents().length, 3, "Check node,textnode,comment remove works" );\r
-       $("#nonnodes").contents().remove();\r
-       equals( $("#nonnodes").contents().length, 0, "Check node,textnode,comment remove works" );\r
+       equals( jQuery("#nonnodes").contents().length, 3, "Check node,textnode,comment remove works" );\r
+       jQuery("#nonnodes").contents().remove();\r
+       equals( jQuery("#nonnodes").contents().length, 0, "Check node,textnode,comment remove works" );\r
 });\r
 \r
 test("empty()", function() {\r
        expect(3);\r
-       equals( $("#ap").children().empty().text().length, 0, "Check text is removed" );\r
-       equals( $("#ap").children().length, 4, "Check elements are not removed" );\r
+       equals( jQuery("#ap").children().empty().text().length, 0, "Check text is removed" );\r
+       equals( jQuery("#ap").children().length, 4, "Check elements are not removed" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var j = $("#nonnodes").contents();\r
+       var j = jQuery("#nonnodes").contents();\r
        j.empty();\r
        equals( j.html(), "", "Check node,textnode,comment empty works" );\r
 });\r
 \r
 test("slice()", function() {\r
        expect(5);\r
-       isSet( $("#ap a").slice(1,2), q("groups"), "slice(1,2)" );\r
-       isSet( $("#ap a").slice(1), q("groups", "anchor1", "mark"), "slice(1)" );\r
-       isSet( $("#ap a").slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );\r
-       isSet( $("#ap a").slice(-1), q("mark"), "slice(-1)" );\r
+       isSet( jQuery("#ap a").slice(1,2), q("groups"), "slice(1,2)" );\r
+       isSet( jQuery("#ap a").slice(1), q("groups", "anchor1", "mark"), "slice(1)" );\r
+       isSet( jQuery("#ap a").slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );\r
+       isSet( jQuery("#ap a").slice(-1), q("mark"), "slice(-1)" );\r
 \r
-       isSet( $("#ap a").eq(1), q("groups"), "eq(1)" );\r
+       isSet( jQuery("#ap a").eq(1), q("groups"), "eq(1)" );\r
 });\r
 \r
 test("map()", function() {\r
        expect(2);//expect(6);\r
 \r
        isSet(\r
-               $("#ap").map(function(){\r
-                       return $(this).find("a").get();\r
+               jQuery("#ap").map(function(){\r
+                       return jQuery(this).find("a").get();\r
                }),\r
                q("google", "groups", "anchor1", "mark"),\r
                "Array Map"\r
        );\r
 \r
        isSet(\r
-               $("#ap > a").map(function(){\r
+               jQuery("#ap > a").map(function(){\r
                        return this.parentNode;\r
                }),\r
                q("ap","ap","ap"),\r
@@ -1599,26 +1596,26 @@ test("map()", function() {
        return;//these haven't been accepted yet\r
 \r
        //for #2616\r
-       var keys = $.map( {a:1,b:2}, function( v, k ){\r
+       var keys = jQuery.map( {a:1,b:2}, function( v, k ){\r
                return k;\r
        }, [ ] );\r
 \r
        equals( keys.join(""), "ab", "Map the keys from a hash to an array" );\r
 \r
-       var values = $.map( {a:1,b:2}, function( v, k ){\r
+       var values = jQuery.map( {a:1,b:2}, function( v, k ){\r
                return v;\r
        }, [ ] );\r
 \r
        equals( values.join(""), "12", "Map the values from a hash to an array" );\r
 \r
        var scripts = document.getElementsByTagName("script");\r
-       var mapped = $.map( scripts, function( v, k ){\r
+       var mapped = jQuery.map( scripts, function( v, k ){\r
                return v;\r
        }, {length:0} );\r
 \r
        equals( mapped.length, scripts.length, "Map an array(-like) to a hash" );\r
 \r
-       var flat = $.map( Array(4), function( v, k ){\r
+       var flat = jQuery.map( Array(4), function( v, k ){\r
                return k % 2 ? k : [k,k,k];//try mixing array and regular returns\r
        });\r
 \r
@@ -1627,67 +1624,67 @@ test("map()", function() {
 \r
 test("contents()", function() {\r
        expect(12);\r
-       equals( $("#ap").contents().length, 9, "Check element contents" );\r
-       ok( $("#iframe").contents()[0], "Check existance of IFrame document" );\r
-       var ibody = $("#loadediframe").contents()[0].body;\r
+       equals( jQuery("#ap").contents().length, 9, "Check element contents" );\r
+       ok( jQuery("#iframe").contents()[0], "Check existance of IFrame document" );\r
+       var ibody = jQuery("#loadediframe").contents()[0].body;\r
        ok( ibody, "Check existance of IFrame body" );\r
 \r
-       equals( $("span", ibody).text(), "span text", "Find span in IFrame and check its text" );\r
+       equals( jQuery("span", ibody).text(), "span text", "Find span in IFrame and check its text" );\r
 \r
-       $(ibody).append("<div>init text</div>");\r
-       equals( $("div", ibody).length, 2, "Check the original div and the new div are in IFrame" );\r
+       jQuery(ibody).append("<div>init text</div>");\r
+       equals( jQuery("div", ibody).length, 2, "Check the original div and the new div are in IFrame" );\r
 \r
-       equals( $("div:last", ibody).text(), "init text", "Add text to div in IFrame" );\r
+       equals( jQuery("div:last", ibody).text(), "init text", "Add text to div in IFrame" );\r
 \r
-       $("div:last", ibody).text("div text");\r
-       equals( $("div:last", ibody).text(), "div text", "Add text to div in IFrame" );\r
+       jQuery("div:last", ibody).text("div text");\r
+       equals( jQuery("div:last", ibody).text(), "div text", "Add text to div in IFrame" );\r
 \r
-       $("div:last", ibody).remove();\r
-       equals( $("div", ibody).length, 1, "Delete the div and check only one div left in IFrame" );\r
+       jQuery("div:last", ibody).remove();\r
+       equals( jQuery("div", ibody).length, 1, "Delete the div and check only one div left in IFrame" );\r
 \r
-       equals( $("div", ibody).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" );\r
+       equals( jQuery("div", ibody).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" );\r
 \r
-       $("<table/>", ibody).append("<tr><td>cell</td></tr>").appendTo(ibody);\r
-       $("table", ibody).remove();\r
-       equals( $("div", ibody).length, 1, "Check for JS error on add and delete of a table in IFrame" );\r
+       jQuery("<table/>", ibody).append("<tr><td>cell</td></tr>").appendTo(ibody);\r
+       jQuery("table", ibody).remove();\r
+       equals( jQuery("div", ibody).length, 1, "Check for JS error on add and delete of a table in IFrame" );\r
 \r
        // using contents will get comments regular, text, and comment nodes\r
-       var c = $("#nonnodes").contents().contents();\r
+       var c = jQuery("#nonnodes").contents().contents();\r
        equals( c.length, 1, "Check node,textnode,comment contents is just one" );\r
        equals( c[0].nodeValue, "hi", "Check node,textnode,comment contents is just the one from span" );\r
 });\r
 \r
-test("$.makeArray", function(){\r
+test("jQuery.makeArray", function(){\r
        expect(15);\r
 \r
-       equals( $.makeArray($('html>*'))[0].nodeName, "HEAD", "Pass makeArray a jQuery object" );\r
+       equals( jQuery.makeArray(jQuery('html>*'))[0].nodeName, "HEAD", "Pass makeArray a jQuery object" );\r
 \r
-       equals( $.makeArray(document.getElementsByName("PWD")).slice(0,1)[0].name, "PWD", "Pass makeArray a nodelist" );\r
+       equals( jQuery.makeArray(document.getElementsByName("PWD")).slice(0,1)[0].name, "PWD", "Pass makeArray a nodelist" );\r
 \r
-       equals( (function(){ return $.makeArray(arguments); })(1,2).join(""), "12", "Pass makeArray an arguments array" );\r
+       equals( (function(){ return jQuery.makeArray(arguments); })(1,2).join(""), "12", "Pass makeArray an arguments array" );\r
 \r
-       equals( $.makeArray([1,2,3]).join(""), "123", "Pass makeArray a real array" );\r
+       equals( jQuery.makeArray([1,2,3]).join(""), "123", "Pass makeArray a real array" );\r
 \r
-       equals( $.makeArray().length, 0, "Pass nothing to makeArray and expect an empty array" );\r
+       equals( jQuery.makeArray().length, 0, "Pass nothing to makeArray and expect an empty array" );\r
 \r
-       equals( $.makeArray( 0 )[0], 0 , "Pass makeArray a number" );\r
+       equals( jQuery.makeArray( 0 )[0], 0 , "Pass makeArray a number" );\r
 \r
-       equals( $.makeArray( "foo" )[0], "foo", "Pass makeArray a string" );\r
+       equals( jQuery.makeArray( "foo" )[0], "foo", "Pass makeArray a string" );\r
 \r
-       equals( $.makeArray( true )[0].constructor, Boolean, "Pass makeArray a boolean" );\r
+       equals( jQuery.makeArray( true )[0].constructor, Boolean, "Pass makeArray a boolean" );\r
 \r
-       equals( $.makeArray( document.createElement("div") )[0].nodeName, "DIV", "Pass makeArray a single node" );\r
+       equals( jQuery.makeArray( document.createElement("div") )[0].nodeName, "DIV", "Pass makeArray a single node" );\r
 \r
-       equals( $.makeArray( {length:2, 0:"a", 1:"b"} ).join(""), "ab", "Pass makeArray an array like map (with length)" );\r
+       equals( jQuery.makeArray( {length:2, 0:"a", 1:"b"} ).join(""), "ab", "Pass makeArray an array like map (with length)" );\r
 \r
-       ok( !!$.makeArray( document.documentElement.childNodes ).slice(0,1)[0].nodeName, "Pass makeArray a childNodes array" );\r
+       ok( !!jQuery.makeArray( document.documentElement.childNodes ).slice(0,1)[0].nodeName, "Pass makeArray a childNodes array" );\r
 \r
        //function, is tricky as it has length\r
-       equals( $.makeArray( function(){ return 1;} )[0](), 1, "Pass makeArray a function" );\r
+       equals( jQuery.makeArray( function(){ return 1;} )[0](), 1, "Pass makeArray a function" );\r
        //window, also has length\r
-       equals( $.makeArray(window)[0], window, "Pass makeArray the window" );\r
+       equals( jQuery.makeArray(window)[0], window, "Pass makeArray the window" );\r
 \r
-       equals( $.makeArray(/a/)[0].constructor, RegExp, "Pass makeArray a regex" );\r
+       equals( jQuery.makeArray(/a/)[0].constructor, RegExp, "Pass makeArray a regex" );\r
 \r
-       ok( $.makeArray(document.getElementById('form')).length >= 13, "Pass makeArray a form (treat as elements)" );\r
+       ok( jQuery.makeArray(document.getElementById('form')).length >= 13, "Pass makeArray a form (treat as elements)" );\r
 });\r