(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 = "
t
"; 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>" ); 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>"); 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 = /)<[^<]*)*<\/script>/gi, rselecttextarea = /^(?:select|textarea)/i, rspacesajax = /\s+/, rts = /([?&])_=[^&]*/, rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, _load = jquery.fn.load, prefilters = {}, transports = {}, ajaxlocation, ajaxlocparts, alltypes = ["*/"] + ["*"]; try { ajaxlocation = location.href; } catch( e ) { ajaxlocation = document.createelement( "a" ); ajaxlocation.href = ""; ajaxlocation = ajaxlocation.href; } ajaxlocparts = rurl.exec( ajaxlocation.tolowercase() ) || []; function addtoprefiltersortransports( structure ) { return function( datatypeexpression, func ) { if ( typeof datatypeexpression !== "string" ) { func = datatypeexpression; datatypeexpression = "*"; } if ( jquery.isfunction( func ) ) { var datatypes = datatypeexpression.tolowercase().split( rspacesajax ), i = 0, length = datatypes.length, datatype, list, placebefore; for ( ; i < length; i++ ) { datatype = datatypes[ i ]; placebefore = /^\+/.test( datatype ); if ( placebefore ) { datatype = datatype.substr( 1 ) || "*"; } list = structure[ datatype ] = structure[ datatype ] || []; list[ placebefore ? "unshift" : "push" ]( func ); } } }; } function inspectprefiltersortransports( structure, options, originaloptions, jqxhr, datatype /* internal */, inspected /* internal */ ) { datatype = datatype || options.datatypes[ 0 ]; inspected = inspected || {}; inspected[ datatype ] = true; var list = structure[ datatype ], i = 0, length = list ? list.length : 0, executeonly = ( structure === prefilters ), selection; for ( ; i < length && ( executeonly || !selection ); i++ ) { selection = list[ i ]( options, originaloptions, jqxhr ); if ( typeof selection === "string" ) { if ( !executeonly || inspected[ selection ] ) { selection = undefined; } else { options.datatypes.unshift( selection ); selection = inspectprefiltersortransports( structure, options, originaloptions, jqxhr, selection, inspected ); } } } if ( ( executeonly || !selection ) && !inspected[ "*" ] ) { selection = inspectprefiltersortransports( structure, options, originaloptions, jqxhr, "*", inspected ); } return selection; } function ajaxextend( target, src ) { var key, deep, flatoptions = jquery.ajaxsettings.flatoptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatoptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jquery.extend( true, target, deep ); } } jquery.fn.extend({ load: function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); } else if ( !this.length ) { return this; } var off = url.indexof( " " ); if ( off >= 0 ) { var selector = url.slice( off, url.length ); url = url.slice( 0, off ); } var type = "get"; if ( params ) { if ( jquery.isfunction( params ) ) { callback = params; params = undefined; } else if ( typeof params === "object" ) { params = jquery.param( params, jquery.ajaxsettings.traditional ); type = "post"; } } var self = this; jquery.ajax({ url: url, type: type, datatype: "html", data: params, complete: function( jqxhr, status, responsetext ) { responsetext = jqxhr.responsetext; if ( jqxhr.isresolved() ) { jqxhr.done(function( r ) { responsetext = r; }); self.html( selector ? jquery("
") .append(responsetext.replace(rscript, "")) .find(selector) : responsetext ); } if ( callback ) { self.each( callback, [ responsetext, status, jqxhr ] ); } } }); return this; }, serialize: function() { return jquery.param( this.serializearray() ); }, serializearray: function() { return this.map(function(){ return this.elements ? jquery.makearray( this.elements ) : this; }) .filter(function(){ return this.name && !this.disabled && ( this.checked || rselecttextarea.test( this.nodename ) || rinput.test( this.type ) ); }) .map(function( i, elem ){ var val = jquery( this ).val(); return val == null ? null : jquery.isarray( val ) ? jquery.map( val, function( val, i ){ return { name: elem.name, value: val.replace( rcrlf, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rcrlf, "\r\n" ) }; }).get(); } }); jquery.each( "ajaxstart ajaxstop ajaxcomplete ajaxerror ajaxsuccess ajaxsend".split( " " ), function( i, o ){ jquery.fn[ o ] = function( f ){ return this.on( o, f ); }; }); jquery.each( [ "get", "post" ], function( i, method ) { jquery[ method ] = function( url, data, callback, type ) { if ( jquery.isfunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jquery.ajax({ type: method, url: url, data: data, success: callback, datatype: type }); }; }); jquery.extend({ getscript: function( url, callback ) { return jquery.get( url, undefined, callback, "script" ); }, getjson: function( url, data, callback ) { return jquery.get( url, data, callback, "json" ); }, ajaxsetup: function( target, settings ) { if ( settings ) { ajaxextend( target, jquery.ajaxsettings ); } else { settings = target; target = jquery.ajaxsettings; } ajaxextend( target, settings ); return target; }, ajaxsettings: { url: ajaxlocation, islocal: rlocalprotocol.test( ajaxlocparts[ 1 ] ), global: true, type: "get", contenttype: "application/x-www-form-urlencoded; charset=utf-8", processdata: true, async: true, accepts: { xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": alltypes }, contents: { xml: /xml/, html: /html/, json: /json/ }, responsefields: { xml: "responsexml", text: "responsetext" }, converters: { "* text": window.string, "text html": true, "text json": jquery.parsejson, "text xml": jquery.parsexml }, flatoptions: { context: true, url: true } }, ajaxprefilter: addtoprefiltersortransports( prefilters ), ajaxtransport: addtoprefiltersortransports( transports ), ajax: function( url, options ) { if ( typeof url === "object" ) { options = url; url = undefined; } options = options || {}; var s = jquery.ajaxsetup( {}, options ), callbackcontext = s.context || s, globaleventcontext = callbackcontext !== s && ( callbackcontext.nodetype || callbackcontext instanceof jquery ) ? jquery( callbackcontext ) : jquery.event, deferred = jquery.deferred(), completedeferred = jquery.callbacks( "once memory" ), statuscode = s.statuscode || {}, ifmodifiedkey, requestheaders = {}, requestheadersnames = {}, responseheadersstring, responseheaders, transport, timeouttimer, parts, state = 0, fireglobals, i, jqxhr = { readystate: 0, setrequestheader: function( name, value ) { if ( !state ) { var lname = name.tolowercase(); name = requestheadersnames[ lname ] = requestheadersnames[ lname ] || name; requestheaders[ name ] = value; } return this; }, getallresponseheaders: function() { return state === 2 ? responseheadersstring : null; }, getresponseheader: function( key ) { var match; if ( state === 2 ) { if ( !responseheaders ) { responseheaders = {}; while( ( match = rheaders.exec( responseheadersstring ) ) ) { responseheaders[ match[1].tolowercase() ] = match[ 2 ]; } } match = responseheaders[ key.tolowercase() ]; } return match === undefined ? null : match; }, overridemimetype: function( type ) { if ( !state ) { s.mimetype = type; } return this; }, abort: function( statustext ) { statustext = statustext || "abort"; if ( transport ) { transport.abort( statustext ); } done( 0, statustext ); return this; } }; function done( status, nativestatustext, responses, headers ) { if ( state === 2 ) { return; } state = 2; if ( timeouttimer ) { cleartimeout( timeouttimer ); } transport = undefined; responseheadersstring = headers || ""; jqxhr.readystate = status > 0 ? 4 : 0; var issuccess, success, error, statustext = nativestatustext, response = responses ? ajaxhandleresponses( s, jqxhr, responses ) : undefined, lastmodified, etag; if ( status >= 200 && status < 300 || status === 304 ) { if ( s.ifmodified ) { if ( ( lastmodified = jqxhr.getresponseheader( "last-modified" ) ) ) { jquery.lastmodified[ ifmodifiedkey ] = lastmodified; } if ( ( etag = jqxhr.getresponseheader( "etag" ) ) ) { jquery.etag[ ifmodifiedkey ] = etag; } } if ( status === 304 ) { statustext = "notmodified"; issuccess = true; } else { try { success = ajaxconvert( s, response ); statustext = "success"; issuccess = true; } catch(e) { statustext = "parsererror"; error = e; } } } else { error = statustext; if ( !statustext || status ) { statustext = "error"; if ( status < 0 ) { status = 0; } } } jqxhr.status = status; jqxhr.statustext = "" + ( nativestatustext || statustext ); if ( issuccess ) { deferred.resolvewith( callbackcontext, [ success, statustext, jqxhr ] ); } else { deferred.rejectwith( callbackcontext, [ jqxhr, statustext, error ] ); } jqxhr.statuscode( statuscode ); statuscode = undefined; if ( fireglobals ) { globaleventcontext.trigger( "ajax" + ( issuccess ? "success" : "error" ), [ jqxhr, s, issuccess ? success : error ] ); } completedeferred.firewith( callbackcontext, [ jqxhr, statustext ] ); if ( fireglobals ) { globaleventcontext.trigger( "ajaxcomplete", [ jqxhr, s ] ); if ( !( --jquery.active ) ) { jquery.event.trigger( "ajaxstop" ); } } } deferred.promise( jqxhr ); jqxhr.success = jqxhr.done; jqxhr.error = jqxhr.fail; jqxhr.complete = completedeferred.add; jqxhr.statuscode = function( map ) { if ( map ) { var tmp; if ( state < 2 ) { for ( tmp in map ) { statuscode[ tmp ] = [ statuscode[tmp], map[tmp] ]; } } else { tmp = map[ jqxhr.status ]; jqxhr.then( tmp, tmp ); } } return this; }; s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxlocparts[ 1 ] + "//" ); s.datatypes = jquery.trim( s.datatype || "*" ).tolowercase().split( rspacesajax ); if ( s.crossdomain == null ) { parts = rurl.exec( s.url.tolowercase() ); s.crossdomain = !!( parts && ( parts[ 1 ] != ajaxlocparts[ 1 ] || parts[ 2 ] != ajaxlocparts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != ( ajaxlocparts[ 3 ] || ( ajaxlocparts[ 1 ] === "http:" ? 80 : 443 ) ) ) ); } if ( s.data && s.processdata && typeof s.data !== "string" ) { s.data = jquery.param( s.data, s.traditional ); } inspectprefiltersortransports( prefilters, s, options, jqxhr ); if ( state === 2 ) { return false; } fireglobals = s.global; s.type = s.type.touppercase(); s.hascontent = !rnocontent.test( s.type ); if ( fireglobals && jquery.active++ === 0 ) { jquery.event.trigger( "ajaxstart" ); } if ( !s.hascontent ) { if ( s.data ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; delete s.data; } ifmodifiedkey = s.url; if ( s.cache === false ) { var ts = jquery.now(), ret = s.url.replace( rts, "$1_=" + ts ); s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); } } if ( s.data && s.hascontent && s.contenttype !== false || options.contenttype ) { jqxhr.setrequestheader( "content-type", s.contenttype ); } if ( s.ifmodified ) { ifmodifiedkey = ifmodifiedkey || s.url; if ( jquery.lastmodified[ ifmodifiedkey ] ) { jqxhr.setrequestheader( "if-modified-since", jquery.lastmodified[ ifmodifiedkey ] ); } if ( jquery.etag[ ifmodifiedkey ] ) { jqxhr.setrequestheader( "if-none-match", jquery.etag[ ifmodifiedkey ] ); } } jqxhr.setrequestheader( "accept", s.datatypes[ 0 ] && s.accepts[ s.datatypes[0] ] ? s.accepts[ s.datatypes[0] ] + ( s.datatypes[ 0 ] !== "*" ? ", " + alltypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); for ( i in s.headers ) { jqxhr.setrequestheader( i, s.headers[ i ] ); } if ( s.beforesend && ( s.beforesend.call( callbackcontext, jqxhr, s ) === false || state === 2 ) ) { jqxhr.abort(); return false; } for ( i in { success: 1, error: 1, complete: 1 } ) { jqxhr[ i ]( s[ i ] ); } transport = inspectprefiltersortransports( transports, s, options, jqxhr ); if ( !transport ) { done( -1, "no transport" ); } else { jqxhr.readystate = 1; if ( fireglobals ) { globaleventcontext.trigger( "ajaxsend", [ jqxhr, s ] ); } if ( s.async && s.timeout > 0 ) { timeouttimer = settimeout( function(){ jqxhr.abort( "timeout" ); }, s.timeout ); } try { state = 1; transport.send( requestheaders, done ); } catch (e) { if ( state < 2 ) { done( -1, e ); } else { throw e; } } } return jqxhr; }, param: function( a, traditional ) { var s = [], add = function( key, value ) { value = jquery.isfunction( value ) ? value() : value; s[ s.length ] = encodeuricomponent( key ) + "=" + encodeuricomponent( value ); }; if ( traditional === undefined ) { traditional = jquery.ajaxsettings.traditional; } if ( jquery.isarray( a ) || ( a.jquery && !jquery.isplainobject( a ) ) ) { jquery.each( a, function() { add( this.name, this.value ); }); } else { for ( var prefix in a ) { buildparams( prefix, a[ prefix ], traditional, add ); } } return s.join( "&" ).replace( r20, "+" ); } }); function buildparams( prefix, obj, traditional, add ) { if ( jquery.isarray( obj ) ) { jquery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { add( prefix, v ); } else { buildparams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && jquery.type( obj ) === "object" ) { for ( var name in obj ) { buildparams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { add( prefix, obj ); } } jquery.extend({ active: 0, lastmodified: {}, etag: {} }); function ajaxhandleresponses( s, jqxhr, responses ) { var contents = s.contents, datatypes = s.datatypes, responsefields = s.responsefields, ct, type, finaldatatype, firstdatatype; for ( type in responsefields ) { if ( type in responses ) { jqxhr[ responsefields[type] ] = responses[ type ]; } } while( datatypes[ 0 ] === "*" ) { datatypes.shift(); if ( ct === undefined ) { ct = s.mimetype || jqxhr.getresponseheader( "content-type" ); } } if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { datatypes.unshift( type ); break; } } } if ( datatypes[ 0 ] in responses ) { finaldatatype = datatypes[ 0 ]; } else { for ( type in responses ) { if ( !datatypes[ 0 ] || s.converters[ type + " " + datatypes[0] ] ) { finaldatatype = type; break; } if ( !firstdatatype ) { firstdatatype = type; } } finaldatatype = finaldatatype || firstdatatype; } if ( finaldatatype ) { if ( finaldatatype !== datatypes[ 0 ] ) { datatypes.unshift( finaldatatype ); } return responses[ finaldatatype ]; } } function ajaxconvert( s, response ) { if ( s.datafilter ) { response = s.datafilter( response, s.datatype ); } var datatypes = s.datatypes, converters = {}, i, key, length = datatypes.length, tmp, current = datatypes[ 0 ], prev, conversion, conv, conv1, conv2; for ( i = 1; i < length; i++ ) { if ( i === 1 ) { for ( key in s.converters ) { if ( typeof key === "string" ) { converters[ key.tolowercase() ] = s.converters[ key ]; } } } prev = current; current = datatypes[ i ]; if ( current === "*" ) { current = prev; } else if ( prev !== "*" && prev !== current ) { conversion = prev + " " + current; conv = converters[ conversion ] || converters[ "* " + current ]; if ( !conv ) { conv2 = undefined; for ( conv1 in converters ) { tmp = conv1.split( " " ); if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { conv2 = converters[ tmp[1] + " " + current ]; if ( conv2 ) { conv1 = converters[ conv1 ]; if ( conv1 === true ) { conv = conv2; } else if ( conv2 === true ) { conv = conv1; } break; } } } } if ( !( conv || conv2 ) ) { jquery.error( "no conversion from " + conversion.replace(" "," to ") ); } if ( conv !== true ) { response = conv ? conv( response ) : conv2( conv1(response) ); } } } return response; } var jsc = jquery.now(), jsre = /(\=)\?(&|$)|\?\?/i; jquery.ajaxsetup({ jsonp: "callback", jsonpcallback: function() { return jquery.expando + "_" + ( jsc++ ); } }); jquery.ajaxprefilter( "json jsonp", function( s, originalsettings, jqxhr ) { var inspectdata = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contenttype ); if ( s.datatypes[ 0 ] === "jsonp" || s.jsonp !== false && ( jsre.test( s.url ) || inspectdata && jsre.test( s.data ) ) ) { var responsecontainer, jsonpcallback = s.jsonpcallback = jquery.isfunction( s.jsonpcallback ) ? s.jsonpcallback() : s.jsonpcallback, previous = window[ jsonpcallback ], url = s.url, data = s.data, replace = "$1" + jsonpcallback + "$2"; if ( s.jsonp !== false ) { url = url.replace( jsre, replace ); if ( s.url === url ) { if ( inspectdata ) { data = data.replace( jsre, replace ); } if ( s.data === data ) { url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpcallback; } } } s.url = url; s.data = data; window[ jsonpcallback ] = function( response ) { responsecontainer = [ response ]; }; jqxhr.always(function() { window[ jsonpcallback ] = previous; if ( responsecontainer && jquery.isfunction( previous ) ) { window[ jsonpcallback ]( responsecontainer[ 0 ] ); } }); s.converters["script json"] = function() { if ( !responsecontainer ) { jquery.error( jsonpcallback + " was not called" ); } return responsecontainer[ 0 ]; }; s.datatypes[ 0 ] = "json"; return "script"; } }); jquery.ajaxsetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /javascript|ecmascript/ }, converters: { "text script": function( text ) { jquery.globaleval( text ); return text; } } }); jquery.ajaxprefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossdomain ) { s.type = "get"; s.global = false; } }); jquery.ajaxtransport( "script", function(s) { if ( s.crossdomain ) { var script, head = document.head || document.getelementsbytagname( "head" )[0] || document.documentelement; return { send: function( _, callback ) { script = document.createelement( "script" ); script.async = "async"; if ( s.scriptcharset ) { script.charset = s.scriptcharset; } script.src = s.url; script.onload = script.onreadystatechange = function( _, isabort ) { if ( isabort || !script.readystate || /loaded|complete/.test( script.readystate ) ) { script.onload = script.onreadystatechange = null; if ( head && script.parentnode ) { head.removechild( script ); } script = undefined; if ( !isabort ) { callback( 200, "success" ); } } }; head.insertbefore( script, head.firstchild ); }, abort: function() { if ( script ) { script.onload( 0, 1 ); } } }; } }); var xhronunloadabort = window.activexobject ? function() { for ( var key in xhrcallbacks ) { xhrcallbacks[ key ]( 0, 1 ); } } : false, xhrid = 0, xhrcallbacks; function createstandardxhr() { try { return new window.xmlhttprequest(); } catch( e ) {} } function createactivexhr() { try { return new window.activexobject( "microsoft.xmlhttp" ); } catch( e ) {} } jquery.ajaxsettings.xhr = window.activexobject ? function() { return !this.islocal && createstandardxhr() || createactivexhr(); } : createstandardxhr; (function( xhr ) { jquery.extend( jquery.support, { ajax: !!xhr, cors: !!xhr && ( "withcredentials" in xhr ) }); })( jquery.ajaxsettings.xhr() ); if ( jquery.support.ajax ) { jquery.ajaxtransport(function( s ) { if ( !s.crossdomain || jquery.support.cors ) { var callback; return { send: function( headers, complete ) { var xhr = s.xhr(), handle, i; if ( s.username ) { xhr.open( s.type, s.url, s.async, s.username, s.password ); } else { xhr.open( s.type, s.url, s.async ); } if ( s.xhrfields ) { for ( i in s.xhrfields ) { xhr[ i ] = s.xhrfields[ i ]; } } if ( s.mimetype && xhr.overridemimetype ) { xhr.overridemimetype( s.mimetype ); } if ( !s.crossdomain && !headers["x-requested-with"] ) { headers[ "x-requested-with" ] = "xmlhttprequest"; } try { for ( i in headers ) { xhr.setrequestheader( i, headers[ i ] ); } } catch( _ ) {} xhr.send( ( s.hascontent && s.data ) || null ); callback = function( _, isabort ) { var status, statustext, responseheaders, responses, xml; try { if ( callback && ( isabort || xhr.readystate === 4 ) ) { callback = undefined; if ( handle ) { xhr.onreadystatechange = jquery.noop; if ( xhronunloadabort ) { delete xhrcallbacks[ handle ]; } } if ( isabort ) { if ( xhr.readystate !== 4 ) { xhr.abort(); } } else { status = xhr.status; responseheaders = xhr.getallresponseheaders(); responses = {}; xml = xhr.responsexml; if ( xml && xml.documentelement /* #4958 */ ) { responses.xml = xml; } try { responses.text = xhr.responsetext; } catch( _ ) { } try { statustext = xhr.statustext; } catch( e ) { statustext = ""; } if ( !status && s.islocal && !s.crossdomain ) { status = responses.text ? 200 : 404; } else if ( status === 1223 ) { status = 204; } } } } catch( firefoxaccessexception ) { if ( !isabort ) { complete( -1, firefoxaccessexception ); } } if ( responses ) { complete( status, statustext, responses, responseheaders ); } }; if ( !s.async || xhr.readystate === 4 ) { callback(); } else { handle = ++xhrid; if ( xhronunloadabort ) { if ( !xhrcallbacks ) { xhrcallbacks = {}; jquery( window ).unload( xhronunloadabort ); } xhrcallbacks[ handle ] = callback; } xhr.onreadystatechange = callback; } }, abort: function() { if ( callback ) { callback(0,1); } } }; } }); } var elemdisplay = {}, iframe, iframedoc, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, timerid, fxattrs = [ [ "height", "margintop", "marginbottom", "paddingtop", "paddingbottom" ], [ "width", "marginleft", "marginright", "paddingleft", "paddingright" ], [ "opacity" ] ], fxnow; jquery.fn.extend({ show: function( speed, easing, callback ) { var elem, display; if ( speed || speed === 0 ) { return this.animate( genfx("show", 3), speed, easing, callback ); } else { for ( var i = 0, j = this.length; i < j; i++ ) { elem = this[ i ]; if ( elem.style ) { display = elem.style.display; if ( !jquery._data(elem, "olddisplay") && display === "none" ) { display = elem.style.display = ""; } if ( (display === "" && jquery.css(elem, "display") === "none") || !jquery.contains( elem.ownerdocument.documentelement, elem ) ) { jquery._data( elem, "olddisplay", defaultdisplay(elem.nodename) ); } } } for ( i = 0; i < j; i++ ) { elem = this[ i ]; if ( elem.style ) { display = elem.style.display; if ( display === "" || display === "none" ) { elem.style.display = jquery._data( elem, "olddisplay" ) || ""; } } } return this; } }, hide: function( speed, easing, callback ) { if ( speed || speed === 0 ) { return this.animate( genfx("hide", 3), speed, easing, callback); } else { var elem, display, i = 0, j = this.length; for ( ; i < j; i++ ) { elem = this[i]; if ( elem.style ) { display = jquery.css( elem, "display" ); if ( display !== "none" && !jquery._data( elem, "olddisplay" ) ) { jquery._data( elem, "olddisplay", display ); } } } for ( i = 0; i < j; i++ ) { if ( this[i].style ) { this[i].style.display = "none"; } } return this; } }, _toggle: jquery.fn.toggle, toggle: function( fn, fn2, callback ) { var bool = typeof fn === "boolean"; if ( jquery.isfunction(fn) && jquery.isfunction(fn2) ) { this._toggle.apply( this, arguments ); } else if ( fn == null || bool ) { this.each(function() { var state = bool ? fn : jquery(this).is(":hidden"); jquery(this)[ state ? "show" : "hide" ](); }); } else { this.animate(genfx("toggle", 3), fn, fn2, callback); } return this; }, fadeto: function( speed, to, easing, callback ) { return this.filter(":hidden").css("opacity", 0).show().end() .animate({opacity: to}, speed, easing, callback); }, animate: function( prop, speed, easing, callback ) { var optall = jquery.speed( speed, easing, callback ); if ( jquery.isemptyobject( prop ) ) { return this.each( optall.complete, [ false ] ); } prop = jquery.extend( {}, prop ); function doanimation() { if ( optall.queue === false ) { jquery._mark( this ); } var opt = jquery.extend( {}, optall ), iselement = this.nodetype === 1, hidden = iselement && jquery(this).is(":hidden"), name, val, p, e, hooks, replace, parts, start, end, unit, method; opt.animatedproperties = {}; for ( p in prop ) { name = jquery.camelcase( p ); if ( p !== name ) { prop[ name ] = prop[ p ]; delete prop[ p ]; } if ( ( hooks = jquery.csshooks[ name ] ) && "expand" in hooks ) { replace = hooks.expand( prop[ name ] ); delete prop[ name ]; for ( p in replace ) { if ( ! ( p in prop ) ) { prop[ p ] = replace[ p ]; } } } } for ( name in prop ) { val = prop[ name ]; if ( jquery.isarray( val ) ) { opt.animatedproperties[ name ] = val[ 1 ]; val = prop[ name ] = val[ 0 ]; } else { opt.animatedproperties[ name ] = opt.specialeasing && opt.specialeasing[ name ] || opt.easing || 'swing'; } if ( val === "hide" && hidden || val === "show" && !hidden ) { return opt.complete.call( this ); } if ( iselement && ( name === "height" || name === "width" ) ) { opt.overflow = [ this.style.overflow, this.style.overflowx, this.style.overflowy ]; if ( jquery.css( this, "display" ) === "inline" && jquery.css( this, "float" ) === "none" ) { if ( !jquery.support.inlineblockneedslayout || defaultdisplay( this.nodename ) === "inline" ) { this.style.display = "inline-block"; } else { this.style.zoom = 1; } } } } if ( opt.overflow != null ) { this.style.overflow = "hidden"; } for ( p in prop ) { e = new jquery.fx( this, opt, p ); val = prop[ p ]; if ( rfxtypes.test( val ) ) { method = jquery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 ); if ( method ) { jquery._data( this, "toggle" + p, method === "show" ? "hide" : "show" ); e[ method ](); } else { e[ val ](); } } else { parts = rfxnum.exec( val ); start = e.cur(); if ( parts ) { end = parsefloat( parts[2] ); unit = parts[3] || ( jquery.cssnumber[ p ] ? "" : "px" ); if ( unit !== "px" ) { jquery.style( this, p, (end || 1) + unit); start = ( (end || 1) / e.cur() ) * start; jquery.style( this, p, start + unit); } if ( parts[1] ) { end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; } e.custom( start, end, unit ); } else { e.custom( start, val, "" ); } } } return true; } return optall.queue === false ? this.each( doanimation ) : this.queue( optall.queue, doanimation ); }, stop: function( type, clearqueue, gotoend ) { if ( typeof type !== "string" ) { gotoend = clearqueue; clearqueue = type; type = undefined; } if ( clearqueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each(function() { var index, hadtimers = false, timers = jquery.timers, data = jquery._data( this ); if ( !gotoend ) { jquery._unmark( true, this ); } function stopqueue( elem, data, index ) { var hooks = data[ index ]; jquery.removedata( elem, index, true ); hooks.stop( gotoend ); } if ( type == null ) { for ( index in data ) { if ( data[ index ] && data[ index ].stop && index.indexof(".run") === index.length - 4 ) { stopqueue( this, data, index ); } } } else if ( data[ index = type + ".run" ] && data[ index ].stop ){ stopqueue( this, data, index ); } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { if ( gotoend ) { timers[ index ]( true ); } else { timers[ index ].savestate(); } hadtimers = true; timers.splice( index, 1 ); } } if ( !( gotoend && hadtimers ) ) { jquery.dequeue( this, type ); } }); } }); function createfxnow() { settimeout( clearfxnow, 0 ); return ( fxnow = jquery.now() ); } function clearfxnow() { fxnow = undefined; } function genfx( type, num ) { var obj = {}; jquery.each( fxattrs.concat.apply([], fxattrs.slice( 0, num )), function() { obj[ this ] = type; }); return obj; } jquery.each({ slidedown: genfx( "show", 1 ), slideup: genfx( "hide", 1 ), slidetoggle: genfx( "toggle", 1 ), fadein: { opacity: "show" }, fadeout: { opacity: "hide" }, fadetoggle: { opacity: "toggle" } }, function( name, props ) { jquery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jquery.extend({ speed: function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jquery.extend( {}, speed ) : { complete: fn || !fn && easing || jquery.isfunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jquery.isfunction( easing ) && easing }; opt.duration = jquery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jquery.fx.speeds ? jquery.fx.speeds[ opt.duration ] : jquery.fx.speeds._default; if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } opt.old = opt.complete; opt.complete = function( nounmark ) { if ( jquery.isfunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jquery.dequeue( this, opt.queue ); } else if ( nounmark !== false ) { jquery._unmark( this ); } }; return opt; }, easing: { linear: function( p ) { return p; }, swing: function( p ) { return ( -math.cos( p*math.pi ) / 2 ) + 0.5; } }, timers: [], fx: function( elem, options, prop ) { this.options = options; this.elem = elem; this.prop = prop; options.orig = options.orig || {}; } }); jquery.fx.prototype = { update: function() { if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } ( jquery.fx.step[ this.prop ] || jquery.fx.step._default )( this ); }, cur: function() { if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) { return this.elem[ this.prop ]; } var parsed, r = jquery.css( this.elem, this.prop ); return isnan( parsed = parsefloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; }, custom: function( from, to, unit ) { var self = this, fx = jquery.fx; this.starttime = fxnow || createfxnow(); this.end = to; this.now = this.start = from; this.pos = this.state = 0; this.unit = unit || this.unit || ( jquery.cssnumber[ this.prop ] ? "" : "px" ); function t( gotoend ) { return self.step( gotoend ); } t.queue = this.options.queue; t.elem = this.elem; t.savestate = function() { if ( jquery._data( self.elem, "fxshow" + self.prop ) === undefined ) { if ( self.options.hide ) { jquery._data( self.elem, "fxshow" + self.prop, self.start ); } else if ( self.options.show ) { jquery._data( self.elem, "fxshow" + self.prop, self.end ); } } }; if ( t() && jquery.timers.push(t) && !timerid ) { timerid = setinterval( fx.tick, fx.interval ); } }, show: function() { var datashow = jquery._data( this.elem, "fxshow" + this.prop ); this.options.orig[ this.prop ] = datashow || jquery.style( this.elem, this.prop ); this.options.show = true; if ( datashow !== undefined ) { this.custom( this.cur(), datashow ); } else { this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() ); } jquery( this.elem ).show(); }, hide: function() { this.options.orig[ this.prop ] = jquery._data( this.elem, "fxshow" + this.prop ) || jquery.style( this.elem, this.prop ); this.options.hide = true; this.custom( this.cur(), 0 ); }, step: function( gotoend ) { var p, n, complete, t = fxnow || createfxnow(), done = true, elem = this.elem, options = this.options; if ( gotoend || t >= options.duration + this.starttime ) { this.now = this.end; this.pos = this.state = 1; this.update(); options.animatedproperties[ this.prop ] = true; for ( p in options.animatedproperties ) { if ( options.animatedproperties[ p ] !== true ) { done = false; } } if ( done ) { if ( options.overflow != null && !jquery.support.shrinkwrapblocks ) { jquery.each( [ "", "x", "y" ], function( index, value ) { elem.style[ "overflow" + value ] = options.overflow[ index ]; }); } if ( options.hide ) { jquery( elem ).hide(); } if ( options.hide || options.show ) { for ( p in options.animatedproperties ) { jquery.style( elem, p, options.orig[ p ] ); jquery.removedata( elem, "fxshow" + p, true ); jquery.removedata( elem, "toggle" + p, true ); } } complete = options.complete; if ( complete ) { options.complete = false; complete.call( elem ); } } return false; } else { if ( options.duration == infinity ) { this.now = t; } else { n = t - this.starttime; this.state = n / options.duration; this.pos = jquery.easing[ options.animatedproperties[this.prop] ]( this.state, n, 0, 1, options.duration ); this.now = this.start + ( (this.end - this.start) * this.pos ); } this.update(); } return true; } }; jquery.extend( jquery.fx, { tick: function() { var timer, timers = jquery.timers, i = 0; for ( ; i < timers.length; i++ ) { timer = timers[ i ]; if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jquery.fx.stop(); } }, interval: 13, stop: function() { clearinterval( timerid ); timerid = null; }, speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function( fx ) { jquery.style( fx.elem, "opacity", fx.now ); }, _default: function( fx ) { if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { fx.elem.style[ fx.prop ] = fx.now + fx.unit; } else { fx.elem[ fx.prop ] = fx.now; } } } }); jquery.each( fxattrs.concat.apply( [], fxattrs ), function( i, prop ) { if ( prop.indexof( "margin" ) ) { jquery.fx.step[ prop ] = function( fx ) { jquery.style( fx.elem, prop, math.max(0, fx.now) + fx.unit ); }; } }); if ( jquery.expr && jquery.expr.filters ) { jquery.expr.filters.animated = function( elem ) { return jquery.grep(jquery.timers, function( fn ) { return elem === fn.elem; }).length; }; } function defaultdisplay( nodename ) { if ( !elemdisplay[ nodename ] ) { var body = document.body, elem = jquery( "<" + nodename + ">" ).appendto( body ), display = elem.css( "display" ); elem.remove(); if ( display === "none" || display === "" ) { if ( !iframe ) { iframe = document.createelement( "iframe" ); iframe.frameborder = iframe.width = iframe.height = 0; } body.appendchild( iframe ); if ( !iframedoc || !iframe.createelement ) { iframedoc = ( iframe.contentwindow || iframe.contentdocument ).document; iframedoc.write( ( jquery.support.boxmodel ? "" : "" ) + "" ); iframedoc.close(); } elem = iframedoc.createelement( nodename ); iframedoc.body.appendchild( elem ); display = jquery.css( elem, "display" ); body.removechild( iframe ); } elemdisplay[ nodename ] = display; } return elemdisplay[ nodename ]; } var getoffset, rtable = /^t(?:able|d|h)$/i, rroot = /^(?:body|html)$/i; if ( "getboundingclientrect" in document.documentelement ) { getoffset = function( elem, doc, docelem, box ) { try { box = elem.getboundingclientrect(); } catch(e) {} if ( !box || !jquery.contains( docelem, elem ) ) { return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; } var body = doc.body, win = getwindow( doc ), clienttop = docelem.clienttop || body.clienttop || 0, clientleft = docelem.clientleft || body.clientleft || 0, scrolltop = win.pageyoffset || jquery.support.boxmodel && docelem.scrolltop || body.scrolltop, scrollleft = win.pagexoffset || jquery.support.boxmodel && docelem.scrollleft || body.scrollleft, top = box.top + scrolltop - clienttop, left = box.left + scrollleft - clientleft; return { top: top, left: left }; }; } else { getoffset = function( elem, doc, docelem ) { var computedstyle, offsetparent = elem.offsetparent, prevoffsetparent = elem, body = doc.body, defaultview = doc.defaultview, prevcomputedstyle = defaultview ? defaultview.getcomputedstyle( elem, null ) : elem.currentstyle, top = elem.offsettop, left = elem.offsetleft; while ( (elem = elem.parentnode) && elem !== body && elem !== docelem ) { if ( jquery.support.fixedposition && prevcomputedstyle.position === "fixed" ) { break; } computedstyle = defaultview ? defaultview.getcomputedstyle(elem, null) : elem.currentstyle; top -= elem.scrolltop; left -= elem.scrollleft; if ( elem === offsetparent ) { top += elem.offsettop; left += elem.offsetleft; if ( jquery.support.doesnotaddborder && !(jquery.support.doesaddborderfortableandcells && rtable.test(elem.nodename)) ) { top += parsefloat( computedstyle.bordertopwidth ) || 0; left += parsefloat( computedstyle.borderleftwidth ) || 0; } prevoffsetparent = offsetparent; offsetparent = elem.offsetparent; } if ( jquery.support.subtractsborderforoverflownotvisible && computedstyle.overflow !== "visible" ) { top += parsefloat( computedstyle.bordertopwidth ) || 0; left += parsefloat( computedstyle.borderleftwidth ) || 0; } prevcomputedstyle = computedstyle; } if ( prevcomputedstyle.position === "relative" || prevcomputedstyle.position === "static" ) { top += body.offsettop; left += body.offsetleft; } if ( jquery.support.fixedposition && prevcomputedstyle.position === "fixed" ) { top += math.max( docelem.scrolltop, body.scrolltop ); left += math.max( docelem.scrollleft, body.scrollleft ); } return { top: top, left: left }; }; } jquery.fn.offset = function( options ) { if ( arguments.length ) { return options === undefined ? this : this.each(function( i ) { jquery.offset.setoffset( this, options, i ); }); } var elem = this[0], doc = elem && elem.ownerdocument; if ( !doc ) { return null; } if ( elem === doc.body ) { return jquery.offset.bodyoffset( elem ); } return getoffset( elem, doc, doc.documentelement ); }; jquery.offset = { bodyoffset: function( body ) { var top = body.offsettop, left = body.offsetleft; if ( jquery.support.doesnotincludemargininbodyoffset ) { top += parsefloat( jquery.css(body, "margintop") ) || 0; left += parsefloat( jquery.css(body, "marginleft") ) || 0; } return { top: top, left: left }; }, setoffset: function( elem, options, i ) { var position = jquery.css( elem, "position" ); if ( position === "static" ) { elem.style.position = "relative"; } var curelem = jquery( elem ), curoffset = curelem.offset(), curcsstop = jquery.css( elem, "top" ), curcssleft = jquery.css( elem, "left" ), calculateposition = ( position === "absolute" || position === "fixed" ) && jquery.inarray("auto", [curcsstop, curcssleft]) > -1, props = {}, curposition = {}, curtop, curleft; if ( calculateposition ) { curposition = curelem.position(); curtop = curposition.top; curleft = curposition.left; } else { curtop = parsefloat( curcsstop ) || 0; curleft = parsefloat( curcssleft ) || 0; } if ( jquery.isfunction( options ) ) { options = options.call( elem, i, curoffset ); } if ( options.top != null ) { props.top = ( options.top - curoffset.top ) + curtop; } if ( options.left != null ) { props.left = ( options.left - curoffset.left ) + curleft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curelem.css( props ); } } }; jquery.fn.extend({ position: function() { if ( !this[0] ) { return null; } var elem = this[0], offsetparent = this.offsetparent(), offset = this.offset(), parentoffset = rroot.test(offsetparent[0].nodename) ? { top: 0, left: 0 } : offsetparent.offset(); offset.top -= parsefloat( jquery.css(elem, "margintop") ) || 0; offset.left -= parsefloat( jquery.css(elem, "marginleft") ) || 0; parentoffset.top += parsefloat( jquery.css(offsetparent[0], "bordertopwidth") ) || 0; parentoffset.left += parsefloat( jquery.css(offsetparent[0], "borderleftwidth") ) || 0; return { top: offset.top - parentoffset.top, left: offset.left - parentoffset.left }; }, offsetparent: function() { return this.map(function() { var offsetparent = this.offsetparent || document.body; while ( offsetparent && (!rroot.test(offsetparent.nodename) && jquery.css(offsetparent, "position") === "static") ) { offsetparent = offsetparent.offsetparent; } return offsetparent; }); } }); jquery.each( {scrollleft: "pagexoffset", scrolltop: "pageyoffset"}, function( method, prop ) { var top = /y/.test( prop ); jquery.fn[ method ] = function( val ) { return jquery.access( this, function( elem, method, val ) { var win = getwindow( elem ); if ( val === undefined ) { return win ? (prop in win) ? win[ prop ] : jquery.support.boxmodel && win.document.documentelement[ method ] || win.document.body[ method ] : elem[ method ]; } if ( win ) { win.scrollto( !top ? val : jquery( win ).scrollleft(), top ? val : jquery( win ).scrolltop() ); } else { elem[ method ] = val; } }, method, val, arguments.length, null ); }; }); function getwindow( elem ) { return jquery.iswindow( elem ) ? elem : elem.nodetype === 9 ? elem.defaultview || elem.parentwindow : false; } jquery.each( { height: "height", width: "width" }, function( name, type ) { var clientprop = "client" + name, scrollprop = "scroll" + name, offsetprop = "offset" + name; jquery.fn[ "inner" + name ] = function() { var elem = this[0]; return elem ? elem.style ? parsefloat( jquery.css( elem, type, "padding" ) ) : this[ type ]() : null; }; jquery.fn[ "outer" + name ] = function( margin ) { var elem = this[0]; return elem ? elem.style ? parsefloat( jquery.css( elem, type, margin ? "margin" : "border" ) ) : this[ type ]() : null; }; jquery.fn[ type ] = function( value ) { return jquery.access( this, function( elem, type, value ) { var doc, docelemprop, orig, ret; if ( jquery.iswindow( elem ) ) { doc = elem.document; docelemprop = doc.documentelement[ clientprop ]; return jquery.support.boxmodel && docelemprop || doc.body && doc.body[ clientprop ] || docelemprop; } if ( elem.nodetype === 9 ) { doc = elem.documentelement; if ( doc[ clientprop ] >= doc[ scrollprop ] ) { return doc[ clientprop ]; } return math.max( elem.body[ scrollprop ], doc[ scrollprop ], elem.body[ offsetprop ], doc[ offsetprop ] ); } if ( value === undefined ) { orig = jquery.css( elem, type ); ret = parsefloat( orig ); return jquery.isnumeric( ret ) ? ret : orig; } jquery( elem ).css( type, value ); }, type, value, arguments.length, null ); }; }); window.jquery = window.$ = jquery; if ( typeof define === "function" && define.amd && define.amd.jquery ) { define( "jquery", [], function () { return jquery; } ); } })( window );