(function( window, undefined ) {
var document = window.document,
navigator = window.navigator,
location = window.location;
var jquery = (function() {
var jquery = function( selector, context ) {
return new jquery.fn.init( selector, context, rootjquery );
},
_jquery = window.jquery,
_$ = window.$,
rootjquery,
quickexpr = /^(?:[^#<]*(<[\w\w]+>)[^>]*$|#([\w\-]*)$)/,
rnotwhite = /\s/,
trimleft = /^\s+/,
trimright = /\s+$/,
rsingletag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
rvalidchars = /^[\],:{}\s]*$/,
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fa-f]{4})/g,
rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[ee][+\-]?\d+)?/g,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
rwebkit = /(webkit)[ \/]([\w.]+)/,
ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
rmsie = /(msie) ([\w.]+)/,
rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
rdashalpha = /-([a-z]|[0-9])/ig,
rmsprefix = /^-ms-/,
fcamelcase = function( all, letter ) {
return ( letter + "" ).touppercase();
},
useragent = navigator.useragent,
browsermatch,
readylist,
domcontentloaded,
tostring = object.prototype.tostring,
hasown = object.prototype.hasownproperty,
push = array.prototype.push,
slice = array.prototype.slice,
trim = string.prototype.trim,
indexof = array.prototype.indexof,
class2type = {};
jquery.fn = jquery.prototype = {
constructor: jquery,
init: function( selector, context, rootjquery ) {
var match, elem, ret, doc;
if ( !selector ) {
return this;
}
if ( selector.nodetype ) {
this.context = this[0] = selector;
this.length = 1;
return this;
}
if ( selector === "body" && !context && document.body ) {
this.context = document;
this[0] = document.body;
this.selector = selector;
this.length = 1;
return this;
}
if ( typeof selector === "string" ) {
if ( selector.charat(0) === "<" && selector.charat( selector.length - 1 ) === ">" && selector.length >= 3 ) {
match = [ null, selector, null ];
} else {
match = quickexpr.exec( selector );
}
if ( match && (match[1] || !context) ) {
if ( match[1] ) {
context = context instanceof jquery ? context[0] : context;
doc = ( context ? context.ownerdocument || context : document );
ret = rsingletag.exec( selector );
if ( ret ) {
if ( jquery.isplainobject( context ) ) {
selector = [ document.createelement( ret[1] ) ];
jquery.fn.attr.call( selector, context, true );
} else {
selector = [ doc.createelement( ret[1] ) ];
}
} else {
ret = jquery.buildfragment( [ match[1] ], [ doc ] );
selector = ( ret.cacheable ? jquery.clone(ret.fragment) : ret.fragment ).childnodes;
}
return jquery.merge( this, selector );
} else {
elem = document.getelementbyid( match[2] );
if ( elem && elem.parentnode ) {
if ( elem.id !== match[2] ) {
return rootjquery.find( selector );
}
this.length = 1;
this[0] = elem;
}
this.context = document;
this.selector = selector;
return this;
}
} else if ( !context || context.jquery ) {
return ( context || rootjquery ).find( selector );
} else {
return this.constructor( context ).find( selector );
}
} else if ( jquery.isfunction( selector ) ) {
return rootjquery.ready( selector );
}
if ( selector.selector !== undefined ) {
this.selector = selector.selector;
this.context = selector.context;
}
return jquery.makearray( selector, this );
},
selector: "",
jquery: "1.7.2",
length: 0,
size: function() {
return this.length;
},
toarray: function() {
return slice.call( this, 0 );
},
get: function( num ) {
return num == null ?
this.toarray() :
( num < 0 ? this[ this.length + num ] : this[ num ] );
},
pushstack: function( elems, name, selector ) {
var ret = this.constructor();
if ( jquery.isarray( elems ) ) {
push.apply( ret, elems );
} else {
jquery.merge( ret, elems );
}
ret.prevobject = this;
ret.context = this.context;
if ( name === "find" ) {
ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
} else if ( name ) {
ret.selector = this.selector + "." + name + "(" + selector + ")";
}
return ret;
},
each: function( callback, args ) {
return jquery.each( this, callback, args );
},
ready: function( fn ) {
jquery.bindready();
readylist.add( fn );
return this;
},
eq: function( i ) {
i = +i;
return i === -1 ?
this.slice( i ) :
this.slice( i, i + 1 );
},
first: function() {
return this.eq( 0 );
},
last: function() {
return this.eq( -1 );
},
slice: function() {
return this.pushstack( slice.apply( this, arguments ),
"slice", slice.call(arguments).join(",") );
},
map: function( callback ) {
return this.pushstack( jquery.map(this, function( elem, i ) {
return callback.call( elem, i, elem );
}));
},
end: function() {
return this.prevobject || this.constructor(null);
},
push: push,
sort: [].sort,
splice: [].splice
};
jquery.fn.init.prototype = jquery.fn;
jquery.extend = jquery.fn.extend = function() {
var options, name, src, copy, copyisarray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
if ( typeof target === "boolean" ) {
deep = target;
target = arguments[1] || {};
i = 2;
}
if ( typeof target !== "object" && !jquery.isfunction(target) ) {
target = {};
}
if ( length === i ) {
target = this;
--i;
}
for ( ; i < length; i++ ) {
if ( (options = arguments[ i ]) != null ) {
for ( name in options ) {
src = target[ name ];
copy = options[ name ];
if ( target === copy ) {
continue;
}
if ( deep && copy && ( jquery.isplainobject(copy) || (copyisarray = jquery.isarray(copy)) ) ) {
if ( copyisarray ) {
copyisarray = false;
clone = src && jquery.isarray(src) ? src : [];
} else {
clone = src && jquery.isplainobject(src) ? src : {};
}
target[ name ] = jquery.extend( deep, clone, copy );
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
}
}
}
return target;
};
jquery.extend({
noconflict: function( deep ) {
if ( window.$ === jquery ) {
window.$ = _$;
}
if ( deep && window.jquery === jquery ) {
window.jquery = _jquery;
}
return jquery;
},
isready: false,
readywait: 1,
holdready: function( hold ) {
if ( hold ) {
jquery.readywait++;
} else {
jquery.ready( true );
}
},
ready: function( wait ) {
if ( (wait === true && !--jquery.readywait) || (wait !== true && !jquery.isready) ) {
if ( !document.body ) {
return settimeout( jquery.ready, 1 );
}
jquery.isready = true;
if ( wait !== true && --jquery.readywait > 0 ) {
return;
}
readylist.firewith( document, [ jquery ] );
if ( jquery.fn.trigger ) {
jquery( document ).trigger( "ready" ).off( "ready" );
}
}
},
bindready: function() {
if ( readylist ) {
return;
}
readylist = jquery.callbacks( "once memory" );
if ( document.readystate === "complete" ) {
return settimeout( jquery.ready, 1 );
}
if ( document.addeventlistener ) {
document.addeventlistener( "domcontentloaded", domcontentloaded, false );
window.addeventlistener( "load", jquery.ready, false );
} else if ( document.attachevent ) {
document.attachevent( "onreadystatechange", domcontentloaded );
window.attachevent( "onload", jquery.ready );
var toplevel = false;
try {
toplevel = window.frameelement == null;
} catch(e) {}
if ( document.documentelement.doscroll && toplevel ) {
doscrollcheck();
}
}
},
isfunction: function( obj ) {
return jquery.type(obj) === "function";
},
isarray: array.isarray || function( obj ) {
return jquery.type(obj) === "array";
},
iswindow: function( obj ) {
return obj != null && obj == obj.window;
},
isnumeric: function( obj ) {
return !isnan( parsefloat(obj) ) && isfinite( obj );
},
type: function( obj ) {
return obj == null ?
string( obj ) :
class2type[ tostring.call(obj) ] || "object";
},
isplainobject: function( obj ) {
if ( !obj || jquery.type(obj) !== "object" || obj.nodetype || jquery.iswindow( obj ) ) {
return false;
}
try {
if ( obj.constructor &&
!hasown.call(obj, "constructor") &&
!hasown.call(obj.constructor.prototype, "isprototypeof") ) {
return false;
}
} catch ( e ) {
return false;
}
var key;
for ( key in obj ) {}
return key === undefined || hasown.call( obj, key );
},
isemptyobject: function( obj ) {
for ( var name in obj ) {
return false;
}
return true;
},
error: function( msg ) {
throw new error( msg );
},
parsejson: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
}
data = jquery.trim( data );
if ( window.json && window.json.parse ) {
return window.json.parse( data );
}
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
.replace( rvalidtokens, "]" )
.replace( rvalidbraces, "")) ) {
return ( new function( "return " + data ) )();
}
jquery.error( "invalid json: " + data );
},
parsexml: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
}
var xml, tmp;
try {
if ( window.domparser ) {
tmp = new domparser();
xml = tmp.parsefromstring( data , "text/xml" );
} else {
xml = new activexobject( "microsoft.xmldom" );
xml.async = "false";
xml.loadxml( data );
}
} catch( e ) {
xml = undefined;
}
if ( !xml || !xml.documentelement || xml.getelementsbytagname( "parsererror" ).length ) {
jquery.error( "invalid xml: " + data );
}
return xml;
},
noop: function() {},
globaleval: function( data ) {
if ( data && rnotwhite.test( data ) ) {
( window.execscript || function( data ) {
window[ "eval" ].call( window, data );
} )( data );
}
},
camelcase: function( string ) {
return string.replace( rmsprefix, "ms-" ).replace( rdashalpha, fcamelcase );
},
nodename: function( elem, name ) {
return elem.nodename && elem.nodename.touppercase() === name.touppercase();
},
each: function( object, callback, args ) {
var name, i = 0,
length = object.length,
isobj = length === undefined || jquery.isfunction( object );
if ( args ) {
if ( isobj ) {
for ( name in object ) {
if ( callback.apply( object[ name ], args ) === false ) {
break;
}
}
} else {
for ( ; i < length; ) {
if ( callback.apply( object[ i++ ], args ) === false ) {
break;
}
}
}
} else {
if ( isobj ) {
for ( name in object ) {
if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
break;
}
}
} else {
for ( ; i < length; ) {
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
break;
}
}
}
}
return object;
},
trim: trim ?
function( text ) {
return text == null ?
"" :
trim.call( text );
} :
function( text ) {
return text == null ?
"" :
text.tostring().replace( trimleft, "" ).replace( trimright, "" );
},
makearray: function( array, results ) {
var ret = results || [];
if ( array != null ) {
var type = jquery.type( array );
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jquery.iswindow( array ) ) {
push.call( ret, array );
} else {
jquery.merge( ret, array );
}
}
return ret;
},
inarray: function( elem, array, i ) {
var len;
if ( array ) {
if ( indexof ) {
return indexof.call( array, elem, i );
}
len = array.length;
i = i ? i < 0 ? math.max( 0, len + i ) : i : 0;
for ( ; i < len; i++ ) {
if ( i in array && array[ i ] === elem ) {
return i;
}
}
}
return -1;
},
merge: function( first, second ) {
var i = first.length,
j = 0;
if ( typeof second.length === "number" ) {
for ( var l = second.length; j < l; j++ ) {
first[ i++ ] = second[ j ];
}
} else {
while ( second[j] !== undefined ) {
first[ i++ ] = second[ j++ ];
}
}
first.length = i;
return first;
},
grep: function( elems, callback, inv ) {
var ret = [], retval;
inv = !!inv;
for ( var i = 0, length = elems.length; i < length; i++ ) {
retval = !!callback( elems[ i ], i );
if ( inv !== retval ) {
ret.push( elems[ i ] );
}
}
return ret;
},
map: function( elems, callback, arg ) {
var value, key, ret = [],
i = 0,
length = elems.length,
isarray = elems instanceof jquery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jquery.isarray( elems ) ) ;
if ( isarray ) {
for ( ; i < length; i++ ) {
value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret[ ret.length ] = value;
}
}
} else {
for ( key in elems ) {
value = callback( elems[ key ], key, arg );
if ( value != null ) {
ret[ ret.length ] = value;
}
}
}
return ret.concat.apply( [], ret );
},
guid: 1,
proxy: function( fn, context ) {
if ( typeof context === "string" ) {
var tmp = fn[ context ];
context = fn;
fn = tmp;
}
if ( !jquery.isfunction( fn ) ) {
return undefined;
}
var args = slice.call( arguments, 2 ),
proxy = function() {
return fn.apply( context, args.concat( slice.call( arguments ) ) );
};
proxy.guid = fn.guid = fn.guid || proxy.guid || jquery.guid++;
return proxy;
},
access: function( elems, fn, key, value, chainable, emptyget, pass ) {
var exec,
bulk = key == null,
i = 0,
length = elems.length;
if ( key && typeof key === "object" ) {
for ( i in key ) {
jquery.access( elems, fn, i, key[i], 1, emptyget, value );
}
chainable = 1;
} else if ( value !== undefined ) {
exec = pass === undefined && jquery.isfunction( value );
if ( bulk ) {
if ( exec ) {
exec = fn;
fn = function( elem, key, value ) {
return exec.call( jquery( elem ), value );
};
} else {
fn.call( elems, value );
fn = null;
}
}
if ( fn ) {
for (; i < length; i++ ) {
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
}
}
chainable = 1;
}
return chainable ?
elems :
bulk ?
fn.call( elems ) :
length ? fn( elems[0], key ) : emptyget;
},
now: function() {
return ( new date() ).gettime();
},
uamatch: function( ua ) {
ua = ua.tolowercase();
var match = rwebkit.exec( ua ) ||
ropera.exec( ua ) ||
rmsie.exec( ua ) ||
ua.indexof("compatible") < 0 && rmozilla.exec( ua ) ||
[];
return { browser: match[1] || "", version: match[2] || "0" };
},
sub: function() {
function jquerysub( selector, context ) {
return new jquerysub.fn.init( selector, context );
}
jquery.extend( true, jquerysub, this );
jquerysub.superclass = this;
jquerysub.fn = jquerysub.prototype = this();
jquerysub.fn.constructor = jquerysub;
jquerysub.sub = this.sub;
jquerysub.fn.init = function init( selector, context ) {
if ( context && context instanceof jquery && !(context instanceof jquerysub) ) {
context = jquerysub( context );
}
return jquery.fn.init.call( this, selector, context, rootjquerysub );
};
jquerysub.fn.init.prototype = jquerysub.fn;
var rootjquerysub = jquerysub(document);
return jquerysub;
},
browser: {}
});
jquery.each("boolean number string function array date regexp object".split(" "), function(i, name) {
class2type[ "[object " + name + "]" ] = name.tolowercase();
});
browsermatch = jquery.uamatch( useragent );
if ( browsermatch.browser ) {
jquery.browser[ browsermatch.browser ] = true;
jquery.browser.version = browsermatch.version;
}
if ( jquery.browser.webkit ) {
jquery.browser.safari = true;
}
if ( rnotwhite.test( "\xa0" ) ) {
trimleft = /^[\s\xa0]+/;
trimright = /[\s\xa0]+$/;
}
rootjquery = jquery(document);
if ( document.addeventlistener ) {
domcontentloaded = function() {
document.removeeventlistener( "domcontentloaded", domcontentloaded, false );
jquery.ready();
};
} else if ( document.attachevent ) {
domcontentloaded = function() {
if ( document.readystate === "complete" ) {
document.detachevent( "onreadystatechange", domcontentloaded );
jquery.ready();
}
};
}
function doscrollcheck() {
if ( jquery.isready ) {
return;
}
try {
document.documentelement.doscroll("left");
} catch(e) {
settimeout( doscrollcheck, 1 );
return;
}
jquery.ready();
}
return jquery;
})();
var flagscache = {};
function createflags( flags ) {
var object = flagscache[ flags ] = {},
i, length;
flags = flags.split( /\s+/ );
for ( i = 0, length = flags.length; i < length; i++ ) {
object[ flags[i] ] = true;
}
return object;
}
jquery.callbacks = function( flags ) {
flags = flags ? ( flagscache[ flags ] || createflags( flags ) ) : {};
var
list = [],
stack = [],
memory,
fired,
firing,
firingstart,
firinglength,
firingindex,
add = function( args ) {
var i,
length,
elem,
type,
actual;
for ( i = 0, length = args.length; i < length; i++ ) {
elem = args[ i ];
type = jquery.type( elem );
if ( type === "array" ) {
add( elem );
} else if ( type === "function" ) {
if ( !flags.unique || !self.has( elem ) ) {
list.push( elem );
}
}
}
},
fire = function( context, args ) {
args = args || [];
memory = !flags.memory || [ context, args ];
fired = true;
firing = true;
firingindex = firingstart || 0;
firingstart = 0;
firinglength = list.length;
for ( ; list && firingindex < firinglength; firingindex++ ) {
if ( list[ firingindex ].apply( context, args ) === false && flags.stoponfalse ) {
memory = true;
break;
}
}
firing = false;
if ( list ) {
if ( !flags.once ) {
if ( stack && stack.length ) {
memory = stack.shift();
self.firewith( memory[ 0 ], memory[ 1 ] );
}
} else if ( memory === true ) {
self.disable();
} else {
list = [];
}
}
},
self = {
add: function() {
if ( list ) {
var length = list.length;
add( arguments );
if ( firing ) {
firinglength = list.length;
} else if ( memory && memory !== true ) {
firingstart = length;
fire( memory[ 0 ], memory[ 1 ] );
}
}
return this;
},
remove: function() {
if ( list ) {
var args = arguments,
argindex = 0,
arglength = args.length;
for ( ; argindex < arglength ; argindex++ ) {
for ( var i = 0; i < list.length; i++ ) {
if ( args[ argindex ] === list[ i ] ) {
if ( firing ) {
if ( i <= firinglength ) {
firinglength--;
if ( i <= firingindex ) {
firingindex--;
}
}
}
list.splice( i--, 1 );
if ( flags.unique ) {
break;
}
}
}
}
}
return this;
},
has: function( fn ) {
if ( list ) {
var i = 0,
length = list.length;
for ( ; i < length; i++ ) {
if ( fn === list[ i ] ) {
return true;
}
}
}
return false;
},
empty: function() {
list = [];
return this;
},
disable: function() {
list = stack = memory = undefined;
return this;
},
disabled: function() {
return !list;
},
lock: function() {
stack = undefined;
if ( !memory || memory === true ) {
self.disable();
}
return this;
},
locked: function() {
return !stack;
},
firewith: function( context, args ) {
if ( stack ) {
if ( firing ) {
if ( !flags.once ) {
stack.push( [ context, args ] );
}
} else if ( !( flags.once && memory ) ) {
fire( context, args );
}
}
return this;
},
fire: function() {
self.firewith( this, arguments );
return this;
},
fired: function() {
return !!fired;
}
};
return self;
};
var
slicedeferred = [].slice;
jquery.extend({
deferred: function( func ) {
var donelist = jquery.callbacks( "once memory" ),
faillist = jquery.callbacks( "once memory" ),
progresslist = jquery.callbacks( "memory" ),
state = "pending",
lists = {
resolve: donelist,
reject: faillist,
notify: progresslist
},
promise = {
done: donelist.add,
fail: faillist.add,
progress: progresslist.add,
state: function() {
return state;
},
isresolved: donelist.fired,
isrejected: faillist.fired,
then: function( donecallbacks, failcallbacks, progresscallbacks ) {
deferred.done( donecallbacks ).fail( failcallbacks ).progress( progresscallbacks );
return this;
},
always: function() {
deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
return this;
},
pipe: function( fndone, fnfail, fnprogress ) {
return jquery.deferred(function( newdefer ) {
jquery.each( {
done: [ fndone, "resolve" ],
fail: [ fnfail, "reject" ],
progress: [ fnprogress, "notify" ]
}, function( handler, data ) {
var fn = data[ 0 ],
action = data[ 1 ],
returned;
if ( jquery.isfunction( fn ) ) {
deferred[ handler ](function() {
returned = fn.apply( this, arguments );
if ( returned && jquery.isfunction( returned.promise ) ) {
returned.promise().then( newdefer.resolve, newdefer.reject, newdefer.notify );
} else {
newdefer[ action + "with" ]( this === deferred ? newdefer : this, [ returned ] );
}
});
} else {
deferred[ handler ]( newdefer[ action ] );
}
});
}).promise();
},
promise: function( obj ) {
if ( obj == null ) {
obj = promise;
} else {
for ( var key in promise ) {
obj[ key ] = promise[ key ];
}
}
return obj;
}
},
deferred = promise.promise({}),
key;
for ( key in lists ) {
deferred[ key ] = lists[ key ].fire;
deferred[ key + "with" ] = lists[ key ].firewith;
}
deferred.done( function() {
state = "resolved";
}, faillist.disable, progresslist.lock ).fail( function() {
state = "rejected";
}, donelist.disable, progresslist.lock );
if ( func ) {
func.call( deferred, deferred );
}
return deferred;
},
when: function( firstparam ) {
var args = slicedeferred.call( arguments, 0 ),
i = 0,
length = args.length,
pvalues = new array( length ),
count = length,
pcount = length,
deferred = length <= 1 && firstparam && jquery.isfunction( firstparam.promise ) ?
firstparam :
jquery.deferred(),
promise = deferred.promise();
function resolvefunc( i ) {
return function( value ) {
args[ i ] = arguments.length > 1 ? slicedeferred.call( arguments, 0 ) : value;
if ( !( --count ) ) {
deferred.resolvewith( deferred, args );
}
};
}
function progressfunc( i ) {
return function( value ) {
pvalues[ i ] = arguments.length > 1 ? slicedeferred.call( arguments, 0 ) : value;
deferred.notifywith( promise, pvalues );
};
}
if ( length > 1 ) {
for ( ; i < length; i++ ) {
if ( args[ i ] && args[ i ].promise && jquery.isfunction( args[ i ].promise ) ) {
args[ i ].promise().then( resolvefunc(i), deferred.reject, progressfunc(i) );
} else {
--count;
}
}
if ( !count ) {
deferred.resolvewith( deferred, args );
}
} else if ( deferred !== firstparam ) {
deferred.resolvewith( deferred, length ? [ firstparam ] : [] );
}
return promise;
}
});
jquery.support = (function() {
var support,
all,
a,
select,
opt,
input,
fragment,
tds,
events,
eventname,
i,
issupported,
div = document.createelement( "div" ),
documentelement = document.documentelement;
div.setattribute("classname", "t");
div.innerhtml = "
a";
all = div.getelementsbytagname( "*" );
a = div.getelementsbytagname( "a" )[ 0 ];
if ( !all || !all.length || !a ) {
return {};
}
select = document.createelement( "select" );
opt = select.appendchild( document.createelement("option") );
input = div.getelementsbytagname( "input" )[ 0 ];
support = {
leadingwhitespace: ( div.firstchild.nodetype === 3 ),
tbody: !div.getelementsbytagname("tbody").length,
htmlserialize: !!div.getelementsbytagname("link").length,
style: /top/.test( a.getattribute("style") ),
hrefnormalized: ( a.getattribute("href") === "/a" ),
opacity: /^0.55/.test( a.style.opacity ),
cssfloat: !!a.style.cssfloat,
checkon: ( input.value === "on" ),
optselected: opt.selected,
getsetattribute: div.classname !== "t",
enctype: !!document.createelement("form").enctype,
html5clone: document.createelement("nav").clonenode( true ).outerhtml !== "<:nav>",
submitbubbles: true,
changebubbles: true,
focusinbubbles: false,
deleteexpando: true,
nocloneevent: true,
inlineblockneedslayout: false,
shrinkwrapblocks: false,
reliablemarginright: true,
pixelmargin: true
};
jquery.boxmodel = support.boxmodel = (document.compatmode === "css1compat");
input.checked = true;
support.noclonechecked = input.clonenode( true ).checked;
select.disabled = true;
support.optdisabled = !opt.disabled;
try {
delete div.test;
} catch( e ) {
support.deleteexpando = false;
}
if ( !div.addeventlistener && div.attachevent && div.fireevent ) {
div.attachevent( "onclick", function() {
support.nocloneevent = false;
});
div.clonenode( true ).fireevent( "onclick" );
}
input = document.createelement("input");
input.value = "t";
input.setattribute("type", "radio");
support.radiovalue = input.value === "t";
input.setattribute("checked", "checked");
input.setattribute( "name", "t" );
div.appendchild( input );
fragment = document.createdocumentfragment();
fragment.appendchild( div.lastchild );
support.checkclone = fragment.clonenode( true ).clonenode( true ).lastchild.checked;
support.appendchecked = input.checked;
fragment.removechild( input );
fragment.appendchild( div );
if ( div.attachevent ) {
for ( i in {
submit: 1,
change: 1,
focusin: 1
}) {
eventname = "on" + i;
issupported = ( eventname in div );
if ( !issupported ) {
div.setattribute( eventname, "return;" );
issupported = ( typeof div[ eventname ] === "function" );
}
support[ i + "bubbles" ] = issupported;
}
}
fragment.removechild( div );
fragment = select = opt = div = input = null;
jquery(function() {
var container, outer, inner, table, td, offsetsupport,
margindiv, conmargintop, style, html, positiontopleftwidthheight,
paddingmarginbordervisibility, paddingmarginborder,
body = document.getelementsbytagname("body")[0];
if ( !body ) {
return;
}
conmargintop = 1;
paddingmarginborder = "padding:0;margin:0;border:";
positiontopleftwidthheight = "position:absolute;top:0;left:0;width:1px;height:1px;";
paddingmarginbordervisibility = paddingmarginborder + "0;visibility:hidden;";
style = "style='" + positiontopleftwidthheight + paddingmarginborder + "5px solid #000;";
html = "" +
"";
container = document.createelement("div");
container.style.csstext = paddingmarginbordervisibility + "width:0;height:0;position:static;top:0;margin-top:" + conmargintop + "px";
body.insertbefore( container, body.firstchild );
div = document.createelement("div");
container.appendchild( div );
div.innerhtml = "";
tds = div.getelementsbytagname( "td" );
issupported = ( tds[ 0 ].offsetheight === 0 );
tds[ 0 ].style.display = "";
tds[ 1 ].style.display = "none";
support.reliablehiddenoffsets = issupported && ( tds[ 0 ].offsetheight === 0 );
if ( window.getcomputedstyle ) {
div.innerhtml = "";
margindiv = document.createelement( "div" );
margindiv.style.width = "0";
margindiv.style.marginright = "0";
div.style.width = "2px";
div.appendchild( margindiv );
support.reliablemarginright =
( parseint( ( window.getcomputedstyle( margindiv, null ) || { marginright: 0 } ).marginright, 10 ) || 0 ) === 0;
}
if ( typeof div.style.zoom !== "undefined" ) {
div.innerhtml = "";
div.style.width = div.style.padding = "1px";
div.style.border = 0;
div.style.overflow = "hidden";
div.style.display = "inline";
div.style.zoom = 1;
support.inlineblockneedslayout = ( div.offsetwidth === 3 );
div.style.display = "block";
div.style.overflow = "visible";
div.innerhtml = "";
support.shrinkwrapblocks = ( div.offsetwidth !== 3 );
}
div.style.csstext = positiontopleftwidthheight + paddingmarginbordervisibility;
div.innerhtml = html;
outer = div.firstchild;
inner = outer.firstchild;
td = outer.nextsibling.firstchild.firstchild;
offsetsupport = {
doesnotaddborder: ( inner.offsettop !== 5 ),
doesaddborderfortableandcells: ( td.offsettop === 5 )
};
inner.style.position = "fixed";
inner.style.top = "20px";
offsetsupport.fixedposition = ( inner.offsettop === 20 || inner.offsettop === 15 );
inner.style.position = inner.style.top = "";
outer.style.overflow = "hidden";
outer.style.position = "relative";
offsetsupport.subtractsborderforoverflownotvisible = ( inner.offsettop === -5 );
offsetsupport.doesnotincludemargininbodyoffset = ( body.offsettop !== conmargintop );
if ( window.getcomputedstyle ) {
div.style.margintop = "1%";
support.pixelmargin = ( window.getcomputedstyle( div, null ) || { margintop: 0 } ).margintop !== "1%";
}
if ( typeof container.style.zoom !== "undefined" ) {
container.style.zoom = 1;
}
body.removechild( container );
margindiv = div = container = null;
jquery.extend( support, offsetsupport );
});
return support;
})();
var rbrace = /^(?:\{.*\}|\[.*\])$/,
rmultidash = /([a-z])/g;
jquery.extend({
cache: {},
uuid: 0,
expando: "jquery" + ( jquery.fn.jquery + math.random() ).replace( /\d/g, "" ),
nodata: {
"embed": true,
"object": "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
"applet": true
},
hasdata: function( elem ) {
elem = elem.nodetype ? jquery.cache[ elem[jquery.expando] ] : elem[ jquery.expando ];
return !!elem && !isemptydataobject( elem );
},
data: function( elem, name, data, pvt /* internal use only */ ) {
if ( !jquery.acceptdata( elem ) ) {
return;
}
var privatecache, thiscache, ret,
internalkey = jquery.expando,
getbyname = typeof name === "string",
isnode = elem.nodetype,
cache = isnode ? jquery.cache : elem,
id = isnode ? elem[ internalkey ] : elem[ internalkey ] && internalkey,
isevents = name === "events";
if ( (!id || !cache[id] || (!isevents && !pvt && !cache[id].data)) && getbyname && data === undefined ) {
return;
}
if ( !id ) {
if ( isnode ) {
elem[ internalkey ] = id = ++jquery.uuid;
} else {
id = internalkey;
}
}
if ( !cache[ id ] ) {
cache[ id ] = {};
if ( !isnode ) {
cache[ id ].tojson = jquery.noop;
}
}
if ( typeof name === "object" || typeof name === "function" ) {
if ( pvt ) {
cache[ id ] = jquery.extend( cache[ id ], name );
} else {
cache[ id ].data = jquery.extend( cache[ id ].data, name );
}
}
privatecache = thiscache = cache[ id ];
if ( !pvt ) {
if ( !thiscache.data ) {
thiscache.data = {};
}
thiscache = thiscache.data;
}
if ( data !== undefined ) {
thiscache[ jquery.camelcase( name ) ] = data;
}
if ( isevents && !thiscache[ name ] ) {
return privatecache.events;
}
if ( getbyname ) {
ret = thiscache[ name ];
if ( ret == null ) {
ret = thiscache[ jquery.camelcase( name ) ];
}
} else {
ret = thiscache;
}
return ret;
},
removedata: function( elem, name, pvt ) {
if ( !jquery.acceptdata( elem ) ) {
return;
}
var thiscache, i, l,
internalkey = jquery.expando,
isnode = elem.nodetype,
cache = isnode ? jquery.cache : elem,
id = isnode ? elem[ internalkey ] : internalkey;
if ( !cache[ id ] ) {
return;
}
if ( name ) {
thiscache = pvt ? cache[ id ] : cache[ id ].data;
if ( thiscache ) {
if ( !jquery.isarray( name ) ) {
if ( name in thiscache ) {
name = [ name ];
} else {
name = jquery.camelcase( name );
if ( name in thiscache ) {
name = [ name ];
} else {
name = name.split( " " );
}
}
}
for ( i = 0, l = name.length; i < l; i++ ) {
delete thiscache[ name[i] ];
}
if ( !( pvt ? isemptydataobject : jquery.isemptyobject )( thiscache ) ) {
return;
}
}
}
if ( !pvt ) {
delete cache[ id ].data;
if ( !isemptydataobject(cache[ id ]) ) {
return;
}
}
if ( jquery.support.deleteexpando || !cache.setinterval ) {
delete cache[ id ];
} else {
cache[ id ] = null;
}
if ( isnode ) {
if ( jquery.support.deleteexpando ) {
delete elem[ internalkey ];
} else if ( elem.removeattribute ) {
elem.removeattribute( internalkey );
} else {
elem[ internalkey ] = null;
}
}
},
_data: function( elem, name, data ) {
return jquery.data( elem, name, data, true );
},
acceptdata: function( elem ) {
if ( elem.nodename ) {
var match = jquery.nodata[ elem.nodename.tolowercase() ];
if ( match ) {
return !(match === true || elem.getattribute("classid") !== match);
}
}
return true;
}
});
jquery.fn.extend({
data: function( key, value ) {
var parts, part, attr, name, l,
elem = this[0],
i = 0,
data = null;
if ( key === undefined ) {
if ( this.length ) {
data = jquery.data( elem );
if ( elem.nodetype === 1 && !jquery._data( elem, "parsedattrs" ) ) {
attr = elem.attributes;
for ( l = attr.length; i < l; i++ ) {
name = attr[i].name;
if ( name.indexof( "data-" ) === 0 ) {
name = jquery.camelcase( name.substring(5) );
dataattr( elem, name, data[ name ] );
}
}
jquery._data( elem, "parsedattrs", true );
}
}
return data;
}
if ( typeof key === "object" ) {
return this.each(function() {
jquery.data( this, key );
});
}
parts = key.split( ".", 2 );
parts[1] = parts[1] ? "." + parts[1] : "";
part = parts[1] + "!";
return jquery.access( this, function( value ) {
if ( value === undefined ) {
data = this.triggerhandler( "getdata" + part, [ parts[0] ] );
if ( data === undefined && elem ) {
data = jquery.data( elem, key );
data = dataattr( elem, key, data );
}
return data === undefined && parts[1] ?
this.data( parts[0] ) :
data;
}
parts[1] = value;
this.each(function() {
var self = jquery( this );
self.triggerhandler( "setdata" + part, parts );
jquery.data( this, key, value );
self.triggerhandler( "changedata" + part, parts );
});
}, null, value, arguments.length > 1, null, false );
},
removedata: function( key ) {
return this.each(function() {
jquery.removedata( this, key );
});
}
});
function dataattr( elem, key, data ) {
if ( data === undefined && elem.nodetype === 1 ) {
var name = "data-" + key.replace( rmultidash, "-$1" ).tolowercase();
data = elem.getattribute( name );
if ( typeof data === "string" ) {
try {
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :
jquery.isnumeric( data ) ? +data :
rbrace.test( data ) ? jquery.parsejson( data ) :
data;
} catch( e ) {}
jquery.data( elem, key, data );
} else {
data = undefined;
}
}
return data;
}
function isemptydataobject( obj ) {
for ( var name in obj ) {
if ( name === "data" && jquery.isemptyobject( obj[name] ) ) {
continue;
}
if ( name !== "tojson" ) {
return false;
}
}
return true;
}
function handlequeuemarkdefer( elem, type, src ) {
var deferdatakey = type + "defer",
queuedatakey = type + "queue",
markdatakey = type + "mark",
defer = jquery._data( elem, deferdatakey );
if ( defer &&
( src === "queue" || !jquery._data(elem, queuedatakey) ) &&
( src === "mark" || !jquery._data(elem, markdatakey) ) ) {
settimeout( function() {
if ( !jquery._data( elem, queuedatakey ) &&
!jquery._data( elem, markdatakey ) ) {
jquery.removedata( elem, deferdatakey, true );
defer.fire();
}
}, 0 );
}
}
jquery.extend({
_mark: function( elem, type ) {
if ( elem ) {
type = ( type || "fx" ) + "mark";
jquery._data( elem, type, (jquery._data( elem, type ) || 0) + 1 );
}
},
_unmark: function( force, elem, type ) {
if ( force !== true ) {
type = elem;
elem = force;
force = false;
}
if ( elem ) {
type = type || "fx";
var key = type + "mark",
count = force ? 0 : ( (jquery._data( elem, key ) || 1) - 1 );
if ( count ) {
jquery._data( elem, key, count );
} else {
jquery.removedata( elem, key, true );
handlequeuemarkdefer( elem, type, "mark" );
}
}
},
queue: function( elem, type, data ) {
var q;
if ( elem ) {
type = ( type || "fx" ) + "queue";
q = jquery._data( elem, type );
if ( data ) {
if ( !q || jquery.isarray(data) ) {
q = jquery._data( elem, type, jquery.makearray(data) );
} else {
q.push( data );
}
}
return q || [];
}
},
dequeue: function( elem, type ) {
type = type || "fx";
var queue = jquery.queue( elem, type ),
fn = queue.shift(),
hooks = {};
if ( fn === "inprogress" ) {
fn = queue.shift();
}
if ( fn ) {
if ( type === "fx" ) {
queue.unshift( "inprogress" );
}
jquery._data( elem, type + ".run", hooks );
fn.call( elem, function() {
jquery.dequeue( elem, type );
}, hooks );
}
if ( !queue.length ) {
jquery.removedata( elem, type + "queue " + type + ".run", true );
handlequeuemarkdefer( elem, type, "queue" );
}
}
});
jquery.fn.extend({
queue: function( type, data ) {
var setter = 2;
if ( typeof type !== "string" ) {
data = type;
type = "fx";
setter--;
}
if ( arguments.length < setter ) {
return jquery.queue( this[0], type );
}
return data === undefined ?
this :
this.each(function() {
var queue = jquery.queue( this, type, data );
if ( type === "fx" && queue[0] !== "inprogress" ) {
jquery.dequeue( this, type );
}
});
},
dequeue: function( type ) {
return this.each(function() {
jquery.dequeue( this, type );
});
},
delay: function( time, type ) {
time = jquery.fx ? jquery.fx.speeds[ time ] || time : time;
type = type || "fx";
return this.queue( type, function( next, hooks ) {
var timeout = settimeout( next, time );
hooks.stop = function() {
cleartimeout( timeout );
};
});
},
clearqueue: function( type ) {
return this.queue( type || "fx", [] );
},
promise: function( type, object ) {
if ( typeof type !== "string" ) {
object = type;
type = undefined;
}
type = type || "fx";
var defer = jquery.deferred(),
elements = this,
i = elements.length,
count = 1,
deferdatakey = type + "defer",
queuedatakey = type + "queue",
markdatakey = type + "mark",
tmp;
function resolve() {
if ( !( --count ) ) {
defer.resolvewith( elements, [ elements ] );
}
}
while( i-- ) {
if (( tmp = jquery.data( elements[ i ], deferdatakey, undefined, true ) ||
( jquery.data( elements[ i ], queuedatakey, undefined, true ) ||
jquery.data( elements[ i ], markdatakey, undefined, true ) ) &&
jquery.data( elements[ i ], deferdatakey, jquery.callbacks( "once memory" ), true ) )) {
count++;
tmp.add( resolve );
}
}
resolve();
return defer.promise( object );
}
});
var rclass = /[\n\t\r]/g,
rspace = /\s+/,
rreturn = /\r/g,
rtype = /^(?:button|input)$/i,
rfocusable = /^(?:button|input|object|select|textarea)$/i,
rclickable = /^a(?:rea)?$/i,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
getsetattribute = jquery.support.getsetattribute,
nodehook, boolhook, fixspecified;
jquery.fn.extend({
attr: function( name, value ) {
return jquery.access( this, jquery.attr, name, value, arguments.length > 1 );
},
removeattr: function( name ) {
return this.each(function() {
jquery.removeattr( this, name );
});
},
prop: function( name, value ) {
return jquery.access( this, jquery.prop, name, value, arguments.length > 1 );
},
removeprop: function( name ) {
name = jquery.propfix[ name ] || name;
return this.each(function() {
try {
this[ name ] = undefined;
delete this[ name ];
} catch( e ) {}
});
},
addclass: function( value ) {
var classnames, i, l, elem,
setclass, c, cl;
if ( jquery.isfunction( value ) ) {
return this.each(function( j ) {
jquery( this ).addclass( value.call(this, j, this.classname) );
});
}
if ( value && typeof value === "string" ) {
classnames = value.split( rspace );
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
if ( elem.nodetype === 1 ) {
if ( !elem.classname && classnames.length === 1 ) {
elem.classname = value;
} else {
setclass = " " + elem.classname + " ";
for ( c = 0, cl = classnames.length; c < cl; c++ ) {
if ( !~setclass.indexof( " " + classnames[ c ] + " " ) ) {
setclass += classnames[ c ] + " ";
}
}
elem.classname = jquery.trim( setclass );
}
}
}
}
return this;
},
removeclass: function( value ) {
var classnames, i, l, elem, classname, c, cl;
if ( jquery.isfunction( value ) ) {
return this.each(function( j ) {
jquery( this ).removeclass( value.call(this, j, this.classname) );
});
}
if ( (value && typeof value === "string") || value === undefined ) {
classnames = ( value || "" ).split( rspace );
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
if ( elem.nodetype === 1 && elem.classname ) {
if ( value ) {
classname = (" " + elem.classname + " ").replace( rclass, " " );
for ( c = 0, cl = classnames.length; c < cl; c++ ) {
classname = classname.replace(" " + classnames[ c ] + " ", " ");
}
elem.classname = jquery.trim( classname );
} else {
elem.classname = "";
}
}
}
}
return this;
},
toggleclass: function( value, stateval ) {
var type = typeof value,
isbool = typeof stateval === "boolean";
if ( jquery.isfunction( value ) ) {
return this.each(function( i ) {
jquery( this ).toggleclass( value.call(this, i, this.classname, stateval), stateval );
});
}
return this.each(function() {
if ( type === "string" ) {
var classname,
i = 0,
self = jquery( this ),
state = stateval,
classnames = value.split( rspace );
while ( (classname = classnames[ i++ ]) ) {
state = isbool ? state : !self.hasclass( classname );
self[ state ? "addclass" : "removeclass" ]( classname );
}
} else if ( type === "undefined" || type === "boolean" ) {
if ( this.classname ) {
jquery._data( this, "__classname__", this.classname );
}
this.classname = this.classname || value === false ? "" : jquery._data( this, "__classname__" ) || "";
}
});
},
hasclass: function( selector ) {
var classname = " " + selector + " ",
i = 0,
l = this.length;
for ( ; i < l; i++ ) {
if ( this[i].nodetype === 1 && (" " + this[i].classname + " ").replace(rclass, " ").indexof( classname ) > -1 ) {
return true;
}
}
return false;
},
val: function( value ) {
var hooks, ret, isfunction,
elem = this[0];
if ( !arguments.length ) {
if ( elem ) {
hooks = jquery.valhooks[ elem.type ] || jquery.valhooks[ elem.nodename.tolowercase() ];
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
return ret;
}
ret = elem.value;
return typeof ret === "string" ?
ret.replace(rreturn, "") :
ret == null ? "" : ret;
}
return;
}
isfunction = jquery.isfunction( value );
return this.each(function( i ) {
var self = jquery(this), val;
if ( this.nodetype !== 1 ) {
return;
}
if ( isfunction ) {
val = value.call( this, i, self.val() );
} else {
val = value;
}
if ( val == null ) {
val = "";
} else if ( typeof val === "number" ) {
val += "";
} else if ( jquery.isarray( val ) ) {
val = jquery.map(val, function ( value ) {
return value == null ? "" : value + "";
});
}
hooks = jquery.valhooks[ this.type ] || jquery.valhooks[ this.nodename.tolowercase() ];
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
this.value = val;
}
});
}
});
jquery.extend({
valhooks: {
option: {
get: function( elem ) {
var val = elem.attributes.value;
return !val || val.specified ? elem.value : elem.text;
}
},
select: {
get: function( elem ) {
var value, i, max, option,
index = elem.selectedindex,
values = [],
options = elem.options,
one = elem.type === "select-one";
if ( index < 0 ) {
return null;
}
i = one ? index : 0;
max = one ? index + 1 : options.length;
for ( ; i < max; i++ ) {
option = options[ i ];
if ( option.selected && (jquery.support.optdisabled ? !option.disabled : option.getattribute("disabled") === null) &&
(!option.parentnode.disabled || !jquery.nodename( option.parentnode, "optgroup" )) ) {
value = jquery( option ).val();
if ( one ) {
return value;
}
values.push( value );
}
}
if ( one && !values.length && options.length ) {
return jquery( options[ index ] ).val();
}
return values;
},
set: function( elem, value ) {
var values = jquery.makearray( value );
jquery(elem).find("option").each(function() {
this.selected = jquery.inarray( jquery(this).val(), values ) >= 0;
});
if ( !values.length ) {
elem.selectedindex = -1;
}
return values;
}
}
},
attrfn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
attr: function( elem, name, value, pass ) {
var ret, hooks, notxml,
ntype = elem.nodetype;
if ( !elem || ntype === 3 || ntype === 8 || ntype === 2 ) {
return;
}
if ( pass && name in jquery.attrfn ) {
return jquery( elem )[ name ]( value );
}
if ( typeof elem.getattribute === "undefined" ) {
return jquery.prop( elem, name, value );
}
notxml = ntype !== 1 || !jquery.isxmldoc( elem );
if ( notxml ) {
name = name.tolowercase();
hooks = jquery.attrhooks[ name ] || ( rboolean.test( name ) ? boolhook : nodehook );
}
if ( value !== undefined ) {
if ( value === null ) {
jquery.removeattr( elem, name );
return;
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
elem.setattribute( name, "" + value );
return value;
}
} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
return ret;
} else {
ret = elem.getattribute( name );
return ret === null ?
undefined :
ret;
}
},
removeattr: function( elem, value ) {
var propname, attrnames, name, l, isbool,
i = 0;
if ( value && elem.nodetype === 1 ) {
attrnames = value.tolowercase().split( rspace );
l = attrnames.length;
for ( ; i < l; i++ ) {
name = attrnames[ i ];
if ( name ) {
propname = jquery.propfix[ name ] || name;
isbool = rboolean.test( name );
if ( !isbool ) {
jquery.attr( elem, name, "" );
}
elem.removeattribute( getsetattribute ? name : propname );
if ( isbool && propname in elem ) {
elem[ propname ] = false;
}
}
}
}
},
attrhooks: {
type: {
set: function( elem, value ) {
if ( rtype.test( elem.nodename ) && elem.parentnode ) {
jquery.error( "type property can't be changed" );
} else if ( !jquery.support.radiovalue && value === "radio" && jquery.nodename(elem, "input") ) {
var val = elem.value;
elem.setattribute( "type", value );
if ( val ) {
elem.value = val;
}
return value;
}
}
},
value: {
get: function( elem, name ) {
if ( nodehook && jquery.nodename( elem, "button" ) ) {
return nodehook.get( elem, name );
}
return name in elem ?
elem.value :
null;
},
set: function( elem, value, name ) {
if ( nodehook && jquery.nodename( elem, "button" ) ) {
return nodehook.set( elem, value, name );
}
elem.value = value;
}
}
},
propfix: {
tabindex: "tabindex",
readonly: "readonly",
"for": "htmlfor",
"class": "classname",
maxlength: "maxlength",
cellspacing: "cellspacing",
cellpadding: "cellpadding",
rowspan: "rowspan",
colspan: "colspan",
usemap: "usemap",
frameborder: "frameborder",
contenteditable: "contenteditable"
},
prop: function( elem, name, value ) {
var ret, hooks, notxml,
ntype = elem.nodetype;
if ( !elem || ntype === 3 || ntype === 8 || ntype === 2 ) {
return;
}
notxml = ntype !== 1 || !jquery.isxmldoc( elem );
if ( notxml ) {
name = jquery.propfix[ name ] || name;
hooks = jquery.prophooks[ name ];
}
if ( value !== undefined ) {
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
return ( elem[ name ] = value );
}
} else {
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
return ret;
} else {
return elem[ name ];
}
}
},
prophooks: {
tabindex: {
get: function( elem ) {
var attributenode = elem.getattributenode("tabindex");
return attributenode && attributenode.specified ?
parseint( attributenode.value, 10 ) :
rfocusable.test( elem.nodename ) || rclickable.test( elem.nodename ) && elem.href ?
0 :
undefined;
}
}
}
});
jquery.attrhooks.tabindex = jquery.prophooks.tabindex;
boolhook = {
get: function( elem, name ) {
var attrnode,
property = jquery.prop( elem, name );
return property === true || typeof property !== "boolean" && ( attrnode = elem.getattributenode(name) ) && attrnode.nodevalue !== false ?
name.tolowercase() :
undefined;
},
set: function( elem, value, name ) {
var propname;
if ( value === false ) {
jquery.removeattr( elem, name );
} else {
propname = jquery.propfix[ name ] || name;
if ( propname in elem ) {
elem[ propname ] = true;
}
elem.setattribute( name, name.tolowercase() );
}
return name;
}
};
if ( !getsetattribute ) {
fixspecified = {
name: true,
id: true,
coords: true
};
nodehook = jquery.valhooks.button = {
get: function( elem, name ) {
var ret;
ret = elem.getattributenode( name );
return ret && ( fixspecified[ name ] ? ret.nodevalue !== "" : ret.specified ) ?
ret.nodevalue :
undefined;
},
set: function( elem, value, name ) {
var ret = elem.getattributenode( name );
if ( !ret ) {
ret = document.createattribute( name );
elem.setattributenode( ret );
}
return ( ret.nodevalue = value + "" );
}
};
jquery.attrhooks.tabindex.set = nodehook.set;
jquery.each([ "width", "height" ], function( i, name ) {
jquery.attrhooks[ name ] = jquery.extend( jquery.attrhooks[ name ], {
set: function( elem, value ) {
if ( value === "" ) {
elem.setattribute( name, "auto" );
return value;
}
}
});
});
jquery.attrhooks.contenteditable = {
get: nodehook.get,
set: function( elem, value, name ) {
if ( value === "" ) {
value = "false";
}
nodehook.set( elem, value, name );
}
};
}
if ( !jquery.support.hrefnormalized ) {
jquery.each([ "href", "src", "width", "height" ], function( i, name ) {
jquery.attrhooks[ name ] = jquery.extend( jquery.attrhooks[ name ], {
get: function( elem ) {
var ret = elem.getattribute( name, 2 );
return ret === null ? undefined : ret;
}
});
});
}
if ( !jquery.support.style ) {
jquery.attrhooks.style = {
get: function( elem ) {
return elem.style.csstext.tolowercase() || undefined;
},
set: function( elem, value ) {
return ( elem.style.csstext = "" + value );
}
};
}
if ( !jquery.support.optselected ) {
jquery.prophooks.selected = jquery.extend( jquery.prophooks.selected, {
get: function( elem ) {
var parent = elem.parentnode;
if ( parent ) {
parent.selectedindex;
if ( parent.parentnode ) {
parent.parentnode.selectedindex;
}
}
return null;
}
});
}
if ( !jquery.support.enctype ) {
jquery.propfix.enctype = "encoding";
}
if ( !jquery.support.checkon ) {
jquery.each([ "radio", "checkbox" ], function() {
jquery.valhooks[ this ] = {
get: function( elem ) {
return elem.getattribute("value") === null ? "on" : elem.value;
}
};
});
}
jquery.each([ "radio", "checkbox" ], function() {
jquery.valhooks[ this ] = jquery.extend( jquery.valhooks[ this ], {
set: function( elem, value ) {
if ( jquery.isarray( value ) ) {
return ( elem.checked = jquery.inarray( jquery(elem).val(), value ) >= 0 );
}
}
});
});
var rformelems = /^(?:textarea|input|select)$/i,
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
rhoverhack = /(?:^|\s)hover(\.\s+)?\b/,
rkeyevent = /^key/,
rmouseevent = /^(?:mouse|contextmenu)|click/,
rfocusmorph = /^(?:focusinfocus|focusoutblur)$/,
rquickis = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
quickparse = function( selector ) {
var quick = rquickis.exec( selector );
if ( quick ) {
quick[1] = ( quick[1] || "" ).tolowercase();
quick[3] = quick[3] && new regexp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
}
return quick;
},
quickis = function( elem, m ) {
var attrs = elem.attributes || {};
return (
(!m[1] || elem.nodename.tolowercase() === m[1]) &&
(!m[2] || (attrs.id || {}).value === m[2]) &&
(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
);
},
hoverhack = function( events ) {
return jquery.event.special.hover ? events : events.replace( rhoverhack, "mouseenter$1 mouseleave$1" );
};
jquery.event = {
add: function( elem, types, handler, data, selector ) {
var elemdata, eventhandle, events,
t, tns, type, namespaces, handleobj,
handleobjin, quick, handlers, special;
if ( elem.nodetype === 3 || elem.nodetype === 8 || !types || !handler || !(elemdata = jquery._data( elem )) ) {
return;
}
if ( handler.handler ) {
handleobjin = handler;
handler = handleobjin.handler;
selector = handleobjin.selector;
}
if ( !handler.guid ) {
handler.guid = jquery.guid++;
}
events = elemdata.events;
if ( !events ) {
elemdata.events = events = {};
}
eventhandle = elemdata.handle;
if ( !eventhandle ) {
elemdata.handle = eventhandle = function( e ) {
return typeof jquery !== "undefined" && (!e || jquery.event.triggered !== e.type) ?
jquery.event.dispatch.apply( eventhandle.elem, arguments ) :
undefined;
};
eventhandle.elem = elem;
}
types = jquery.trim( hoverhack(types) ).split( " " );
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = tns[1];
namespaces = ( tns[2] || "" ).split( "." ).sort();
special = jquery.event.special[ type ] || {};
type = ( selector ? special.delegatetype : special.bindtype ) || type;
special = jquery.event.special[ type ] || {};
handleobj = jquery.extend({
type: type,
origtype: tns[1],
data: data,
handler: handler,
guid: handler.guid,
selector: selector,
quick: selector && quickparse( selector ),
namespace: namespaces.join(".")
}, handleobjin );
handlers = events[ type ];
if ( !handlers ) {
handlers = events[ type ] = [];
handlers.delegatecount = 0;
if ( !special.setup || special.setup.call( elem, data, namespaces, eventhandle ) === false ) {
if ( elem.addeventlistener ) {
elem.addeventlistener( type, eventhandle, false );
} else if ( elem.attachevent ) {
elem.attachevent( "on" + type, eventhandle );
}
}
}
if ( special.add ) {
special.add.call( elem, handleobj );
if ( !handleobj.handler.guid ) {
handleobj.handler.guid = handler.guid;
}
}
if ( selector ) {
handlers.splice( handlers.delegatecount++, 0, handleobj );
} else {
handlers.push( handleobj );
}
jquery.event.global[ type ] = true;
}
elem = null;
},
global: {},
remove: function( elem, types, handler, selector, mappedtypes ) {
var elemdata = jquery.hasdata( elem ) && jquery._data( elem ),
t, tns, type, origtype, namespaces, origcount,
j, events, special, handle, eventtype, handleobj;
if ( !elemdata || !(events = elemdata.events) ) {
return;
}
types = jquery.trim( hoverhack( types || "" ) ).split(" ");
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = origtype = tns[1];
namespaces = tns[2];
if ( !type ) {
for ( type in events ) {
jquery.event.remove( elem, type + types[ t ], handler, selector, true );
}
continue;
}
special = jquery.event.special[ type ] || {};
type = ( selector? special.delegatetype : special.bindtype ) || type;
eventtype = events[ type ] || [];
origcount = eventtype.length;
namespaces = namespaces ? new regexp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
for ( j = 0; j < eventtype.length; j++ ) {
handleobj = eventtype[ j ];
if ( ( mappedtypes || origtype === handleobj.origtype ) &&
( !handler || handler.guid === handleobj.guid ) &&
( !namespaces || namespaces.test( handleobj.namespace ) ) &&
( !selector || selector === handleobj.selector || selector === "**" && handleobj.selector ) ) {
eventtype.splice( j--, 1 );
if ( handleobj.selector ) {
eventtype.delegatecount--;
}
if ( special.remove ) {
special.remove.call( elem, handleobj );
}
}
}
if ( eventtype.length === 0 && origcount !== eventtype.length ) {
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
jquery.removeevent( elem, type, elemdata.handle );
}
delete events[ type ];
}
}
if ( jquery.isemptyobject( events ) ) {
handle = elemdata.handle;
if ( handle ) {
handle.elem = null;
}
jquery.removedata( elem, [ "events", "handle" ], true );
}
},
customevent: {
"getdata": true,
"setdata": true,
"changedata": true
},
trigger: function( event, data, elem, onlyhandlers ) {
if ( elem && (elem.nodetype === 3 || elem.nodetype === 8) ) {
return;
}
var type = event.type || event,
namespaces = [],
cache, exclusive, i, cur, old, ontype, special, handle, eventpath, bubbletype;
if ( rfocusmorph.test( type + jquery.event.triggered ) ) {
return;
}
if ( type.indexof( "!" ) >= 0 ) {
type = type.slice(0, -1);
exclusive = true;
}
if ( type.indexof( "." ) >= 0 ) {
namespaces = type.split(".");
type = namespaces.shift();
namespaces.sort();
}
if ( (!elem || jquery.event.customevent[ type ]) && !jquery.event.global[ type ] ) {
return;
}
event = typeof event === "object" ?
event[ jquery.expando ] ? event :
new jquery.event( type, event ) :
new jquery.event( type );
event.type = type;
event.istrigger = true;
event.exclusive = exclusive;
event.namespace = namespaces.join( "." );
event.namespace_re = event.namespace? new regexp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
ontype = type.indexof( ":" ) < 0 ? "on" + type : "";
if ( !elem ) {
cache = jquery.cache;
for ( i in cache ) {
if ( cache[ i ].events && cache[ i ].events[ type ] ) {
jquery.event.trigger( event, data, cache[ i ].handle.elem, true );
}
}
return;
}
event.result = undefined;
if ( !event.target ) {
event.target = elem;
}
data = data != null ? jquery.makearray( data ) : [];
data.unshift( event );
special = jquery.event.special[ type ] || {};
if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
return;
}
eventpath = [[ elem, special.bindtype || type ]];
if ( !onlyhandlers && !special.nobubble && !jquery.iswindow( elem ) ) {
bubbletype = special.delegatetype || type;
cur = rfocusmorph.test( bubbletype + type ) ? elem : elem.parentnode;
old = null;
for ( ; cur; cur = cur.parentnode ) {
eventpath.push([ cur, bubbletype ]);
old = cur;
}
if ( old && old === elem.ownerdocument ) {
eventpath.push([ old.defaultview || old.parentwindow || window, bubbletype ]);
}
}
for ( i = 0; i < eventpath.length && !event.ispropagationstopped(); i++ ) {
cur = eventpath[i][0];
event.type = eventpath[i][1];
handle = ( jquery._data( cur, "events" ) || {} )[ event.type ] && jquery._data( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}
handle = ontype && cur[ ontype ];
if ( handle && jquery.acceptdata( cur ) && handle.apply( cur, data ) === false ) {
event.preventdefault();
}
}
event.type = type;
if ( !onlyhandlers && !event.isdefaultprevented() ) {
if ( (!special._default || special._default.apply( elem.ownerdocument, data ) === false) &&
!(type === "click" && jquery.nodename( elem, "a" )) && jquery.acceptdata( elem ) ) {
if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetwidth !== 0) && !jquery.iswindow( elem ) ) {
old = elem[ ontype ];
if ( old ) {
elem[ ontype ] = null;
}
jquery.event.triggered = type;
elem[ type ]();
jquery.event.triggered = undefined;
if ( old ) {
elem[ ontype ] = old;
}
}
}
}
return event.result;
},
dispatch: function( event ) {
event = jquery.event.fix( event || window.event );
var handlers = ( (jquery._data( this, "events" ) || {} )[ event.type ] || []),
delegatecount = handlers.delegatecount,
args = [].slice.call( arguments, 0 ),
run_all = !event.exclusive && !event.namespace,
special = jquery.event.special[ event.type ] || {},
handlerqueue = [],
i, j, cur, jqcur, ret, selmatch, matched, matches, handleobj, sel, related;
args[0] = event;
event.delegatetarget = this;
if ( special.predispatch && special.predispatch.call( this, event ) === false ) {
return;
}
if ( delegatecount && !(event.button && event.type === "click") ) {
jqcur = jquery(this);
jqcur.context = this.ownerdocument || this;
for ( cur = event.target; cur != this; cur = cur.parentnode || this ) {
if ( cur.disabled !== true ) {
selmatch = {};
matches = [];
jqcur[0] = cur;
for ( i = 0; i < delegatecount; i++ ) {
handleobj = handlers[ i ];
sel = handleobj.selector;
if ( selmatch[ sel ] === undefined ) {
selmatch[ sel ] = (
handleobj.quick ? quickis( cur, handleobj.quick ) : jqcur.is( sel )
);
}
if ( selmatch[ sel ] ) {
matches.push( handleobj );
}
}
if ( matches.length ) {
handlerqueue.push({ elem: cur, matches: matches });
}
}
}
}
if ( handlers.length > delegatecount ) {
handlerqueue.push({ elem: this, matches: handlers.slice( delegatecount ) });
}
for ( i = 0; i < handlerqueue.length && !event.ispropagationstopped(); i++ ) {
matched = handlerqueue[ i ];
event.currenttarget = matched.elem;
for ( j = 0; j < matched.matches.length && !event.isimmediatepropagationstopped(); j++ ) {
handleobj = matched.matches[ j ];
if ( run_all || (!event.namespace && !handleobj.namespace) || event.namespace_re && event.namespace_re.test( handleobj.namespace ) ) {
event.data = handleobj.data;
event.handleobj = handleobj;
ret = ( (jquery.event.special[ handleobj.origtype ] || {}).handle || handleobj.handler )
.apply( matched.elem, args );
if ( ret !== undefined ) {
event.result = ret;
if ( ret === false ) {
event.preventdefault();
event.stoppropagation();
}
}
}
}
}
if ( special.postdispatch ) {
special.postdispatch.call( this, event );
}
return event.result;
},
props: "attrchange attrname relatednode srcelement altkey bubbles cancelable ctrlkey currenttarget eventphase metakey relatedtarget shiftkey target timestamp view which".split(" "),
fixhooks: {},
keyhooks: {
props: "char charcode key keycode".split(" "),
filter: function( event, original ) {
if ( event.which == null ) {
event.which = original.charcode != null ? original.charcode : original.keycode;
}
return event;
}
},
mousehooks: {
props: "button buttons clientx clienty fromelement offsetx offsety pagex pagey screenx screeny toelement".split(" "),
filter: function( event, original ) {
var eventdoc, doc, body,
button = original.button,
fromelement = original.fromelement;
if ( event.pagex == null && original.clientx != null ) {
eventdoc = event.target.ownerdocument || document;
doc = eventdoc.documentelement;
body = eventdoc.body;
event.pagex = original.clientx + ( doc && doc.scrollleft || body && body.scrollleft || 0 ) - ( doc && doc.clientleft || body && body.clientleft || 0 );
event.pagey = original.clienty + ( doc && doc.scrolltop || body && body.scrolltop || 0 ) - ( doc && doc.clienttop || body && body.clienttop || 0 );
}
if ( !event.relatedtarget && fromelement ) {
event.relatedtarget = fromelement === event.target ? original.toelement : fromelement;
}
if ( !event.which && button !== undefined ) {
event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
}
return event;
}
},
fix: function( event ) {
if ( event[ jquery.expando ] ) {
return event;
}
var i, prop,
originalevent = event,
fixhook = jquery.event.fixhooks[ event.type ] || {},
copy = fixhook.props ? this.props.concat( fixhook.props ) : this.props;
event = jquery.event( originalevent );
for ( i = copy.length; i; ) {
prop = copy[ --i ];
event[ prop ] = originalevent[ prop ];
}
if ( !event.target ) {
event.target = originalevent.srcelement || document;
}
if ( event.target.nodetype === 3 ) {
event.target = event.target.parentnode;
}
if ( event.metakey === undefined ) {
event.metakey = event.ctrlkey;
}
return fixhook.filter? fixhook.filter( event, originalevent ) : event;
},
special: {
ready: {
setup: jquery.bindready
},
load: {
nobubble: true
},
focus: {
delegatetype: "focusin"
},
blur: {
delegatetype: "focusout"
},
beforeunload: {
setup: function( data, namespaces, eventhandle ) {
if ( jquery.iswindow( this ) ) {
this.onbeforeunload = eventhandle;
}
},
teardown: function( namespaces, eventhandle ) {
if ( this.onbeforeunload === eventhandle ) {
this.onbeforeunload = null;
}
}
}
},
simulate: function( type, elem, event, bubble ) {
var e = jquery.extend(
new jquery.event(),
event,
{ type: type,
issimulated: true,
originalevent: {}
}
);
if ( bubble ) {
jquery.event.trigger( e, null, elem );
} else {
jquery.event.dispatch.call( elem, e );
}
if ( e.isdefaultprevented() ) {
event.preventdefault();
}
}
};
jquery.event.handle = jquery.event.dispatch;
jquery.removeevent = document.removeeventlistener ?
function( elem, type, handle ) {
if ( elem.removeeventlistener ) {
elem.removeeventlistener( type, handle, false );
}
} :
function( elem, type, handle ) {
if ( elem.detachevent ) {
elem.detachevent( "on" + type, handle );
}
};
jquery.event = function( src, props ) {
if ( !(this instanceof jquery.event) ) {
return new jquery.event( src, props );
}
if ( src && src.type ) {
this.originalevent = src;
this.type = src.type;
this.isdefaultprevented = ( src.defaultprevented || src.returnvalue === false ||
src.getpreventdefault && src.getpreventdefault() ) ? returntrue : returnfalse;
} else {
this.type = src;
}
if ( props ) {
jquery.extend( this, props );
}
this.timestamp = src && src.timestamp || jquery.now();
this[ jquery.expando ] = true;
};
function returnfalse() {
return false;
}
function returntrue() {
return true;
}
jquery.event.prototype = {
preventdefault: function() {
this.isdefaultprevented = returntrue;
var e = this.originalevent;
if ( !e ) {
return;
}
if ( e.preventdefault ) {
e.preventdefault();
} else {
e.returnvalue = false;
}
},
stoppropagation: function() {
this.ispropagationstopped = returntrue;
var e = this.originalevent;
if ( !e ) {
return;
}
if ( e.stoppropagation ) {
e.stoppropagation();
}
e.cancelbubble = true;
},
stopimmediatepropagation: function() {
this.isimmediatepropagationstopped = returntrue;
this.stoppropagation();
},
isdefaultprevented: returnfalse,
ispropagationstopped: returnfalse,
isimmediatepropagationstopped: returnfalse
};
jquery.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function( orig, fix ) {
jquery.event.special[ orig ] = {
delegatetype: fix,
bindtype: fix,
handle: function( event ) {
var target = this,
related = event.relatedtarget,
handleobj = event.handleobj,
selector = handleobj.selector,
ret;
if ( !related || (related !== target && !jquery.contains( target, related )) ) {
event.type = handleobj.origtype;
ret = handleobj.handler.apply( this, arguments );
event.type = fix;
}
return ret;
}
};
});
if ( !jquery.support.submitbubbles ) {
jquery.event.special.submit = {
setup: function() {
if ( jquery.nodename( this, "form" ) ) {
return false;
}
jquery.event.add( this, "click._submit keypress._submit", function( e ) {
var elem = e.target,
form = jquery.nodename( elem, "input" ) || jquery.nodename( elem, "button" ) ? elem.form : undefined;
if ( form && !form._submit_attached ) {
jquery.event.add( form, "submit._submit", function( event ) {
event._submit_bubble = true;
});
form._submit_attached = true;
}
});
},
postdispatch: function( event ) {
if ( event._submit_bubble ) {
delete event._submit_bubble;
if ( this.parentnode && !event.istrigger ) {
jquery.event.simulate( "submit", this.parentnode, event, true );
}
}
},
teardown: function() {
if ( jquery.nodename( this, "form" ) ) {
return false;
}
jquery.event.remove( this, "._submit" );
}
};
}
if ( !jquery.support.changebubbles ) {
jquery.event.special.change = {
setup: function() {
if ( rformelems.test( this.nodename ) ) {
if ( this.type === "checkbox" || this.type === "radio" ) {
jquery.event.add( this, "propertychange._change", function( event ) {
if ( event.originalevent.propertyname === "checked" ) {
this._just_changed = true;
}
});
jquery.event.add( this, "click._change", function( event ) {
if ( this._just_changed && !event.istrigger ) {
this._just_changed = false;
jquery.event.simulate( "change", this, event, true );
}
});
}
return false;
}
jquery.event.add( this, "beforeactivate._change", function( e ) {
var elem = e.target;
if ( rformelems.test( elem.nodename ) && !elem._change_attached ) {
jquery.event.add( elem, "change._change", function( event ) {
if ( this.parentnode && !event.issimulated && !event.istrigger ) {
jquery.event.simulate( "change", this.parentnode, event, true );
}
});
elem._change_attached = true;
}
});
},
handle: function( event ) {
var elem = event.target;
if ( this !== elem || event.issimulated || event.istrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
return event.handleobj.handler.apply( this, arguments );
}
},
teardown: function() {
jquery.event.remove( this, "._change" );
return rformelems.test( this.nodename );
}
};
}
if ( !jquery.support.focusinbubbles ) {
jquery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
var attaches = 0,
handler = function( event ) {
jquery.event.simulate( fix, event.target, jquery.event.fix( event ), true );
};
jquery.event.special[ fix ] = {
setup: function() {
if ( attaches++ === 0 ) {
document.addeventlistener( orig, handler, true );
}
},
teardown: function() {
if ( --attaches === 0 ) {
document.removeeventlistener( orig, handler, true );
}
}
};
});
}
jquery.fn.extend({
on: function( types, selector, data, fn, one ) {
var origfn, type;
if ( typeof types === "object" ) {
if ( typeof selector !== "string" ) {
data = data || selector;
selector = undefined;
}
for ( type in types ) {
this.on( type, selector, data, types[ type ], one );
}
return this;
}
if ( data == null && fn == null ) {
fn = selector;
data = selector = undefined;
} else if ( fn == null ) {
if ( typeof selector === "string" ) {
fn = data;
data = undefined;
} else {
fn = data;
data = selector;
selector = undefined;
}
}
if ( fn === false ) {
fn = returnfalse;
} else if ( !fn ) {
return this;
}
if ( one === 1 ) {
origfn = fn;
fn = function( event ) {
jquery().off( event );
return origfn.apply( this, arguments );
};
fn.guid = origfn.guid || ( origfn.guid = jquery.guid++ );
}
return this.each( function() {
jquery.event.add( this, types, fn, data, selector );
});
},
one: function( types, selector, data, fn ) {
return this.on( types, selector, data, fn, 1 );
},
off: function( types, selector, fn ) {
if ( types && types.preventdefault && types.handleobj ) {
var handleobj = types.handleobj;
jquery( types.delegatetarget ).off(
handleobj.namespace ? handleobj.origtype + "." + handleobj.namespace : handleobj.origtype,
handleobj.selector,
handleobj.handler
);
return this;
}
if ( typeof types === "object" ) {
for ( var type in types ) {
this.off( type, selector, types[ type ] );
}
return this;
}
if ( selector === false || typeof selector === "function" ) {
fn = selector;
selector = undefined;
}
if ( fn === false ) {
fn = returnfalse;
}
return this.each(function() {
jquery.event.remove( this, types, fn, selector );
});
},
bind: function( types, data, fn ) {
return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
return this.off( types, null, fn );
},
live: function( types, data, fn ) {
jquery( this.context ).on( types, this.selector, data, fn );
return this;
},
die: function( types, fn ) {
jquery( this.context ).off( types, this.selector || "**", fn );
return this;
},
delegate: function( selector, types, data, fn ) {
return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {
return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
},
trigger: function( type, data ) {
return this.each(function() {
jquery.event.trigger( type, data, this );
});
},
triggerhandler: function( type, data ) {
if ( this[0] ) {
return jquery.event.trigger( type, data, this[0], true );
}
},
toggle: function( fn ) {
var args = arguments,
guid = fn.guid || jquery.guid++,
i = 0,
toggler = function( event ) {
var lasttoggle = ( jquery._data( this, "lasttoggle" + fn.guid ) || 0 ) % i;
jquery._data( this, "lasttoggle" + fn.guid, lasttoggle + 1 );
event.preventdefault();
return args[ lasttoggle ].apply( this, arguments ) || false;
};
toggler.guid = guid;
while ( i < args.length ) {
args[ i++ ].guid = guid;
}
return this.click( toggler );
},
hover: function( fnover, fnout ) {
return this.mouseenter( fnover ).mouseleave( fnout || fnover );
}
});
jquery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
jquery.fn[ name ] = function( data, fn ) {
if ( fn == null ) {
fn = data;
data = null;
}
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
if ( jquery.attrfn ) {
jquery.attrfn[ name ] = true;
}
if ( rkeyevent.test( name ) ) {
jquery.event.fixhooks[ name ] = jquery.event.keyhooks;
}
if ( rmouseevent.test( name ) ) {
jquery.event.fixhooks[ name ] = jquery.event.mousehooks;
}
});
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
expando = "sizcache" + (math.random() + '').replace('.', ''),
done = 0,
tostring = object.prototype.tostring,
hasduplicate = false,
basehasduplicate = true,
rbackslash = /\\/g,
rreturn = /\r\n/g,
rnonword = /\w/;
[0, 0].sort(function() {
basehasduplicate = false;
return 0;
});
var sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origcontext = context;
if ( context.nodetype !== 1 && context.nodetype !== 9 ) {
return [];
}
if ( !selector || typeof selector !== "string" ) {
return results;
}
var m, set, checkset, extra, ret, cur, pop, i,
prune = true,
contextxml = sizzle.isxml( context ),
parts = [],
sofar = selector;
do {
chunker.exec( "" );
m = chunker.exec( sofar );
if ( m ) {
sofar = m[3];
parts.push( m[1] );
if ( m[2] ) {
extra = m[3];
break;
}
}
} while ( m );
if ( parts.length > 1 && origpos.exec( selector ) ) {
if ( parts.length === 2 && expr.relative[ parts[0] ] ) {
set = posprocess( parts[0] + parts[1], context, seed );
} else {
set = expr.relative[ parts[0] ] ?
[ context ] :
sizzle( parts.shift(), context );
while ( parts.length ) {
selector = parts.shift();
if ( expr.relative[ selector ] ) {
selector += parts.shift();
}
set = posprocess( selector, set, seed );
}
}
} else {
// (but not if it'll be faster if the inner selector is an id)
if ( !seed && parts.length > 1 && context.nodetype === 9 && !contextxml &&
expr.match.id.test(parts[0]) && !expr.match.id.test(parts[parts.length - 1]) ) {
ret = sizzle.find( parts.shift(), context, contextxml );
context = ret.expr ?
sizzle.filter( ret.expr, ret.set )[0] :
ret.set[0];
}
if ( context ) {
ret = seed ?
{ expr: parts.pop(), set: makearray(seed) } :
sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentnode ? context.parentnode : context, contextxml );
set = ret.expr ?
sizzle.filter( ret.expr, ret.set ) :
ret.set;
if ( parts.length > 0 ) {
checkset = makearray( set );
} else {
prune = false;
}
while ( parts.length ) {
cur = parts.pop();
pop = cur;
if ( !expr.relative[ cur ] ) {
cur = "";
} else {
pop = parts.pop();
}
if ( pop == null ) {
pop = context;
}
expr.relative[ cur ]( checkset, pop, contextxml );
}
} else {
checkset = parts = [];
}
}
if ( !checkset ) {
checkset = set;
}
if ( !checkset ) {
sizzle.error( cur || selector );
}
if ( tostring.call(checkset) === "[object array]" ) {
if ( !prune ) {
results.push.apply( results, checkset );
} else if ( context && context.nodetype === 1 ) {
for ( i = 0; checkset[i] != null; i++ ) {
if ( checkset[i] && (checkset[i] === true || checkset[i].nodetype === 1 && sizzle.contains(context, checkset[i])) ) {
results.push( set[i] );
}
}
} else {
for ( i = 0; checkset[i] != null; i++ ) {
if ( checkset[i] && checkset[i].nodetype === 1 ) {
results.push( set[i] );
}
}
}
} else {
makearray( checkset, results );
}
if ( extra ) {
sizzle( extra, origcontext, results, seed );
sizzle.uniquesort( results );
}
return results;
};
sizzle.uniquesort = function( results ) {
if ( sortorder ) {
hasduplicate = basehasduplicate;
results.sort( sortorder );
if ( hasduplicate ) {
for ( var i = 1; i < results.length; i++ ) {
if ( results[i] === results[ i - 1 ] ) {
results.splice( i--, 1 );
}
}
}
}
return results;
};
sizzle.matches = function( expr, set ) {
return sizzle( expr, null, null, set );
};
sizzle.matchesselector = function( node, expr ) {
return sizzle( expr, null, null, [node] ).length > 0;
};
sizzle.find = function( expr, context, isxml ) {
var set, i, len, match, type, left;
if ( !expr ) {
return [];
}
for ( i = 0, len = expr.order.length; i < len; i++ ) {
type = expr.order[i];
if ( (match = expr.leftmatch[ type ].exec( expr )) ) {
left = match[1];
match.splice( 1, 1 );
if ( left.substr( left.length - 1 ) !== "\\" ) {
match[1] = (match[1] || "").replace( rbackslash, "" );
set = expr.find[ type ]( match, context, isxml );
if ( set != null ) {
expr = expr.replace( expr.match[ type ], "" );
break;
}
}
}
}
if ( !set ) {
set = typeof context.getelementsbytagname !== "undefined" ?
context.getelementsbytagname( "*" ) :
[];
}
return { set: set, expr: expr };
};
sizzle.filter = function( expr, set, inplace, not ) {
var match, anyfound,
type, found, item, filter, left,
i, pass,
old = expr,
result = [],
curloop = set,
isxmlfilter = set && set[0] && sizzle.isxml( set[0] );
while ( expr && set.length ) {
for ( type in expr.filter ) {
if ( (match = expr.leftmatch[ type ].exec( expr )) != null && match[2] ) {
filter = expr.filter[ type ];
left = match[1];
anyfound = false;
match.splice(1,1);
if ( left.substr( left.length - 1 ) === "\\" ) {
continue;
}
if ( curloop === result ) {
result = [];
}
if ( expr.prefilter[ type ] ) {
match = expr.prefilter[ type ]( match, curloop, inplace, result, not, isxmlfilter );
if ( !match ) {
anyfound = found = true;
} else if ( match === true ) {
continue;
}
}
if ( match ) {
for ( i = 0; (item = curloop[i]) != null; i++ ) {
if ( item ) {
found = filter( item, match, i, curloop );
pass = not ^ found;
if ( inplace && found != null ) {
if ( pass ) {
anyfound = true;
} else {
curloop[i] = false;
}
} else if ( pass ) {
result.push( item );
anyfound = true;
}
}
}
}
if ( found !== undefined ) {
if ( !inplace ) {
curloop = result;
}
expr = expr.replace( expr.match[ type ], "" );
if ( !anyfound ) {
return [];
}
break;
}
}
}
if ( expr === old ) {
if ( anyfound == null ) {
sizzle.error( expr );
} else {
break;
}
}
old = expr;
}
return curloop;
};
sizzle.error = function( msg ) {
throw new error( "syntax error, unrecognized expression: " + msg );
};
var gettext = sizzle.gettext = function( elem ) {
var i, node,
nodetype = elem.nodetype,
ret = "";
if ( nodetype ) {
if ( nodetype === 1 || nodetype === 9 || nodetype === 11 ) {
if ( typeof elem.textcontent === 'string' ) {
return elem.textcontent;
} else if ( typeof elem.innertext === 'string' ) {
return elem.innertext.replace( rreturn, '' );
} else {
for ( elem = elem.firstchild; elem; elem = elem.nextsibling) {
ret += gettext( elem );
}
}
} else if ( nodetype === 3 || nodetype === 4 ) {
return elem.nodevalue;
}
} else {
for ( i = 0; (node = elem[i]); i++ ) {
if ( node.nodetype !== 8 ) {
ret += gettext( node );
}
}
}
return ret;
};
var expr = sizzle.selectors = {
order: [ "id", "name", "tag" ],
match: {
id: /#((?:[\w\u00c0-\uffff\-]|\\.)+)/,
class: /\.((?:[\w\u00c0-\uffff\-]|\\.)+)/,
name: /\[name=['"]*((?:[\w\u00c0-\uffff\-]|\\.)+)['"]*\]/,
attr: /\[\s*((?:[\w\u00c0-\uffff\-]|\\.)+)\s*(?:(\s?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uffff\-]|\\.)*)|)|)\s*\]/,
tag: /^((?:[\w\u00c0-\uffff\*\-]|\\.)+)/,
child: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
pos: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
pseudo: /:((?:[\w\u00c0-\uffff\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
leftmatch: {},
attrmap: {
"class": "classname",
"for": "htmlfor"
},
attrhandle: {
href: function( elem ) {
return elem.getattribute( "href" );
},
type: function( elem ) {
return elem.getattribute( "type" );
}
},
relative: {
"+": function(checkset, part){
var ispartstr = typeof part === "string",
istag = ispartstr && !rnonword.test( part ),
ispartstrnottag = ispartstr && !istag;
if ( istag ) {
part = part.tolowercase();
}
for ( var i = 0, l = checkset.length, elem; i < l; i++ ) {
if ( (elem = checkset[i]) ) {
while ( (elem = elem.previoussibling) && elem.nodetype !== 1 ) {}
checkset[i] = ispartstrnottag || elem && elem.nodename.tolowercase() === part ?
elem || false :
elem === part;
}
}
if ( ispartstrnottag ) {
sizzle.filter( part, checkset, true );
}
},
">": function( checkset, part ) {
var elem,
ispartstr = typeof part === "string",
i = 0,
l = checkset.length;
if ( ispartstr && !rnonword.test( part ) ) {
part = part.tolowercase();
for ( ; i < l; i++ ) {
elem = checkset[i];
if ( elem ) {
var parent = elem.parentnode;
checkset[i] = parent.nodename.tolowercase() === part ? parent : false;
}
}
} else {
for ( ; i < l; i++ ) {
elem = checkset[i];
if ( elem ) {
checkset[i] = ispartstr ?
elem.parentnode :
elem.parentnode === part;
}
}
if ( ispartstr ) {
sizzle.filter( part, checkset, true );
}
}
},
"": function(checkset, part, isxml){
var nodecheck,
donename = done++,
checkfn = dircheck;
if ( typeof part === "string" && !rnonword.test( part ) ) {
part = part.tolowercase();
nodecheck = part;
checkfn = dirnodecheck;
}
checkfn( "parentnode", part, donename, checkset, nodecheck, isxml );
},
"~": function( checkset, part, isxml ) {
var nodecheck,
donename = done++,
checkfn = dircheck;
if ( typeof part === "string" && !rnonword.test( part ) ) {
part = part.tolowercase();
nodecheck = part;
checkfn = dirnodecheck;
}
checkfn( "previoussibling", part, donename, checkset, nodecheck, isxml );
}
},
find: {
id: function( match, context, isxml ) {
if ( typeof context.getelementbyid !== "undefined" && !isxml ) {
var m = context.getelementbyid(match[1]);
return m && m.parentnode ? [m] : [];
}
},
name: function( match, context ) {
if ( typeof context.getelementsbyname !== "undefined" ) {
var ret = [],
results = context.getelementsbyname( match[1] );
for ( var i = 0, l = results.length; i < l; i++ ) {
if ( results[i].getattribute("name") === match[1] ) {
ret.push( results[i] );
}
}
return ret.length === 0 ? null : ret;
}
},
tag: function( match, context ) {
if ( typeof context.getelementsbytagname !== "undefined" ) {
return context.getelementsbytagname( match[1] );
}
}
},
prefilter: {
class: function( match, curloop, inplace, result, not, isxml ) {
match = " " + match[1].replace( rbackslash, "" ) + " ";
if ( isxml ) {
return match;
}
for ( var i = 0, elem; (elem = curloop[i]) != null; i++ ) {
if ( elem ) {
if ( not ^ (elem.classname && (" " + elem.classname + " ").replace(/[\t\n\r]/g, " ").indexof(match) >= 0) ) {
if ( !inplace ) {
result.push( elem );
}
} else if ( inplace ) {
curloop[i] = false;
}
}
}
return false;
},
id: function( match ) {
return match[1].replace( rbackslash, "" );
},
tag: function( match, curloop ) {
return match[1].replace( rbackslash, "" ).tolowercase();
},
child: function( match ) {
if ( match[1] === "nth" ) {
if ( !match[2] ) {
sizzle.error( match[0] );
}
match[2] = match[2].replace(/^\+|\s*/g, '');
var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
!/\d/.test( match[2] ) && "0n+" + match[2] || match[2]);
match[2] = (test[1] + (test[2] || 1)) - 0;
match[3] = test[3] - 0;
}
else if ( match[2] ) {
sizzle.error( match[0] );
}
match[0] = done++;
return match;
},
attr: function( match, curloop, inplace, result, not, isxml ) {
var name = match[1] = match[1].replace( rbackslash, "" );
if ( !isxml && expr.attrmap[name] ) {
match[1] = expr.attrmap[name];
}
match[4] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
if ( match[2] === "~=" ) {
match[4] = " " + match[4] + " ";
}
return match;
},
pseudo: function( match, curloop, inplace, result, not ) {
if ( match[1] === "not" ) {
if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
match[3] = sizzle(match[3], null, null, curloop);
} else {
var ret = sizzle.filter(match[3], curloop, inplace, true ^ not);
if ( !inplace ) {
result.push.apply( result, ret );
}
return false;
}
} else if ( expr.match.pos.test( match[0] ) || expr.match.child.test( match[0] ) ) {
return true;
}
return match;
},
pos: function( match ) {
match.unshift( true );
return match;
}
},
filters: {
enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
},
disabled: function( elem ) {
return elem.disabled === true;
},
checked: function( elem ) {
return elem.checked === true;
},
selected: function( elem ) {
if ( elem.parentnode ) {
elem.parentnode.selectedindex;
}
return elem.selected === true;
},
parent: function( elem ) {
return !!elem.firstchild;
},
empty: function( elem ) {
return !elem.firstchild;
},
has: function( elem, i, match ) {
return !!sizzle( match[3], elem ).length;
},
header: function( elem ) {
return (/h\d/i).test( elem.nodename );
},
text: function( elem ) {
var attr = elem.getattribute( "type" ), type = elem.type;
return elem.nodename.tolowercase() === "input" && "text" === type && ( attr === type || attr === null );
},
radio: function( elem ) {
return elem.nodename.tolowercase() === "input" && "radio" === elem.type;
},
checkbox: function( elem ) {
return elem.nodename.tolowercase() === "input" && "checkbox" === elem.type;
},
file: function( elem ) {
return elem.nodename.tolowercase() === "input" && "file" === elem.type;
},
password: function( elem ) {
return elem.nodename.tolowercase() === "input" && "password" === elem.type;
},
submit: function( elem ) {
var name = elem.nodename.tolowercase();
return (name === "input" || name === "button") && "submit" === elem.type;
},
image: function( elem ) {
return elem.nodename.tolowercase() === "input" && "image" === elem.type;
},
reset: function( elem ) {
var name = elem.nodename.tolowercase();
return (name === "input" || name === "button") && "reset" === elem.type;
},
button: function( elem ) {
var name = elem.nodename.tolowercase();
return name === "input" && "button" === elem.type || name === "button";
},
input: function( elem ) {
return (/input|select|textarea|button/i).test( elem.nodename );
},
focus: function( elem ) {
return elem === elem.ownerdocument.activeelement;
}
},
setfilters: {
first: function( elem, i ) {
return i === 0;
},
last: function( elem, i, match, array ) {
return i === array.length - 1;
},
even: function( elem, i ) {
return i % 2 === 0;
},
odd: function( elem, i ) {
return i % 2 === 1;
},
lt: function( elem, i, match ) {
return i < match[3] - 0;
},
gt: function( elem, i, match ) {
return i > match[3] - 0;
},
nth: function( elem, i, match ) {
return match[3] - 0 === i;
},
eq: function( elem, i, match ) {
return match[3] - 0 === i;
}
},
filter: {
pseudo: function( elem, match, i, array ) {
var name = match[1],
filter = expr.filters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
} else if ( name === "contains" ) {
return (elem.textcontent || elem.innertext || gettext([ elem ]) || "").indexof(match[3]) >= 0;
} else if ( name === "not" ) {
var not = match[3];
for ( var j = 0, l = not.length; j < l; j++ ) {
if ( not[j] === elem ) {
return false;
}
}
return true;
} else {
sizzle.error( name );
}
},
child: function( elem, match ) {
var first, last,
donename, parent, cache,
count, diff,
type = match[1],
node = elem;
switch ( type ) {
case "only":
case "first":
while ( (node = node.previoussibling) ) {
if ( node.nodetype === 1 ) {
return false;
}
}
if ( type === "first" ) {
return true;
}
node = elem;
case "last":
while ( (node = node.nextsibling) ) {
if ( node.nodetype === 1 ) {
return false;
}
}
return true;
case "nth":
first = match[2];
last = match[3];
if ( first === 1 && last === 0 ) {
return true;
}
donename = match[0];
parent = elem.parentnode;
if ( parent && (parent[ expando ] !== donename || !elem.nodeindex) ) {
count = 0;
for ( node = parent.firstchild; node; node = node.nextsibling ) {
if ( node.nodetype === 1 ) {
node.nodeindex = ++count;
}
}
parent[ expando ] = donename;
}
diff = elem.nodeindex - last;
if ( first === 0 ) {
return diff === 0;
} else {
return ( diff % first === 0 && diff / first >= 0 );
}
}
},
id: function( elem, match ) {
return elem.nodetype === 1 && elem.getattribute("id") === match;
},
tag: function( elem, match ) {
return (match === "*" && elem.nodetype === 1) || !!elem.nodename && elem.nodename.tolowercase() === match;
},
class: function( elem, match ) {
return (" " + (elem.classname || elem.getattribute("class")) + " ")
.indexof( match ) > -1;
},
attr: function( elem, match ) {
var name = match[1],
result = sizzle.attr ?
sizzle.attr( elem, name ) :
expr.attrhandle[ name ] ?
expr.attrhandle[ name ]( elem ) :
elem[ name ] != null ?
elem[ name ] :
elem.getattribute( name ),
value = result + "",
type = match[2],
check = match[4];
return result == null ?
type === "!=" :
!type && sizzle.attr ?
result != null :
type === "=" ?
value === check :
type === "*=" ?
value.indexof(check) >= 0 :
type === "~=" ?
(" " + value + " ").indexof(check) >= 0 :
!check ?
value && result !== false :
type === "!=" ?
value !== check :
type === "^=" ?
value.indexof(check) === 0 :
type === "$=" ?
value.substr(value.length - check.length) === check :
type === "|=" ?
value === check || value.substr(0, check.length + 1) === check + "-" :
false;
},
pos: function( elem, match, i, array ) {
var name = match[2],
filter = expr.setfilters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
}
}
}
};
var origpos = expr.match.pos,
fescape = function(all, num){
return "\\" + (num - 0 + 1);
};
for ( var type in expr.match ) {
expr.match[ type ] = new regexp( expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
expr.leftmatch[ type ] = new regexp( /(^(?:.|\r|\n)*?)/.source + expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
}
expr.match.globalpos = origpos;
var makearray = function( array, results ) {
array = array.prototype.slice.call( array, 0 );
if ( results ) {
results.push.apply( results, array );
return results;
}
return array;
};
try {
array.prototype.slice.call( document.documentelement.childnodes, 0 )[0].nodetype;
} catch( e ) {
makearray = function( array, results ) {
var i = 0,
ret = results || [];
if ( tostring.call(array) === "[object array]" ) {
array.prototype.push.apply( ret, array );
} else {
if ( typeof array.length === "number" ) {
for ( var l = array.length; i < l; i++ ) {
ret.push( array[i] );
}
} else {
for ( ; array[i]; i++ ) {
ret.push( array[i] );
}
}
}
return ret;
};
}
var sortorder, siblingcheck;
if ( document.documentelement.comparedocumentposition ) {
sortorder = function( a, b ) {
if ( a === b ) {
hasduplicate = true;
return 0;
}
if ( !a.comparedocumentposition || !b.comparedocumentposition ) {
return a.comparedocumentposition ? -1 : 1;
}
return a.comparedocumentposition(b) & 4 ? -1 : 1;
};
} else {
sortorder = function( a, b ) {
if ( a === b ) {
hasduplicate = true;
return 0;
} else if ( a.sourceindex && b.sourceindex ) {
return a.sourceindex - b.sourceindex;
}
var al, bl,
ap = [],
bp = [],
aup = a.parentnode,
bup = b.parentnode,
cur = aup;
if ( aup === bup ) {
return siblingcheck( a, b );
} else if ( !aup ) {
return -1;
} else if ( !bup ) {
return 1;
}
while ( cur ) {
ap.unshift( cur );
cur = cur.parentnode;
}
cur = bup;
while ( cur ) {
bp.unshift( cur );
cur = cur.parentnode;
}
al = ap.length;
bl = bp.length;
for ( var i = 0; i < al && i < bl; i++ ) {
if ( ap[i] !== bp[i] ) {
return siblingcheck( ap[i], bp[i] );
}
}
return i === al ?
siblingcheck( a, bp[i], -1 ) :
siblingcheck( ap[i], b, 1 );
};
siblingcheck = function( a, b, ret ) {
if ( a === b ) {
return ret;
}
var cur = a.nextsibling;
while ( cur ) {
if ( cur === b ) {
return -1;
}
cur = cur.nextsibling;
}
return 1;
};
}
(function(){
var form = document.createelement("div"),
id = "script" + (new date()).gettime(),
root = document.documentelement;
form.innerhtml = "";
root.insertbefore( form, root.firstchild );
if ( document.getelementbyid( id ) ) {
expr.find.id = function( match, context, isxml ) {
if ( typeof context.getelementbyid !== "undefined" && !isxml ) {
var m = context.getelementbyid(match[1]);
return m ?
m.id === match[1] || typeof m.getattributenode !== "undefined" && m.getattributenode("id").nodevalue === match[1] ?
[m] :
undefined :
[];
}
};
expr.filter.id = function( elem, match ) {
var node = typeof elem.getattributenode !== "undefined" && elem.getattributenode("id");
return elem.nodetype === 1 && node && node.nodevalue === match;
};
}
root.removechild( form );
root = form = null;
})();
(function(){
var div = document.createelement("div");
div.appendchild( document.createcomment("") );
if ( div.getelementsbytagname("*").length > 0 ) {
expr.find.tag = function( match, context ) {
var results = context.getelementsbytagname( match[1] );
if ( match[1] === "*" ) {
var tmp = [];
for ( var i = 0; results[i]; i++ ) {
if ( results[i].nodetype === 1 ) {
tmp.push( results[i] );
}
}
results = tmp;
}
return results;
};
}
div.innerhtml = "";
if ( div.firstchild && typeof div.firstchild.getattribute !== "undefined" &&
div.firstchild.getattribute("href") !== "#" ) {
expr.attrhandle.href = function( elem ) {
return elem.getattribute( "href", 2 );
};
}
div = null;
})();
if ( document.queryselectorall ) {
(function(){
var oldsizzle = sizzle,
div = document.createelement("div"),
id = "__sizzle__";
div.innerhtml = "";
if ( div.queryselectorall && div.queryselectorall(".test").length === 0 ) {
return;
}
sizzle = function( query, context, extra, seed ) {
context = context || document;
if ( !seed && !sizzle.isxml(context) ) {
var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
if ( match && (context.nodetype === 1 || context.nodetype === 9) ) {
if ( match[1] ) {
return makearray( context.getelementsbytagname( query ), extra );
} else if ( match[2] && expr.find.class && context.getelementsbyclassname ) {
return makearray( context.getelementsbyclassname( match[2] ), extra );
}
}
if ( context.nodetype === 9 ) {
if ( query === "body" && context.body ) {
return makearray( [ context.body ], extra );
} else if ( match && match[3] ) {
var elem = context.getelementbyid( match[3] );
if ( elem && elem.parentnode ) {
if ( elem.id === match[3] ) {
return makearray( [ elem ], extra );
}
} else {
return makearray( [], extra );
}
}
try {
return makearray( context.queryselectorall(query), extra );
} catch(qsaerror) {}
} else if ( context.nodetype === 1 && context.nodename.tolowercase() !== "object" ) {
var oldcontext = context,
old = context.getattribute( "id" ),
nid = old || id,
hasparent = context.parentnode,
relativehierarchyselector = /^\s*[+~]/.test( query );
if ( !old ) {
context.setattribute( "id", nid );
} else {
nid = nid.replace( /'/g, "\\$&" );
}
if ( relativehierarchyselector && hasparent ) {
context = context.parentnode;
}
try {
if ( !relativehierarchyselector || hasparent ) {
return makearray( context.queryselectorall( "[id='" + nid + "'] " + query ), extra );
}
} catch(pseudoerror) {
} finally {
if ( !old ) {
oldcontext.removeattribute( "id" );
}
}
}
}
return oldsizzle(query, context, extra, seed);
};
for ( var prop in oldsizzle ) {
sizzle[ prop ] = oldsizzle[ prop ];
}
div = null;
})();
}
(function(){
var html = document.documentelement,
matches = html.matchesselector || html.mozmatchesselector || html.webkitmatchesselector || html.msmatchesselector;
if ( matches ) {
var disconnectedmatch = !matches.call( document.createelement( "div" ), "div" ),
pseudoworks = false;
try {
matches.call( document.documentelement, "[test!='']:sizzle" );
} catch( pseudoerror ) {
pseudoworks = true;
}
sizzle.matchesselector = function( node, expr ) {
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if ( !sizzle.isxml( node ) ) {
try {
if ( pseudoworks || !expr.match.pseudo.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr );
if ( ret || !disconnectedmatch ||
node.document && node.document.nodetype !== 11 ) {
return ret;
}
}
} catch(e) {}
}
return sizzle(expr, null, null, [node]).length > 0;
};
}
})();
(function(){
var div = document.createelement("div");
div.innerhtml = "";
if ( !div.getelementsbyclassname || div.getelementsbyclassname("e").length === 0 ) {
return;
}
div.lastchild.classname = "e";
if ( div.getelementsbyclassname("e").length === 1 ) {
return;
}
expr.order.splice(1, 0, "class");
expr.find.class = function( match, context, isxml ) {
if ( typeof context.getelementsbyclassname !== "undefined" && !isxml ) {
return context.getelementsbyclassname(match[1]);
}
};
div = null;
})();
function dirnodecheck( dir, cur, donename, checkset, nodecheck, isxml ) {
for ( var i = 0, l = checkset.length; i < l; i++ ) {
var elem = checkset[i];
if ( elem ) {
var match = false;
elem = elem[dir];
while ( elem ) {
if ( elem[ expando ] === donename ) {
match = checkset[elem.sizset];
break;
}
if ( elem.nodetype === 1 && !isxml ){
elem[ expando ] = donename;
elem.sizset = i;
}
if ( elem.nodename.tolowercase() === cur ) {
match = elem;
break;
}
elem = elem[dir];
}
checkset[i] = match;
}
}
}
function dircheck( dir, cur, donename, checkset, nodecheck, isxml ) {
for ( var i = 0, l = checkset.length; i < l; i++ ) {
var elem = checkset[i];
if ( elem ) {
var match = false;
elem = elem[dir];
while ( elem ) {
if ( elem[ expando ] === donename ) {
match = checkset[elem.sizset];
break;
}
if ( elem.nodetype === 1 ) {
if ( !isxml ) {
elem[ expando ] = donename;
elem.sizset = i;
}
if ( typeof cur !== "string" ) {
if ( elem === cur ) {
match = true;
break;
}
} else if ( sizzle.filter( cur, [elem] ).length > 0 ) {
match = elem;
break;
}
}
elem = elem[dir];
}
checkset[i] = match;
}
}
}
if ( document.documentelement.contains ) {
sizzle.contains = function( a, b ) {
return a !== b && (a.contains ? a.contains(b) : true);
};
} else if ( document.documentelement.comparedocumentposition ) {
sizzle.contains = function( a, b ) {
return !!(a.comparedocumentposition(b) & 16);
};
} else {
sizzle.contains = function() {
return false;
};
}
sizzle.isxml = function( elem ) {
var documentelement = (elem ? elem.ownerdocument || elem : 0).documentelement;
return documentelement ? documentelement.nodename !== "html" : false;
};
var posprocess = function( selector, context, seed ) {
var match,
tmpset = [],
later = "",
root = context.nodetype ? [context] : context;
while ( (match = expr.match.pseudo.exec( selector )) ) {
later += match[0];
selector = selector.replace( expr.match.pseudo, "" );
}
selector = expr.relative[selector] ? selector + "*" : selector;
for ( var i = 0, l = root.length; i < l; i++ ) {
sizzle( selector, root[i], tmpset, seed );
}
return sizzle.filter( later, tmpset );
};
sizzle.attr = jquery.attr;
sizzle.selectors.attrmap = {};
jquery.find = sizzle;
jquery.expr = sizzle.selectors;
jquery.expr[":"] = jquery.expr.filters;
jquery.unique = sizzle.uniquesort;
jquery.text = sizzle.gettext;
jquery.isxmldoc = sizzle.isxml;
jquery.contains = sizzle.contains;
})();
var runtil = /until$/,
rparentsprev = /^(?:parents|prevuntil|prevall)/,
rmultiselector = /,/,
issimple = /^.[^:#\[\.,]*$/,
slice = array.prototype.slice,
pos = jquery.expr.match.globalpos,
guaranteedunique = {
children: true,
contents: true,
next: true,
prev: true
};
jquery.fn.extend({
find: function( selector ) {
var self = this,
i, l;
if ( typeof selector !== "string" ) {
return jquery( selector ).filter(function() {
for ( i = 0, l = self.length; i < l; i++ ) {
if ( jquery.contains( self[ i ], this ) ) {
return true;
}
}
});
}
var ret = this.pushstack( "", "find", selector ),
length, n, r;
for ( i = 0, l = this.length; i < l; i++ ) {
length = ret.length;
jquery.find( selector, this[i], ret );
if ( i > 0 ) {
for ( n = length; n < ret.length; n++ ) {
for ( r = 0; r < length; r++ ) {
if ( ret[r] === ret[n] ) {
ret.splice(n--, 1);
break;
}
}
}
}
}
return ret;
},
has: function( target ) {
var targets = jquery( target );
return this.filter(function() {
for ( var i = 0, l = targets.length; i < l; i++ ) {
if ( jquery.contains( this, targets[i] ) ) {
return true;
}
}
});
},
not: function( selector ) {
return this.pushstack( winnow(this, selector, false), "not", selector);
},
filter: function( selector ) {
return this.pushstack( winnow(this, selector, true), "filter", selector );
},
is: function( selector ) {
return !!selector && (
typeof selector === "string" ?
pos.test( selector ) ?
jquery( selector, this.context ).index( this[0] ) >= 0 :
jquery.filter( selector, this ).length > 0 :
this.filter( selector ).length > 0 );
},
closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0];
if ( jquery.isarray( selectors ) ) {
var level = 1;
while ( cur && cur.ownerdocument && cur !== context ) {
for ( i = 0; i < selectors.length; i++ ) {
if ( jquery( cur ).is( selectors[ i ] ) ) {
ret.push({ selector: selectors[ i ], elem: cur, level: level });
}
}
cur = cur.parentnode;
level++;
}
return ret;
}
var pos = pos.test( selectors ) || typeof selectors !== "string" ?
jquery( selectors, context || this.context ) :
0;
for ( i = 0, l = this.length; i < l; i++ ) {
cur = this[i];
while ( cur ) {
if ( pos ? pos.index(cur) > -1 : jquery.find.matchesselector(cur, selectors) ) {
ret.push( cur );
break;
} else {
cur = cur.parentnode;
if ( !cur || !cur.ownerdocument || cur === context || cur.nodetype === 11 ) {
break;
}
}
}
}
ret = ret.length > 1 ? jquery.unique( ret ) : ret;
return this.pushstack( ret, "closest", selectors );
},
index: function( elem ) {
if ( !elem ) {
return ( this[0] && this[0].parentnode ) ? this.prevall().length : -1;
}
if ( typeof elem === "string" ) {
return jquery.inarray( this[0], jquery( elem ) );
}
return jquery.inarray(
elem.jquery ? elem[0] : elem, this );
},
add: function( selector, context ) {
var set = typeof selector === "string" ?
jquery( selector, context ) :
jquery.makearray( selector && selector.nodetype ? [ selector ] : selector ),
all = jquery.merge( this.get(), set );
return this.pushstack( isdisconnected( set[0] ) || isdisconnected( all[0] ) ?
all :
jquery.unique( all ) );
},
andself: function() {
return this.add( this.prevobject );
}
});
function isdisconnected( node ) {
return !node || !node.parentnode || node.parentnode.nodetype === 11;
}
jquery.each({
parent: function( elem ) {
var parent = elem.parentnode;
return parent && parent.nodetype !== 11 ? parent : null;
},
parents: function( elem ) {
return jquery.dir( elem, "parentnode" );
},
parentsuntil: function( elem, i, until ) {
return jquery.dir( elem, "parentnode", until );
},
next: function( elem ) {
return jquery.nth( elem, 2, "nextsibling" );
},
prev: function( elem ) {
return jquery.nth( elem, 2, "previoussibling" );
},
nextall: function( elem ) {
return jquery.dir( elem, "nextsibling" );
},
prevall: function( elem ) {
return jquery.dir( elem, "previoussibling" );
},
nextuntil: function( elem, i, until ) {
return jquery.dir( elem, "nextsibling", until );
},
prevuntil: function( elem, i, until ) {
return jquery.dir( elem, "previoussibling", until );
},
siblings: function( elem ) {
return jquery.sibling( ( elem.parentnode || {} ).firstchild, elem );
},
children: function( elem ) {
return jquery.sibling( elem.firstchild );
},
contents: function( elem ) {
return jquery.nodename( elem, "iframe" ) ?
elem.contentdocument || elem.contentwindow.document :
jquery.makearray( elem.childnodes );
}
}, function( name, fn ) {
jquery.fn[ name ] = function( until, selector ) {
var ret = jquery.map( this, fn, until );
if ( !runtil.test( name ) ) {
selector = until;
}
if ( selector && typeof selector === "string" ) {
ret = jquery.filter( selector, ret );
}
ret = this.length > 1 && !guaranteedunique[ name ] ? jquery.unique( ret ) : ret;
if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
ret = ret.reverse();
}
return this.pushstack( ret, name, slice.call( arguments ).join(",") );
};
});
jquery.extend({
filter: function( expr, elems, not ) {
if ( not ) {
expr = ":not(" + expr + ")";
}
return elems.length === 1 ?
jquery.find.matchesselector(elems[0], expr) ? [ elems[0] ] : [] :
jquery.find.matches(expr, elems);
},
dir: function( elem, dir, until ) {
var matched = [],
cur = elem[ dir ];
while ( cur && cur.nodetype !== 9 && (until === undefined || cur.nodetype !== 1 || !jquery( cur ).is( until )) ) {
if ( cur.nodetype === 1 ) {
matched.push( cur );
}
cur = cur[dir];
}
return matched;
},
nth: function( cur, result, dir, elem ) {
result = result || 1;
var num = 0;
for ( ; cur; cur = cur[dir] ) {
if ( cur.nodetype === 1 && ++num === result ) {
break;
}
}
return cur;
},
sibling: function( n, elem ) {
var r = [];
for ( ; n; n = n.nextsibling ) {
if ( n.nodetype === 1 && n !== elem ) {
r.push( n );
}
}
return r;
}
});
function winnow( elements, qualifier, keep ) {
qualifier = qualifier || 0;
if ( jquery.isfunction( qualifier ) ) {
return jquery.grep(elements, function( elem, i ) {
var retval = !!qualifier.call( elem, i, elem );
return retval === keep;
});
} else if ( qualifier.nodetype ) {
return jquery.grep(elements, function( elem, i ) {
return ( elem === qualifier ) === keep;
});
} else if ( typeof qualifier === "string" ) {
var filtered = jquery.grep(elements, function( elem ) {
return elem.nodetype === 1;
});
if ( issimple.test( qualifier ) ) {
return jquery.filter(qualifier, filtered, !keep);
} else {
qualifier = jquery.filter( qualifier, filtered );
}
}
return jquery.grep(elements, function( elem, i ) {
return ( jquery.inarray( elem, qualifier ) >= 0 ) === keep;
});
}
function createsafefragment( document ) {
var list = nodenames.split( "|" ),
safefrag = document.createdocumentfragment();
if ( safefrag.createelement ) {
while ( list.length ) {
safefrag.createelement(
list.pop()
);
}
}
return safefrag;
}
var nodenames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
rinlinejquery = / jquery\d+="(?:\d+|null)"/g,
rleadingwhitespace = /^\s+/,
rxhtmltag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rtagname = /<([\w:]+)/,
rtbody = /]", "i"),
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscripttype = /\/(java|ecma)script/i,
rcleanscript = /^\s*", "" ],
legend: [ 1, "" ],
thead: [ 1, "" ],
tr: [ 2, "" ],
td: [ 3, "" ],
col: [ 2, "" ],
area: [ 1, "" ],
_default: [ 0, "", "" ]
},
safefragment = createsafefragment( document );
wrapmap.optgroup = wrapmap.option;
wrapmap.tbody = wrapmap.tfoot = wrapmap.colgroup = wrapmap.caption = wrapmap.thead;
wrapmap.th = wrapmap.td;
if ( !jquery.support.htmlserialize ) {
wrapmap._default = [ 1, "div", "
" ];
}
jquery.fn.extend({
text: function( value ) {
return jquery.access( this, function( value ) {
return value === undefined ?
jquery.text( this ) :
this.empty().append( ( this[0] && this[0].ownerdocument || document ).createtextnode( value ) );
}, null, value, arguments.length );
},
wrapall: function( html ) {
if ( jquery.isfunction( html ) ) {
return this.each(function(i) {
jquery(this).wrapall( html.call(this, i) );
});
}
if ( this[0] ) {
var wrap = jquery( html, this[0].ownerdocument ).eq(0).clone(true);
if ( this[0].parentnode ) {
wrap.insertbefore( this[0] );
}
wrap.map(function() {
var elem = this;
while ( elem.firstchild && elem.firstchild.nodetype === 1 ) {
elem = elem.firstchild;
}
return elem;
}).append( this );
}
return this;
},
wrapinner: function( html ) {
if ( jquery.isfunction( html ) ) {
return this.each(function(i) {
jquery(this).wrapinner( html.call(this, i) );
});
}
return this.each(function() {
var self = jquery( this ),
contents = self.contents();
if ( contents.length ) {
contents.wrapall( html );
} else {
self.append( html );
}
});
},
wrap: function( html ) {
var isfunction = jquery.isfunction( html );
return this.each(function(i) {
jquery( this ).wrapall( isfunction ? html.call(this, i) : html );
});
},
unwrap: function() {
return this.parent().each(function() {
if ( !jquery.nodename( this, "body" ) ) {
jquery( this ).replacewith( this.childnodes );
}
}).end();
},
append: function() {
return this.dommanip(arguments, true, function( elem ) {
if ( this.nodetype === 1 ) {
this.appendchild( elem );
}
});
},
prepend: function() {
return this.dommanip(arguments, true, function( elem ) {
if ( this.nodetype === 1 ) {
this.insertbefore( elem, this.firstchild );
}
});
},
before: function() {
if ( this[0] && this[0].parentnode ) {
return this.dommanip(arguments, false, function( elem ) {
this.parentnode.insertbefore( elem, this );
});
} else if ( arguments.length ) {
var set = jquery.clean( arguments );
set.push.apply( set, this.toarray() );
return this.pushstack( set, "before", arguments );
}
},
after: function() {
if ( this[0] && this[0].parentnode ) {
return this.dommanip(arguments, false, function( elem ) {
this.parentnode.insertbefore( elem, this.nextsibling );
});
} else if ( arguments.length ) {
var set = this.pushstack( this, "after", arguments );
set.push.apply( set, jquery.clean(arguments) );
return set;
}
},
remove: function( selector, keepdata ) {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
if ( !selector || jquery.filter( selector, [ elem ] ).length ) {
if ( !keepdata && elem.nodetype === 1 ) {
jquery.cleandata( elem.getelementsbytagname("*") );
jquery.cleandata( [ elem ] );
}
if ( elem.parentnode ) {
elem.parentnode.removechild( elem );
}
}
}
return this;
},
empty: function() {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
if ( elem.nodetype === 1 ) {
jquery.cleandata( elem.getelementsbytagname("*") );
}
while ( elem.firstchild ) {
elem.removechild( elem.firstchild );
}
}
return this;
},
clone: function( dataandevents, deepdataandevents ) {
dataandevents = dataandevents == null ? false : dataandevents;
deepdataandevents = deepdataandevents == null ? dataandevents : deepdataandevents;
return this.map( function () {
return jquery.clone( this, dataandevents, deepdataandevents );
});
},
html: function( value ) {
return jquery.access( this, function( value ) {
var elem = this[0] || {},
i = 0,
l = this.length;
if ( value === undefined ) {
return elem.nodetype === 1 ?
elem.innerhtml.replace( rinlinejquery, "" ) :
null;
}
if ( typeof value === "string" && !rnoinnerhtml.test( value ) &&
( jquery.support.leadingwhitespace || !rleadingwhitespace.test( value ) ) &&
!wrapmap[ ( rtagname.exec( value ) || ["", ""] )[1].tolowercase() ] ) {
value = value.replace( rxhtmltag, "<$1>$2>" );
try {
for (; i < l; i++ ) {
elem = this[i] || {};
if ( elem.nodetype === 1 ) {
jquery.cleandata( elem.getelementsbytagname( "*" ) );
elem.innerhtml = value;
}
}
elem = 0;
} catch(e) {}
}
if ( elem ) {
this.empty().append( value );
}
}, null, value, arguments.length );
},
replacewith: function( value ) {
if ( this[0] && this[0].parentnode ) {
if ( jquery.isfunction( value ) ) {
return this.each(function(i) {
var self = jquery(this), old = self.html();
self.replacewith( value.call( this, i, old ) );
});
}
if ( typeof value !== "string" ) {
value = jquery( value ).detach();
}
return this.each(function() {
var next = this.nextsibling,
parent = this.parentnode;
jquery( this ).remove();
if ( next ) {
jquery(next).before( value );
} else {
jquery(parent).append( value );
}
});
} else {
return this.length ?
this.pushstack( jquery(jquery.isfunction(value) ? value() : value), "replacewith", value ) :
this;
}
},
detach: function( selector ) {
return this.remove( selector, true );
},
dommanip: function( args, table, callback ) {
var results, first, fragment, parent,
value = args[0],
scripts = [];
if ( !jquery.support.checkclone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
return this.each(function() {
jquery(this).dommanip( args, table, callback, true );
});
}
if ( jquery.isfunction(value) ) {
return this.each(function(i) {
var self = jquery(this);
args[0] = value.call(this, i, table ? self.html() : undefined);
self.dommanip( args, table, callback );
});
}
if ( this[0] ) {
parent = value && value.parentnode;
if ( jquery.support.parentnode && parent && parent.nodetype === 11 && parent.childnodes.length === this.length ) {
results = { fragment: parent };
} else {
results = jquery.buildfragment( args, this, scripts );
}
fragment = results.fragment;
if ( fragment.childnodes.length === 1 ) {
first = fragment = fragment.firstchild;
} else {
first = fragment.firstchild;
}
if ( first ) {
table = table && jquery.nodename( first, "tr" );
for ( var i = 0, l = this.length, lastindex = l - 1; i < l; i++ ) {
callback.call(
table ?
root(this[i], first) :
this[i],
results.cacheable || ( l > 1 && i < lastindex ) ?
jquery.clone( fragment, true, true ) :
fragment
);
}
}
if ( scripts.length ) {
jquery.each( scripts, function( i, elem ) {
if ( elem.src ) {
jquery.ajax({
type: "get",
global: false,
url: elem.src,
async: false,
datatype: "script"
});
} else {
jquery.globaleval( ( elem.text || elem.textcontent || elem.innerhtml || "" ).replace( rcleanscript, "/*$0*/" ) );
}
if ( elem.parentnode ) {
elem.parentnode.removechild( elem );
}
});
}
}
return this;
}
});
function root( elem, cur ) {
return jquery.nodename(elem, "table") ?
(elem.getelementsbytagname("tbody")[0] ||
elem.appendchild(elem.ownerdocument.createelement("tbody"))) :
elem;
}
function clonecopyevent( src, dest ) {
if ( dest.nodetype !== 1 || !jquery.hasdata( src ) ) {
return;
}
var type, i, l,
olddata = jquery._data( src ),
curdata = jquery._data( dest, olddata ),
events = olddata.events;
if ( events ) {
delete curdata.handle;
curdata.events = {};
for ( type in events ) {
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
jquery.event.add( dest, type, events[ type ][ i ] );
}
}
}
if ( curdata.data ) {
curdata.data = jquery.extend( {}, curdata.data );
}
}
function clonefixattributes( src, dest ) {
var nodename;
if ( dest.nodetype !== 1 ) {
return;
}
if ( dest.clearattributes ) {
dest.clearattributes();
}
if ( dest.mergeattributes ) {
dest.mergeattributes( src );
}
nodename = dest.nodename.tolowercase();
if ( nodename === "object" ) {
dest.outerhtml = src.outerhtml;
} else if ( nodename === "input" && (src.type === "checkbox" || src.type === "radio") ) {
if ( src.checked ) {
dest.defaultchecked = dest.checked = src.checked;
}
if ( dest.value !== src.value ) {
dest.value = src.value;
}
} else if ( nodename === "option" ) {
dest.selected = src.defaultselected;
} else if ( nodename === "input" || nodename === "textarea" ) {
dest.defaultvalue = src.defaultvalue;
} else if ( nodename === "script" && dest.text !== src.text ) {
dest.text = src.text;
}
dest.removeattribute( jquery.expando );
dest.removeattribute( "_submit_attached" );
dest.removeattribute( "_change_attached" );
}
jquery.buildfragment = function( args, nodes, scripts ) {
var fragment, cacheable, cacheresults, doc,
first = args[ 0 ];
if ( nodes && nodes[0] ) {
doc = nodes[0].ownerdocument || nodes[0];
}
if ( !doc.createdocumentfragment ) {
doc = document;
}
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
first.charat(0) === "<" && !rnocache.test( first ) &&
(jquery.support.checkclone || !rchecked.test( first )) &&
(jquery.support.html5clone || !rnoshimcache.test( first )) ) {
cacheable = true;
cacheresults = jquery.fragments[ first ];
if ( cacheresults && cacheresults !== 1 ) {
fragment = cacheresults;
}
}
if ( !fragment ) {
fragment = doc.createdocumentfragment();
jquery.clean( args, doc, fragment, scripts );
}
if ( cacheable ) {
jquery.fragments[ first ] = cacheresults ? fragment : 1;
}
return { fragment: fragment, cacheable: cacheable };
};
jquery.fragments = {};
jquery.each({
appendto: "append",
prependto: "prepend",
insertbefore: "before",
insertafter: "after",
replaceall: "replacewith"
}, function( name, original ) {
jquery.fn[ name ] = function( selector ) {
var ret = [],
insert = jquery( selector ),
parent = this.length === 1 && this[0].parentnode;
if ( parent && parent.nodetype === 11 && parent.childnodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
return this;
} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = ( i > 0 ? this.clone(true) : this ).get();
jquery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
return this.pushstack( ret, name, insert.selector );
}
};
});
function getall( elem ) {
if ( typeof elem.getelementsbytagname !== "undefined" ) {
return elem.getelementsbytagname( "*" );
} else if ( typeof elem.queryselectorall !== "undefined" ) {
return elem.queryselectorall( "*" );
} else {
return [];
}
}
function fixdefaultchecked( elem ) {
if ( elem.type === "checkbox" || elem.type === "radio" ) {
elem.defaultchecked = elem.checked;
}
}
function findinputs( elem ) {
var nodename = ( elem.nodename || "" ).tolowercase();
if ( nodename === "input" ) {
fixdefaultchecked( elem );
} else if ( nodename !== "script" && typeof elem.getelementsbytagname !== "undefined" ) {
jquery.grep( elem.getelementsbytagname("input"), fixdefaultchecked );
}
}
function shimclonenode( elem ) {
var div = document.createelement( "div" );
safefragment.appendchild( div );
div.innerhtml = elem.outerhtml;
return div.firstchild;
}
jquery.extend({
clone: function( elem, dataandevents, deepdataandevents ) {
var srcelements,
destelements,
i,
clone = jquery.support.html5clone || jquery.isxmldoc(elem) || !rnoshimcache.test( "<" + elem.nodename + ">" ) ?
elem.clonenode( true ) :
shimclonenode( elem );
if ( (!jquery.support.nocloneevent || !jquery.support.noclonechecked) &&
(elem.nodetype === 1 || elem.nodetype === 11) && !jquery.isxmldoc(elem) ) {
clonefixattributes( elem, clone );
srcelements = getall( elem );
destelements = getall( clone );
for ( i = 0; srcelements[i]; ++i ) {
if ( destelements[i] ) {
clonefixattributes( srcelements[i], destelements[i] );
}
}
}
if ( dataandevents ) {
clonecopyevent( elem, clone );
if ( deepdataandevents ) {
srcelements = getall( elem );
destelements = getall( clone );
for ( i = 0; srcelements[i]; ++i ) {
clonecopyevent( srcelements[i], destelements[i] );
}
}
}
srcelements = destelements = null;
return clone;
},
clean: function( elems, context, fragment, scripts ) {
var checkscripttype, script, j,
ret = [];
context = context || document;
if ( typeof context.createelement === "undefined" ) {
context = context.ownerdocument || context[0] && context[0].ownerdocument || document;
}
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( typeof elem === "number" ) {
elem += "";
}
if ( !elem ) {
continue;
}
if ( typeof elem === "string" ) {
if ( !rhtml.test( elem ) ) {
elem = context.createtextnode( elem );
} else {
elem = elem.replace(rxhtmltag, "<$1>$2>");
var tag = ( rtagname.exec( elem ) || ["", ""] )[1].tolowercase(),
wrap = wrapmap[ tag ] || wrapmap._default,
depth = wrap[0],
div = context.createelement("div"),
safechildnodes = safefragment.childnodes,
remove;
if ( context === document ) {
safefragment.appendchild( div );
} else {
createsafefragment( context ).appendchild( div );
}
div.innerhtml = wrap[1] + elem + wrap[2];
while ( depth-- ) {
div = div.lastchild;
}
if ( !jquery.support.tbody ) {
var hasbody = rtbody.test(elem),
tbody = tag === "table" && !hasbody ?
div.firstchild && div.firstchild.childnodes :
wrap[1] === "" && !hasbody ?
div.childnodes :
[];
for ( j = tbody.length - 1; j >= 0 ; --j ) {
if ( jquery.nodename( tbody[ j ], "tbody" ) && !tbody[ j ].childnodes.length ) {
tbody[ j ].parentnode.removechild( tbody[ j ] );
}
}
}
if ( !jquery.support.leadingwhitespace && rleadingwhitespace.test( elem ) ) {
div.insertbefore( context.createtextnode( rleadingwhitespace.exec(elem)[0] ), div.firstchild );
}
elem = div.childnodes;
if ( div ) {
div.parentnode.removechild( div );
if ( safechildnodes.length > 0 ) {
remove = safechildnodes[ safechildnodes.length - 1 ];
if ( remove && remove.parentnode ) {
remove.parentnode.removechild( remove );
}
}
}
}
}
var len;
if ( !jquery.support.appendchecked ) {
if ( elem[0] && typeof (len = elem.length) === "number" ) {
for ( j = 0; j < len; j++ ) {
findinputs( elem[j] );
}
} else {
findinputs( elem );
}
}
if ( elem.nodetype ) {
ret.push( elem );
} else {
ret = jquery.merge( ret, elem );
}
}
if ( fragment ) {
checkscripttype = function( elem ) {
return !elem.type || rscripttype.test( elem.type );
};
for ( i = 0; ret[i]; i++ ) {
script = ret[i];
if ( scripts && jquery.nodename( script, "script" ) && (!script.type || rscripttype.test( script.type )) ) {
scripts.push( script.parentnode ? script.parentnode.removechild( script ) : script );
} else {
if ( script.nodetype === 1 ) {
var jstags = jquery.grep( script.getelementsbytagname( "script" ), checkscripttype );
ret.splice.apply( ret, [i + 1, 0].concat( jstags ) );
}
fragment.appendchild( script );
}
}
}
return ret;
},
cleandata: function( elems ) {
var data, id,
cache = jquery.cache,
special = jquery.event.special,
deleteexpando = jquery.support.deleteexpando;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( elem.nodename && jquery.nodata[elem.nodename.tolowercase()] ) {
continue;
}
id = elem[ jquery.expando ];
if ( id ) {
data = cache[ id ];
if ( data && data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
jquery.event.remove( elem, type );
} else {
jquery.removeevent( elem, type, data.handle );
}
}
if ( data.handle ) {
data.handle.elem = null;
}
}
if ( deleteexpando ) {
delete elem[ jquery.expando ];
} else if ( elem.removeattribute ) {
elem.removeattribute( jquery.expando );
}
delete cache[ id ];
}
}
}
});
var ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
rupper = /([a-z]|^ms)/g,
rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
rrelnum = /^([\-+])=([\-+.\de]+)/,
rmargin = /^margin/,
cssshow = { position: "absolute", visibility: "hidden", display: "block" },
cssexpand = [ "top", "right", "bottom", "left" ],
curcss,
getcomputedstyle,
currentstyle;
jquery.fn.css = function( name, value ) {
return jquery.access( this, function( elem, name, value ) {
return value !== undefined ?
jquery.style( elem, name, value ) :
jquery.css( elem, name );
}, name, value, arguments.length > 1 );
};
jquery.extend({
csshooks: {
opacity: {
get: function( elem, computed ) {
if ( computed ) {
var ret = curcss( elem, "opacity" );
return ret === "" ? "1" : ret;
} else {
return elem.style.opacity;
}
}
}
},
cssnumber: {
"fillopacity": true,
"fontweight": true,
"lineheight": true,
"opacity": true,
"orphans": true,
"widows": true,
"zindex": true,
"zoom": true
},
cssprops: {
"float": jquery.support.cssfloat ? "cssfloat" : "stylefloat"
},
style: function( elem, name, value, extra ) {
if ( !elem || elem.nodetype === 3 || elem.nodetype === 8 || !elem.style ) {
return;
}
var ret, type, origname = jquery.camelcase( name ),
style = elem.style, hooks = jquery.csshooks[ origname ];
name = jquery.cssprops[ origname ] || origname;
if ( value !== undefined ) {
type = typeof value;
if ( type === "string" && (ret = rrelnum.exec( value )) ) {
value = ( +( ret[1] + 1) * +ret[2] ) + parsefloat( jquery.css( elem, name ) );
type = "number";
}
if ( value == null || type === "number" && isnan( value ) ) {
return;
}
if ( type === "number" && !jquery.cssnumber[ origname ] ) {
value += "px";
}
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
try {
style[ name ] = value;
} catch(e) {}
}
} else {
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
return ret;
}
return style[ name ];
}
},
css: function( elem, name, extra ) {
var ret, hooks;
name = jquery.camelcase( name );
hooks = jquery.csshooks[ name ];
name = jquery.cssprops[ name ] || name;
if ( name === "cssfloat" ) {
name = "float";
}
if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
return ret;
} else if ( curcss ) {
return curcss( elem, name );
}
},
swap: function( elem, options, callback ) {
var old = {},
ret, name;
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
ret = callback.call( elem );
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
return ret;
}
});
jquery.curcss = jquery.css;
if ( document.defaultview && document.defaultview.getcomputedstyle ) {
getcomputedstyle = function( elem, name ) {
var ret, defaultview, computedstyle, width,
style = elem.style;
name = name.replace( rupper, "-$1" ).tolowercase();
if ( (defaultview = elem.ownerdocument.defaultview) &&
(computedstyle = defaultview.getcomputedstyle( elem, null )) ) {
ret = computedstyle.getpropertyvalue( name );
if ( ret === "" && !jquery.contains( elem.ownerdocument.documentelement, elem ) ) {
ret = jquery.style( elem, name );
}
}
if ( !jquery.support.pixelmargin && computedstyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
width = style.width;
style.width = ret;
ret = computedstyle.width;
style.width = width;
}
return ret;
};
}
if ( document.documentelement.currentstyle ) {
currentstyle = function( elem, name ) {
var left, rsleft, uncomputed,
ret = elem.currentstyle && elem.currentstyle[ name ],
style = elem.style;
if ( ret == null && style && (uncomputed = style[ name ]) ) {
ret = uncomputed;
}
if ( rnumnonpx.test( ret ) ) {
left = style.left;
rsleft = elem.runtimestyle && elem.runtimestyle.left;
if ( rsleft ) {
elem.runtimestyle.left = elem.currentstyle.left;
}
style.left = name === "fontsize" ? "1em" : ret;
ret = style.pixelleft + "px";
style.left = left;
if ( rsleft ) {
elem.runtimestyle.left = rsleft;
}
}
return ret === "" ? "auto" : ret;
};
}
curcss = getcomputedstyle || currentstyle;
function getwidthorheight( elem, name, extra ) {
var val = name === "width" ? elem.offsetwidth : elem.offsetheight,
i = name === "width" ? 1 : 0,
len = 4;
if ( val > 0 ) {
if ( extra !== "border" ) {
for ( ; i < len; i += 2 ) {
if ( !extra ) {
val -= parsefloat( jquery.css( elem, "padding" + cssexpand[ i ] ) ) || 0;
}
if ( extra === "margin" ) {
val += parsefloat( jquery.css( elem, extra + cssexpand[ i ] ) ) || 0;
} else {
val -= parsefloat( jquery.css( elem, "border" + cssexpand[ i ] + "width" ) ) || 0;
}
}
}
return val + "px";
}
val = curcss( elem, name );
if ( val < 0 || val == null ) {
val = elem.style[ name ];
}
if ( rnumnonpx.test(val) ) {
return val;
}
val = parsefloat( val ) || 0;
if ( extra ) {
for ( ; i < len; i += 2 ) {
val += parsefloat( jquery.css( elem, "padding" + cssexpand[ i ] ) ) || 0;
if ( extra !== "padding" ) {
val += parsefloat( jquery.css( elem, "border" + cssexpand[ i ] + "width" ) ) || 0;
}
if ( extra === "margin" ) {
val += parsefloat( jquery.css( elem, extra + cssexpand[ i ]) ) || 0;
}
}
}
return val + "px";
}
jquery.each([ "height", "width" ], function( i, name ) {
jquery.csshooks[ name ] = {
get: function( elem, computed, extra ) {
if ( computed ) {
if ( elem.offsetwidth !== 0 ) {
return getwidthorheight( elem, name, extra );
} else {
return jquery.swap( elem, cssshow, function() {
return getwidthorheight( elem, name, extra );
});
}
}
},
set: function( elem, value ) {
return rnum.test( value ) ?
value + "px" :
value;
}
};
});
if ( !jquery.support.opacity ) {
jquery.csshooks.opacity = {
get: function( elem, computed ) {
return ropacity.test( (computed && elem.currentstyle ? elem.currentstyle.filter : elem.style.filter) || "" ) ?
( parsefloat( regexp.$1 ) / 100 ) + "" :
computed ? "1" : "";
},
set: function( elem, value ) {
var style = elem.style,
currentstyle = elem.currentstyle,
opacity = jquery.isnumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
filter = currentstyle && currentstyle.filter || style.filter || "";
style.zoom = 1;
if ( value >= 1 && jquery.trim( filter.replace( ralpha, "" ) ) === "" ) {
style.removeattribute( "filter" );
if ( currentstyle && !currentstyle.filter ) {
return;
}
}
style.filter = ralpha.test( filter ) ?
filter.replace( ralpha, opacity ) :
filter + " " + opacity;
}
};
}
jquery(function() {
if ( !jquery.support.reliablemarginright ) {
jquery.csshooks.marginright = {
get: function( elem, computed ) {
return jquery.swap( elem, { "display": "inline-block" }, function() {
if ( computed ) {
return curcss( elem, "margin-right" );
} else {
return elem.style.marginright;
}
});
}
};
}
});
if ( jquery.expr && jquery.expr.filters ) {
jquery.expr.filters.hidden = function( elem ) {
var width = elem.offsetwidth,
height = elem.offsetheight;
return ( width === 0 && height === 0 ) || (!jquery.support.reliablehiddenoffsets && ((elem.style && elem.style.display) || jquery.css( elem, "display" )) === "none");
};
jquery.expr.filters.visible = function( elem ) {
return !jquery.expr.filters.hidden( elem );
};
}
jquery.each({
margin: "",
padding: "",
border: "width"
}, function( prefix, suffix ) {
jquery.csshooks[ prefix + suffix ] = {
expand: function( value ) {
var i,
parts = typeof value === "string" ? value.split(" ") : [ value ],
expanded = {};
for ( i = 0; i < 4; i++ ) {
expanded[ prefix + cssexpand[ i ] + suffix ] =
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
}
return expanded;
}
};
});
var r20 = /%20/g,
rbracket = /\[\]$/,
rcrlf = /\r?\n/g,
rhash = /#.*$/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
rlocalprotocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
rnocontent = /^(?:get|head)$/,
rprotocol = /^\/\//,
rquery = /\?/,
rscript = /