var jsc = now();
jQuery.extend({
-
+
get: function( url, data, callback, type ) {
// shift arguments if data argument was ommited
if ( jQuery.isFunction( data ) ) {
if ( xml && data.documentElement.tagName == "parsererror" )
throw "parsererror";
-
+
// Allow a pre-filtering function to sanitize the response
// s != null is checked to keep backwards compatibility
if( s && s.dataFilter )
if ( type == "json" )
data = window["eval"]("(" + data + ")");
}
-
+
return data;
},
if ( elem ) {
if( jQuery.nodeName( elem, 'option' ) )
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
-
+
// We need to handle select boxes special
if ( jQuery.nodeName( elem, "select" ) ) {
var index = elem.selectedIndex,
}
}
- return values;
+ return values;
}
// Everything else, we just grab the value
-var
+var
// Will speed up references to window, and allows munging its name.
window = this,
// Will speed up references to undefined, and allows munging its name.
// Recurse if we're merging object values
if ( deep && copy && typeof copy === "object" && !copy.nodeType )
- target[ name ] = jQuery.extend( deep,
+ target[ name ] = jQuery.extend( deep,
// Never move original objects, clone them
src || ( copy.length != null ? [ ] : { } )
, copy );
},\r
queue: function( elem, type, data ) {\r
if ( elem ){\r
- \r
+\r
type = (type || "fx") + "queue";\r
- \r
+\r
var q = jQuery.data( elem, type );\r
- \r
+\r
if ( !q || jQuery.isArray(data) )\r
q = jQuery.data( elem, type, jQuery.makeArray(data) );\r
else if( data )\r
q.push( data );\r
- \r
+\r
}\r
return q;\r
},\r
dequeue: function( elem, type ){\r
var queue = jQuery.queue( elem, type ),\r
fn = queue.shift();\r
- \r
+\r
if( !type || type === "fx" )\r
fn = queue[0];\r
- \r
+\r
if( fn !== undefined )\r
fn.call(elem);\r
}\r
\r
return this.each(function(){\r
var queue = jQuery.queue( this, type, data );\r
- \r
+\r
if( type == "fx" && queue.length == 1 )\r
queue[0].call(this);\r
});\r
jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
null;
};
-
+
jQuery.fn[ type ] = function( size ) {
// Get window width or height
return this[0] == window ?
// Get the current list of functions bound to this event
var handlers = events[type];
-
+
if ( jQuery.event.specialAll[type] )
jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
// Handle the removal of namespaced events
if ( namespace.test(events[type][handle].type) )
delete events[type][handle];
-
+
if ( jQuery.event.specialAll[type] )
jQuery.event.specialAll[type].teardown.call(elem, namespaces);
// don't do events on text and comment nodes
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
return undefined;
-
+
// Clean up in case it is reused
event.result = undefined;
event.target = elem;
-
+
// Clone the incoming data, if any
data = jQuery.makeArray(data);
data.unshift( event );
event = arguments[0] = jQuery.event.fix( event || window.event );
event.currentTarget = this;
-
+
// Namespaced event handlers
var namespaces = event.type.split(".");
event.type = namespaces.shift();
// Cache this now, all = true means, any handler
all = !namespaces.length && !event.exclusive;
-
+
var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
handlers = ( jQuery.data(this, "events") || {} )[event.type];
teardown: function() {}
}
},
-
+
specialAll: {
live: {
setup: function( selector, namespaces ){
teardown: function( namespaces ){
if ( namespaces.length ) {
var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
-
+
jQuery.each( (jQuery.data(this, "events").live || {}), function(){
if ( name.test(this.type) )
remove++;
});
-
+
if ( remove < 1 )
jQuery.event.remove( this, namespaces[0], liveHandler );
}
// Allow instantiation without the 'new' keyword
if( !this.preventDefault )
return new jQuery.Event(src);
-
+
// Event object
if( src && src.type ){
this.originalEvent = src;
// timeStamp is buggy for some events on Firefox(#3843)
// So we won't rely on the native value
this.timeStamp = now();
-
+
// Mark it as fixed
this[expando] = true;
};
while ( parent && parent != this )
try { parent = parent.parentNode; }
catch(e) { parent = this; }
-
+
if( parent != this ){
// set the correct event type
event.type = event.data;
jQuery.event.handle.apply( this, arguments );
}
};
-
-jQuery.each({
- mouseover: 'mouseenter',
+
+jQuery.each({
+ mouseover: 'mouseenter',
mouseout: 'mouseleave'
}, function( orig, fix ){
jQuery.event.special[ fix ] = {
teardown: function(){
jQuery.event.remove( this, orig, withinElement );
}
- };
+ };
});
jQuery.fn.extend({
event.stopPropagation();
jQuery.event.trigger( event, data, this[0] );
return event.result;
- }
+ }
},
toggle: function( fn ) {
return this;
},
-
+
live: function( type, fn ){
var proxy = jQuery.event.proxy( fn );
proxy.guid += this.selector + type;
return this;
},
-
+
die: function( type, fn ){
jQuery( this.context ).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
return this;
elems.sort(function(a,b) {
return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
});
-
+
jQuery.each(elems, function(){
event.currentTarget = this.elem;
if ( this.fn.call(this.elem, event, this.fn.data) === false )
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
// - https://bugzilla.mozilla.org/show_bug.cgi?id=252542
-jQuery( window ).bind( 'unload', function(){
+jQuery( window ).bind( 'unload', function(){
for ( var id in jQuery.cache )
// Skip the window
if ( id != 1 && jQuery.cache[ id ].handle )
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
-});
+});
} else {
for ( var i = 0, l = this.length; i < l; i++ ){
var old = jQuery.data(this[i], "olddisplay");
-
+
this[i].style.display = old || "";
-
+
if ( jQuery.css(this[i], "display") === "none" ) {
var tagName = this[i].tagName, display;
-
+
if ( elemdisplay[ tagName ] ) {
display = elemdisplay[ tagName ];
} else {
var elem = jQuery("<" + tagName + " />").appendTo("body");
-
+
display = elem.css("display");
if ( display === "none" )
display = "block";
-
+
elem.remove();
-
+
elemdisplay[ tagName ] = display;
}
-
+
jQuery.data(this[i], "olddisplay", display);
}
}
for ( var i = 0, l = this.length; i < l; i++ ){
this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
}
-
+
return this;
}
},
var optall = jQuery.speed(speed, easing, callback);
return this[ optall.queue === false ? "each" : "queue" ](function(){
-
+
var opt = jQuery.extend({}, optall), p,
hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
self = this;
-
+
for ( p in prop ) {
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
return opt.complete.call(this);
if ( this.options.hide || this.options.show )
for ( var p in this.options.curAnim )
jQuery.style(this.elem, p, this.options.orig[p]);
-
+
// Execute the complete function
this.options.complete.call( this.elem );
}
for ( var i = 0, l = this.length; i < l; i++ )
callback.call( root(this[i], first), this.length > 1 || i > 0 ?
fragment.cloneNode(true) : fragment );
-
+
if ( scripts )
jQuery.each( scripts, evalScript );
}
return this;
-
+
function root( elem, cur ) {
return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
(elem.getElementsByTagName("tbody")[0] ||
// IE completely kills leading whitespace when innerHTML is used
if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
-
+
elem = jQuery.makeArray( div.childNodes );
}
fragment.appendChild( ret[i] );
}
}
-
+
return scripts;
}
left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
return { top: top, left: left };
};
-else
+else
jQuery.fn.offset = function() {
var elem = this[0];
if ( !elem ) return null;
parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
// Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
+ // note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
offset.top -= parseFloat( jQuery.curCSS(elem, 'marginTop', true), 10 ) || 0;
offset.left -= parseFloat( jQuery.curCSS(elem, 'marginLeft', true), 10 ) || 0;
// Create scrollLeft and scrollTop methods
jQuery.each( ['Left', 'Top'], function(i, name) {
var method = 'scroll' + name;
-
+
jQuery.fn[ method ] = function(val) {
if ( !this[0] ) return null;
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
-
+
if ( !selector || typeof selector !== "string" ) {
return results;
}
var parts = [], m, set, checkSet, check, mode, extra, prune = true, contextXML = isXML(context);
-
+
// Reset the position of the chunker regexp (start from head)
chunker.lastIndex = 0;
-
+
while ( (m = chunker.exec(selector)) !== null ) {
parts.push( m[1] );
-
+
if ( m[2] ) {
extra = RegExp.rightContext;
break;
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
var type = Expr.order[i], match;
-
+
if ( (match = Expr.match[ type ].exec( expr )) ) {
var left = RegExp.leftContext;
},
ATTR: function(match, curLoop, inplace, result, not, isXML){
var name = match[1].replace(/\\/g, "");
-
+
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
-
+
return match;
},
POS: function(match){
if ( first == 1 && last == 0 ) {
return true;
}
-
+
var doneName = match[0],
parent = elem.parentNode;
-
+
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
- }
+ }
parent.sizcache = doneName;
}
-
+
var diff = elem.nodeIndex - last;
if ( first == 0 ) {
return diff == 0;
results.push.apply( results, array );
return results;
}
-
+
return array;
};
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
-
+
Sizzle = function(query, context, extra, seed){
context = context || document;
return makeArray( context.querySelectorAll(query), extra );
} catch(e){}
}
-
+
return oldSizzle(query, context, extra, seed);
};
jQuery.support = {
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace: div.firstChild.nodeType == 3,
-
+
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
tbody: !div.getElementsByTagName("tbody").length,
-
+
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
htmlSerialize: !!div.getElementsByTagName("link").length,
-
+
// Get the style information from getAttribute
// (IE uses .cssText insted)
style: /red/.test( a.getAttribute("style") ),
-
+
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
hrefNormalized: a.getAttribute("href") === "/a",
-
+
// Make sure that element opacity exists
// (IE uses filter instead)
opacity: a.style.opacity === "0.5",
-
+
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
cssFloat: !!a.style.cssFloat,
noCloneEvent: true,
boxModel: null
};
-
+
script.type = "text/javascript";
try {
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
} catch(e){}
root.insertBefore( script, root.firstChild );
-
+
// Make sure that the execution of code works by injecting a script
// tag with appendChild/createTextNode
// (IE doesn't support this, fails, and uses .text instead)