commit/galaxy-central: kanwei: update jquery to 1.5.2, pack scripts
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/0f3a0c220945/ changeset: r5368:0f3a0c220945 user: kanwei date: 2011-04-12 18:10:48 summary: update jquery to 1.5.2, pack scripts affected #: 3 files (3.2 KB) --- a/static/scripts/jquery.js Tue Apr 12 09:35:36 2011 -0400 +++ b/static/scripts/jquery.js Tue Apr 12 12:10:48 2011 -0400 @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v1.5.1 + * jQuery JavaScript Library v1.5.2 * http://jquery.com/ * * Copyright 2011, John Resig @@ -11,7 +11,7 @@ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * - * Date: Wed Feb 23 13:55:29 2011 -0500 + * Date: Thu Mar 31 15:28:23 2011 -0400 */ (function( window, undefined ) { @@ -69,15 +69,9 @@ // For matching the engine and version of the browser browserMatch, - // Has the ready events already been bound? - readyBound = false, - // The deferred used on DOM ready readyList, - // Promise methods - promiseMethods = "then done fail isResolved isRejected promise".split( " " ), - // The ready event handler DOMContentLoaded, @@ -202,7 +196,7 @@ selector: "", // The current version of jQuery being used - jquery: "1.5.1", + jquery: "1.5.2", // The default length of a jQuery object is 0 length: 0, @@ -427,11 +421,11 @@ }, bindReady: function() { - if ( readyBound ) { + if ( readyList ) { return; } - readyBound = true; + readyList = jQuery._Deferred(); // Catch cases where $(document).ready() is called after the // browser event has already occurred. @@ -811,6 +805,123 @@ return (new Date()).getTime(); }, + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + 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 jQuerySubclass( selector, context ) { + return new jQuerySubclass.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySubclass, this ); + jQuerySubclass.superclass = this; + jQuerySubclass.fn = jQuerySubclass.prototype = this(); + jQuerySubclass.fn.constructor = jQuerySubclass; + jQuerySubclass.subclass = this.subclass; + jQuerySubclass.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { + context = jQuerySubclass(context); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); + }; + jQuerySubclass.fn.init.prototype = jQuerySubclass.fn; + var rootjQuerySubclass = jQuerySubclass(document); + return jQuerySubclass; + }, + + browser: {} +}); + +// Populate the class2type map +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; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery to the global object +return jQuery; + +})(); + + +var // Promise methods + promiseMethods = "then done fail isResolved isRejected promise".split( " " ), + // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ // Create a simple deferred (one callbacks list) _Deferred: function() { var // callbacks list @@ -856,18 +967,14 @@ // resolve with given context and args resolveWith: function( context, args ) { if ( !cancelled && !fired && !firing ) { + // make sure args are available (#8421) + args = args || []; firing = 1; try { while( callbacks[ 0 ] ) { callbacks.shift().apply( context, args ); } } - // We have to add a catch block for - // IE prior to 8 or else the finally - // block will never get executed - catch (e) { - throw e; - } finally { fired = [ context, args ]; firing = 0; @@ -878,7 +985,7 @@ // resolve with this as context and given arguments resolve: function() { - deferred.resolveWith( jQuery.isFunction( this.promise ) ? this.promise() : this, arguments ); + deferred.resolveWith( this, arguments ); return this; }, @@ -941,153 +1048,44 @@ }, // Deferred helper - when: function( object ) { - var lastIndex = arguments.length, - deferred = lastIndex <= 1 && object && jQuery.isFunction( object.promise ) ? - object : - jQuery.Deferred(), - promise = deferred.promise(); - - if ( lastIndex > 1 ) { - var array = slice.call( arguments, 0 ), - count = lastIndex, - iCallback = function( index ) { - return function( value ) { - array[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value; - if ( !( --count ) ) { - deferred.resolveWith( promise, array ); - } - }; - }; - while( ( lastIndex-- ) ) { - object = array[ lastIndex ]; - if ( object && jQuery.isFunction( object.promise ) ) { - object.promise().then( iCallback(lastIndex), deferred.reject ); + when: function( firstParam ) { + var args = arguments, + i = 0, + length = args.length, + count = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + // Strange bug in FF4: + // Values changed onto the arguments object sometimes end up as undefined values + // outside the $.when method. Cloning the object into a fresh array solves the issue + deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); + } + }; + } + if ( length > 1 ) { + for( ; i < length; i++ ) { + if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject ); } else { --count; } } if ( !count ) { - deferred.resolveWith( promise, array ); - } - } else if ( deferred !== object ) { - deferred.resolve( object ); - } - return promise; - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - 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 jQuerySubclass( selector, context ) { - return new jQuerySubclass.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySubclass, this ); - jQuerySubclass.superclass = this; - jQuerySubclass.fn = jQuerySubclass.prototype = this(); - jQuerySubclass.fn.constructor = jQuerySubclass; - jQuerySubclass.subclass = this.subclass; - jQuerySubclass.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { - context = jQuerySubclass(context); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); - }; - jQuerySubclass.fn.init.prototype = jQuerySubclass.fn; - var rootjQuerySubclass = jQuerySubclass(document); - return jQuerySubclass; - }, - - browser: {} + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return deferred.promise(); + } }); -// Create readyList deferred -readyList = jQuery._Deferred(); - -// Populate the class2type map -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; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -if ( indexOf ) { - jQuery.inArray = function( elem, array ) { - return indexOf.call( array, elem ); - }; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -// Expose jQuery to the global object -return jQuery; - -})(); + (function() { @@ -1157,7 +1155,8 @@ boxModel: null, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, - reliableHiddenOffsets: true + reliableHiddenOffsets: true, + reliableMarginRight: true }; input.checked = true; @@ -1175,15 +1174,15 @@ script = document.createElement("script"), id = "script" + jQuery.now(); + // Make sure that the execution of code works by injecting a script + // tag with appendChild/createTextNode + // (IE doesn't support this, fails, and uses .text instead) try { script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); } catch(e) {} root.insertBefore( script, root.firstChild ); - // Make sure that the execution of code works by injecting a script - // tag with appendChild/createTextNode - // (IE doesn't support this, fails, and uses .text instead) if ( window[ id ] ) { _scriptEval = true; delete window[ id ]; @@ -1192,8 +1191,6 @@ } root.removeChild( script ); - // release memory in IE - root = script = id = null; } return _scriptEval; @@ -1278,6 +1275,17 @@ jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; div.innerHTML = ""; + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( document.defaultView && document.defaultView.getComputedStyle ) { + div.style.width = "1px"; + div.style.marginRight = "0"; + jQuery.support.reliableMarginRight = ( parseInt(document.defaultView.getComputedStyle(div, null).marginRight, 10) || 0 ) === 0; + } + body.removeChild( div ).style.display = "none"; div = tds = null; }); @@ -1301,8 +1309,6 @@ el.setAttribute(eventName, "return;"); isSupported = typeof el[eventName] === "function"; } - el = null; - return isSupported; }; @@ -2194,10 +2200,10 @@ } if ( !eventHandle ) { - elemData.handle = eventHandle = function() { + elemData.handle = eventHandle = function( e ) { // Handle the second event of a trigger and when // an event is called after a page has unloaded - return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.handle.apply( eventHandle.elem, arguments ) : undefined; }; @@ -2504,7 +2510,7 @@ target[ "on" + targetType ] = null; } - jQuery.event.triggered = true; + jQuery.event.triggered = event.type; target[ targetType ](); } @@ -2515,7 +2521,7 @@ target[ "on" + targetType ] = old; } - jQuery.event.triggered = false; + jQuery.event.triggered = undefined; } } }, @@ -2785,7 +2791,7 @@ // Chrome does something similar, the parentNode property // can be accessed but is null. - if ( parent !== document && !parent.parentNode ) { + if ( parent && parent !== document && !parent.parentNode ) { return; } // Traverse up the tree @@ -2992,19 +2998,33 @@ // Create "bubbling" focus and blur events if ( document.addEventListener ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0; + jQuery.event.special[ fix ] = { setup: function() { - this.addEventListener( orig, handler, true ); + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } }, teardown: function() { - this.removeEventListener( orig, handler, true ); + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } } }; - function handler( e ) { - e = jQuery.event.fix( e ); + function handler( donor ) { + // Donor event is always a native one; fix it and switch its type. + // Let focusin/out handler cancel the donor focus/blur event. + var e = jQuery.event.fix( donor ); e.type = fix; - return jQuery.event.handle.call( this, e ); + e.originalEvent = {}; + jQuery.event.trigger( e, null, e.target ); + if ( e.isDefaultPrevented() ) { + donor.preventDefault(); + } } }); } @@ -3918,10 +3938,12 @@ }, text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case - return "text" === elem.getAttribute( 'type' ); + return "text" === type && ( attr === type || attr === null ); }, + radio: function( elem ) { return "radio" === elem.type; }, @@ -4496,19 +4518,23 @@ (function(){ var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); - } catch( pseudoError ) { - pseudoWorks = true; - } - - if ( matches ) { + } catch( pseudoError ) { + pseudoWorks = true; + } + Sizzle.matchesSelector = function( node, expr ) { // Make sure that attribute selectors are quoted expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); @@ -4516,7 +4542,15 @@ if ( !Sizzle.isXML( node ) ) { try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - return matches.call( node, expr ); + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } } } catch(e) {} } @@ -5260,7 +5294,9 @@ } }); } else { - return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ); + return this.length ? + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : + this; } }, @@ -5707,7 +5743,8 @@ var ralpha = /alpha\([^)]*\)/i, ropacity = /opacity=([^)]*)/, rdashAlpha = /-([a-z])/ig, - rupper = /([A-Z])/g, + // fixed for IE9, see #8346 + rupper = /([A-Z]|^ms)/g, rnumpx = /^-?\d+(?:px)?$/i, rnum = /^-?\d/, @@ -5944,6 +5981,28 @@ }; } +jQuery(function() { + // This hook cannot be added until DOM ready because the support test + // for it is not run until after DOM ready + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + var ret; + jQuery.swap( elem, { "display": "inline-block" }, function() { + if ( computed ) { + ret = curCSS( elem, "margin-right", "marginRight" ); + } else { + ret = elem.style.marginRight; + } + }); + return ret; + } + }; + } +}); + if ( document.defaultView && document.defaultView.getComputedStyle ) { getComputedStyle = function( elem, newName, name ) { var ret, defaultView, computedStyle; @@ -6048,7 +6107,7 @@ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /(?:^file|^widget|\-extension):$/, + rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rquery = /\?/, @@ -6060,7 +6119,7 @@ rucHeadersFunc = function( _, $1, $2 ) { return $1 + $2.toUpperCase(); }, - rurl = /^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, // Keep a copy of the old load method _load = jQuery.fn.load, @@ -6102,7 +6161,7 @@ } // Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ); +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -6360,7 +6419,6 @@ cache: null, traditional: false, headers: {}, - crossDomain: null, */ accepts: { @@ -6645,7 +6703,7 @@ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); // Determine if a cross-domain request is in order - if ( !s.crossDomain ) { + if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || @@ -7024,7 +7082,7 @@ var jsc = jQuery.now(), - jsre = /(\=)\?(&|$)|()\?\?()/i; + jsre = /(\=)\?(&|$)|\?\?/i; // Default jsonp settings jQuery.ajaxSetup({ @@ -7285,11 +7343,12 @@ xhr.overrideMimeType( s.mimeType ); } - // Requested-With header - // Not set for crossDomain requests with no content - // (see why at http://trac.dojotoolkit.org/ticket/9486) - // Won't change header if already provided - if ( !( s.crossDomain && !s.hasContent ) && !headers["X-Requested-With"] ) { + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } @@ -7979,8 +8038,8 @@ 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), + 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; @@ -8093,7 +8152,6 @@ this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop); body.removeChild( container ); - body = container = innerDiv = checkDiv = table = td = null; jQuery.offset.initialize = jQuery.noop; }, @@ -8123,10 +8181,10 @@ curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1), + calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; - // need to be able to calculate position if either top or left is auto and position is absolute + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); } --- a/static/scripts/packed/jquery.js Tue Apr 12 09:35:36 2011 -0400 +++ b/static/scripts/packed/jquery.js Tue Apr 12 12:10:48 2011 -0400 @@ -1,5 +1,5 @@ /* - * jQuery JavaScript Library v1.5.1 + * jQuery JavaScript Library v1.5.2 * http://jquery.com/ * * Copyright 2011, John Resig @@ -11,13 +11,13 @@ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * - * Date: Wed Feb 23 13:55:29 2011 -0500 + * Date: Thu Mar 31 15:28:23 2011 -0400 */ -(function(aY,H){var al=aY.document;var a=(function(){var bn=function(bI,bJ){return new bn.fn.init(bI,bJ,bl)},bD=aY.jQuery,bp=aY.$,bl,bH=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,bv=/\S/,br=/^\s+/,bm=/\s+$/,bq=/\d/,bj=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bw=/^[\],:{}\s]*$/,bF=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,by=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bs=/(?:^|:|,)(?:\s*\[)+/g,bh=/(webkit)[ \/]([\w.]+)/,bA=/(opera)(?:.*version)?[ \/]([\w.]+)/,bz=/(msie) ([\w.]+)/,bB=/(mozilla)(?:.*? rv:([\w.]+))?/,bG=navigator.userAgent,bE,bC=false,bk,e="then done fail isResolved isRejected promise".split(" "),bd,bu=Object.prototype.toString,bo=Object.prototype.hasOwnProperty,bi=Array.prototype.push,bt=Array.prototype.slice,bx=String.prototype.trim,be=Array.prototype.indexOf,bg={};bn.fn=bn.prototype={constructor:bn,init:function(bI,bM,bL){var bK,bN,bJ,bO;if(!bI){return this}if(bI.nodeType){this.context=this[0]=bI;this.length=1;return this}if(bI==="body"&&!bM&&al.body){this.context=al;this[0]=al.body;this.selector="body";this.length=1;return this}if(typeof bI==="string"){bK=bH.exec(bI);if(bK&&(bK[1]||!bM)){if(bK[1]){bM=bM instanceof bn?bM[0]:bM;bO=(bM?bM.ownerDocument||bM:al);bJ=bj.exec(bI);if(bJ){if(bn.isPlainObject(bM)){bI=[al.createElement(bJ[1])];bn.fn.attr.call(bI,bM,true)}else{bI=[bO.createElement(bJ[1])]}}else{bJ=bn.buildFragment([bK[1]],[bO]);bI=(bJ.cacheable?bn.clone(bJ.fragment):bJ.fragment).childNodes}return bn.merge(this,bI)}else{bN=al.getElementById(bK[2]);if(bN&&bN.parentNode){if(bN.id!==bK[2]){return bL.find(bI)}this.length=1;this[0]=bN}this.context=al;this.selector=bI;return this}}else{if(!bM||bM.jquery){return(bM||bL).find(bI)}else{return this.constructor(bM).find(bI)}}}else{if(bn.isFunction(bI)){return bL.ready(bI)}}if(bI.selector!==H){this.selector=bI.selector;this.context=bI.context}return bn.makeArray(bI,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return bt.call(this,0)},get:function(bI){return bI==null?this.toArray():(bI<0?this[this.length+bI]:this[bI])},pushStack:function(bJ,bL,bI){var bK=this.constructor();if(bn.isArray(bJ)){bi.apply(bK,bJ)}else{bn.merge(bK,bJ)}bK.prevObject=this;bK.context=this.context;if(bL==="find"){bK.selector=this.selector+(this.selector?" ":"")+bI}else{if(bL){bK.selector=this.selector+"."+bL+"("+bI+")"}}return bK},each:function(bJ,bI){return bn.each(this,bJ,bI)},ready:function(bI){bn.bindReady();bk.done(bI);return this},eq:function(bI){return bI===-1?this.slice(bI):this.slice(bI,+bI+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bt.apply(this,arguments),"slice",bt.call(arguments).join(","))},map:function(bI){return this.pushStack(bn.map(this,function(bK,bJ){return bI.call(bK,bJ,bK)}))},end:function(){return this.prevObject||this.constructor(null)},push:bi,sort:[].sort,splice:[].splice};bn.fn.init.prototype=bn.fn;bn.extend=bn.fn.extend=function(){var bR,bK,bI,bJ,bO,bP,bN=arguments[0]||{},bM=1,bL=arguments.length,bQ=false;if(typeof bN==="boolean"){bQ=bN;bN=arguments[1]||{};bM=2}if(typeof bN!=="object"&&!bn.isFunction(bN)){bN={}}if(bL===bM){bN=this;--bM}for(;bM<bL;bM++){if((bR=arguments[bM])!=null){for(bK in bR){bI=bN[bK];bJ=bR[bK];if(bN===bJ){continue}if(bQ&&bJ&&(bn.isPlainObject(bJ)||(bO=bn.isArray(bJ)))){if(bO){bO=false;bP=bI&&bn.isArray(bI)?bI:[]}else{bP=bI&&bn.isPlainObject(bI)?bI:{}}bN[bK]=bn.extend(bQ,bP,bJ)}else{if(bJ!==H){bN[bK]=bJ}}}}}return bN};bn.extend({noConflict:function(bI){aY.$=bp;if(bI){aY.jQuery=bD}return bn},isReady:false,readyWait:1,ready:function(bI){if(bI===true){bn.readyWait--}if(!bn.readyWait||(bI!==true&&!bn.isReady)){if(!al.body){return setTimeout(bn.ready,1)}bn.isReady=true;if(bI!==true&&--bn.readyWait>0){return}bk.resolveWith(al,[bn]);if(bn.fn.trigger){bn(al).trigger("ready").unbind("ready")}}},bindReady:function(){if(bC){return}bC=true;if(al.readyState==="complete"){return setTimeout(bn.ready,1)}if(al.addEventListener){al.addEventListener("DOMContentLoaded",bd,false);aY.addEventListener("load",bn.ready,false)}else{if(al.attachEvent){al.attachEvent("onreadystatechange",bd);aY.attachEvent("onload",bn.ready);var bI=false;try{bI=aY.frameElement==null}catch(bJ){}if(al.documentElement.doScroll&&bI){bf()}}}},isFunction:function(bI){return bn.type(bI)==="function"},isArray:Array.isArray||function(bI){return bn.type(bI)==="array"},isWindow:function(bI){return bI&&typeof bI==="object"&&"setInterval" in bI},isNaN:function(bI){return bI==null||!bq.test(bI)||isNaN(bI)},type:function(bI){return bI==null?String(bI):bg[bu.call(bI)]||"object"},isPlainObject:function(bJ){if(!bJ||bn.type(bJ)!=="object"||bJ.nodeType||bn.isWindow(bJ)){return false}if(bJ.constructor&&!bo.call(bJ,"constructor")&&!bo.call(bJ.constructor.prototype,"isPrototypeOf")){return false}var bI;for(bI in bJ){}return bI===H||bo.call(bJ,bI)},isEmptyObject:function(bJ){for(var bI in bJ){return false}return true},error:function(bI){throw bI},parseJSON:function(bI){if(typeof bI!=="string"||!bI){return null}bI=bn.trim(bI);if(bw.test(bI.replace(bF,"@").replace(by,"]").replace(bs,""))){return aY.JSON&&aY.JSON.parse?aY.JSON.parse(bI):(new Function("return "+bI))()}else{bn.error("Invalid JSON: "+bI)}},parseXML:function(bK,bI,bJ){if(aY.DOMParser){bJ=new DOMParser();bI=bJ.parseFromString(bK,"text/xml")}else{bI=new ActiveXObject("Microsoft.XMLDOM");bI.async="false";bI.loadXML(bK)}bJ=bI.documentElement;if(!bJ||!bJ.nodeName||bJ.nodeName==="parsererror"){bn.error("Invalid XML: "+bK)}return bI},noop:function(){},globalEval:function(bK){if(bK&&bv.test(bK)){var bJ=al.head||al.getElementsByTagName("head")[0]||al.documentElement,bI=al.createElement("script");if(bn.support.scriptEval()){bI.appendChild(al.createTextNode(bK))}else{bI.text=bK}bJ.insertBefore(bI,bJ.firstChild);bJ.removeChild(bI)}},nodeName:function(bJ,bI){return bJ.nodeName&&bJ.nodeName.toUpperCase()===bI.toUpperCase()},each:function(bL,bP,bK){var bJ,bM=0,bN=bL.length,bI=bN===H||bn.isFunction(bL);if(bK){if(bI){for(bJ in bL){if(bP.apply(bL[bJ],bK)===false){break}}}else{for(;bM<bN;){if(bP.apply(bL[bM++],bK)===false){break}}}}else{if(bI){for(bJ in bL){if(bP.call(bL[bJ],bJ,bL[bJ])===false){break}}}else{for(var bO=bL[0];bM<bN&&bP.call(bO,bM,bO)!==false;bO=bL[++bM]){}}}return bL},trim:bx?function(bI){return bI==null?"":bx.call(bI)}:function(bI){return bI==null?"":bI.toString().replace(br,"").replace(bm,"")},makeArray:function(bL,bJ){var bI=bJ||[];if(bL!=null){var bK=bn.type(bL);if(bL.length==null||bK==="string"||bK==="function"||bK==="regexp"||bn.isWindow(bL)){bi.call(bI,bL)}else{bn.merge(bI,bL)}}return bI},inArray:function(bK,bL){if(bL.indexOf){return bL.indexOf(bK)}for(var bI=0,bJ=bL.length;bI<bJ;bI++){if(bL[bI]===bK){return bI}}return -1},merge:function(bM,bK){var bL=bM.length,bJ=0;if(typeof bK.length==="number"){for(var bI=bK.length;bJ<bI;bJ++){bM[bL++]=bK[bJ]}}else{while(bK[bJ]!==H){bM[bL++]=bK[bJ++]}}bM.length=bL;return bM},grep:function(bJ,bO,bI){var bK=[],bN;bI=!!bI;for(var bL=0,bM=bJ.length;bL<bM;bL++){bN=!!bO(bJ[bL],bL);if(bI!==bN){bK.push(bJ[bL])}}return bK},map:function(bJ,bO,bI){var bK=[],bN;for(var bL=0,bM=bJ.length;bL<bM;bL++){bN=bO(bJ[bL],bL,bI);if(bN!=null){bK[bK.length]=bN}}return bK.concat.apply([],bK)},guid:1,proxy:function(bK,bJ,bI){if(arguments.length===2){if(typeof bJ==="string"){bI=bK;bK=bI[bJ];bJ=H}else{if(bJ&&!bn.isFunction(bJ)){bI=bJ;bJ=H}}}if(!bJ&&bK){bJ=function(){return bK.apply(bI||this,arguments)}}if(bK){bJ.guid=bK.guid=bK.guid||bJ.guid||bn.guid++}return bJ},access:function(bI,bQ,bO,bK,bN,bP){var bJ=bI.length;if(typeof bQ==="object"){for(var bL in bQ){bn.access(bI,bL,bQ[bL],bK,bN,bO)}return bI}if(bO!==H){bK=!bP&&bK&&bn.isFunction(bO);for(var bM=0;bM<bJ;bM++){bN(bI[bM],bQ,bK?bO.call(bI[bM],bM,bN(bI[bM],bQ)):bO,bP)}return bI}return bJ?bN(bI[0],bQ):H},now:function(){return(new Date()).getTime()},_Deferred:function(){var bL=[],bM,bJ,bK,bI={done:function(){if(!bK){var bO=arguments,bP,bS,bR,bQ,bN;if(bM){bN=bM;bM=0}for(bP=0,bS=bO.length;bP<bS;bP++){bR=bO[bP];bQ=bn.type(bR);if(bQ==="array"){bI.done.apply(bI,bR)}else{if(bQ==="function"){bL.push(bR)}}}if(bN){bI.resolveWith(bN[0],bN[1])}}return this},resolveWith:function(bO,bN){if(!bK&&!bM&&!bJ){bJ=1;try{while(bL[0]){bL.shift().apply(bO,bN)}}catch(bP){throw bP}finally{bM=[bO,bN];bJ=0}}return this},resolve:function(){bI.resolveWith(bn.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return !!(bJ||bM)},cancel:function(){bK=1;bL=[];return this}};return bI},Deferred:function(bJ){var bI=bn._Deferred(),bL=bn._Deferred(),bK;bn.extend(bI,{then:function(bN,bM){bI.done(bN).fail(bM);return this},fail:bL.done,rejectWith:bL.resolveWith,reject:bL.resolve,isRejected:bL.isResolved,promise:function(bN){if(bN==null){if(bK){return bK}bK=bN={}}var bM=e.length;while(bM--){bN[e[bM]]=bI[e[bM]]}return bN}});bI.done(bL.cancel).fail(bI.cancel);delete bI.cancel;if(bJ){bJ.call(bI,bI)}return bI},when:function(bJ){var bO=arguments.length,bI=bO<=1&&bJ&&bn.isFunction(bJ.promise)?bJ:bn.Deferred(),bM=bI.promise();if(bO>1){var bN=bt.call(arguments,0),bL=bO,bK=function(bP){return function(bQ){bN[bP]=arguments.length>1?bt.call(arguments,0):bQ;if(!(--bL)){bI.resolveWith(bM,bN)}}};while((bO--)){bJ=bN[bO];if(bJ&&bn.isFunction(bJ.promise)){bJ.promise().then(bK(bO),bI.reject)}else{--bL}}if(!bL){bI.resolveWith(bM,bN)}}else{if(bI!==bJ){bI.resolve(bJ)}}return bM},uaMatch:function(bJ){bJ=bJ.toLowerCase();var bI=bh.exec(bJ)||bA.exec(bJ)||bz.exec(bJ)||bJ.indexOf("compatible")<0&&bB.exec(bJ)||[];return{browser:bI[1]||"",version:bI[2]||"0"}},sub:function(){function bJ(bL,bM){return new bJ.fn.init(bL,bM)}bn.extend(true,bJ,this);bJ.superclass=this;bJ.fn=bJ.prototype=this();bJ.fn.constructor=bJ;bJ.subclass=this.subclass;bJ.fn.init=function bK(bL,bM){if(bM&&bM instanceof bn&&!(bM instanceof bJ)){bM=bJ(bM)}return bn.fn.init.call(this,bL,bM,bI)};bJ.fn.init.prototype=bJ.fn;var bI=bJ(al);return bJ},browser:{}});bk=bn._Deferred();bn.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(bJ,bI){bg["[object "+bI+"]"]=bI.toLowerCase()});bE=bn.uaMatch(bG);if(bE.browser){bn.browser[bE.browser]=true;bn.browser.version=bE.version}if(bn.browser.webkit){bn.browser.safari=true}if(be){bn.inArray=function(bI,bJ){return be.call(bJ,bI)}}if(bv.test("\xA0")){br=/^[\s\xA0]+/;bm=/[\s\xA0]+$/}bl=bn(al);if(al.addEventListener){bd=function(){al.removeEventListener("DOMContentLoaded",bd,false);bn.ready()}}else{if(al.attachEvent){bd=function(){if(al.readyState==="complete"){al.detachEvent("onreadystatechange",bd);bn.ready()}}}}function bf(){if(bn.isReady){return}try{al.documentElement.doScroll("left")}catch(bI){setTimeout(bf,1);return}bn.ready()}return bn})();(function(){a.support={};var bd=al.createElement("div");bd.style.display="none";bd.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var bm=bd.getElementsByTagName("*"),bk=bd.getElementsByTagName("a")[0],bl=al.createElement("select"),be=bl.appendChild(al.createElement("option")),bj=bd.getElementsByTagName("input")[0];if(!bm||!bm.length||!bk){return}a.support={leadingWhitespace:bd.firstChild.nodeType===3,tbody:!bd.getElementsByTagName("tbody").length,htmlSerialize:!!bd.getElementsByTagName("link").length,style:/red/.test(bk.getAttribute("style")),hrefNormalized:bk.getAttribute("href")==="/a",opacity:/^0.55$/.test(bk.style.opacity),cssFloat:!!bk.style.cssFloat,checkOn:bj.value==="on",optSelected:be.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};bj.checked=true;a.support.noCloneChecked=bj.cloneNode(true).checked;bl.disabled=true;a.support.optDisabled=!be.disabled;var bf=null;a.support.scriptEval=function(){if(bf===null){var bo=al.documentElement,bp=al.createElement("script"),br="script"+a.now();try{bp.appendChild(al.createTextNode("window."+br+"=1;"))}catch(bq){}bo.insertBefore(bp,bo.firstChild);if(aY[br]){bf=true;delete aY[br]}else{bf=false}bo.removeChild(bp);bo=bp=br=null}return bf};try{delete bd.test}catch(bh){a.support.deleteExpando=false}if(!bd.addEventListener&&bd.attachEvent&&bd.fireEvent){bd.attachEvent("onclick",function bn(){a.support.noCloneEvent=false;bd.detachEvent("onclick",bn)});bd.cloneNode(true).fireEvent("onclick")}bd=al.createElement("div");bd.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var bg=al.createDocumentFragment();bg.appendChild(bd.firstChild);a.support.checkClone=bg.cloneNode(true).cloneNode(true).lastChild.checked;a(function(){var bp=al.createElement("div"),e=al.getElementsByTagName("body")[0];if(!e){return}bp.style.width=bp.style.paddingLeft="1px";e.appendChild(bp);a.boxModel=a.support.boxModel=bp.offsetWidth===2;if("zoom" in bp.style){bp.style.display="inline";bp.style.zoom=1;a.support.inlineBlockNeedsLayout=bp.offsetWidth===2;bp.style.display="";bp.innerHTML="<div style='width:4px;'></div>";a.support.shrinkWrapBlocks=bp.offsetWidth!==2}bp.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var bo=bp.getElementsByTagName("td");a.support.reliableHiddenOffsets=bo[0].offsetHeight===0;bo[0].style.display="";bo[1].style.display="none";a.support.reliableHiddenOffsets=a.support.reliableHiddenOffsets&&bo[0].offsetHeight===0;bp.innerHTML="";e.removeChild(bp).style.display="none";bp=bo=null});var bi=function(e){var bp=al.createElement("div");e="on"+e;if(!bp.attachEvent){return true}var bo=(e in bp);if(!bo){bp.setAttribute(e,"return;");bo=typeof bp[e]==="function"}bp=null;return bo};a.support.submitBubbles=bi("submit");a.support.changeBubbles=bi("change");bd=bm=bk=null})();var aE=/^(?:\{.*\}|\[.*\])$/;a.extend({cache:{},uuid:0,expando:"jQuery"+(a.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?a.cache[e[a.expando]]:e[a.expando];return !!e&&!P(e)},data:function(bf,bd,bh,bg){if(!a.acceptData(bf)){return}var bk=a.expando,bj=typeof bd==="string",bi,bl=bf.nodeType,e=bl?a.cache:bf,be=bl?bf[a.expando]:bf[a.expando]&&a.expando;if((!be||(bg&&be&&!e[be][bk]))&&bj&&bh===H){return}if(!be){if(bl){bf[a.expando]=be=++a.uuid}else{be=a.expando}}if(!e[be]){e[be]={};if(!bl){e[be].toJSON=a.noop}}if(typeof bd==="object"||typeof bd==="function"){if(bg){e[be][bk]=a.extend(e[be][bk],bd)}else{e[be]=a.extend(e[be],bd)}}bi=e[be];if(bg){if(!bi[bk]){bi[bk]={}}bi=bi[bk]}if(bh!==H){bi[bd]=bh}if(bd==="events"&&!bi[bd]){return bi[bk]&&bi[bk].events}return bj?bi[bd]:bi},removeData:function(bg,be,bh){if(!a.acceptData(bg)){return}var bj=a.expando,bk=bg.nodeType,bd=bk?a.cache:bg,bf=bk?bg[a.expando]:a.expando;if(!bd[bf]){return}if(be){var bi=bh?bd[bf][bj]:bd[bf];if(bi){delete bi[be];if(!P(bi)){return}}}if(bh){delete bd[bf][bj];if(!P(bd[bf])){return}}var e=bd[bf][bj];if(a.support.deleteExpando||bd!=aY){delete bd[bf]}else{bd[bf]=null}if(e){bd[bf]={};if(!bk){bd[bf].toJSON=a.noop}bd[bf][bj]=e}else{if(bk){if(a.support.deleteExpando){delete bg[a.expando]}else{if(bg.removeAttribute){bg.removeAttribute(a.expando)}else{bg[a.expando]=null}}}}},_data:function(bd,e,be){return a.data(bd,e,be,true)},acceptData:function(bd){if(bd.nodeName){var e=a.noData[bd.nodeName.toLowerCase()];if(e){return !(e===true||bd.getAttribute("classid")!==e)}}return true}});a.fn.extend({data:function(bg,bi){var bh=null;if(typeof bg==="undefined"){if(this.length){bh=a.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,be;for(var bf=0,bd=e.length;bf<bd;bf++){be=e[bf].name;if(be.indexOf("data-")===0){be=be.substr(5);aT(this[0],be,bh[be])}}}}return bh}else{if(typeof bg==="object"){return this.each(function(){a.data(this,bg)})}}var bj=bg.split(".");bj[1]=bj[1]?"."+bj[1]:"";if(bi===H){bh=this.triggerHandler("getData"+bj[1]+"!",[bj[0]]);if(bh===H&&this.length){bh=a.data(this[0],bg);bh=aT(this[0],bg,bh)}return bh===H&&bj[1]?this.data(bj[0]):bh}else{return this.each(function(){var bl=a(this),bk=[bj[0],bi];bl.triggerHandler("setData"+bj[1]+"!",bk);a.data(this,bg,bi);bl.triggerHandler("changeData"+bj[1]+"!",bk)})}},removeData:function(e){return this.each(function(){a.removeData(this,e)})}});function aT(be,bd,bf){if(bf===H&&be.nodeType===1){bf=be.getAttribute("data-"+bd);if(typeof bf==="string"){try{bf=bf==="true"?true:bf==="false"?false:bf==="null"?null:!a.isNaN(bf)?parseFloat(bf):aE.test(bf)?a.parseJSON(bf):bf}catch(bg){}a.data(be,bd,bf)}else{bf=H}}return bf}function P(bd){for(var e in bd){if(e!=="toJSON"){return false}}return true}a.extend({queue:function(bd,e,bf){if(!bd){return}e=(e||"fx")+"queue";var be=a._data(bd,e);if(!bf){return be||[]}if(!be||a.isArray(bf)){be=a._data(bd,e,a.makeArray(bf))}else{be.push(bf)}return be},dequeue:function(bf,be){be=be||"fx";var e=a.queue(bf,be),bd=e.shift();if(bd==="inprogress"){bd=e.shift()}if(bd){if(be==="fx"){e.unshift("inprogress")}bd.call(bf,function(){a.dequeue(bf,be)})}if(!e.length){a.removeData(bf,be+"queue",true)}}});a.fn.extend({queue:function(e,bd){if(typeof e!=="string"){bd=e;e="fx"}if(bd===H){return a.queue(this[0],e)}return this.each(function(bf){var be=a.queue(this,e,bd);if(e==="fx"&&be[0]!=="inprogress"){a.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){a.dequeue(this,e)})},delay:function(bd,e){bd=a.fx?a.fx.speeds[bd]||bd:bd;e=e||"fx";return this.queue(e,function(){var be=this;setTimeout(function(){a.dequeue(be,e)},bd)})},clearQueue:function(e){return this.queue(e||"fx",[])}});var aC=/[\n\t\r]/g,a3=/\s+/,aG=/\r/g,a2=/^(?:href|src|style)$/,f=/^(?:button|input)$/i,C=/^(?:button|input|object|select|textarea)$/i,k=/^a(?:rea)?$/i,Q=/^(?:radio|checkbox)$/i;a.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};a.fn.extend({attr:function(e,bd){return a.access(this,e,bd,true,a.attr)},removeAttr:function(e,bd){return this.each(function(){a.attr(this,e,"");if(this.nodeType===1){this.removeAttribute(e)}})},addClass:function(bj){if(a.isFunction(bj)){return this.each(function(bm){var bl=a(this);bl.addClass(bj.call(this,bm,bl.attr("class")))})}if(bj&&typeof bj==="string"){var e=(bj||"").split(a3);for(var bf=0,be=this.length;bf<be;bf++){var bd=this[bf];if(bd.nodeType===1){if(!bd.className){bd.className=bj}else{var bg=" "+bd.className+" ",bi=bd.className;for(var bh=0,bk=e.length;bh<bk;bh++){if(bg.indexOf(" "+e[bh]+" ")<0){bi+=" "+e[bh]}}bd.className=a.trim(bi)}}}}return this},removeClass:function(bh){if(a.isFunction(bh)){return this.each(function(bl){var bk=a(this);bk.removeClass(bh.call(this,bl,bk.attr("class")))})}if((bh&&typeof bh==="string")||bh===H){var bi=(bh||"").split(a3);for(var be=0,bd=this.length;be<bd;be++){var bg=this[be];if(bg.nodeType===1&&bg.className){if(bh){var bf=(" "+bg.className+" ").replace(aC," ");for(var bj=0,e=bi.length;bj<e;bj++){bf=bf.replace(" "+bi[bj]+" "," ")}bg.className=a.trim(bf)}else{bg.className=""}}}}return this},toggleClass:function(bf,bd){var be=typeof bf,e=typeof bd==="boolean";if(a.isFunction(bf)){return this.each(function(bh){var bg=a(this);bg.toggleClass(bf.call(this,bh,bg.attr("class"),bd),bd)})}return this.each(function(){if(be==="string"){var bi,bh=0,bg=a(this),bj=bd,bk=bf.split(a3);while((bi=bk[bh++])){bj=e?bj:!bg.hasClass(bi);bg[bj?"addClass":"removeClass"](bi)}}else{if(be==="undefined"||be==="boolean"){if(this.className){a._data(this,"__className__",this.className)}this.className=this.className||bf===false?"":a._data(this,"__className__")||""}}})},hasClass:function(e){var bf=" "+e+" ";for(var be=0,bd=this.length;be<bd;be++){if((" "+this[be].className+" ").replace(aC," ").indexOf(bf)>-1){return true}}return false},val:function(bk){if(!arguments.length){var be=this[0];if(be){if(a.nodeName(be,"option")){var bd=be.attributes.value;return !bd||bd.specified?be.value:be.text}if(a.nodeName(be,"select")){var bi=be.selectedIndex,bl=[],bm=be.options,bh=be.type==="select-one";if(bi<0){return null}for(var bf=bh?bi:0,bj=bh?bi+1:bm.length;bf<bj;bf++){var bg=bm[bf];if(bg.selected&&(a.support.optDisabled?!bg.disabled:bg.getAttribute("disabled")===null)&&(!bg.parentNode.disabled||!a.nodeName(bg.parentNode,"optgroup"))){bk=a(bg).val();if(bh){return bk}bl.push(bk)}}if(bh&&!bl.length&&bm.length){return a(bm[bi]).val()}return bl}if(Q.test(be.type)&&!a.support.checkOn){return be.getAttribute("value")===null?"on":be.value}return(be.value||"").replace(aG,"")}return H}var e=a.isFunction(bk);return this.each(function(bp){var bo=a(this),bq=bk;if(this.nodeType!==1){return}if(e){bq=bk.call(this,bp,bo.val())}if(bq==null){bq=""}else{if(typeof bq==="number"){bq+=""}else{if(a.isArray(bq)){bq=a.map(bq,function(br){return br==null?"":br+""})}}}if(a.isArray(bq)&&Q.test(this.type)){this.checked=a.inArray(bo.val(),bq)>=0}else{if(a.nodeName(this,"select")){var bn=a.makeArray(bq);a("option",this).each(function(){this.selected=a.inArray(a(this).val(),bn)>=0});if(!bn.length){this.selectedIndex=-1}}else{this.value=bq}}})}});a.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bd,e,bi,bl){if(!bd||bd.nodeType===3||bd.nodeType===8||bd.nodeType===2){return H}if(bl&&e in a.attrFn){return a(bd)[e](bi)}var be=bd.nodeType!==1||!a.isXMLDoc(bd),bh=bi!==H;e=be&&a.props[e]||e;if(bd.nodeType===1){var bg=a2.test(e);if(e==="selected"&&!a.support.optSelected){var bj=bd.parentNode;if(bj){bj.selectedIndex;if(bj.parentNode){bj.parentNode.selectedIndex}}}if((e in bd||bd[e]!==H)&&be&&!bg){if(bh){if(e==="type"&&f.test(bd.nodeName)&&bd.parentNode){a.error("type property can't be changed")}if(bi===null){if(bd.nodeType===1){bd.removeAttribute(e)}}else{bd[e]=bi}}if(a.nodeName(bd,"form")&&bd.getAttributeNode(e)){return bd.getAttributeNode(e).nodeValue}if(e==="tabIndex"){var bk=bd.getAttributeNode("tabIndex");return bk&&bk.specified?bk.value:C.test(bd.nodeName)||k.test(bd.nodeName)&&bd.href?0:H}return bd[e]}if(!a.support.style&&be&&e==="style"){if(bh){bd.style.cssText=""+bi}return bd.style.cssText}if(bh){bd.setAttribute(e,""+bi)}if(!bd.attributes[e]&&(bd.hasAttribute&&!bd.hasAttribute(e))){return H}var bf=!a.support.hrefNormalized&&be&&bg?bd.getAttribute(e,2):bd.getAttribute(e);return bf===null?H:bf}if(bh){bd[e]=bi}return bd[e]}});var aP=/\.(.*)$/,a0=/^(?:textarea|input|select)$/i,K=/\./g,aa=/ /g,aw=/[^\w\s.|`]/g,E=function(e){return e.replace(aw,"\\$&")};a.event={add:function(bg,bk,br,bi){if(bg.nodeType===3||bg.nodeType===8){return}try{if(a.isWindow(bg)&&(bg!==aY&&!bg.frameElement)){bg=aY}}catch(bl){}if(br===false){br=a5}else{if(!br){return}}var be,bp;if(br.handler){be=br;br=be.handler}if(!br.guid){br.guid=a.guid++}var bm=a._data(bg);if(!bm){return}var bq=bm.events,bj=bm.handle;if(!bq){bm.events=bq={}}if(!bj){bm.handle=bj=function(){return typeof a!=="undefined"&&!a.event.triggered?a.event.handle.apply(bj.elem,arguments):H}}bj.elem=bg;bk=bk.split(" ");var bo,bh=0,bd;while((bo=bk[bh++])){bp=be?a.extend({},be):{handler:br,data:bi};if(bo.indexOf(".")>-1){bd=bo.split(".");bo=bd.shift();bp.namespace=bd.slice(0).sort().join(".")}else{bd=[];bp.namespace=""}bp.type=bo;if(!bp.guid){bp.guid=br.guid}var bf=bq[bo],bn=a.event.special[bo]||{};if(!bf){bf=bq[bo]=[];if(!bn.setup||bn.setup.call(bg,bi,bd,bj)===false){if(bg.addEventListener){bg.addEventListener(bo,bj,false)}else{if(bg.attachEvent){bg.attachEvent("on"+bo,bj)}}}}if(bn.add){bn.add.call(bg,bp);if(!bp.handler.guid){bp.handler.guid=br.guid}}bf.push(bp);a.event.global[bo]=true}bg=null},global:{},remove:function(br,bm,be,bi){if(br.nodeType===3||br.nodeType===8){return}if(be===false){be=a5}var bu,bh,bj,bo,bp=0,bf,bk,bn,bg,bl,e,bt,bq=a.hasData(br)&&a._data(br),bd=bq&&bq.events;if(!bq||!bd){return}if(bm&&bm.type){be=bm.handler;bm=bm.type}if(!bm||typeof bm==="string"&&bm.charAt(0)==="."){bm=bm||"";for(bh in bd){a.event.remove(br,bh+bm)}return}bm=bm.split(" ");while((bh=bm[bp++])){bt=bh;e=null;bf=bh.indexOf(".")<0;bk=[];if(!bf){bk=bh.split(".");bh=bk.shift();bn=new RegExp("(^|\\.)"+a.map(bk.slice(0).sort(),E).join("\\.(?:.*\\.)?")+"(\\.|$)")}bl=bd[bh];if(!bl){continue}if(!be){for(bo=0;bo<bl.length;bo++){e=bl[bo];if(bf||bn.test(e.namespace)){a.event.remove(br,bt,e.handler,bo);bl.splice(bo--,1)}}continue}bg=a.event.special[bh]||{};for(bo=bi||0;bo<bl.length;bo++){e=bl[bo];if(be.guid===e.guid){if(bf||bn.test(e.namespace)){if(bi==null){bl.splice(bo--,1)}if(bg.remove){bg.remove.call(br,e)}}if(bi!=null){break}}}if(bl.length===0||bi!=null&&bl.length===1){if(!bg.teardown||bg.teardown.call(br,bk)===false){a.removeEvent(br,bh,bq.handle)}bu=null;delete bd[bh]}}if(a.isEmptyObject(bd)){var bs=bq.handle;if(bs){bs.elem=null}delete bq.events;delete bq.handle;if(a.isEmptyObject(bq)){a.removeData(br,H,true)}}},trigger:function(bd,bi,bf){var bm=bd.type||bd,bh=arguments[3];if(!bh){bd=typeof bd==="object"?bd[a.expando]?bd:a.extend(a.Event(bm),bd):a.Event(bm);if(bm.indexOf("!")>=0){bd.type=bm=bm.slice(0,-1);bd.exclusive=true}if(!bf){bd.stopPropagation();if(a.event.global[bm]){a.each(a.cache,function(){var br=a.expando,bq=this[br];if(bq&&bq.events&&bq.events[bm]){a.event.trigger(bd,bi,bq.handle.elem)}})}}if(!bf||bf.nodeType===3||bf.nodeType===8){return H}bd.result=H;bd.target=bf;bi=a.makeArray(bi);bi.unshift(bd)}bd.currentTarget=bf;var bj=a._data(bf,"handle");if(bj){bj.apply(bf,bi)}var bo=bf.parentNode||bf.ownerDocument;try{if(!(bf&&bf.nodeName&&a.noData[bf.nodeName.toLowerCase()])){if(bf["on"+bm]&&bf["on"+bm].apply(bf,bi)===false){bd.result=false;bd.preventDefault()}}}catch(bn){}if(!bd.isPropagationStopped()&&bo){a.event.trigger(bd,bi,bo,true)}else{if(!bd.isDefaultPrevented()){var be,bk=bd.target,e=bm.replace(aP,""),bp=a.nodeName(bk,"a")&&e==="click",bl=a.event.special[e]||{};if((!bl._default||bl._default.call(bf,bd)===false)&&!bp&&!(bk&&bk.nodeName&&a.noData[bk.nodeName.toLowerCase()])){try{if(bk[e]){be=bk["on"+e];if(be){bk["on"+e]=null}a.event.triggered=true;bk[e]()}}catch(bg){}if(be){bk["on"+e]=be}a.event.triggered=false}}}},handle:function(e){var bl,be,bd,bn,bm,bh=[],bj=a.makeArray(arguments);e=bj[0]=a.event.fix(e||aY.event);e.currentTarget=this;bl=e.type.indexOf(".")<0&&!e.exclusive;if(!bl){bd=e.type.split(".");e.type=bd.shift();bh=bd.slice(0).sort();bn=new RegExp("(^|\\.)"+bh.join("\\.(?:.*\\.)?")+"(\\.|$)")}e.namespace=e.namespace||bh.join(".");bm=a._data(this,"events");be=(bm||{})[e.type];if(bm&&be){be=be.slice(0);for(var bg=0,bf=be.length;bg<bf;bg++){var bk=be[bg];if(bl||bn.test(bk.namespace)){e.handler=bk.handler;e.data=bk.data;e.handleObj=bk;var bi=bk.handler.apply(this,bj);if(bi!==H){e.result=bi;if(bi===false){e.preventDefault();e.stopPropagation()}}if(e.isImmediatePropagationStopped()){break}}}}return e.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(bf){if(bf[a.expando]){return bf}var bd=bf;bf=a.Event(bd);for(var be=this.props.length,bh;be;){bh=this.props[--be];bf[bh]=bd[bh]}if(!bf.target){bf.target=bf.srcElement||al}if(bf.target.nodeType===3){bf.target=bf.target.parentNode}if(!bf.relatedTarget&&bf.fromElement){bf.relatedTarget=bf.fromElement===bf.target?bf.toElement:bf.fromElement}if(bf.pageX==null&&bf.clientX!=null){var bg=al.documentElement,e=al.body;bf.pageX=bf.clientX+(bg&&bg.scrollLeft||e&&e.scrollLeft||0)-(bg&&bg.clientLeft||e&&e.clientLeft||0);bf.pageY=bf.clientY+(bg&&bg.scrollTop||e&&e.scrollTop||0)-(bg&&bg.clientTop||e&&e.clientTop||0)}if(bf.which==null&&(bf.charCode!=null||bf.keyCode!=null)){bf.which=bf.charCode!=null?bf.charCode:bf.keyCode}if(!bf.metaKey&&bf.ctrlKey){bf.metaKey=bf.ctrlKey}if(!bf.which&&bf.button!==H){bf.which=(bf.button&1?1:(bf.button&2?3:(bf.button&4?2:0)))}return bf},guid:100000000,proxy:a.proxy,special:{ready:{setup:a.bindReady,teardown:a.noop},live:{add:function(e){a.event.add(this,n(e.origType,e.selector),a.extend({},e,{handler:af,guid:e.handler.guid}))},remove:function(e){a.event.remove(this,n(e.origType,e.selector),e)}},beforeunload:{setup:function(be,bd,e){if(a.isWindow(this)){this.onbeforeunload=e}},teardown:function(bd,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}};a.removeEvent=al.removeEventListener?function(bd,e,be){if(bd.removeEventListener){bd.removeEventListener(e,be,false)}}:function(bd,e,be){if(bd.detachEvent){bd.detachEvent("on"+e,be)}};a.Event=function(e){if(!this.preventDefault){return new a.Event(e)}if(e&&e.type){this.originalEvent=e;this.type=e.type;this.isDefaultPrevented=(e.defaultPrevented||e.returnValue===false||e.getPreventDefault&&e.getPreventDefault())?h:a5}else{this.type=e}this.timeStamp=a.now();this[a.expando]=true};function a5(){return false}function h(){return true}a.Event.prototype={preventDefault:function(){this.isDefaultPrevented=h;var bd=this.originalEvent;if(!bd){return}if(bd.preventDefault){bd.preventDefault()}else{bd.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=h;var bd=this.originalEvent;if(!bd){return}if(bd.stopPropagation){bd.stopPropagation()}bd.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=h;this.stopPropagation()},isDefaultPrevented:a5,isPropagationStopped:a5,isImmediatePropagationStopped:a5};var Z=function(be){var bd=be.relatedTarget;try{if(bd!==al&&!bd.parentNode){return}while(bd&&bd!==this){bd=bd.parentNode}if(bd!==this){be.type=be.data;a.event.handle.apply(this,arguments)}}catch(bf){}},aK=function(e){e.type=e.data;a.event.handle.apply(this,arguments)};a.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bd,e){a.event.special[bd]={setup:function(be){a.event.add(this,e,be&&be.selector?aK:Z,bd)},teardown:function(be){a.event.remove(this,e,be&&be.selector?aK:Z)}}});if(!a.support.submitBubbles){a.event.special.submit={setup:function(bd,e){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){a.event.add(this,"click.specialSubmit",function(bg){var bf=bg.target,be=bf.type;if((be==="submit"||be==="image")&&a(bf).closest("form").length){aN("submit",this,arguments)}});a.event.add(this,"keypress.specialSubmit",function(bg){var bf=bg.target,be=bf.type;if((be==="text"||be==="password")&&a(bf).closest("form").length&&bg.keyCode===13){aN("submit",this,arguments)}})}else{return false}},teardown:function(e){a.event.remove(this,".specialSubmit")}}}if(!a.support.changeBubbles){var a6,j=function(bd){var e=bd.type,be=bd.value;if(e==="radio"||e==="checkbox"){be=bd.checked}else{if(e==="select-multiple"){be=bd.selectedIndex>-1?a.map(bd.options,function(bf){return bf.selected}).join("-"):""}else{if(bd.nodeName.toLowerCase()==="select"){be=bd.selectedIndex}}}return be},X=function X(bf){var bd=bf.target,be,bg;if(!a0.test(bd.nodeName)||bd.readOnly){return}be=a._data(bd,"_change_data");bg=j(bd);if(bf.type!=="focusout"||bd.type!=="radio"){a._data(bd,"_change_data",bg)}if(be===H||bg===be){return}if(be!=null||bg){bf.type="change";bf.liveFired=H;a.event.trigger(bf,arguments[1],bd)}};a.event.special.change={filters:{focusout:X,beforedeactivate:X,click:function(bf){var be=bf.target,bd=be.type;if(bd==="radio"||bd==="checkbox"||be.nodeName.toLowerCase()==="select"){X.call(this,bf)}},keydown:function(bf){var be=bf.target,bd=be.type;if((bf.keyCode===13&&be.nodeName.toLowerCase()!=="textarea")||(bf.keyCode===32&&(bd==="checkbox"||bd==="radio"))||bd==="select-multiple"){X.call(this,bf)}},beforeactivate:function(be){var bd=be.target;a._data(bd,"_change_data",j(bd))}},setup:function(be,bd){if(this.type==="file"){return false}for(var e in a6){a.event.add(this,e+".specialChange",a6[e])}return a0.test(this.nodeName)},teardown:function(e){a.event.remove(this,".specialChange");return a0.test(this.nodeName)}};a6=a.event.special.change.filters;a6.focus=a6.beforeactivate}function aN(bd,bf,e){var be=a.extend({},e[0]);be.type=bd;be.originalEvent={};be.liveFired=H;a.event.handle.call(bf,be);if(be.isDefaultPrevented()){e[0].preventDefault()}}if(al.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(be,e){a.event.special[e]={setup:function(){this.addEventListener(be,bd,true)},teardown:function(){this.removeEventListener(be,bd,true)}};function bd(bf){bf=a.event.fix(bf);bf.type=e;return a.event.handle.call(this,bf)}})}a.each(["bind","one"],function(bd,e){a.fn[e]=function(bj,bk,bi){if(typeof bj==="object"){for(var bg in bj){this[e](bg,bk,bj[bg],bi)}return this}if(a.isFunction(bk)||bk===false){bi=bk;bk=H}var bh=e==="one"?a.proxy(bi,function(bl){a(this).unbind(bl,bh);return bi.apply(this,arguments)}):bi;if(bj==="unload"&&e!=="one"){this.one(bj,bk,bi)}else{for(var bf=0,be=this.length;bf<be;bf++){a.event.add(this[bf],bj,bh,bk)}}return this}});a.fn.extend({unbind:function(bg,bf){if(typeof bg==="object"&&!bg.preventDefault){for(var be in bg){this.unbind(be,bg[be])}}else{for(var bd=0,e=this.length;bd<e;bd++){a.event.remove(this[bd],bg,bf)}}return this},delegate:function(e,bd,bf,be){return this.live(bd,bf,be,e)},undelegate:function(e,bd,be){if(arguments.length===0){return this.unbind("live")}else{return this.die(bd,null,be,e)}},trigger:function(e,bd){return this.each(function(){a.event.trigger(e,bd,this)})},triggerHandler:function(e,be){if(this[0]){var bd=a.Event(e);bd.preventDefault();bd.stopPropagation();a.event.trigger(bd,be,this[0]);return bd.result}},toggle:function(be){var e=arguments,bd=1;while(bd<e.length){a.proxy(be,e[bd++])}return this.click(a.proxy(be,function(bf){var bg=(a._data(this,"lastToggle"+be.guid)||0)%bd;a._data(this,"lastToggle"+be.guid,bg+1);bf.preventDefault();return e[bg].apply(this,arguments)||false}))},hover:function(e,bd){return this.mouseenter(e).mouseleave(bd||e)}});var aH={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};a.each(["live","die"],function(bd,e){a.fn[e]=function(bn,bk,bp,bg){var bo,bl=0,bm,bf,br,bi=bg||this.selector,be=bg?this:a(this.context);if(typeof bn==="object"&&!bn.preventDefault){for(var bq in bn){be[e](bq,bk,bn[bq],bi)}return this}if(a.isFunction(bk)){bp=bk;bk=H}bn=(bn||"").split(" ");while((bo=bn[bl++])!=null){bm=aP.exec(bo);bf="";if(bm){bf=bm[0];bo=bo.replace(aP,"")}if(bo==="hover"){bn.push("mouseenter"+bf,"mouseleave"+bf);continue}br=bo;if(bo==="focus"||bo==="blur"){bn.push(aH[bo]+bf);bo=bo+bf}else{bo=(aH[bo]||bo)+bf}if(e==="live"){for(var bj=0,bh=be.length;bj<bh;bj++){a.event.add(be[bj],"live."+n(bo,bi),{data:bk,selector:bi,handler:bp,origType:bo,origHandler:bp,preType:br})}}else{be.unbind("live."+n(bo,bi),bp)}}return this}});function af(bn){var bk,bf,bt,bh,e,bp,bm,bo,bl,bs,bj,bi,br,bq=[],bg=[],bd=a._data(this,"events");if(bn.liveFired===this||!bd||!bd.live||bn.target.disabled||bn.button&&bn.type==="click"){return}if(bn.namespace){bi=new RegExp("(^|\\.)"+bn.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")}bn.liveFired=this;var be=bd.live.slice(0);for(bm=0;bm<be.length;bm++){e=be[bm];if(e.origType.replace(aP,"")===bn.type){bg.push(e.selector)}else{be.splice(bm--,1)}}bh=a(bn.target).closest(bg,bn.currentTarget);for(bo=0,bl=bh.length;bo<bl;bo++){bj=bh[bo];for(bm=0;bm<be.length;bm++){e=be[bm];if(bj.selector===e.selector&&(!bi||bi.test(e.namespace))&&!bj.elem.disabled){bp=bj.elem;bt=null;if(e.preType==="mouseenter"||e.preType==="mouseleave"){bn.type=e.preType;bt=a(bn.relatedTarget).closest(e.selector)[0]}if(!bt||bt!==bp){bq.push({elem:bp,handleObj:e,level:bj.level})}}}}for(bo=0,bl=bq.length;bo<bl;bo++){bh=bq[bo];if(bf&&bh.level>bf){break}bn.currentTarget=bh.elem;bn.data=bh.handleObj.data;bn.handleObj=bh.handleObj;br=bh.handleObj.origHandler.apply(bh.elem,arguments);if(br===false||bn.isPropagationStopped()){bf=bh.level;if(br===false){bk=false}if(bn.isImmediatePropagationStopped()){break}}}return bk}function n(bd,e){return(bd&&bd!=="*"?bd+".":"")+e.replace(K,"`").replace(aa,"&")}a.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").split(" "),function(bd,e){a.fn[e]=function(bf,be){if(be==null){be=bf;bf=null}return arguments.length>0?this.bind(e,bf,be):this.trigger(e)};if(a.attrFn){a.attrFn[e]=true}}); +(function(a0,I){var am=a0.document;var b=(function(){var bo=function(bI,bJ){return new bo.fn.init(bI,bJ,bm)},bD=a0.jQuery,bq=a0.$,bm,bH=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,bw=/\S/,bs=/^\s+/,bn=/\s+$/,br=/\d/,bk=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bx=/^[\],:{}\s]*$/,bF=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bz=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bt=/(?:^|:|,)(?:\s*\[)+/g,bi=/(webkit)[ \/]([\w.]+)/,bB=/(opera)(?:.*version)?[ \/]([\w.]+)/,bA=/(msie) ([\w.]+)/,bC=/(mozilla)(?:.*? rv:([\w.]+))?/,bG=navigator.userAgent,bE,bl,e,bv=Object.prototype.toString,bp=Object.prototype.hasOwnProperty,bj=Array.prototype.push,bu=Array.prototype.slice,by=String.prototype.trim,bf=Array.prototype.indexOf,bh={};bo.fn=bo.prototype={constructor:bo,init:function(bI,bM,bL){var bK,bN,bJ,bO;if(!bI){return this}if(bI.nodeType){this.context=this[0]=bI;this.length=1;return this}if(bI==="body"&&!bM&&am.body){this.context=am;this[0]=am.body;this.selector="body";this.length=1;return this}if(typeof bI==="string"){bK=bH.exec(bI);if(bK&&(bK[1]||!bM)){if(bK[1]){bM=bM instanceof bo?bM[0]:bM;bO=(bM?bM.ownerDocument||bM:am);bJ=bk.exec(bI);if(bJ){if(bo.isPlainObject(bM)){bI=[am.createElement(bJ[1])];bo.fn.attr.call(bI,bM,true)}else{bI=[bO.createElement(bJ[1])]}}else{bJ=bo.buildFragment([bK[1]],[bO]);bI=(bJ.cacheable?bo.clone(bJ.fragment):bJ.fragment).childNodes}return bo.merge(this,bI)}else{bN=am.getElementById(bK[2]);if(bN&&bN.parentNode){if(bN.id!==bK[2]){return bL.find(bI)}this.length=1;this[0]=bN}this.context=am;this.selector=bI;return this}}else{if(!bM||bM.jquery){return(bM||bL).find(bI)}else{return this.constructor(bM).find(bI)}}}else{if(bo.isFunction(bI)){return bL.ready(bI)}}if(bI.selector!==I){this.selector=bI.selector;this.context=bI.context}return bo.makeArray(bI,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return bu.call(this,0)},get:function(bI){return bI==null?this.toArray():(bI<0?this[this.length+bI]:this[bI])},pushStack:function(bJ,bL,bI){var bK=this.constructor();if(bo.isArray(bJ)){bj.apply(bK,bJ)}else{bo.merge(bK,bJ)}bK.prevObject=this;bK.context=this.context;if(bL==="find"){bK.selector=this.selector+(this.selector?" ":"")+bI}else{if(bL){bK.selector=this.selector+"."+bL+"("+bI+")"}}return bK},each:function(bJ,bI){return bo.each(this,bJ,bI)},ready:function(bI){bo.bindReady();bl.done(bI);return this},eq:function(bI){return bI===-1?this.slice(bI):this.slice(bI,+bI+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bu.apply(this,arguments),"slice",bu.call(arguments).join(","))},map:function(bI){return this.pushStack(bo.map(this,function(bK,bJ){return bI.call(bK,bJ,bK)}))},end:function(){return this.prevObject||this.constructor(null)},push:bj,sort:[].sort,splice:[].splice};bo.fn.init.prototype=bo.fn;bo.extend=bo.fn.extend=function(){var bR,bK,bI,bJ,bO,bP,bN=arguments[0]||{},bM=1,bL=arguments.length,bQ=false;if(typeof bN==="boolean"){bQ=bN;bN=arguments[1]||{};bM=2}if(typeof bN!=="object"&&!bo.isFunction(bN)){bN={}}if(bL===bM){bN=this;--bM}for(;bM<bL;bM++){if((bR=arguments[bM])!=null){for(bK in bR){bI=bN[bK];bJ=bR[bK];if(bN===bJ){continue}if(bQ&&bJ&&(bo.isPlainObject(bJ)||(bO=bo.isArray(bJ)))){if(bO){bO=false;bP=bI&&bo.isArray(bI)?bI:[]}else{bP=bI&&bo.isPlainObject(bI)?bI:{}}bN[bK]=bo.extend(bQ,bP,bJ)}else{if(bJ!==I){bN[bK]=bJ}}}}}return bN};bo.extend({noConflict:function(bI){a0.$=bq;if(bI){a0.jQuery=bD}return bo},isReady:false,readyWait:1,ready:function(bI){if(bI===true){bo.readyWait--}if(!bo.readyWait||(bI!==true&&!bo.isReady)){if(!am.body){return setTimeout(bo.ready,1)}bo.isReady=true;if(bI!==true&&--bo.readyWait>0){return}bl.resolveWith(am,[bo]);if(bo.fn.trigger){bo(am).trigger("ready").unbind("ready")}}},bindReady:function(){if(bl){return}bl=bo._Deferred();if(am.readyState==="complete"){return setTimeout(bo.ready,1)}if(am.addEventListener){am.addEventListener("DOMContentLoaded",e,false);a0.addEventListener("load",bo.ready,false)}else{if(am.attachEvent){am.attachEvent("onreadystatechange",e);a0.attachEvent("onload",bo.ready);var bI=false;try{bI=a0.frameElement==null}catch(bJ){}if(am.documentElement.doScroll&&bI){bg()}}}},isFunction:function(bI){return bo.type(bI)==="function"},isArray:Array.isArray||function(bI){return bo.type(bI)==="array"},isWindow:function(bI){return bI&&typeof bI==="object"&&"setInterval" in bI},isNaN:function(bI){return bI==null||!br.test(bI)||isNaN(bI)},type:function(bI){return bI==null?String(bI):bh[bv.call(bI)]||"object"},isPlainObject:function(bJ){if(!bJ||bo.type(bJ)!=="object"||bJ.nodeType||bo.isWindow(bJ)){return false}if(bJ.constructor&&!bp.call(bJ,"constructor")&&!bp.call(bJ.constructor.prototype,"isPrototypeOf")){return false}var bI;for(bI in bJ){}return bI===I||bp.call(bJ,bI)},isEmptyObject:function(bJ){for(var bI in bJ){return false}return true},error:function(bI){throw bI},parseJSON:function(bI){if(typeof bI!=="string"||!bI){return null}bI=bo.trim(bI);if(bx.test(bI.replace(bF,"@").replace(bz,"]").replace(bt,""))){return a0.JSON&&a0.JSON.parse?a0.JSON.parse(bI):(new Function("return "+bI))()}else{bo.error("Invalid JSON: "+bI)}},parseXML:function(bK,bI,bJ){if(a0.DOMParser){bJ=new DOMParser();bI=bJ.parseFromString(bK,"text/xml")}else{bI=new ActiveXObject("Microsoft.XMLDOM");bI.async="false";bI.loadXML(bK)}bJ=bI.documentElement;if(!bJ||!bJ.nodeName||bJ.nodeName==="parsererror"){bo.error("Invalid XML: "+bK)}return bI},noop:function(){},globalEval:function(bK){if(bK&&bw.test(bK)){var bJ=am.head||am.getElementsByTagName("head")[0]||am.documentElement,bI=am.createElement("script");if(bo.support.scriptEval()){bI.appendChild(am.createTextNode(bK))}else{bI.text=bK}bJ.insertBefore(bI,bJ.firstChild);bJ.removeChild(bI)}},nodeName:function(bJ,bI){return bJ.nodeName&&bJ.nodeName.toUpperCase()===bI.toUpperCase()},each:function(bL,bP,bK){var bJ,bM=0,bN=bL.length,bI=bN===I||bo.isFunction(bL);if(bK){if(bI){for(bJ in bL){if(bP.apply(bL[bJ],bK)===false){break}}}else{for(;bM<bN;){if(bP.apply(bL[bM++],bK)===false){break}}}}else{if(bI){for(bJ in bL){if(bP.call(bL[bJ],bJ,bL[bJ])===false){break}}}else{for(var bO=bL[0];bM<bN&&bP.call(bO,bM,bO)!==false;bO=bL[++bM]){}}}return bL},trim:by?function(bI){return bI==null?"":by.call(bI)}:function(bI){return bI==null?"":bI.toString().replace(bs,"").replace(bn,"")},makeArray:function(bL,bJ){var bI=bJ||[];if(bL!=null){var bK=bo.type(bL);if(bL.length==null||bK==="string"||bK==="function"||bK==="regexp"||bo.isWindow(bL)){bj.call(bI,bL)}else{bo.merge(bI,bL)}}return bI},inArray:function(bK,bL){if(bL.indexOf){return bL.indexOf(bK)}for(var bI=0,bJ=bL.length;bI<bJ;bI++){if(bL[bI]===bK){return bI}}return -1},merge:function(bM,bK){var bL=bM.length,bJ=0;if(typeof bK.length==="number"){for(var bI=bK.length;bJ<bI;bJ++){bM[bL++]=bK[bJ]}}else{while(bK[bJ]!==I){bM[bL++]=bK[bJ++]}}bM.length=bL;return bM},grep:function(bJ,bO,bI){var bK=[],bN;bI=!!bI;for(var bL=0,bM=bJ.length;bL<bM;bL++){bN=!!bO(bJ[bL],bL);if(bI!==bN){bK.push(bJ[bL])}}return bK},map:function(bJ,bO,bI){var bK=[],bN;for(var bL=0,bM=bJ.length;bL<bM;bL++){bN=bO(bJ[bL],bL,bI);if(bN!=null){bK[bK.length]=bN}}return bK.concat.apply([],bK)},guid:1,proxy:function(bK,bJ,bI){if(arguments.length===2){if(typeof bJ==="string"){bI=bK;bK=bI[bJ];bJ=I}else{if(bJ&&!bo.isFunction(bJ)){bI=bJ;bJ=I}}}if(!bJ&&bK){bJ=function(){return bK.apply(bI||this,arguments)}}if(bK){bJ.guid=bK.guid=bK.guid||bJ.guid||bo.guid++}return bJ},access:function(bI,bQ,bO,bK,bN,bP){var bJ=bI.length;if(typeof bQ==="object"){for(var bL in bQ){bo.access(bI,bL,bQ[bL],bK,bN,bO)}return bI}if(bO!==I){bK=!bP&&bK&&bo.isFunction(bO);for(var bM=0;bM<bJ;bM++){bN(bI[bM],bQ,bK?bO.call(bI[bM],bM,bN(bI[bM],bQ)):bO,bP)}return bI}return bJ?bN(bI[0],bQ):I},now:function(){return(new Date()).getTime()},uaMatch:function(bJ){bJ=bJ.toLowerCase();var bI=bi.exec(bJ)||bB.exec(bJ)||bA.exec(bJ)||bJ.indexOf("compatible")<0&&bC.exec(bJ)||[];return{browser:bI[1]||"",version:bI[2]||"0"}},sub:function(){function bJ(bL,bM){return new bJ.fn.init(bL,bM)}bo.extend(true,bJ,this);bJ.superclass=this;bJ.fn=bJ.prototype=this();bJ.fn.constructor=bJ;bJ.subclass=this.subclass;bJ.fn.init=function bK(bL,bM){if(bM&&bM instanceof bo&&!(bM instanceof bJ)){bM=bJ(bM)}return bo.fn.init.call(this,bL,bM,bI)};bJ.fn.init.prototype=bJ.fn;var bI=bJ(am);return bJ},browser:{}});bo.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(bJ,bI){bh["[object "+bI+"]"]=bI.toLowerCase()});bE=bo.uaMatch(bG);if(bE.browser){bo.browser[bE.browser]=true;bo.browser.version=bE.version}if(bo.browser.webkit){bo.browser.safari=true}if(bf){bo.inArray=function(bI,bJ){return bf.call(bJ,bI)}}if(bw.test("\xA0")){bs=/^[\s\xA0]+/;bn=/[\s\xA0]+$/}bm=bo(am);if(am.addEventListener){e=function(){am.removeEventListener("DOMContentLoaded",e,false);bo.ready()}}else{if(am.attachEvent){e=function(){if(am.readyState==="complete"){am.detachEvent("onreadystatechange",e);bo.ready()}}}}function bg(){if(bo.isReady){return}try{am.documentElement.doScroll("left")}catch(bI){setTimeout(bg,1);return}bo.ready()}return bo})();var a="then done fail isResolved isRejected promise".split(" "),aA=[].slice;b.extend({_Deferred:function(){var bh=[],bi,bf,bg,e={done:function(){if(!bg){var bk=arguments,bl,bo,bn,bm,bj;if(bi){bj=bi;bi=0}for(bl=0,bo=bk.length;bl<bo;bl++){bn=bk[bl];bm=b.type(bn);if(bm==="array"){e.done.apply(e,bn)}else{if(bm==="function"){bh.push(bn)}}}if(bj){e.resolveWith(bj[0],bj[1])}}return this},resolveWith:function(bk,bj){if(!bg&&!bi&&!bf){bj=bj||[];bf=1;try{while(bh[0]){bh.shift().apply(bk,bj)}}finally{bi=[bk,bj];bf=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return !!(bf||bi)},cancel:function(){bg=1;bh=[];return this}};return e},Deferred:function(bf){var e=b._Deferred(),bh=b._Deferred(),bg;b.extend(e,{then:function(bj,bi){e.done(bj).fail(bi);return this},fail:bh.done,rejectWith:bh.resolveWith,reject:bh.resolve,isRejected:bh.isResolved,promise:function(bj){if(bj==null){if(bg){return bg}bg=bj={}}var bi=a.length;while(bi--){bj[a[bi]]=e[a[bi]]}return bj}});e.done(bh.cancel).fail(e.cancel);delete e.cancel;if(bf){bf.call(e,e)}return e},when:function(bk){var bf=arguments,bg=0,bj=bf.length,bi=bj,e=bj<=1&&bk&&b.isFunction(bk.promise)?bk:b.Deferred();function bh(bl){return function(bm){bf[bl]=arguments.length>1?aA.call(arguments,0):bm;if(!(--bi)){e.resolveWith(e,aA.call(bf,0))}}}if(bj>1){for(;bg<bj;bg++){if(bf[bg]&&b.isFunction(bf[bg].promise)){bf[bg].promise().then(bh(bg),e.reject)}else{--bi}}if(!bi){e.resolveWith(e,bf)}}else{if(e!==bk){e.resolveWith(e,bj?[bk]:[])}}return e.promise()}});(function(){b.support={};var bf=am.createElement("div");bf.style.display="none";bf.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var bo=bf.getElementsByTagName("*"),bm=bf.getElementsByTagName("a")[0],bn=am.createElement("select"),bg=bn.appendChild(am.createElement("option")),bl=bf.getElementsByTagName("input")[0];if(!bo||!bo.length||!bm){return}b.support={leadingWhitespace:bf.firstChild.nodeType===3,tbody:!bf.getElementsByTagName("tbody").length,htmlSerialize:!!bf.getElementsByTagName("link").length,style:/red/.test(bm.getAttribute("style")),hrefNormalized:bm.getAttribute("href")==="/a",opacity:/^0.55$/.test(bm.style.opacity),cssFloat:!!bm.style.cssFloat,checkOn:bl.value==="on",optSelected:bg.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true,reliableMarginRight:true};bl.checked=true;b.support.noCloneChecked=bl.cloneNode(true).checked;bn.disabled=true;b.support.optDisabled=!bg.disabled;var bh=null;b.support.scriptEval=function(){if(bh===null){var bq=am.documentElement,br=am.createElement("script"),bt="script"+b.now();try{br.appendChild(am.createTextNode("window."+bt+"=1;"))}catch(bs){}bq.insertBefore(br,bq.firstChild);if(a0[bt]){bh=true;delete a0[bt]}else{bh=false}bq.removeChild(br)}return bh};try{delete bf.test}catch(bj){b.support.deleteExpando=false}if(!bf.addEventListener&&bf.attachEvent&&bf.fireEvent){bf.attachEvent("onclick",function bp(){b.support.noCloneEvent=false;bf.detachEvent("onclick",bp)});bf.cloneNode(true).fireEvent("onclick")}bf=am.createElement("div");bf.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var bi=am.createDocumentFragment();bi.appendChild(bf.firstChild);b.support.checkClone=bi.cloneNode(true).cloneNode(true).lastChild.checked;b(function(){var br=am.createElement("div"),e=am.getElementsByTagName("body")[0];if(!e){return}br.style.width=br.style.paddingLeft="1px";e.appendChild(br);b.boxModel=b.support.boxModel=br.offsetWidth===2;if("zoom" in br.style){br.style.display="inline";br.style.zoom=1;b.support.inlineBlockNeedsLayout=br.offsetWidth===2;br.style.display="";br.innerHTML="<div style='width:4px;'></div>";b.support.shrinkWrapBlocks=br.offsetWidth!==2}br.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var bq=br.getElementsByTagName("td");b.support.reliableHiddenOffsets=bq[0].offsetHeight===0;bq[0].style.display="";bq[1].style.display="none";b.support.reliableHiddenOffsets=b.support.reliableHiddenOffsets&&bq[0].offsetHeight===0;br.innerHTML="";if(am.defaultView&&am.defaultView.getComputedStyle){br.style.width="1px";br.style.marginRight="0";b.support.reliableMarginRight=(parseInt(am.defaultView.getComputedStyle(br,null).marginRight,10)||0)===0}e.removeChild(br).style.display="none";br=bq=null});var bk=function(e){var br=am.createElement("div");e="on"+e;if(!br.attachEvent){return true}var bq=(e in br);if(!bq){br.setAttribute(e,"return;");bq=typeof br[e]==="function"}return bq};b.support.submitBubbles=bk("submit");b.support.changeBubbles=bk("change");bf=bo=bm=null})();var aG=/^(?:\{.*\}|\[.*\])$/;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!Q(e)},data:function(bh,bf,bj,bi){if(!b.acceptData(bh)){return}var bm=b.expando,bl=typeof bf==="string",bk,bn=bh.nodeType,e=bn?b.cache:bh,bg=bn?bh[b.expando]:bh[b.expando]&&b.expando;if((!bg||(bi&&bg&&!e[bg][bm]))&&bl&&bj===I){return}if(!bg){if(bn){bh[b.expando]=bg=++b.uuid}else{bg=b.expando}}if(!e[bg]){e[bg]={};if(!bn){e[bg].toJSON=b.noop}}if(typeof bf==="object"||typeof bf==="function"){if(bi){e[bg][bm]=b.extend(e[bg][bm],bf)}else{e[bg]=b.extend(e[bg],bf)}}bk=e[bg];if(bi){if(!bk[bm]){bk[bm]={}}bk=bk[bm]}if(bj!==I){bk[bf]=bj}if(bf==="events"&&!bk[bf]){return bk[bm]&&bk[bm].events}return bl?bk[bf]:bk},removeData:function(bi,bg,bj){if(!b.acceptData(bi)){return}var bl=b.expando,bm=bi.nodeType,bf=bm?b.cache:bi,bh=bm?bi[b.expando]:b.expando;if(!bf[bh]){return}if(bg){var bk=bj?bf[bh][bl]:bf[bh];if(bk){delete bk[bg];if(!Q(bk)){return}}}if(bj){delete bf[bh][bl];if(!Q(bf[bh])){return}}var e=bf[bh][bl];if(b.support.deleteExpando||bf!=a0){delete bf[bh]}else{bf[bh]=null}if(e){bf[bh]={};if(!bm){bf[bh].toJSON=b.noop}bf[bh][bl]=e}else{if(bm){if(b.support.deleteExpando){delete bi[b.expando]}else{if(bi.removeAttribute){bi.removeAttribute(b.expando)}else{bi[b.expando]=null}}}}},_data:function(bf,e,bg){return b.data(bf,e,bg,true)},acceptData:function(bf){if(bf.nodeName){var e=b.noData[bf.nodeName.toLowerCase()];if(e){return !(e===true||bf.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(bi,bk){var bj=null;if(typeof bi==="undefined"){if(this.length){bj=b.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,bg;for(var bh=0,bf=e.length;bh<bf;bh++){bg=e[bh].name;if(bg.indexOf("data-")===0){bg=bg.substr(5);aV(this[0],bg,bj[bg])}}}}return bj}else{if(typeof bi==="object"){return this.each(function(){b.data(this,bi)})}}var bl=bi.split(".");bl[1]=bl[1]?"."+bl[1]:"";if(bk===I){bj=this.triggerHandler("getData"+bl[1]+"!",[bl[0]]);if(bj===I&&this.length){bj=b.data(this[0],bi);bj=aV(this[0],bi,bj)}return bj===I&&bl[1]?this.data(bl[0]):bj}else{return this.each(function(){var bn=b(this),bm=[bl[0],bk];bn.triggerHandler("setData"+bl[1]+"!",bm);b.data(this,bi,bk);bn.triggerHandler("changeData"+bl[1]+"!",bm)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function aV(bg,bf,bh){if(bh===I&&bg.nodeType===1){bh=bg.getAttribute("data-"+bf);if(typeof bh==="string"){try{bh=bh==="true"?true:bh==="false"?false:bh==="null"?null:!b.isNaN(bh)?parseFloat(bh):aG.test(bh)?b.parseJSON(bh):bh}catch(bi){}b.data(bg,bf,bh)}else{bh=I}}return bh}function Q(bf){for(var e in bf){if(e!=="toJSON"){return false}}return true}b.extend({queue:function(bf,e,bh){if(!bf){return}e=(e||"fx")+"queue";var bg=b._data(bf,e);if(!bh){return bg||[]}if(!bg||b.isArray(bh)){bg=b._data(bf,e,b.makeArray(bh))}else{bg.push(bh)}return bg},dequeue:function(bh,bg){bg=bg||"fx";var e=b.queue(bh,bg),bf=e.shift();if(bf==="inprogress"){bf=e.shift()}if(bf){if(bg==="fx"){e.unshift("inprogress")}bf.call(bh,function(){b.dequeue(bh,bg)})}if(!e.length){b.removeData(bh,bg+"queue",true)}}});b.fn.extend({queue:function(e,bf){if(typeof e!=="string"){bf=e;e="fx"}if(bf===I){return b.queue(this[0],e)}return this.each(function(bh){var bg=b.queue(this,e,bf);if(e==="fx"&&bg[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(bf,e){bf=b.fx?b.fx.speeds[bf]||bf:bf;e=e||"fx";return this.queue(e,function(){var bg=this;setTimeout(function(){b.dequeue(bg,e)},bf)})},clearQueue:function(e){return this.queue(e||"fx",[])}});var aE=/[\n\t\r]/g,a5=/\s+/,aI=/\r/g,a4=/^(?:href|src|style)$/,g=/^(?:button|input)$/i,D=/^(?:button|input|object|select|textarea)$/i,l=/^a(?:rea)?$/i,R=/^(?:radio|checkbox)$/i;b.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};b.fn.extend({attr:function(e,bf){return b.access(this,e,bf,true,b.attr)},removeAttr:function(e,bf){return this.each(function(){b.attr(this,e,"");if(this.nodeType===1){this.removeAttribute(e)}})},addClass:function(bl){if(b.isFunction(bl)){return this.each(function(bo){var bn=b(this);bn.addClass(bl.call(this,bo,bn.attr("class")))})}if(bl&&typeof bl==="string"){var e=(bl||"").split(a5);for(var bh=0,bg=this.length;bh<bg;bh++){var bf=this[bh];if(bf.nodeType===1){if(!bf.className){bf.className=bl}else{var bi=" "+bf.className+" ",bk=bf.className;for(var bj=0,bm=e.length;bj<bm;bj++){if(bi.indexOf(" "+e[bj]+" ")<0){bk+=" "+e[bj]}}bf.className=b.trim(bk)}}}}return this},removeClass:function(bj){if(b.isFunction(bj)){return this.each(function(bn){var bm=b(this);bm.removeClass(bj.call(this,bn,bm.attr("class")))})}if((bj&&typeof bj==="string")||bj===I){var bk=(bj||"").split(a5);for(var bg=0,bf=this.length;bg<bf;bg++){var bi=this[bg];if(bi.nodeType===1&&bi.className){if(bj){var bh=(" "+bi.className+" ").replace(aE," ");for(var bl=0,e=bk.length;bl<e;bl++){bh=bh.replace(" "+bk[bl]+" "," ")}bi.className=b.trim(bh)}else{bi.className=""}}}}return this},toggleClass:function(bh,bf){var bg=typeof bh,e=typeof bf==="boolean";if(b.isFunction(bh)){return this.each(function(bj){var bi=b(this);bi.toggleClass(bh.call(this,bj,bi.attr("class"),bf),bf)})}return this.each(function(){if(bg==="string"){var bk,bj=0,bi=b(this),bl=bf,bm=bh.split(a5);while((bk=bm[bj++])){bl=e?bl:!bi.hasClass(bk);bi[bl?"addClass":"removeClass"](bk)}}else{if(bg==="undefined"||bg==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bh===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bh=" "+e+" ";for(var bg=0,bf=this.length;bg<bf;bg++){if((" "+this[bg].className+" ").replace(aE," ").indexOf(bh)>-1){return true}}return false},val:function(bm){if(!arguments.length){var bg=this[0];if(bg){if(b.nodeName(bg,"option")){var bf=bg.attributes.value;return !bf||bf.specified?bg.value:bg.text}if(b.nodeName(bg,"select")){var bk=bg.selectedIndex,bn=[],bo=bg.options,bj=bg.type==="select-one";if(bk<0){return null}for(var bh=bj?bk:0,bl=bj?bk+1:bo.length;bh<bl;bh++){var bi=bo[bh];if(bi.selected&&(b.support.optDisabled?!bi.disabled:bi.getAttribute("disabled")===null)&&(!bi.parentNode.disabled||!b.nodeName(bi.parentNode,"optgroup"))){bm=b(bi).val();if(bj){return bm}bn.push(bm)}}if(bj&&!bn.length&&bo.length){return b(bo[bk]).val()}return bn}if(R.test(bg.type)&&!b.support.checkOn){return bg.getAttribute("value")===null?"on":bg.value}return(bg.value||"").replace(aI,"")}return I}var e=b.isFunction(bm);return this.each(function(br){var bq=b(this),bs=bm;if(this.nodeType!==1){return}if(e){bs=bm.call(this,br,bq.val())}if(bs==null){bs=""}else{if(typeof bs==="number"){bs+=""}else{if(b.isArray(bs)){bs=b.map(bs,function(bt){return bt==null?"":bt+""})}}}if(b.isArray(bs)&&R.test(this.type)){this.checked=b.inArray(bq.val(),bs)>=0}else{if(b.nodeName(this,"select")){var bp=b.makeArray(bs);b("option",this).each(function(){this.selected=b.inArray(b(this).val(),bp)>=0});if(!bp.length){this.selectedIndex=-1}}else{this.value=bs}}})}});b.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bf,e,bk,bn){if(!bf||bf.nodeType===3||bf.nodeType===8||bf.nodeType===2){return I}if(bn&&e in b.attrFn){return b(bf)[e](bk)}var bg=bf.nodeType!==1||!b.isXMLDoc(bf),bj=bk!==I;e=bg&&b.props[e]||e;if(bf.nodeType===1){var bi=a4.test(e);if(e==="selected"&&!b.support.optSelected){var bl=bf.parentNode;if(bl){bl.selectedIndex;if(bl.parentNode){bl.parentNode.selectedIndex}}}if((e in bf||bf[e]!==I)&&bg&&!bi){if(bj){if(e==="type"&&g.test(bf.nodeName)&&bf.parentNode){b.error("type property can't be changed")}if(bk===null){if(bf.nodeType===1){bf.removeAttribute(e)}}else{bf[e]=bk}}if(b.nodeName(bf,"form")&&bf.getAttributeNode(e)){return bf.getAttributeNode(e).nodeValue}if(e==="tabIndex"){var bm=bf.getAttributeNode("tabIndex");return bm&&bm.specified?bm.value:D.test(bf.nodeName)||l.test(bf.nodeName)&&bf.href?0:I}return bf[e]}if(!b.support.style&&bg&&e==="style"){if(bj){bf.style.cssText=""+bk}return bf.style.cssText}if(bj){bf.setAttribute(e,""+bk)}if(!bf.attributes[e]&&(bf.hasAttribute&&!bf.hasAttribute(e))){return I}var bh=!b.support.hrefNormalized&&bg&&bi?bf.getAttribute(e,2):bf.getAttribute(e);return bh===null?I:bh}if(bj){bf[e]=bk}return bf[e]}});var aR=/\.(.*)$/,a2=/^(?:textarea|input|select)$/i,L=/\./g,ab=/ /g,ax=/[^\w\s.|`]/g,F=function(e){return e.replace(ax,"\\$&")};b.event={add:function(bi,bm,bt,bk){if(bi.nodeType===3||bi.nodeType===8){return}try{if(b.isWindow(bi)&&(bi!==a0&&!bi.frameElement)){bi=a0}}catch(bn){}if(bt===false){bt=a7}else{if(!bt){return}}var bg,br;if(bt.handler){bg=bt;bt=bg.handler}if(!bt.guid){bt.guid=b.guid++}var bo=b._data(bi);if(!bo){return}var bs=bo.events,bl=bo.handle;if(!bs){bo.events=bs={}}if(!bl){bo.handle=bl=function(bu){return typeof b!=="undefined"&&b.event.triggered!==bu.type?b.event.handle.apply(bl.elem,arguments):I}}bl.elem=bi;bm=bm.split(" ");var bq,bj=0,bf;while((bq=bm[bj++])){br=bg?b.extend({},bg):{handler:bt,data:bk};if(bq.indexOf(".")>-1){bf=bq.split(".");bq=bf.shift();br.namespace=bf.slice(0).sort().join(".")}else{bf=[];br.namespace=""}br.type=bq;if(!br.guid){br.guid=bt.guid}var bh=bs[bq],bp=b.event.special[bq]||{};if(!bh){bh=bs[bq]=[];if(!bp.setup||bp.setup.call(bi,bk,bf,bl)===false){if(bi.addEventListener){bi.addEventListener(bq,bl,false)}else{if(bi.attachEvent){bi.attachEvent("on"+bq,bl)}}}}if(bp.add){bp.add.call(bi,br);if(!br.handler.guid){br.handler.guid=bt.guid}}bh.push(br);b.event.global[bq]=true}bi=null},global:{},remove:function(bt,bo,bg,bk){if(bt.nodeType===3||bt.nodeType===8){return}if(bg===false){bg=a7}var bw,bj,bl,bq,br=0,bh,bm,bp,bi,bn,e,bv,bs=b.hasData(bt)&&b._data(bt),bf=bs&&bs.events;if(!bs||!bf){return}if(bo&&bo.type){bg=bo.handler;bo=bo.type}if(!bo||typeof bo==="string"&&bo.charAt(0)==="."){bo=bo||"";for(bj in bf){b.event.remove(bt,bj+bo)}return}bo=bo.split(" ");while((bj=bo[br++])){bv=bj;e=null;bh=bj.indexOf(".")<0;bm=[];if(!bh){bm=bj.split(".");bj=bm.shift();bp=new RegExp("(^|\\.)"+b.map(bm.slice(0).sort(),F).join("\\.(?:.*\\.)?")+"(\\.|$)")}bn=bf[bj];if(!bn){continue}if(!bg){for(bq=0;bq<bn.length;bq++){e=bn[bq];if(bh||bp.test(e.namespace)){b.event.remove(bt,bv,e.handler,bq);bn.splice(bq--,1)}}continue}bi=b.event.special[bj]||{};for(bq=bk||0;bq<bn.length;bq++){e=bn[bq];if(bg.guid===e.guid){if(bh||bp.test(e.namespace)){if(bk==null){bn.splice(bq--,1)}if(bi.remove){bi.remove.call(bt,e)}}if(bk!=null){break}}}if(bn.length===0||bk!=null&&bn.length===1){if(!bi.teardown||bi.teardown.call(bt,bm)===false){b.removeEvent(bt,bj,bs.handle)}bw=null;delete bf[bj]}}if(b.isEmptyObject(bf)){var bu=bs.handle;if(bu){bu.elem=null}delete bs.events;delete bs.handle;if(b.isEmptyObject(bs)){b.removeData(bt,I,true)}}},trigger:function(bf,bk,bh){var bo=bf.type||bf,bj=arguments[3];if(!bj){bf=typeof bf==="object"?bf[b.expando]?bf:b.extend(b.Event(bo),bf):b.Event(bo);if(bo.indexOf("!")>=0){bf.type=bo=bo.slice(0,-1);bf.exclusive=true}if(!bh){bf.stopPropagation();if(b.event.global[bo]){b.each(b.cache,function(){var bt=b.expando,bs=this[bt];if(bs&&bs.events&&bs.events[bo]){b.event.trigger(bf,bk,bs.handle.elem)}})}}if(!bh||bh.nodeType===3||bh.nodeType===8){return I}bf.result=I;bf.target=bh;bk=b.makeArray(bk);bk.unshift(bf)}bf.currentTarget=bh;var bl=b._data(bh,"handle");if(bl){bl.apply(bh,bk)}var bq=bh.parentNode||bh.ownerDocument;try{if(!(bh&&bh.nodeName&&b.noData[bh.nodeName.toLowerCase()])){if(bh["on"+bo]&&bh["on"+bo].apply(bh,bk)===false){bf.result=false;bf.preventDefault()}}}catch(bp){}if(!bf.isPropagationStopped()&&bq){b.event.trigger(bf,bk,bq,true)}else{if(!bf.isDefaultPrevented()){var bg,bm=bf.target,e=bo.replace(aR,""),br=b.nodeName(bm,"a")&&e==="click",bn=b.event.special[e]||{};if((!bn._default||bn._default.call(bh,bf)===false)&&!br&&!(bm&&bm.nodeName&&b.noData[bm.nodeName.toLowerCase()])){try{if(bm[e]){bg=bm["on"+e];if(bg){bm["on"+e]=null}b.event.triggered=bf.type;bm[e]()}}catch(bi){}if(bg){bm["on"+e]=bg}b.event.triggered=I}}}},handle:function(e){var bn,bg,bf,bp,bo,bj=[],bl=b.makeArray(arguments);e=bl[0]=b.event.fix(e||a0.event);e.currentTarget=this;bn=e.type.indexOf(".")<0&&!e.exclusive;if(!bn){bf=e.type.split(".");e.type=bf.shift();bj=bf.slice(0).sort();bp=new RegExp("(^|\\.)"+bj.join("\\.(?:.*\\.)?")+"(\\.|$)")}e.namespace=e.namespace||bj.join(".");bo=b._data(this,"events");bg=(bo||{})[e.type];if(bo&&bg){bg=bg.slice(0);for(var bi=0,bh=bg.length;bi<bh;bi++){var bm=bg[bi];if(bn||bp.test(bm.namespace)){e.handler=bm.handler;e.data=bm.data;e.handleObj=bm;var bk=bm.handler.apply(this,bl);if(bk!==I){e.result=bk;if(bk===false){e.preventDefault();e.stopPropagation()}}if(e.isImmediatePropagationStopped()){break}}}}return e.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(bh){if(bh[b.expando]){return bh}var bf=bh;bh=b.Event(bf);for(var bg=this.props.length,bj;bg;){bj=this.props[--bg];bh[bj]=bf[bj]}if(!bh.target){bh.target=bh.srcElement||am}if(bh.target.nodeType===3){bh.target=bh.target.parentNode}if(!bh.relatedTarget&&bh.fromElement){bh.relatedTarget=bh.fromElement===bh.target?bh.toElement:bh.fromElement}if(bh.pageX==null&&bh.clientX!=null){var bi=am.documentElement,e=am.body;bh.pageX=bh.clientX+(bi&&bi.scrollLeft||e&&e.scrollLeft||0)-(bi&&bi.clientLeft||e&&e.clientLeft||0);bh.pageY=bh.clientY+(bi&&bi.scrollTop||e&&e.scrollTop||0)-(bi&&bi.clientTop||e&&e.clientTop||0)}if(bh.which==null&&(bh.charCode!=null||bh.keyCode!=null)){bh.which=bh.charCode!=null?bh.charCode:bh.keyCode}if(!bh.metaKey&&bh.ctrlKey){bh.metaKey=bh.ctrlKey}if(!bh.which&&bh.button!==I){bh.which=(bh.button&1?1:(bh.button&2?3:(bh.button&4?2:0)))}return bh},guid:100000000,proxy:b.proxy,special:{ready:{setup:b.bindReady,teardown:b.noop},live:{add:function(e){b.event.add(this,o(e.origType,e.selector),b.extend({},e,{handler:ag,guid:e.handler.guid}))},remove:function(e){b.event.remove(this,o(e.origType,e.selector),e)}},beforeunload:{setup:function(bg,bf,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(bf,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}};b.removeEvent=am.removeEventListener?function(bf,e,bg){if(bf.removeEventListener){bf.removeEventListener(e,bg,false)}}:function(bf,e,bg){if(bf.detachEvent){bf.detachEvent("on"+e,bg)}};b.Event=function(e){if(!this.preventDefault){return new b.Event(e)}if(e&&e.type){this.originalEvent=e;this.type=e.type;this.isDefaultPrevented=(e.defaultPrevented||e.returnValue===false||e.getPreventDefault&&e.getPreventDefault())?i:a7}else{this.type=e}this.timeStamp=b.now();this[b.expando]=true};function a7(){return false}function i(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var bf=this.originalEvent;if(!bf){return}if(bf.preventDefault){bf.preventDefault()}else{bf.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=i;var bf=this.originalEvent;if(!bf){return}if(bf.stopPropagation){bf.stopPropagation()}bf.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:a7,isPropagationStopped:a7,isImmediatePropagationStopped:a7};var aa=function(bg){var bf=bg.relatedTarget;try{if(bf&&bf!==am&&!bf.parentNode){return}while(bf&&bf!==this){bf=bf.parentNode}if(bf!==this){bg.type=bg.data;b.event.handle.apply(this,arguments)}}catch(bh){}},aM=function(e){e.type=e.data;b.event.handle.apply(this,arguments)};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bf,e){b.event.special[bf]={setup:function(bg){b.event.add(this,e,bg&&bg.selector?aM:aa,bf)},teardown:function(bg){b.event.remove(this,e,bg&&bg.selector?aM:aa)}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(bf,e){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){b.event.add(this,"click.specialSubmit",function(bi){var bh=bi.target,bg=bh.type;if((bg==="submit"||bg==="image")&&b(bh).closest("form").length){aP("submit",this,arguments)}});b.event.add(this,"keypress.specialSubmit",function(bi){var bh=bi.target,bg=bh.type;if((bg==="text"||bg==="password")&&b(bh).closest("form").length&&bi.keyCode===13){aP("submit",this,arguments)}})}else{return false}},teardown:function(e){b.event.remove(this,".specialSubmit")}}}if(!b.support.changeBubbles){var a8,k=function(bf){var e=bf.type,bg=bf.value;if(e==="radio"||e==="checkbox"){bg=bf.checked}else{if(e==="select-multiple"){bg=bf.selectedIndex>-1?b.map(bf.options,function(bh){return bh.selected}).join("-"):""}else{if(bf.nodeName.toLowerCase()==="select"){bg=bf.selectedIndex}}}return bg},Y=function Y(bh){var bf=bh.target,bg,bi;if(!a2.test(bf.nodeName)||bf.readOnly){return}bg=b._data(bf,"_change_data");bi=k(bf);if(bh.type!=="focusout"||bf.type!=="radio"){b._data(bf,"_change_data",bi)}if(bg===I||bi===bg){return}if(bg!=null||bi){bh.type="change";bh.liveFired=I;b.event.trigger(bh,arguments[1],bf)}};b.event.special.change={filters:{focusout:Y,beforedeactivate:Y,click:function(bh){var bg=bh.target,bf=bg.type;if(bf==="radio"||bf==="checkbox"||bg.nodeName.toLowerCase()==="select"){Y.call(this,bh)}},keydown:function(bh){var bg=bh.target,bf=bg.type;if((bh.keyCode===13&&bg.nodeName.toLowerCase()!=="textarea")||(bh.keyCode===32&&(bf==="checkbox"||bf==="radio"))||bf==="select-multiple"){Y.call(this,bh)}},beforeactivate:function(bg){var bf=bg.target;b._data(bf,"_change_data",k(bf))}},setup:function(bg,bf){if(this.type==="file"){return false}for(var e in a8){b.event.add(this,e+".specialChange",a8[e])}return a2.test(this.nodeName)},teardown:function(e){b.event.remove(this,".specialChange");return a2.test(this.nodeName)}};a8=b.event.special.change.filters;a8.focus=a8.beforeactivate}function aP(bf,bh,e){var bg=b.extend({},e[0]);bg.type=bf;bg.originalEvent={};bg.liveFired=I;b.event.handle.call(bh,bg);if(bg.isDefaultPrevented()){e[0].preventDefault()}}if(am.addEventListener){b.each({focus:"focusin",blur:"focusout"},function(bh,e){var bf=0;b.event.special[e]={setup:function(){if(bf++===0){am.addEventListener(bh,bg,true)}},teardown:function(){if(--bf===0){am.removeEventListener(bh,bg,true)}}};function bg(bi){var bj=b.event.fix(bi);bj.type=e;bj.originalEvent={};b.event.trigger(bj,null,bj.target);if(bj.isDefaultPrevented()){bi.preventDefault()}}})}b.each(["bind","one"],function(bf,e){b.fn[e]=function(bl,bm,bk){if(typeof bl==="object"){for(var bi in bl){this[e](bi,bm,bl[bi],bk)}return this}if(b.isFunction(bm)||bm===false){bk=bm;bm=I}var bj=e==="one"?b.proxy(bk,function(bn){b(this).unbind(bn,bj);return bk.apply(this,arguments)}):bk;if(bl==="unload"&&e!=="one"){this.one(bl,bm,bk)}else{for(var bh=0,bg=this.length;bh<bg;bh++){b.event.add(this[bh],bl,bj,bm)}}return this}});b.fn.extend({unbind:function(bi,bh){if(typeof bi==="object"&&!bi.preventDefault){for(var bg in bi){this.unbind(bg,bi[bg])}}else{for(var bf=0,e=this.length;bf<e;bf++){b.event.remove(this[bf],bi,bh)}}return this},delegate:function(e,bf,bh,bg){return this.live(bf,bh,bg,e)},undelegate:function(e,bf,bg){if(arguments.length===0){return this.unbind("live")}else{return this.die(bf,null,bg,e)}},trigger:function(e,bf){return this.each(function(){b.event.trigger(e,bf,this)})},triggerHandler:function(e,bg){if(this[0]){var bf=b.Event(e);bf.preventDefault();bf.stopPropagation();b.event.trigger(bf,bg,this[0]);return bf.result}},toggle:function(bg){var e=arguments,bf=1;while(bf<e.length){b.proxy(bg,e[bf++])}return this.click(b.proxy(bg,function(bh){var bi=(b._data(this,"lastToggle"+bg.guid)||0)%bf;b._data(this,"lastToggle"+bg.guid,bi+1);bh.preventDefault();return e[bi].apply(this,arguments)||false}))},hover:function(e,bf){return this.mouseenter(e).mouseleave(bf||e)}});var aJ={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};b.each(["live","die"],function(bf,e){b.fn[e]=function(bp,bm,br,bi){var bq,bn=0,bo,bh,bt,bk=bi||this.selector,bg=bi?this:b(this.context);if(typeof bp==="object"&&!bp.preventDefault){for(var bs in bp){bg[e](bs,bm,bp[bs],bk)}return this}if(b.isFunction(bm)){br=bm;bm=I}bp=(bp||"").split(" ");while((bq=bp[bn++])!=null){bo=aR.exec(bq);bh="";if(bo){bh=bo[0];bq=bq.replace(aR,"")}if(bq==="hover"){bp.push("mouseenter"+bh,"mouseleave"+bh);continue}bt=bq;if(bq==="focus"||bq==="blur"){bp.push(aJ[bq]+bh);bq=bq+bh}else{bq=(aJ[bq]||bq)+bh}if(e==="live"){for(var bl=0,bj=bg.length;bl<bj;bl++){b.event.add(bg[bl],"live."+o(bq,bk),{data:bm,selector:bk,handler:br,origType:bq,origHandler:br,preType:bt})}}else{bg.unbind("live."+o(bq,bk),br)}}return this}});function ag(bp){var bm,bh,bv,bj,e,br,bo,bq,bn,bu,bl,bk,bt,bs=[],bi=[],bf=b._data(this,"events");if(bp.liveFired===this||!bf||!bf.live||bp.target.disabled||bp.button&&bp.type==="click"){return}if(bp.namespace){bk=new RegExp("(^|\\.)"+bp.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")}bp.liveFired=this;var bg=bf.live.slice(0);for(bo=0;bo<bg.length;bo++){e=bg[bo];if(e.origType.replace(aR,"")===bp.type){bi.push(e.selector)}else{bg.splice(bo--,1)}}bj=b(bp.target).closest(bi,bp.currentTarget);for(bq=0,bn=bj.length;bq<bn;bq++){bl=bj[bq];for(bo=0;bo<bg.length;bo++){e=bg[bo];if(bl.selector===e.selector&&(!bk||bk.test(e.namespace))&&!bl.elem.disabled){br=bl.elem;bv=null;if(e.preType==="mouseenter"||e.preType==="mouseleave"){bp.type=e.preType;bv=b(bp.relatedTarget).closest(e.selector)[0]}if(!bv||bv!==br){bs.push({elem:br,handleObj:e,level:bl.level})}}}}for(bq=0,bn=bs.length;bq<bn;bq++){bj=bs[bq];if(bh&&bj.level>bh){break}bp.currentTarget=bj.elem;bp.data=bj.handleObj.data;bp.handleObj=bj.handleObj;bt=bj.handleObj.origHandler.apply(bj.elem,arguments);if(bt===false||bp.isPropagationStopped()){bh=bj.level;if(bt===false){bm=false}if(bp.isImmediatePropagationStopped()){break}}}return bm}function o(bf,e){return(bf&&bf!=="*"?bf+".":"")+e.replace(L,"`").replace(ab,"&")}b.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").split(" "),function(bf,e){b.fn[e]=function(bh,bg){if(bg==null){bg=bh;bh=null}return arguments.length>0?this.bind(e,bh,bg):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}}); /* * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ -(function(){var bn=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bo=0,br=Object.prototype.toString,bi=false,bh=true,bp=/\\/g,bv=/\W/;[0,0].sort(function(){bh=false;return 0});var bf=function(bA,e,bD,bE){bD=bD||[];e=e||al;var bG=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bA||typeof bA!=="string"){return bD}var bx,bI,bL,bw,bH,bK,bJ,bC,bz=true,by=bf.isXML(e),bB=[],bF=bA;do{bn.exec("");bx=bn.exec(bF);if(bx){bF=bx[3];bB.push(bx[1]);if(bx[2]){bw=bx[3];break}}}while(bx);if(bB.length>1&&bj.exec(bA)){if(bB.length===2&&bk.relative[bB[0]]){bI=bs(bB[0]+bB[1],e)}else{bI=bk.relative[bB[0]]?[e]:bf(bB.shift(),e);while(bB.length){bA=bB.shift();if(bk.relative[bA]){bA+=bB.shift()}bI=bs(bA,bI)}}}else{if(!bE&&bB.length>1&&e.nodeType===9&&!by&&bk.match.ID.test(bB[0])&&!bk.match.ID.test(bB[bB.length-1])){bH=bf.find(bB.shift(),e,by);e=bH.expr?bf.filter(bH.expr,bH.set)[0]:bH.set[0]}if(e){bH=bE?{expr:bB.pop(),set:bl(bE)}:bf.find(bB.pop(),bB.length===1&&(bB[0]==="~"||bB[0]==="+")&&e.parentNode?e.parentNode:e,by);bI=bH.expr?bf.filter(bH.expr,bH.set):bH.set;if(bB.length>0){bL=bl(bI)}else{bz=false}while(bB.length){bK=bB.pop();bJ=bK;if(!bk.relative[bK]){bK=""}else{bJ=bB.pop()}if(bJ==null){bJ=e}bk.relative[bK](bL,bJ,by)}}else{bL=bB=[]}}if(!bL){bL=bI}if(!bL){bf.error(bK||bA)}if(br.call(bL)==="[object Array]"){if(!bz){bD.push.apply(bD,bL)}else{if(e&&e.nodeType===1){for(bC=0;bL[bC]!=null;bC++){if(bL[bC]&&(bL[bC]===true||bL[bC].nodeType===1&&bf.contains(e,bL[bC]))){bD.push(bI[bC])}}}else{for(bC=0;bL[bC]!=null;bC++){if(bL[bC]&&bL[bC].nodeType===1){bD.push(bI[bC])}}}}}else{bl(bL,bD)}if(bw){bf(bw,bG,bD,bE);bf.uniqueSort(bD)}return bD};bf.uniqueSort=function(bw){if(bq){bi=bh;bw.sort(bq);if(bi){for(var e=1;e<bw.length;e++){if(bw[e]===bw[e-1]){bw.splice(e--,1)}}}}return bw};bf.matches=function(e,bw){return bf(e,null,null,bw)};bf.matchesSelector=function(e,bw){return bf(bw,null,null,[e]).length>0};bf.find=function(bC,e,bD){var bB;if(!bC){return[]}for(var by=0,bx=bk.order.length;by<bx;by++){var bz,bA=bk.order[by];if((bz=bk.leftMatch[bA].exec(bC))){var bw=bz[1];bz.splice(1,1);if(bw.substr(bw.length-1)!=="\\"){bz[1]=(bz[1]||"").replace(bp,"");bB=bk.find[bA](bz,e,bD);if(bB!=null){bC=bC.replace(bk.match[bA],"");break}}}}if(!bB){bB=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bB,expr:bC}};bf.filter=function(bG,bF,bJ,bz){var bB,e,bx=bG,bL=[],bD=bF,bC=bF&&bF[0]&&bf.isXML(bF[0]);while(bG&&bF.length){for(var bE in bk.filter){if((bB=bk.leftMatch[bE].exec(bG))!=null&&bB[2]){var bK,bI,bw=bk.filter[bE],by=bB[1];e=false;bB.splice(1,1);if(by.substr(by.length-1)==="\\"){continue}if(bD===bL){bL=[]}if(bk.preFilter[bE]){bB=bk.preFilter[bE](bB,bD,bJ,bL,bz,bC);if(!bB){e=bK=true}else{if(bB===true){continue}}}if(bB){for(var bA=0;(bI=bD[bA])!=null;bA++){if(bI){bK=bw(bI,bB,bA,bD);var bH=bz^!!bK;if(bJ&&bK!=null){if(bH){e=true}else{bD[bA]=false}}else{if(bH){bL.push(bI);e=true}}}}}if(bK!==H){if(!bJ){bD=bL}bG=bG.replace(bk.match[bE],"");if(!e){return[]}break}}}if(bG===bx){if(e==null){bf.error(bG)}else{break}}bx=bG}return bD};bf.error=function(e){throw"Syntax error, unrecognized expression: "+e};var bk=bf.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(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bB,bw){var by=typeof bw==="string",bA=by&&!bv.test(bw),bC=by&&!bA;if(bA){bw=bw.toLowerCase()}for(var bx=0,e=bB.length,bz;bx<e;bx++){if((bz=bB[bx])){while((bz=bz.previousSibling)&&bz.nodeType!==1){}bB[bx]=bC||bz&&bz.nodeName.toLowerCase()===bw?bz||false:bz===bw}}if(bC){bf.filter(bw,bB,true)}},">":function(bB,bw){var bA,bz=typeof bw==="string",bx=0,e=bB.length;if(bz&&!bv.test(bw)){bw=bw.toLowerCase();for(;bx<e;bx++){bA=bB[bx];if(bA){var by=bA.parentNode;bB[bx]=by.nodeName.toLowerCase()===bw?by:false}}}else{for(;bx<e;bx++){bA=bB[bx];if(bA){bB[bx]=bz?bA.parentNode:bA.parentNode===bw}}if(bz){bf.filter(bw,bB,true)}}},"":function(by,bw,bA){var bz,bx=bo++,e=bt;if(typeof bw==="string"&&!bv.test(bw)){bw=bw.toLowerCase();bz=bw;e=bd}e("parentNode",bw,bx,by,bz,bA)},"~":function(by,bw,bA){var bz,bx=bo++,e=bt;if(typeof bw==="string"&&!bv.test(bw)){bw=bw.toLowerCase();bz=bw;e=bd}e("previousSibling",bw,bx,by,bz,bA)}},find:{ID:function(bw,bx,by){if(typeof bx.getElementById!=="undefined"&&!by){var e=bx.getElementById(bw[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bx,bA){if(typeof bA.getElementsByName!=="undefined"){var bw=[],bz=bA.getElementsByName(bx[1]);for(var by=0,e=bz.length;by<e;by++){if(bz[by].getAttribute("name")===bx[1]){bw.push(bz[by])}}return bw.length===0?null:bw}},TAG:function(e,bw){if(typeof bw.getElementsByTagName!=="undefined"){return bw.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(by,bw,bx,e,bB,bC){by=" "+by[1].replace(bp,"")+" ";if(bC){return by}for(var bz=0,bA;(bA=bw[bz])!=null;bz++){if(bA){if(bB^(bA.className&&(" "+bA.className+" ").replace(/[\t\n\r]/g," ").indexOf(by)>=0)){if(!bx){e.push(bA)}}else{if(bx){bw[bz]=false}}}}return false},ID:function(e){return e[1].replace(bp,"")},TAG:function(bw,e){return bw[1].replace(bp,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bf.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bw=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bw[1]+(bw[2]||1))-0;e[3]=bw[3]-0}else{if(e[2]){bf.error(e[0])}}e[0]=bo++;return e},ATTR:function(bz,bw,bx,e,bA,bB){var by=bz[1]=bz[1].replace(bp,"");if(!bB&&bk.attrMap[by]){bz[1]=bk.attrMap[by]}bz[4]=(bz[4]||bz[5]||"").replace(bp,"");if(bz[2]==="~="){bz[4]=" "+bz[4]+" "}return bz},PSEUDO:function(bz,bw,bx,e,bA){if(bz[1]==="not"){if((bn.exec(bz[3])||"").length>1||/^\w/.test(bz[3])){bz[3]=bf(bz[3],null,null,bw)}else{var by=bf.filter(bz[3],bw,bx,true^bA);if(!bx){e.push.apply(e,by)}return false}}else{if(bk.match.POS.test(bz[0])||bk.match.CHILD.test(bz[0])){return true}}return bz},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bx,bw,e){return !!bf(e[3],bx).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.getAttribute("type")},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(bw,e){return e===0},last:function(bx,bw,e,by){return bw===by.length-1},even:function(bw,e){return e%2===0},odd:function(bw,e){return e%2===1},lt:function(bx,bw,e){return bw<e[3]-0},gt:function(bx,bw,e){return bw>e[3]-0},nth:function(bx,bw,e){return e[3]-0===bw},eq:function(bx,bw,e){return e[3]-0===bw}},filter:{PSEUDO:function(bx,bC,bB,bD){var e=bC[1],bw=bk.filters[e];if(bw){return bw(bx,bB,bC,bD)}else{if(e==="contains"){return(bx.textContent||bx.innerText||bf.getText([bx])||"").indexOf(bC[3])>=0}else{if(e==="not"){var by=bC[3];for(var bA=0,bz=by.length;bA<bz;bA++){if(by[bA]===bx){return false}}return true}else{bf.error(e)}}}},CHILD:function(e,by){var bB=by[1],bw=e;switch(bB){case"only":case"first":while((bw=bw.previousSibling)){if(bw.nodeType===1){return false}}if(bB==="first"){return true}bw=e;case"last":while((bw=bw.nextSibling)){if(bw.nodeType===1){return false}}return true;case"nth":var bx=by[2],bE=by[3];if(bx===1&&bE===0){return true}var bA=by[0],bD=e.parentNode;if(bD&&(bD.sizcache!==bA||!e.nodeIndex)){var bz=0;for(bw=bD.firstChild;bw;bw=bw.nextSibling){if(bw.nodeType===1){bw.nodeIndex=++bz}}bD.sizcache=bA}var bC=e.nodeIndex-bE;if(bx===0){return bC===0}else{return(bC%bx===0&&bC/bx>=0)}}},ID:function(bw,e){return bw.nodeType===1&&bw.getAttribute("id")===e},TAG:function(bw,e){return(e==="*"&&bw.nodeType===1)||bw.nodeName.toLowerCase()===e},CLASS:function(bw,e){return(" "+(bw.className||bw.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bA,by){var bx=by[1],e=bk.attrHandle[bx]?bk.attrHandle[bx](bA):bA[bx]!=null?bA[bx]:bA.getAttribute(bx),bB=e+"",bz=by[2],bw=by[4];return e==null?bz==="!=":bz==="="?bB===bw:bz==="*="?bB.indexOf(bw)>=0:bz==="~="?(" "+bB+" ").indexOf(bw)>=0:!bw?bB&&e!==false:bz==="!="?bB!==bw:bz==="^="?bB.indexOf(bw)===0:bz==="$="?bB.substr(bB.length-bw.length)===bw:bz==="|="?bB===bw||bB.substr(0,bw.length+1)===bw+"-":false},POS:function(bz,bw,bx,bA){var e=bw[2],by=bk.setFilters[e];if(by){return by(bz,bx,bw,bA)}}}};var bj=bk.match.POS,be=function(bw,e){return"\\"+(e-0+1)};for(var bg in bk.match){bk.match[bg]=new RegExp(bk.match[bg].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bk.leftMatch[bg]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bk.match[bg].source.replace(/\\(\d+)/g,be))}var bl=function(bw,e){bw=Array.prototype.slice.call(bw,0);if(e){e.push.apply(e,bw);return e}return bw};try{Array.prototype.slice.call(al.documentElement.childNodes,0)[0].nodeType}catch(bu){bl=function(bz,by){var bx=0,bw=by||[];if(br.call(bz)==="[object Array]"){Array.prototype.push.apply(bw,bz)}else{if(typeof bz.length==="number"){for(var e=bz.length;bx<e;bx++){bw.push(bz[bx])}}else{for(;bz[bx];bx++){bw.push(bz[bx])}}}return bw}}var bq,bm;if(al.documentElement.compareDocumentPosition){bq=function(bw,e){if(bw===e){bi=true;return 0}if(!bw.compareDocumentPosition||!e.compareDocumentPosition){return bw.compareDocumentPosition?-1:1}return bw.compareDocumentPosition(e)&4?-1:1}}else{bq=function(bD,bC){var bA,bw,bx=[],e=[],bz=bD.parentNode,bB=bC.parentNode,bE=bz;if(bD===bC){bi=true;return 0}else{if(bz===bB){return bm(bD,bC)}else{if(!bz){return -1}else{if(!bB){return 1}}}}while(bE){bx.unshift(bE);bE=bE.parentNode}bE=bB;while(bE){e.unshift(bE);bE=bE.parentNode}bA=bx.length;bw=e.length;for(var by=0;by<bA&&by<bw;by++){if(bx[by]!==e[by]){return bm(bx[by],e[by])}}return by===bA?bm(bD,e[by],-1):bm(bx[by],bC,1)};bm=function(bw,e,bx){if(bw===e){return bx}var by=bw.nextSibling;while(by){if(by===e){return -1}by=by.nextSibling}return 1}}bf.getText=function(e){var bw="",by;for(var bx=0;e[bx];bx++){by=e[bx];if(by.nodeType===3||by.nodeType===4){bw+=by.nodeValue}else{if(by.nodeType!==8){bw+=bf.getText(by.childNodes)}}}return bw};(function(){var bw=al.createElement("div"),bx="script"+(new Date()).getTime(),e=al.documentElement;bw.innerHTML="<a name='"+bx+"'/>";e.insertBefore(bw,e.firstChild);if(al.getElementById(bx)){bk.find.ID=function(bz,bA,bB){if(typeof bA.getElementById!=="undefined"&&!bB){var by=bA.getElementById(bz[1]);return by?by.id===bz[1]||typeof by.getAttributeNode!=="undefined"&&by.getAttributeNode("id").nodeValue===bz[1]?[by]:H:[]}};bk.filter.ID=function(bA,by){var bz=typeof bA.getAttributeNode!=="undefined"&&bA.getAttributeNode("id");return bA.nodeType===1&&bz&&bz.nodeValue===by}}e.removeChild(bw);e=bw=null})();(function(){var e=al.createElement("div");e.appendChild(al.createComment(""));if(e.getElementsByTagName("*").length>0){bk.find.TAG=function(bw,bA){var bz=bA.getElementsByTagName(bw[1]);if(bw[1]==="*"){var by=[];for(var bx=0;bz[bx];bx++){if(bz[bx].nodeType===1){by.push(bz[bx])}}bz=by}return bz}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bk.attrHandle.href=function(bw){return bw.getAttribute("href",2)}}e=null})();if(al.querySelectorAll){(function(){var e=bf,by=al.createElement("div"),bx="__sizzle__";by.innerHTML="<p class='TEST'></p>";if(by.querySelectorAll&&by.querySelectorAll(".TEST").length===0){return}bf=function(bJ,bA,bE,bI){bA=bA||al;if(!bI&&!bf.isXML(bA)){var bH=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(bJ);if(bH&&(bA.nodeType===1||bA.nodeType===9)){if(bH[1]){return bl(bA.getElementsByTagName(bJ),bE)}else{if(bH[2]&&bk.find.CLASS&&bA.getElementsByClassName){return bl(bA.getElementsByClassName(bH[2]),bE)}}}if(bA.nodeType===9){if(bJ==="body"&&bA.body){return bl([bA.body],bE)}else{if(bH&&bH[3]){var bD=bA.getElementById(bH[3]);if(bD&&bD.parentNode){if(bD.id===bH[3]){return bl([bD],bE)}}else{return bl([],bE)}}}try{return bl(bA.querySelectorAll(bJ),bE)}catch(bF){}}else{if(bA.nodeType===1&&bA.nodeName.toLowerCase()!=="object"){var bB=bA,bC=bA.getAttribute("id"),bz=bC||bx,bL=bA.parentNode,bK=/^\s*[+~]/.test(bJ);if(!bC){bA.setAttribute("id",bz)}else{bz=bz.replace(/'/g,"\\$&")}if(bK&&bL){bA=bA.parentNode}try{if(!bK||bL){return bl(bA.querySelectorAll("[id='"+bz+"'] "+bJ),bE)}}catch(bG){}finally{if(!bC){bB.removeAttribute("id")}}}}}return e(bJ,bA,bE,bI)};for(var bw in e){bf[bw]=e[bw]}by=null})()}(function(){var e=al.documentElement,bx=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector,bw=false;try{bx.call(al.documentElement,"[test!='']:sizzle")}catch(by){bw=true}if(bx){bf.matchesSelector=function(bz,bB){bB=bB.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bf.isXML(bz)){try{if(bw||!bk.match.PSEUDO.test(bB)&&!/!=/.test(bB)){return bx.call(bz,bB)}}catch(bA){}}return bf(bB,null,null,[bz]).length>0}}})();(function(){var e=al.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bk.order.splice(1,0,"CLASS");bk.find.CLASS=function(bw,bx,by){if(typeof bx.getElementsByClassName!=="undefined"&&!by){return bx.getElementsByClassName(bw[1])}};e=null})();function bd(bw,bB,bA,bE,bC,bD){for(var by=0,bx=bE.length;by<bx;by++){var e=bE[by];if(e){var bz=false;e=e[bw];while(e){if(e.sizcache===bA){bz=bE[e.sizset];break}if(e.nodeType===1&&!bD){e.sizcache=bA;e.sizset=by}if(e.nodeName.toLowerCase()===bB){bz=e;break}e=e[bw]}bE[by]=bz}}}function bt(bw,bB,bA,bE,bC,bD){for(var by=0,bx=bE.length;by<bx;by++){var e=bE[by];if(e){var bz=false;e=e[bw];while(e){if(e.sizcache===bA){bz=bE[e.sizset];break}if(e.nodeType===1){if(!bD){e.sizcache=bA;e.sizset=by}if(typeof bB!=="string"){if(e===bB){bz=true;break}}else{if(bf.filter(bB,[e]).length>0){bz=e;break}}}e=e[bw]}bE[by]=bz}}}if(al.documentElement.contains){bf.contains=function(bw,e){return bw!==e&&(bw.contains?bw.contains(e):true)}}else{if(al.documentElement.compareDocumentPosition){bf.contains=function(bw,e){return !!(bw.compareDocumentPosition(e)&16)}}else{bf.contains=function(){return false}}}bf.isXML=function(e){var bw=(e?e.ownerDocument||e:0).documentElement;return bw?bw.nodeName!=="HTML":false};var bs=function(e,bC){var bA,by=[],bz="",bx=bC.nodeType?[bC]:bC;while((bA=bk.match.PSEUDO.exec(e))){bz+=bA[0];e=e.replace(bk.match.PSEUDO,"")}e=bk.relative[e]?e+"*":e;for(var bB=0,bw=bx.length;bB<bw;bB++){bf(e,bx[bB],by)}return bf.filter(bz,by)};a.find=bf;a.expr=bf.selectors;a.expr[":"]=a.expr.filters;a.unique=bf.uniqueSort;a.text=bf.getText;a.isXMLDoc=bf.isXML;a.contains=bf.contains})();var W=/Until$/,ai=/^(?:parents|prevUntil|prevAll)/,aW=/,/,a9=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,F=a.expr.match.POS,ao={children:true,contents:true,next:true,prev:true};a.fn.extend({find:function(e){var be=this.pushStack("","find",e),bh=0;for(var bf=0,bd=this.length;bf<bd;bf++){bh=be.length;a.find(e,this[bf],be);if(bf>0){for(var bi=bh;bi<be.length;bi++){for(var bg=0;bg<bh;bg++){if(be[bg]===be[bi]){be.splice(bi--,1);break}}}}}return be},has:function(bd){var e=a(bd);return this.filter(function(){for(var bf=0,be=e.length;bf<be;bf++){if(a.contains(this,e[bf])){return true}}})},not:function(e){return this.pushStack(av(this,e,false),"not",e)},filter:function(e){return this.pushStack(av(this,e,true),"filter",e)},is:function(e){return !!e&&a.filter(e,this).length>0},closest:function(bm,bd){var bj=[],bg,be,bl=this[0];if(a.isArray(bm)){var bi,bf,bh={},e=1;if(bl&&bm.length){for(bg=0,be=bm.length;bg<be;bg++){bf=bm[bg];if(!bh[bf]){bh[bf]=a.expr.match.POS.test(bf)?a(bf,bd||this.context):bf}}while(bl&&bl.ownerDocument&&bl!==bd){for(bf in bh){bi=bh[bf];if(bi.jquery?bi.index(bl)>-1:a(bl).is(bi)){bj.push({selector:bf,elem:bl,level:e})}}bl=bl.parentNode;e++}}return bj}var bk=F.test(bm)?a(bm,bd||this.context):null;for(bg=0,be=this.length;bg<be;bg++){bl=this[bg];while(bl){if(bk?bk.index(bl)>-1:a.find.matchesSelector(bl,bm)){bj.push(bl);break}else{bl=bl.parentNode;if(!bl||!bl.ownerDocument||bl===bd){break}}}}bj=bj.length>1?a.unique(bj):bj;return this.pushStack(bj,"closest",bm)},index:function(e){if(!e||typeof e==="string"){return a.inArray(this[0],e?a(e):this.parent().children())}return a.inArray(e.jquery?e[0]:e,this)},add:function(e,bd){var bf=typeof e==="string"?a(e,bd):a.makeArray(e),be=a.merge(this.get(),bf);return this.pushStack(B(bf[0])||B(be[0])?be:a.unique(be))},andSelf:function(){return this.add(this.prevObject)}});function B(e){return !e||!e.parentNode||e.parentNode.nodeType===11}a.each({parent:function(bd){var e=bd.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return a.dir(e,"parentNode")},parentsUntil:function(bd,e,be){return a.dir(bd,"parentNode",be)},next:function(e){return a.nth(e,2,"nextSibling")},prev:function(e){return a.nth(e,2,"previousSibling")},nextAll:function(e){return a.dir(e,"nextSibling")},prevAll:function(e){return a.dir(e,"previousSibling")},nextUntil:function(bd,e,be){return a.dir(bd,"nextSibling",be)},prevUntil:function(bd,e,be){return a.dir(bd,"previousSibling",be)},siblings:function(e){return a.sibling(e.parentNode.firstChild,e)},children:function(e){return a.sibling(e.firstChild)},contents:function(e){return a.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:a.makeArray(e.childNodes)}},function(e,bd){a.fn[e]=function(bh,be){var bg=a.map(this,bd,bh),bf=M.call(arguments);if(!W.test(e)){be=bh}if(be&&typeof be==="string"){bg=a.filter(be,bg)}bg=this.length>1&&!ao[e]?a.unique(bg):bg;if((this.length>1||aW.test(be))&&ai.test(e)){bg=bg.reverse()}return this.pushStack(bg,e,bf.join(","))}});a.extend({filter:function(be,e,bd){if(bd){be=":not("+be+")"}return e.length===1?a.find.matchesSelector(e[0],be)?[e[0]]:[]:a.find.matches(be,e)},dir:function(be,bd,bg){var e=[],bf=be[bd];while(bf&&bf.nodeType!==9&&(bg===H||bf.nodeType!==1||!a(bf).is(bg))){if(bf.nodeType===1){e.push(bf)}bf=bf[bd]}return e},nth:function(bg,e,be,bf){e=e||1;var bd=0;for(;bg;bg=bg[be]){if(bg.nodeType===1&&++bd===e){break}}return bg},sibling:function(be,bd){var e=[];for(;be;be=be.nextSibling){if(be.nodeType===1&&be!==bd){e.push(be)}}return e}});function av(bf,be,e){if(a.isFunction(be)){return a.grep(bf,function(bh,bg){var bi=!!be.call(bh,bg,bh);return bi===e})}else{if(be.nodeType){return a.grep(bf,function(bh,bg){return(bh===be)===e})}else{if(typeof be==="string"){var bd=a.grep(bf,function(bg){return bg.nodeType===1});if(a9.test(be)){return a.filter(be,bd,!e)}else{be=a.filter(be,bd)}}}}return a.grep(bf,function(bh,bg){return(a.inArray(bh,be)>=0)===e})}var ab=/ jQuery\d+="(?:\d+|null)"/g,aj=/^\s+/,O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,c=/<([\w:]+)/,v=/<tbody/i,T=/<|?\w+;/,L=/<(?:script|object|embed|option|style)/i,m=/checked\s*(?:[^=]|=\s*.checked.)/i,an={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};an.optgroup=an.option;an.tbody=an.tfoot=an.colgroup=an.caption=an.thead;an.th=an.td;if(!a.support.htmlSerialize){an._default=[1,"div<div>","</div>"]}a.fn.extend({text:function(e){if(a.isFunction(e)){return this.each(function(be){var bd=a(this);bd.text(e.call(this,be,bd.text()))})}if(typeof e!=="object"&&e!==H){return this.empty().append((this[0]&&this[0].ownerDocument||al).createTextNode(e))}return a.text(this)},wrapAll:function(e){if(a.isFunction(e)){return this.each(function(be){a(this).wrapAll(e.call(this,be))})}if(this[0]){var bd=a(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bd.insertBefore(this[0])}bd.map(function(){var be=this;while(be.firstChild&&be.firstChild.nodeType===1){be=be.firstChild}return be}).append(this)}return this},wrapInner:function(e){if(a.isFunction(e)){return this.each(function(bd){a(this).wrapInner(e.call(this,bd))})}return this.each(function(){var bd=a(this),be=bd.contents();if(be.length){be.wrapAll(e)}else{bd.append(e)}})},wrap:function(e){return this.each(function(){a(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!a.nodeName(this,"body")){a(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bd){this.parentNode.insertBefore(bd,this)})}else{if(arguments.length){var e=a(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bd){this.parentNode.insertBefore(bd,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,a(arguments[0]).toArray());return e}}},remove:function(e,bf){for(var bd=0,be;(be=this[bd])!=null;bd++){if(!e||a.filter(e,[be]).length){if(!bf&&be.nodeType===1){a.cleanData(be.getElementsByTagName("*"));a.cleanData([be])}if(be.parentNode){be.parentNode.removeChild(be)}}}return this},empty:function(){for(var e=0,bd;(bd=this[e])!=null;e++){if(bd.nodeType===1){a.cleanData(bd.getElementsByTagName("*"))}while(bd.firstChild){bd.removeChild(bd.firstChild)}}return this},clone:function(bd,e){bd=bd==null?false:bd;e=e==null?bd:e;return this.map(function(){return a.clone(this,bd,e)})},html:function(bf){if(bf===H){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ab,""):null}else{if(typeof bf==="string"&&!L.test(bf)&&(a.support.leadingWhitespace||!aj.test(bf))&&!an[(c.exec(bf)||["",""])[1].toLowerCase()]){bf=bf.replace(O,"<$1></$2>");try{for(var be=0,bd=this.length;be<bd;be++){if(this[be].nodeType===1){a.cleanData(this[be].getElementsByTagName("*"));this[be].innerHTML=bf}}}catch(bg){this.empty().append(bf)}}else{if(a.isFunction(bf)){this.each(function(bh){var e=a(this);e.html(bf.call(this,bh,e.html()))})}else{this.empty().append(bf)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(a.isFunction(e)){return this.each(function(bf){var be=a(this),bd=be.html();be.replaceWith(e.call(this,bf,bd))})}if(typeof e!=="string"){e=a(e).detach()}return this.each(function(){var be=this.nextSibling,bd=this.parentNode;a(this).remove();if(be){a(be).before(e)}else{a(bd).append(e)}})}else{return this.pushStack(a(a.isFunction(e)?e():e),"replaceWith",e)}},detach:function(e){return this.remove(e,true)},domManip:function(bj,bn,bm){var bf,bg,bi,bl,bk=bj[0],bd=[];if(!a.support.checkClone&&arguments.length===3&&typeof bk==="string"&&m.test(bk)){return this.each(function(){a(this).domManip(bj,bn,bm,true)})}if(a.isFunction(bk)){return this.each(function(bp){var bo=a(this);bj[0]=bk.call(this,bp,bn?bo.html():H);bo.domManip(bj,bn,bm)})}if(this[0]){bl=bk&&bk.parentNode;if(a.support.parentNode&&bl&&bl.nodeType===11&&bl.childNodes.length===this.length){bf={fragment:bl}}else{bf=a.buildFragment(bj,this,bd)}bi=bf.fragment;if(bi.childNodes.length===1){bg=bi=bi.firstChild}else{bg=bi.firstChild}if(bg){bn=bn&&a.nodeName(bg,"tr");for(var be=0,e=this.length,bh=e-1;be<e;be++){bm.call(bn?aX(this[be],bg):this[be],bf.cacheable||(e>1&&be<bh)?a.clone(bi,true,true):bi)}}if(bd.length){a.each(bd,a8)}}return this}});function aX(e,bd){return a.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function s(e,bj){if(bj.nodeType!==1||!a.hasData(e)){return}var bi=a.expando,bf=a.data(e),bg=a.data(bj,bf);if((bf=bf[bi])){var bk=bf.events;bg=bg[bi]=a.extend({},bf);if(bk){delete bg.handle;bg.events={};for(var bh in bk){for(var be=0,bd=bk[bh].length;be<bd;be++){a.event.add(bj,bh+(bk[bh][be].namespace?".":"")+bk[bh][be].namespace,bk[bh][be],bk[bh][be].data)}}}}}function ac(bd,e){if(e.nodeType!==1){return}var be=e.nodeName.toLowerCase();e.clearAttributes();e.mergeAttributes(bd);if(be==="object"){e.outerHTML=bd.outerHTML}else{if(be==="input"&&(bd.type==="checkbox"||bd.type==="radio")){if(bd.checked){e.defaultChecked=e.checked=bd.checked}if(e.value!==bd.value){e.value=bd.value}}else{if(be==="option"){e.selected=bd.defaultSelected}else{if(be==="input"||be==="textarea"){e.defaultValue=bd.defaultValue}}}}e.removeAttribute(a.expando)}a.buildFragment=function(bh,bf,bd){var bg,e,be,bi=(bf&&bf[0]?bf[0].ownerDocument||bf[0]:al);if(bh.length===1&&typeof bh[0]==="string"&&bh[0].length<512&&bi===al&&bh[0].charAt(0)==="<"&&!L.test(bh[0])&&(a.support.checkClone||!m.test(bh[0]))){e=true;be=a.fragments[bh[0]];if(be){if(be!==1){bg=be}}}if(!bg){bg=bi.createDocumentFragment();a.clean(bh,bi,bg,bd)}if(e){a.fragments[bh[0]]=be?bg:1}return{fragment:bg,cacheable:e}};a.fragments={};a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bd){a.fn[e]=function(be){var bh=[],bk=a(be),bj=this.length===1&&this[0].parentNode;if(bj&&bj.nodeType===11&&bj.childNodes.length===1&&bk.length===1){bk[bd](this[0]);return this}else{for(var bi=0,bf=bk.length;bi<bf;bi++){var bg=(bi>0?this.clone(true):this).get();a(bk[bi])[bd](bg);bh=bh.concat(bg)}return this.pushStack(bh,e,bk.selector)}}});function a1(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")}else{if("querySelectorAll" in e){return e.querySelectorAll("*")}else{return[]}}}a.extend({clone:function(bg,bi,be){var bh=bg.cloneNode(true),e,bd,bf;if((!a.support.noCloneEvent||!a.support.noCloneChecked)&&(bg.nodeType===1||bg.nodeType===11)&&!a.isXMLDoc(bg)){ac(bg,bh);e=a1(bg);bd=a1(bh);for(bf=0;e[bf];++bf){ac(e[bf],bd[bf])}}if(bi){s(bg,bh);if(be){e=a1(bg);bd=a1(bh);for(bf=0;e[bf];++bf){s(e[bf],bd[bf])}}}return bh},clean:function(be,bg,bn,bi){bg=bg||al;if(typeof bg.createElement==="undefined"){bg=bg.ownerDocument||bg[0]&&bg[0].ownerDocument||al}var bo=[];for(var bm=0,bh;(bh=be[bm])!=null;bm++){if(typeof bh==="number"){bh+=""}if(!bh){continue}if(typeof bh==="string"&&!T.test(bh)){bh=bg.createTextNode(bh)}else{if(typeof bh==="string"){bh=bh.replace(O,"<$1></$2>");var bp=(c.exec(bh)||["",""])[1].toLowerCase(),bf=an[bp]||an._default,bl=bf[0],bd=bg.createElement("div");bd.innerHTML=bf[1]+bh+bf[2];while(bl--){bd=bd.lastChild}if(!a.support.tbody){var e=v.test(bh),bk=bp==="table"&&!e?bd.firstChild&&bd.firstChild.childNodes:bf[1]==="<table>"&&!e?bd.childNodes:[];for(var bj=bk.length-1;bj>=0;--bj){if(a.nodeName(bk[bj],"tbody")&&!bk[bj].childNodes.length){bk[bj].parentNode.removeChild(bk[bj])}}}if(!a.support.leadingWhitespace&&aj.test(bh)){bd.insertBefore(bg.createTextNode(aj.exec(bh)[0]),bd.firstChild)}bh=bd.childNodes}}if(bh.nodeType){bo.push(bh)}else{bo=a.merge(bo,bh)}}if(bn){for(bm=0;bo[bm];bm++){if(bi&&a.nodeName(bo[bm],"script")&&(!bo[bm].type||bo[bm].type.toLowerCase()==="text/javascript")){bi.push(bo[bm].parentNode?bo[bm].parentNode.removeChild(bo[bm]):bo[bm])}else{if(bo[bm].nodeType===1){bo.splice.apply(bo,[bm+1,0].concat(a.makeArray(bo[bm].getElementsByTagName("script"))))}bn.appendChild(bo[bm])}}}return bo},cleanData:function(bd){var bg,be,e=a.cache,bl=a.expando,bj=a.event.special,bi=a.support.deleteExpando;for(var bh=0,bf;(bf=bd[bh])!=null;bh++){if(bf.nodeName&&a.noData[bf.nodeName.toLowerCase()]){continue}be=bf[a.expando];if(be){bg=e[be]&&e[be][bl];if(bg&&bg.events){for(var bk in bg.events){if(bj[bk]){a.event.remove(bf,bk)}else{a.removeEvent(bf,bk,bg.handle)}}if(bg.handle){bg.handle.elem=null}}if(bi){delete bf[a.expando]}else{if(bf.removeAttribute){bf.removeAttribute(a.expando)}}delete e[be]}}}});function a8(e,bd){if(bd.src){a.ajax({url:bd.src,async:false,dataType:"script"})}else{a.globalEval(bd.text||bd.textContent||bd.innerHTML||"")}if(bd.parentNode){bd.parentNode.removeChild(bd)}}var ae=/alpha\([^)]*\)/i,ak=/opacity=([^)]*)/,aM=/-([a-z])/ig,y=/([A-Z])/g,aZ=/^-?\d+(?:px)?$/i,a7=/^-?\d/,aV={position:"absolute",visibility:"hidden",display:"block"},ag=["Left","Right"],aR=["Top","Bottom"],U,ay,aL,l=function(e,bd){return bd.toUpperCase()};a.fn.css=function(e,bd){if(arguments.length===2&&bd===H){return this}return a.access(this,e,bd,true,function(bf,be,bg){return bg!==H?a.style(bf,be,bg):a.css(bf,be)})};a.extend({cssHooks:{opacity:{get:function(be,bd){if(bd){var e=U(be,"opacity","opacity");return e===""?"1":e}else{return be.style.opacity}}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":a.support.cssFloat?"cssFloat":"styleFloat"},style:function(bf,be,bk,bg){if(!bf||bf.nodeType===3||bf.nodeType===8||!bf.style){return}var bj,bh=a.camelCase(be),bd=bf.style,bl=a.cssHooks[bh];be=a.cssProps[bh]||bh;if(bk!==H){if(typeof bk==="number"&&isNaN(bk)||bk==null){return}if(typeof bk==="number"&&!a.cssNumber[bh]){bk+="px"}if(!bl||!("set" in bl)||(bk=bl.set(bf,bk))!==H){try{bd[be]=bk}catch(bi){}}}else{if(bl&&"get" in bl&&(bj=bl.get(bf,false,bg))!==H){return bj}return bd[be]}},css:function(bh,bg,bd){var bf,be=a.camelCase(bg),e=a.cssHooks[be];bg=a.cssProps[be]||be;if(e&&"get" in e&&(bf=e.get(bh,true,bd))!==H){return bf}else{if(U){return U(bh,bg,be)}}},swap:function(bf,be,bg){var e={};for(var bd in be){e[bd]=bf.style[bd];bf.style[bd]=be[bd]}bg.call(bf);for(bd in be){bf.style[bd]=e[bd]}},camelCase:function(e){return e.replace(aM,l)}});a.curCSS=a.css;a.each(["height","width"],function(bd,e){a.cssHooks[e]={get:function(bg,bf,be){var bh;if(bf){if(bg.offsetWidth!==0){bh=o(bg,e,be)}else{a.swap(bg,aV,function(){bh=o(bg,e,be)})}if(bh<=0){bh=U(bg,e,e);if(bh==="0px"&&aL){bh=aL(bg,e,e)}if(bh!=null){return bh===""||bh==="auto"?"0px":bh}}if(bh<0||bh==null){bh=bg.style[e];return bh===""||bh==="auto"?"0px":bh}return typeof bh==="string"?bh:bh+"px"}},set:function(be,bf){if(aZ.test(bf)){bf=parseFloat(bf);if(bf>=0){return bf+"px"}}else{return bf}}}});if(!a.support.opacity){a.cssHooks.opacity={get:function(bd,e){return ak.test((e&&bd.currentStyle?bd.currentStyle.filter:bd.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(bf,bg){var be=bf.style;be.zoom=1;var e=a.isNaN(bg)?"":"alpha(opacity="+bg*100+")",bd=be.filter||"";be.filter=ae.test(bd)?bd.replace(ae,e):be.filter+" "+e}}}if(al.defaultView&&al.defaultView.getComputedStyle){ay=function(bh,e,bf){var be,bg,bd;bf=bf.replace(y,"-$1").toLowerCase();if(!(bg=bh.ownerDocument.defaultView)){return H}if((bd=bg.getComputedStyle(bh,null))){be=bd.getPropertyValue(bf);if(be===""&&!a.contains(bh.ownerDocument.documentElement,bh)){be=a.style(bh,bf)}}return be}}if(al.documentElement.currentStyle){aL=function(bg,be){var bh,bd=bg.currentStyle&&bg.currentStyle[be],e=bg.runtimeStyle&&bg.runtimeStyle[be],bf=bg.style;if(!aZ.test(bd)&&a7.test(bd)){bh=bf.left;if(e){bg.runtimeStyle.left=bg.currentStyle.left}bf.left=be==="fontSize"?"1em":(bd||0);bd=bf.pixelLeft+"px";bf.left=bh;if(e){bg.runtimeStyle.left=e}}return bd===""?"auto":bd}}U=ay||aL;function o(be,bd,e){var bg=bd==="width"?ag:aR,bf=bd==="width"?be.offsetWidth:be.offsetHeight;if(e==="border"){return bf}a.each(bg,function(){if(!e){bf-=parseFloat(a.css(be,"padding"+this))||0}if(e==="margin"){bf+=parseFloat(a.css(be,"margin"+this))||0}else{bf-=parseFloat(a.css(be,"border"+this+"Width"))||0}});return bf}if(a.expr&&a.expr.filters){a.expr.filters.hidden=function(be){var bd=be.offsetWidth,e=be.offsetHeight;return(bd===0&&e===0)||(!a.support.reliableHiddenOffsets&&(be.style.display||a.css(be,"display"))==="none")};a.expr.filters.visible=function(e){return !a.expr.filters.hidden(e)}}var i=/%20/g,ah=/\[\]$/,bc=/\r?\n/g,ba=/#.*$/,ar=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aO=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aB=/(?:^file|^widget|\-extension):$/,aD=/^(?:GET|HEAD)$/,b=/^\/\//,I=/\?/,aU=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,p=/^(?:select|textarea)/i,g=/\s+/,bb=/([?&])_=[^&]*/,R=/(^|\-)([a-z])/g,aJ=function(bd,e,be){return e+be.toUpperCase()},G=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,z=a.fn.load,V={},q={},au,r;try{au=al.location.href}catch(am){au=al.createElement("a");au.href="";au=au.href}r=G.exec(au.toLowerCase());function d(e){return function(bg,bi){if(typeof bg!=="string"){bi=bg;bg="*"}if(a.isFunction(bi)){var bf=bg.toLowerCase().split(g),be=0,bh=bf.length,bd,bj,bk;for(;be<bh;be++){bd=bf[be];bk=/^\+/.test(bd);if(bk){bd=bd.substr(1)||"*"}bj=e[bd]=e[bd]||[];bj[bk?"unshift":"push"](bi)}}}}function aI(bd,bm,bh,bl,bj,bf){bj=bj||bm.dataTypes[0];bf=bf||{};bf[bj]=true;var bi=bd[bj],be=0,e=bi?bi.length:0,bg=(bd===V),bk;for(;be<e&&(bg||!bk);be++){bk=bi[be](bm,bh,bl);if(typeof bk==="string"){if(!bg||bf[bk]){bk=H}else{bm.dataTypes.unshift(bk);bk=aI(bd,bm,bh,bl,bk,bf)}}}if((bg||!bk)&&!bf["*"]){bk=aI(bd,bm,bh,bl,"*",bf)}return bk}a.fn.extend({load:function(be,bh,bi){if(typeof be!=="string"&&z){return z.apply(this,arguments)}else{if(!this.length){return this}}var bg=be.indexOf(" ");if(bg>=0){var e=be.slice(bg,be.length);be=be.slice(0,bg)}var bf="GET";if(bh){if(a.isFunction(bh)){bi=bh;bh=H}else{if(typeof bh==="object"){bh=a.param(bh,a.ajaxSettings.traditional);bf="POST"}}}var bd=this;a.ajax({url:be,type:bf,dataType:"html",data:bh,complete:function(bk,bj,bl){bl=bk.responseText;if(bk.isResolved()){bk.done(function(bm){bl=bm});bd.html(e?a("<div>").append(bl.replace(aU,"")).find(e):bl)}if(bi){bd.each(bi,[bl,bj,bk])}}});return this},serialize:function(){return a.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?a.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aO.test(this.type))}).map(function(e,bd){var be=a(this).val();return be==null?null:a.isArray(be)?a.map(be,function(bg,bf){return{name:bd.name,value:bg.replace(bc,"\r\n")}}):{name:bd.name,value:be.replace(bc,"\r\n")}}).get()}});a.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bd){a.fn[bd]=function(be){return this.bind(bd,be)}});a.each(["get","post"],function(e,bd){a[bd]=function(be,bg,bh,bf){if(a.isFunction(bg)){bf=bf||bh;bh=bg;bg=H}return a.ajax({type:bd,url:be,data:bg,success:bh,dataType:bf})}});a.extend({getScript:function(e,bd){return a.get(e,H,bd,"script")},getJSON:function(e,bd,be){return a.get(e,bd,be,"json")},ajaxSetup:function(be,e){if(!e){e=be;be=a.extend(true,a.ajaxSettings,e)}else{a.extend(true,be,a.ajaxSettings,e)}for(var bd in {context:1,url:1}){if(bd in e){be[bd]=e[bd]}else{if(bd in a.ajaxSettings){be[bd]=a.ajaxSettings[bd]}}}return be},ajaxSettings:{url:au,isLocal:aB.test(r[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":aY.String,"text html":true,"text json":a.parseJSON,"text xml":a.parseXML}},ajaxPrefilter:d(V),ajaxTransport:d(q),ajax:function(bh,bf){if(typeof bh==="object"){bf=bh;bh=H}bf=bf||{};var bl=a.ajaxSetup({},bf),bz=bl.context||bl,bo=bz!==bl&&(bz.nodeType||bz instanceof a)?a(bz):a.event,by=a.Deferred(),bv=a._Deferred(),bj=bl.statusCode||{},bk,bp={},bx,bg,bt,bm,bq,bi=0,be,bs,br={readyState:0,setRequestHeader:function(e,bA){if(!bi){bp[e.toLowerCase().replace(R,aJ)]=bA}return this},getAllResponseHeaders:function(){return bi===2?bx:null},getResponseHeader:function(bA){var e;if(bi===2){if(!bg){bg={};while((e=ar.exec(bx))){bg[e[1].toLowerCase()]=e[2]}}e=bg[bA.toLowerCase()]}return e===H?null:e},overrideMimeType:function(e){if(!bi){bl.mimeType=e}return this},abort:function(e){e=e||"abort";if(bt){bt.abort(e)}bn(0,e);return this}};function bn(bF,bD,bG,bC){if(bi===2){return}bi=2;if(bm){clearTimeout(bm)}bt=H;bx=bC||"";br.readyState=bF?4:0;var bA,bK,bJ,bE=bG?a4(bl,br,bG):H,bB,bI;if(bF>=200&&bF<300||bF===304){if(bl.ifModified){if((bB=br.getResponseHeader("Last-Modified"))){a.lastModified[bk]=bB}if((bI=br.getResponseHeader("Etag"))){a.etag[bk]=bI}}if(bF===304){bD="notmodified";bA=true}else{try{bK=D(bl,bE);bD="success";bA=true}catch(bH){bD="parsererror";bJ=bH}}}else{bJ=bD;if(!bD||bF){bD="error";if(bF<0){bF=0}}}br.status=bF;br.statusText=bD;if(bA){by.resolveWith(bz,[bK,bD,br])}else{by.rejectWith(bz,[br,bD,bJ])}br.statusCode(bj);bj=H;if(be){bo.trigger("ajax"+(bA?"Success":"Error"),[br,bl,bA?bK:bJ])}bv.resolveWith(bz,[br,bD]);if(be){bo.trigger("ajaxComplete",[br,bl]);if(!(--a.active)){a.event.trigger("ajaxStop")}}}by.promise(br);br.success=br.done;br.error=br.fail;br.complete=bv.done;br.statusCode=function(bA){if(bA){var e;if(bi<2){for(e in bA){bj[e]=[bj[e],bA[e]]}}else{e=bA[br.status];br.then(e,e)}}return this};bl.url=((bh||bl.url)+"").replace(ba,"").replace(b,r[1]+"//");bl.dataTypes=a.trim(bl.dataType||"*").toLowerCase().split(g);if(!bl.crossDomain){bq=G.exec(bl.url.toLowerCase());bl.crossDomain=!!(bq&&(bq[1]!=r[1]||bq[2]!=r[2]||(bq[3]||(bq[1]==="http:"?80:443))!=(r[3]||(r[1]==="http:"?80:443))))}if(bl.data&&bl.processData&&typeof bl.data!=="string"){bl.data=a.param(bl.data,bl.traditional)}aI(V,bl,bf,br);if(bi===2){return false}be=bl.global;bl.type=bl.type.toUpperCase();bl.hasContent=!aD.test(bl.type);if(be&&a.active++===0){a.event.trigger("ajaxStart")}if(!bl.hasContent){if(bl.data){bl.url+=(I.test(bl.url)?"&":"?")+bl.data}bk=bl.url;if(bl.cache===false){var bd=a.now(),bw=bl.url.replace(bb,"$1_="+bd);bl.url=bw+((bw===bl.url)?(I.test(bl.url)?"&":"?")+"_="+bd:"")}}if(bl.data&&bl.hasContent&&bl.contentType!==false||bf.contentType){bp["Content-Type"]=bl.contentType}if(bl.ifModified){bk=bk||bl.url;if(a.lastModified[bk]){bp["If-Modified-Since"]=a.lastModified[bk]}if(a.etag[bk]){bp["If-None-Match"]=a.etag[bk]}}bp.Accept=bl.dataTypes[0]&&bl.accepts[bl.dataTypes[0]]?bl.accepts[bl.dataTypes[0]]+(bl.dataTypes[0]!=="*"?", */*; q=0.01":""):bl.accepts["*"];for(bs in bl.headers){br.setRequestHeader(bs,bl.headers[bs])}if(bl.beforeSend&&(bl.beforeSend.call(bz,br,bl)===false||bi===2)){br.abort();return false}for(bs in {success:1,error:1,complete:1}){br[bs](bl[bs])}bt=aI(q,bl,bf,br);if(!bt){bn(-1,"No Transport")}else{br.readyState=1;if(be){bo.trigger("ajaxSend",[br,bl])}if(bl.async&&bl.timeout>0){bm=setTimeout(function(){br.abort("timeout")},bl.timeout)}try{bi=1;bt.send(bp,bn)}catch(bu){if(status<2){bn(-1,bu)}else{a.error(bu)}}}return br},param:function(e,be){var bd=[],bg=function(bh,bi){bi=a.isFunction(bi)?bi():bi;bd[bd.length]=encodeURIComponent(bh)+"="+encodeURIComponent(bi)};if(be===H){be=a.ajaxSettings.traditional}if(a.isArray(e)||(e.jquery&&!a.isPlainObject(e))){a.each(e,function(){bg(this.name,this.value)})}else{for(var bf in e){u(bf,e[bf],be,bg)}}return bd.join("&").replace(i,"+")}});function u(be,bg,bd,bf){if(a.isArray(bg)&&bg.length){a.each(bg,function(bi,bh){if(bd||ah.test(be)){bf(be,bh)}else{u(be+"["+(typeof bh==="object"||a.isArray(bh)?bi:"")+"]",bh,bd,bf)}})}else{if(!bd&&bg!=null&&typeof bg==="object"){if(a.isArray(bg)||a.isEmptyObject(bg)){bf(be,"")}else{for(var e in bg){u(be+"["+e+"]",bg[e],bd,bf)}}}else{bf(be,bg)}}}a.extend({active:0,lastModified:{},etag:{}});function a4(bl,bk,bh){var bd=bl.contents,bj=bl.dataTypes,be=bl.responseFields,bg,bi,bf,e;for(bi in be){if(bi in bh){bk[be[bi]]=bh[bi]}}while(bj[0]==="*"){bj.shift();if(bg===H){bg=bl.mimeType||bk.getResponseHeader("content-type")}}if(bg){for(bi in bd){if(bd[bi]&&bd[bi].test(bg)){bj.unshift(bi);break}}}if(bj[0] in bh){bf=bj[0]}else{for(bi in bh){if(!bj[0]||bl.converters[bi+" "+bj[0]]){bf=bi;break}if(!e){e=bi}}bf=bf||e}if(bf){if(bf!==bj[0]){bj.unshift(bf)}return bh[bf]}}function D(bp,bh){if(bp.dataFilter){bh=bp.dataFilter(bh,bp.dataType)}var bl=bp.dataTypes,bo={},bi,bm,be=bl.length,bj,bk=bl[0],bf,bg,bn,bd,e;for(bi=1;bi<be;bi++){if(bi===1){for(bm in bp.converters){if(typeof bm==="string"){bo[bm.toLowerCase()]=bp.converters[bm]}}}bf=bk;bk=bl[bi];if(bk==="*"){bk=bf}else{if(bf!=="*"&&bf!==bk){bg=bf+" "+bk;bn=bo[bg]||bo["* "+bk];if(!bn){e=H;for(bd in bo){bj=bd.split(" ");if(bj[0]===bf||bj[0]==="*"){e=bo[bj[1]+" "+bk];if(e){bd=bo[bd];if(bd===true){bn=e}else{if(e===true){bn=bd}}break}}}}if(!(bn||e)){a.error("No conversion from "+bg.replace(" "," to "))}if(bn!==true){bh=bn?bn(bh):e(bd(bh))}}}}return bh}var aq=a.now(),t=/(\=)\?(&|$)|()\?\?()/i;a.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return a.expando+"_"+(aq++)}});a.ajaxPrefilter("json jsonp",function(bm,bi,bl){var bk=(typeof bm.data==="string");if(bm.dataTypes[0]==="jsonp"||bi.jsonpCallback||bi.jsonp!=null||bm.jsonp!==false&&(t.test(bm.url)||bk&&t.test(bm.data))){var bj,be=bm.jsonpCallback=a.isFunction(bm.jsonpCallback)?bm.jsonpCallback():bm.jsonpCallback,bh=aY[be],e=bm.url,bg=bm.data,bd="$1"+be+"$2",bf=function(){aY[be]=bh;if(bj&&a.isFunction(bh)){aY[be](bj[0])}};if(bm.jsonp!==false){e=e.replace(t,bd);if(bm.url===e){if(bk){bg=bg.replace(t,bd)}if(bm.data===bg){e+=(/\?/.test(e)?"&":"?")+bm.jsonp+"="+be}}}bm.url=e;bm.data=bg;aY[be]=function(bn){bj=[bn]};bl.then(bf,bf);bm.converters["script json"]=function(){if(!bj){a.error(be+" was not called")}return bj[0]};bm.dataTypes[0]="json";return"script"}});a.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){a.globalEval(e);return e}}});a.ajaxPrefilter("script",function(e){if(e.cache===H){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});a.ajaxTransport("script",function(be){if(be.crossDomain){var e,bd=al.head||al.getElementsByTagName("head")[0]||al.documentElement;return{send:function(bf,bg){e=al.createElement("script");e.async="async";if(be.scriptCharset){e.charset=be.scriptCharset}e.src=be.url;e.onload=e.onreadystatechange=function(bi,bh){if(!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bd&&e.parentNode){bd.removeChild(e)}e=H;if(!bh){bg(200,"success")}}};bd.insertBefore(e,bd.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var x=a.now(),J,at;function A(){a(aY).unload(function(){for(var e in J){J[e](0,1)}})}function aA(){try{return new aY.XMLHttpRequest()}catch(bd){}}function ad(){try{return new aY.ActiveXObject("Microsoft.XMLHTTP")}catch(bd){}}a.ajaxSettings.xhr=aY.ActiveXObject?function(){return !this.isLocal&&aA()||ad()}:aA;at=a.ajaxSettings.xhr();a.support.ajax=!!at;a.support.cors=at&&("withCredentials" in at);at=H;if(a.support.ajax){a.ajaxTransport(function(e){if(!e.crossDomain||a.support.cors){var bd;return{send:function(bj,be){var bi=e.xhr(),bh,bg;if(e.username){bi.open(e.type,e.url,e.async,e.username,e.password)}else{bi.open(e.type,e.url,e.async)}if(e.xhrFields){for(bg in e.xhrFields){bi[bg]=e.xhrFields[bg]}}if(e.mimeType&&bi.overrideMimeType){bi.overrideMimeType(e.mimeType)}if(!(e.crossDomain&&!e.hasContent)&&!bj["X-Requested-With"]){bj["X-Requested-With"]="XMLHttpRequest"}try{for(bg in bj){bi.setRequestHeader(bg,bj[bg])}}catch(bf){}bi.send((e.hasContent&&e.data)||null);bd=function(bs,bm){var bn,bl,bk,bq,bp;try{if(bd&&(bm||bi.readyState===4)){bd=H;if(bh){bi.onreadystatechange=a.noop;delete J[bh]}if(bm){if(bi.readyState!==4){bi.abort()}}else{bn=bi.status;bk=bi.getAllResponseHeaders();bq={};bp=bi.responseXML;if(bp&&bp.documentElement){bq.xml=bp}bq.text=bi.responseText;try{bl=bi.statusText}catch(br){bl=""}if(!bn&&e.isLocal&&!e.crossDomain){bn=bq.text?200:404}else{if(bn===1223){bn=204}}}}}catch(bo){if(!bm){be(-1,bo)}}if(bq){be(bn,bl,bq,bk)}};if(!e.async||bi.readyState===4){bd()}else{if(!J){J={};A()}bh=x++;bi.onreadystatechange=J[bh]=bd}},abort:function(){if(bd){bd(0,1)}}}}})}var N={},ap=/^(?:toggle|show|hide)$/,aF=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,aS,ax=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];a.fn.extend({show:function(bf,bi,bh){var be,bg;if(bf||bf===0){return this.animate(aQ("show",3),bf,bi,bh)}else{for(var bd=0,e=this.length;bd<e;bd++){be=this[bd];bg=be.style.display;if(!a._data(be,"olddisplay")&&bg==="none"){bg=be.style.display=""}if(bg===""&&a.css(be,"display")==="none"){a._data(be,"olddisplay",w(be.nodeName))}}for(bd=0;bd<e;bd++){be=this[bd];bg=be.style.display;if(bg===""||bg==="none"){be.style.display=a._data(be,"olddisplay")||""}}return this}},hide:function(be,bh,bg){if(be||be===0){return this.animate(aQ("hide",3),be,bh,bg)}else{for(var bd=0,e=this.length;bd<e;bd++){var bf=a.css(this[bd],"display");if(bf!=="none"&&!a._data(this[bd],"olddisplay")){a._data(this[bd],"olddisplay",bf)}}for(bd=0;bd<e;bd++){this[bd].style.display="none"}return this}},_toggle:a.fn.toggle,toggle:function(be,bd,bf){var e=typeof be==="boolean";if(a.isFunction(be)&&a.isFunction(bd)){this._toggle.apply(this,arguments)}else{if(be==null||e){this.each(function(){var bg=e?be:a(this).is(":hidden");a(this)[bg?"show":"hide"]()})}else{this.animate(aQ("toggle",3),be,bd,bf)}}return this},fadeTo:function(e,bf,be,bd){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bf},e,be,bd)},animate:function(bg,bd,bf,be){var e=a.speed(bd,bf,be);if(a.isEmptyObject(bg)){return this.each(e.complete)}return this[e.queue===false?"each":"queue"](function(){var bj=a.extend({},e),bn,bk=this.nodeType===1,bl=bk&&a(this).is(":hidden"),bh=this;for(bn in bg){var bi=a.camelCase(bn);if(bn!==bi){bg[bi]=bg[bn];delete bg[bn];bn=bi}if(bg[bn]==="hide"&&bl||bg[bn]==="show"&&!bl){return bj.complete.call(this)}if(bk&&(bn==="height"||bn==="width")){bj.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(a.css(this,"display")==="inline"&&a.css(this,"float")==="none"){if(!a.support.inlineBlockNeedsLayout){this.style.display="inline-block"}else{var bm=w(this.nodeName);if(bm==="inline"){this.style.display="inline-block"}else{this.style.display="inline";this.style.zoom=1}}}}if(a.isArray(bg[bn])){(bj.specialEasing=bj.specialEasing||{})[bn]=bg[bn][1];bg[bn]=bg[bn][0]}}if(bj.overflow!=null){this.style.overflow="hidden"}bj.curAnim=a.extend({},bg);a.each(bg,function(bp,bt){var bs=new a.fx(bh,bj,bp);if(ap.test(bt)){bs[bt==="toggle"?bl?"show":"hide":bt](bg)}else{var br=aF.exec(bt),bu=bs.cur();if(br){var bo=parseFloat(br[2]),bq=br[3]||(a.cssNumber[bp]?"":"px");if(bq!=="px"){a.style(bh,bp,(bo||1)+bq);bu=((bo||1)/bs.cur())*bu;a.style(bh,bp,bu+bq)}if(br[1]){bo=((br[1]==="-="?-1:1)*bo)+bu}bs.custom(bu,bo,bq)}else{bs.custom(bu,bt,"")}}});return true})},stop:function(bd,e){var be=a.timers;if(bd){this.queue([])}this.each(function(){for(var bf=be.length-1;bf>=0;bf--){if(be[bf].elem===this){if(e){be[bf](true)}be.splice(bf,1)}}});if(!e){this.dequeue()}return this}});function aQ(bd,e){var be={};a.each(ax.concat.apply([],ax.slice(0,e)),function(){be[this]=bd});return be}a.each({slideDown:aQ("show",1),slideUp:aQ("hide",1),slideToggle:aQ("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bd){a.fn[e]=function(be,bg,bf){return this.animate(bd,be,bg,bf)}});a.extend({speed:function(be,bf,bd){var e=be&&typeof be==="object"?a.extend({},be):{complete:bd||!bd&&bf||a.isFunction(be)&&be,duration:be,easing:bd&&bf||bf&&!a.isFunction(bf)&&bf};e.duration=a.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in a.fx.speeds?a.fx.speeds[e.duration]:a.fx.speeds._default;e.old=e.complete;e.complete=function(){if(e.queue!==false){a(this).dequeue()}if(a.isFunction(e.old)){e.old.call(this)}};return e},easing:{linear:function(be,bf,e,bd){return e+bd*be},swing:function(be,bf,e,bd){return((-Math.cos(be*Math.PI)/2)+0.5)*bd+e}},timers:[],fx:function(bd,e,be){this.options=e;this.elem=bd;this.prop=be;if(!e.orig){e.orig={}}}});a.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(a.fx.step[this.prop]||a.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 e,bd=a.css(this.elem,this.prop);return isNaN(e=parseFloat(bd))?!bd||bd==="auto"?0:bd:e},custom:function(bh,bg,bf){var e=this,be=a.fx;this.startTime=a.now();this.start=bh;this.end=bg;this.unit=bf||this.unit||(a.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;function bd(bi){return e.step(bi)}bd.elem=this.elem;if(bd()&&a.timers.push(bd)&&!aS){aS=setInterval(be.tick,be.interval)}},show:function(){this.options.orig[this.prop]=a.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());a(this.elem).show()},hide:function(){this.options.orig[this.prop]=a.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(bf){var bk=a.now(),bg=true;if(bf||bk>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var bh in this.options.curAnim){if(this.options.curAnim[bh]!==true){bg=false}}if(bg){if(this.options.overflow!=null&&!a.support.shrinkWrapBlocks){var be=this.elem,bl=this.options;a.each(["","X","Y"],function(bm,bn){be.style["overflow"+bn]=bl.overflow[bm]})}if(this.options.hide){a(this.elem).hide()}if(this.options.hide||this.options.show){for(var e in this.options.curAnim){a.style(this.elem,e,this.options.orig[e])}}this.options.complete.call(this.elem)}return false}else{var bd=bk-this.startTime;this.state=bd/this.options.duration;var bi=this.options.specialEasing&&this.options.specialEasing[this.prop];var bj=this.options.easing||(a.easing.swing?"swing":"linear");this.pos=a.easing[bi||bj](this.state,bd,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};a.extend(a.fx,{tick:function(){var bd=a.timers;for(var e=0;e<bd.length;e++){if(!bd[e]()){bd.splice(e--,1)}}if(!bd.length){a.fx.stop()}},interval:13,stop:function(){clearInterval(aS);aS=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){a.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=(e.prop==="width"||e.prop==="height"?Math.max(0,e.now):e.now)+e.unit}else{e.elem[e.prop]=e.now}}}});if(a.expr&&a.expr.filters){a.expr.filters.animated=function(e){return a.grep(a.timers,function(bd){return e===bd.elem}).length}}function w(be){if(!N[be]){var e=a("<"+be+">").appendTo("body"),bd=e.css("display");e.remove();if(bd==="none"||bd===""){bd="block"}N[be]=bd}return N[be]}var S=/^t(?:able|d|h)$/i,Y=/^(?:body|html)$/i;if("getBoundingClientRect" in al.documentElement){a.fn.offset=function(bq){var bg=this[0],bj;if(bq){return this.each(function(e){a.offset.setOffset(this,bq,e)})}if(!bg||!bg.ownerDocument){return null}if(bg===bg.ownerDocument.body){return a.offset.bodyOffset(bg)}try{bj=bg.getBoundingClientRect()}catch(bn){}var bp=bg.ownerDocument,be=bp.documentElement;if(!bj||!a.contains(be,bg)){return bj?{top:bj.top,left:bj.left}:{top:0,left:0}}var bk=bp.body,bl=az(bp),bi=be.clientTop||bk.clientTop||0,bm=be.clientLeft||bk.clientLeft||0,bd=(bl.pageYOffset||a.support.boxModel&&be.scrollTop||bk.scrollTop),bh=(bl.pageXOffset||a.support.boxModel&&be.scrollLeft||bk.scrollLeft),bo=bj.top+bd-bi,bf=bj.left+bh-bm;return{top:bo,left:bf}}}else{a.fn.offset=function(bn){var bh=this[0];if(bn){return this.each(function(bo){a.offset.setOffset(this,bn,bo)})}if(!bh||!bh.ownerDocument){return null}if(bh===bh.ownerDocument.body){return a.offset.bodyOffset(bh)}a.offset.initialize();var bk,be=bh.offsetParent,bd=bh,bm=bh.ownerDocument,bf=bm.documentElement,bi=bm.body,bj=bm.defaultView,e=bj?bj.getComputedStyle(bh,null):bh.currentStyle,bl=bh.offsetTop,bg=bh.offsetLeft;while((bh=bh.parentNode)&&bh!==bi&&bh!==bf){if(a.offset.supportsFixedPosition&&e.position==="fixed"){break}bk=bj?bj.getComputedStyle(bh,null):bh.currentStyle;bl-=bh.scrollTop;bg-=bh.scrollLeft;if(bh===be){bl+=bh.offsetTop;bg+=bh.offsetLeft;if(a.offset.doesNotAddBorder&&!(a.offset.doesAddBorderForTableAndCells&&S.test(bh.nodeName))){bl+=parseFloat(bk.borderTopWidth)||0;bg+=parseFloat(bk.borderLeftWidth)||0}bd=be;be=bh.offsetParent}if(a.offset.subtractsBorderForOverflowNotVisible&&bk.overflow!=="visible"){bl+=parseFloat(bk.borderTopWidth)||0;bg+=parseFloat(bk.borderLeftWidth)||0}e=bk}if(e.position==="relative"||e.position==="static"){bl+=bi.offsetTop;bg+=bi.offsetLeft}if(a.offset.supportsFixedPosition&&e.position==="fixed"){bl+=Math.max(bf.scrollTop,bi.scrollTop);bg+=Math.max(bf.scrollLeft,bi.scrollLeft)}return{top:bl,left:bg}}}a.offset={initialize:function(){var e=al.body,bd=al.createElement("div"),bg,bi,bh,bj,be=parseFloat(a.css(e,"marginTop"))||0,bf="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.extend(bd.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});bd.innerHTML=bf;e.insertBefore(bd,e.firstChild);bg=bd.firstChild;bi=bg.firstChild;bj=bg.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(bi.offsetTop!==5);this.doesAddBorderForTableAndCells=(bj.offsetTop===5);bi.style.position="fixed";bi.style.top="20px";this.supportsFixedPosition=(bi.offsetTop===20||bi.offsetTop===15);bi.style.position=bi.style.top="";bg.style.overflow="hidden";bg.style.position="relative";this.subtractsBorderForOverflowNotVisible=(bi.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==be);e.removeChild(bd);e=bd=bg=bi=bh=bj=null;a.offset.initialize=a.noop},bodyOffset:function(e){var be=e.offsetTop,bd=e.offsetLeft;a.offset.initialize();if(a.offset.doesNotIncludeMarginInBodyOffset){be+=parseFloat(a.css(e,"marginTop"))||0;bd+=parseFloat(a.css(e,"marginLeft"))||0}return{top:be,left:bd}},setOffset:function(bf,bo,bi){var bj=a.css(bf,"position");if(bj==="static"){bf.style.position="relative"}var bh=a(bf),bd=bh.offset(),e=a.css(bf,"top"),bm=a.css(bf,"left"),bn=(bj==="absolute"&&a.inArray("auto",[e,bm])>-1),bl={},bk={},be,bg;if(bn){bk=bh.position()}be=bn?bk.top:parseInt(e,10)||0;bg=bn?bk.left:parseInt(bm,10)||0;if(a.isFunction(bo)){bo=bo.call(bf,bi,bd)}if(bo.top!=null){bl.top=(bo.top-bd.top)+be}if(bo.left!=null){bl.left=(bo.left-bd.left)+bg}if("using" in bo){bo.using.call(bf,bl)}else{bh.css(bl)}}};a.fn.extend({position:function(){if(!this[0]){return null}var be=this[0],bd=this.offsetParent(),bf=this.offset(),e=Y.test(bd[0].nodeName)?{top:0,left:0}:bd.offset();bf.top-=parseFloat(a.css(be,"marginTop"))||0;bf.left-=parseFloat(a.css(be,"marginLeft"))||0;e.top+=parseFloat(a.css(bd[0],"borderTopWidth"))||0;e.left+=parseFloat(a.css(bd[0],"borderLeftWidth"))||0;return{top:bf.top-e.top,left:bf.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||al.body;while(e&&(!Y.test(e.nodeName)&&a.css(e,"position")==="static")){e=e.offsetParent}return e})}});a.each(["Left","Top"],function(bd,e){var be="scroll"+e;a.fn[be]=function(bh){var bf=this[0],bg;if(!bf){return null}if(bh!==H){return this.each(function(){bg=az(this);if(bg){bg.scrollTo(!bd?bh:a(bg).scrollLeft(),bd?bh:a(bg).scrollTop())}else{this[be]=bh}})}else{bg=az(bf);return bg?("pageXOffset" in bg)?bg[bd?"pageYOffset":"pageXOffset"]:a.support.boxModel&&bg.document.documentElement[be]||bg.document.body[be]:bf[be]}}});function az(e){return a.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}a.each(["Height","Width"],function(bd,e){var be=e.toLowerCase();a.fn["inner"+e]=function(){return this[0]?parseFloat(a.css(this[0],be,"padding")):null};a.fn["outer"+e]=function(bf){return this[0]?parseFloat(a.css(this[0],be,bf?"margin":"border")):null};a.fn[be]=function(bg){var bh=this[0];if(!bh){return bg==null?null:this}if(a.isFunction(bg)){return this.each(function(bl){var bk=a(this);bk[be](bg.call(this,bl,bk[be]()))})}if(a.isWindow(bh)){var bi=bh.document.documentElement["client"+e];return bh.document.compatMode==="CSS1Compat"&&bi||bh.document.body["client"+e]||bi}else{if(bh.nodeType===9){return Math.max(bh.documentElement["client"+e],bh.body["scroll"+e],bh.documentElement["scroll"+e],bh.body["offset"+e],bh.documentElement["offset"+e])}else{if(bg===H){var bj=a.css(bh,be),bf=parseFloat(bj);return a.isNaN(bf)?bj:bf}else{return this.css(be,typeof bg==="string"?bg:bg+"px")}}}}});aY.jQuery=aY.$=a})(window); \ No newline at end of file +(function(){var bp=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bq=0,bt=Object.prototype.toString,bk=false,bj=true,br=/\\/g,bx=/\W/;[0,0].sort(function(){bj=false;return 0});var bh=function(bC,e,bF,bG){bF=bF||[];e=e||am;var bI=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bC||typeof bC!=="string"){return bF}var bz,bK,bN,by,bJ,bM,bL,bE,bB=true,bA=bh.isXML(e),bD=[],bH=bC;do{bp.exec("");bz=bp.exec(bH);if(bz){bH=bz[3];bD.push(bz[1]);if(bz[2]){by=bz[3];break}}}while(bz);if(bD.length>1&&bl.exec(bC)){if(bD.length===2&&bm.relative[bD[0]]){bK=bu(bD[0]+bD[1],e)}else{bK=bm.relative[bD[0]]?[e]:bh(bD.shift(),e);while(bD.length){bC=bD.shift();if(bm.relative[bC]){bC+=bD.shift()}bK=bu(bC,bK)}}}else{if(!bG&&bD.length>1&&e.nodeType===9&&!bA&&bm.match.ID.test(bD[0])&&!bm.match.ID.test(bD[bD.length-1])){bJ=bh.find(bD.shift(),e,bA);e=bJ.expr?bh.filter(bJ.expr,bJ.set)[0]:bJ.set[0]}if(e){bJ=bG?{expr:bD.pop(),set:bn(bG)}:bh.find(bD.pop(),bD.length===1&&(bD[0]==="~"||bD[0]==="+")&&e.parentNode?e.parentNode:e,bA);bK=bJ.expr?bh.filter(bJ.expr,bJ.set):bJ.set;if(bD.length>0){bN=bn(bK)}else{bB=false}while(bD.length){bM=bD.pop();bL=bM;if(!bm.relative[bM]){bM=""}else{bL=bD.pop()}if(bL==null){bL=e}bm.relative[bM](bN,bL,bA)}}else{bN=bD=[]}}if(!bN){bN=bK}if(!bN){bh.error(bM||bC)}if(bt.call(bN)==="[object Array]"){if(!bB){bF.push.apply(bF,bN)}else{if(e&&e.nodeType===1){for(bE=0;bN[bE]!=null;bE++){if(bN[bE]&&(bN[bE]===true||bN[bE].nodeType===1&&bh.contains(e,bN[bE]))){bF.push(bK[bE])}}}else{for(bE=0;bN[bE]!=null;bE++){if(bN[bE]&&bN[bE].nodeType===1){bF.push(bK[bE])}}}}}else{bn(bN,bF)}if(by){bh(by,bI,bF,bG);bh.uniqueSort(bF)}return bF};bh.uniqueSort=function(by){if(bs){bk=bj;by.sort(bs);if(bk){for(var e=1;e<by.length;e++){if(by[e]===by[e-1]){by.splice(e--,1)}}}}return by};bh.matches=function(e,by){return bh(e,null,null,by)};bh.matchesSelector=function(e,by){return bh(by,null,null,[e]).length>0};bh.find=function(bE,e,bF){var bD;if(!bE){return[]}for(var bA=0,bz=bm.order.length;bA<bz;bA++){var bB,bC=bm.order[bA];if((bB=bm.leftMatch[bC].exec(bE))){var by=bB[1];bB.splice(1,1);if(by.substr(by.length-1)!=="\\"){bB[1]=(bB[1]||"").replace(br,"");bD=bm.find[bC](bB,e,bF);if(bD!=null){bE=bE.replace(bm.match[bC],"");break}}}}if(!bD){bD=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bD,expr:bE}};bh.filter=function(bI,bH,bL,bB){var bD,e,bz=bI,bN=[],bF=bH,bE=bH&&bH[0]&&bh.isXML(bH[0]);while(bI&&bH.length){for(var bG in bm.filter){if((bD=bm.leftMatch[bG].exec(bI))!=null&&bD[2]){var bM,bK,by=bm.filter[bG],bA=bD[1];e=false;bD.splice(1,1);if(bA.substr(bA.length-1)==="\\"){continue}if(bF===bN){bN=[]}if(bm.preFilter[bG]){bD=bm.preFilter[bG](bD,bF,bL,bN,bB,bE);if(!bD){e=bM=true}else{if(bD===true){continue}}}if(bD){for(var bC=0;(bK=bF[bC])!=null;bC++){if(bK){bM=by(bK,bD,bC,bF);var bJ=bB^!!bM;if(bL&&bM!=null){if(bJ){e=true}else{bF[bC]=false}}else{if(bJ){bN.push(bK);e=true}}}}}if(bM!==I){if(!bL){bF=bN}bI=bI.replace(bm.match[bG],"");if(!e){return[]}break}}}if(bI===bz){if(e==null){bh.error(bI)}else{break}}bz=bI}return bF};bh.error=function(e){throw"Syntax error, unrecognized expression: "+e};var bm=bh.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(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bD,by){var bA=typeof by==="string",bC=bA&&!bx.test(by),bE=bA&&!bC;if(bC){by=by.toLowerCase()}for(var bz=0,e=bD.length,bB;bz<e;bz++){if((bB=bD[bz])){while((bB=bB.previousSibling)&&bB.nodeType!==1){}bD[bz]=bE||bB&&bB.nodeName.toLowerCase()===by?bB||false:bB===by}}if(bE){bh.filter(by,bD,true)}},">":function(bD,by){var bC,bB=typeof by==="string",bz=0,e=bD.length;if(bB&&!bx.test(by)){by=by.toLowerCase();for(;bz<e;bz++){bC=bD[bz];if(bC){var bA=bC.parentNode;bD[bz]=bA.nodeName.toLowerCase()===by?bA:false}}}else{for(;bz<e;bz++){bC=bD[bz];if(bC){bD[bz]=bB?bC.parentNode:bC.parentNode===by}}if(bB){bh.filter(by,bD,true)}}},"":function(bA,by,bC){var bB,bz=bq++,e=bv;if(typeof by==="string"&&!bx.test(by)){by=by.toLowerCase();bB=by;e=bf}e("parentNode",by,bz,bA,bB,bC)},"~":function(bA,by,bC){var bB,bz=bq++,e=bv;if(typeof by==="string"&&!bx.test(by)){by=by.toLowerCase();bB=by;e=bf}e("previousSibling",by,bz,bA,bB,bC)}},find:{ID:function(by,bz,bA){if(typeof bz.getElementById!=="undefined"&&!bA){var e=bz.getElementById(by[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bz,bC){if(typeof bC.getElementsByName!=="undefined"){var by=[],bB=bC.getElementsByName(bz[1]);for(var bA=0,e=bB.length;bA<e;bA++){if(bB[bA].getAttribute("name")===bz[1]){by.push(bB[bA])}}return by.length===0?null:by}},TAG:function(e,by){if(typeof by.getElementsByTagName!=="undefined"){return by.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bA,by,bz,e,bD,bE){bA=" "+bA[1].replace(br,"")+" ";if(bE){return bA}for(var bB=0,bC;(bC=by[bB])!=null;bB++){if(bC){if(bD^(bC.className&&(" "+bC.className+" ").replace(/[\t\n\r]/g," ").indexOf(bA)>=0)){if(!bz){e.push(bC)}}else{if(bz){by[bB]=false}}}}return false},ID:function(e){return e[1].replace(br,"")},TAG:function(by,e){return by[1].replace(br,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bh.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var by=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(by[1]+(by[2]||1))-0;e[3]=by[3]-0}else{if(e[2]){bh.error(e[0])}}e[0]=bq++;return e},ATTR:function(bB,by,bz,e,bC,bD){var bA=bB[1]=bB[1].replace(br,"");if(!bD&&bm.attrMap[bA]){bB[1]=bm.attrMap[bA]}bB[4]=(bB[4]||bB[5]||"").replace(br,"");if(bB[2]==="~="){bB[4]=" "+bB[4]+" "}return bB},PSEUDO:function(bB,by,bz,e,bC){if(bB[1]==="not"){if((bp.exec(bB[3])||"").length>1||/^\w/.test(bB[3])){bB[3]=bh(bB[3],null,null,by)}else{var bA=bh.filter(bB[3],by,bz,true^bC);if(!bz){e.push.apply(e,bA)}return false}}else{if(bm.match.POS.test(bB[0])||bm.match.CHILD.test(bB[0])){return true}}return bB},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bz,by,e){return !!bh(e[3],bz).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bz){var e=bz.getAttribute("type"),by=bz.type;return"text"===by&&(e===by||e===null)},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(by,e){return e===0},last:function(bz,by,e,bA){return by===bA.length-1},even:function(by,e){return e%2===0},odd:function(by,e){return e%2===1},lt:function(bz,by,e){return by<e[3]-0},gt:function(bz,by,e){return by>e[3]-0},nth:function(bz,by,e){return e[3]-0===by},eq:function(bz,by,e){return e[3]-0===by}},filter:{PSEUDO:function(bz,bE,bD,bF){var e=bE[1],by=bm.filters[e];if(by){return by(bz,bD,bE,bF)}else{if(e==="contains"){return(bz.textContent||bz.innerText||bh.getText([bz])||"").indexOf(bE[3])>=0}else{if(e==="not"){var bA=bE[3];for(var bC=0,bB=bA.length;bC<bB;bC++){if(bA[bC]===bz){return false}}return true}else{bh.error(e)}}}},CHILD:function(e,bA){var bD=bA[1],by=e;switch(bD){case"only":case"first":while((by=by.previousSibling)){if(by.nodeType===1){return false}}if(bD==="first"){return true}by=e;case"last":while((by=by.nextSibling)){if(by.nodeType===1){return false}}return true;case"nth":var bz=bA[2],bG=bA[3];if(bz===1&&bG===0){return true}var bC=bA[0],bF=e.parentNode;if(bF&&(bF.sizcache!==bC||!e.nodeIndex)){var bB=0;for(by=bF.firstChild;by;by=by.nextSibling){if(by.nodeType===1){by.nodeIndex=++bB}}bF.sizcache=bC}var bE=e.nodeIndex-bG;if(bz===0){return bE===0}else{return(bE%bz===0&&bE/bz>=0)}}},ID:function(by,e){return by.nodeType===1&&by.getAttribute("id")===e},TAG:function(by,e){return(e==="*"&&by.nodeType===1)||by.nodeName.toLowerCase()===e},CLASS:function(by,e){return(" "+(by.className||by.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bC,bA){var bz=bA[1],e=bm.attrHandle[bz]?bm.attrHandle[bz](bC):bC[bz]!=null?bC[bz]:bC.getAttribute(bz),bD=e+"",bB=bA[2],by=bA[4];return e==null?bB==="!=":bB==="="?bD===by:bB==="*="?bD.indexOf(by)>=0:bB==="~="?(" "+bD+" ").indexOf(by)>=0:!by?bD&&e!==false:bB==="!="?bD!==by:bB==="^="?bD.indexOf(by)===0:bB==="$="?bD.substr(bD.length-by.length)===by:bB==="|="?bD===by||bD.substr(0,by.length+1)===by+"-":false},POS:function(bB,by,bz,bC){var e=by[2],bA=bm.setFilters[e];if(bA){return bA(bB,bz,by,bC)}}}};var bl=bm.match.POS,bg=function(by,e){return"\\"+(e-0+1)};for(var bi in bm.match){bm.match[bi]=new RegExp(bm.match[bi].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bm.leftMatch[bi]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bm.match[bi].source.replace(/\\(\d+)/g,bg))}var bn=function(by,e){by=Array.prototype.slice.call(by,0);if(e){e.push.apply(e,by);return e}return by};try{Array.prototype.slice.call(am.documentElement.childNodes,0)[0].nodeType}catch(bw){bn=function(bB,bA){var bz=0,by=bA||[];if(bt.call(bB)==="[object Array]"){Array.prototype.push.apply(by,bB)}else{if(typeof bB.length==="number"){for(var e=bB.length;bz<e;bz++){by.push(bB[bz])}}else{for(;bB[bz];bz++){by.push(bB[bz])}}}return by}}var bs,bo;if(am.documentElement.compareDocumentPosition){bs=function(by,e){if(by===e){bk=true;return 0}if(!by.compareDocumentPosition||!e.compareDocumentPosition){return by.compareDocumentPosition?-1:1}return by.compareDocumentPosition(e)&4?-1:1}}else{bs=function(bF,bE){var bC,by,bz=[],e=[],bB=bF.parentNode,bD=bE.parentNode,bG=bB;if(bF===bE){bk=true;return 0}else{if(bB===bD){return bo(bF,bE)}else{if(!bB){return -1}else{if(!bD){return 1}}}}while(bG){bz.unshift(bG);bG=bG.parentNode}bG=bD;while(bG){e.unshift(bG);bG=bG.parentNode}bC=bz.length;by=e.length;for(var bA=0;bA<bC&&bA<by;bA++){if(bz[bA]!==e[bA]){return bo(bz[bA],e[bA])}}return bA===bC?bo(bF,e[bA],-1):bo(bz[bA],bE,1)};bo=function(by,e,bz){if(by===e){return bz}var bA=by.nextSibling;while(bA){if(bA===e){return -1}bA=bA.nextSibling}return 1}}bh.getText=function(e){var by="",bA;for(var bz=0;e[bz];bz++){bA=e[bz];if(bA.nodeType===3||bA.nodeType===4){by+=bA.nodeValue}else{if(bA.nodeType!==8){by+=bh.getText(bA.childNodes)}}}return by};(function(){var by=am.createElement("div"),bz="script"+(new Date()).getTime(),e=am.documentElement;by.innerHTML="<a name='"+bz+"'/>";e.insertBefore(by,e.firstChild);if(am.getElementById(bz)){bm.find.ID=function(bB,bC,bD){if(typeof bC.getElementById!=="undefined"&&!bD){var bA=bC.getElementById(bB[1]);return bA?bA.id===bB[1]||typeof bA.getAttributeNode!=="undefined"&&bA.getAttributeNode("id").nodeValue===bB[1]?[bA]:I:[]}};bm.filter.ID=function(bC,bA){var bB=typeof bC.getAttributeNode!=="undefined"&&bC.getAttributeNode("id");return bC.nodeType===1&&bB&&bB.nodeValue===bA}}e.removeChild(by);e=by=null})();(function(){var e=am.createElement("div");e.appendChild(am.createComment(""));if(e.getElementsByTagName("*").length>0){bm.find.TAG=function(by,bC){var bB=bC.getElementsByTagName(by[1]);if(by[1]==="*"){var bA=[];for(var bz=0;bB[bz];bz++){if(bB[bz].nodeType===1){bA.push(bB[bz])}}bB=bA}return bB}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bm.attrHandle.href=function(by){return by.getAttribute("href",2)}}e=null})();if(am.querySelectorAll){(function(){var e=bh,bA=am.createElement("div"),bz="__sizzle__";bA.innerHTML="<p class='TEST'></p>";if(bA.querySelectorAll&&bA.querySelectorAll(".TEST").length===0){return}bh=function(bL,bC,bG,bK){bC=bC||am;if(!bK&&!bh.isXML(bC)){var bJ=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(bL);if(bJ&&(bC.nodeType===1||bC.nodeType===9)){if(bJ[1]){return bn(bC.getElementsByTagName(bL),bG)}else{if(bJ[2]&&bm.find.CLASS&&bC.getElementsByClassName){return bn(bC.getElementsByClassName(bJ[2]),bG)}}}if(bC.nodeType===9){if(bL==="body"&&bC.body){return bn([bC.body],bG)}else{if(bJ&&bJ[3]){var bF=bC.getElementById(bJ[3]);if(bF&&bF.parentNode){if(bF.id===bJ[3]){return bn([bF],bG)}}else{return bn([],bG)}}}try{return bn(bC.querySelectorAll(bL),bG)}catch(bH){}}else{if(bC.nodeType===1&&bC.nodeName.toLowerCase()!=="object"){var bD=bC,bE=bC.getAttribute("id"),bB=bE||bz,bN=bC.parentNode,bM=/^\s*[+~]/.test(bL);if(!bE){bC.setAttribute("id",bB)}else{bB=bB.replace(/'/g,"\\$&")}if(bM&&bN){bC=bC.parentNode}try{if(!bM||bN){return bn(bC.querySelectorAll("[id='"+bB+"'] "+bL),bG)}}catch(bI){}finally{if(!bE){bD.removeAttribute("id")}}}}}return e(bL,bC,bG,bK)};for(var by in e){bh[by]=e[by]}bA=null})()}(function(){var e=am.documentElement,bz=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bz){var bB=!bz.call(am.createElement("div"),"div"),by=false;try{bz.call(am.documentElement,"[test!='']:sizzle")}catch(bA){by=true}bh.matchesSelector=function(bD,bF){bF=bF.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bh.isXML(bD)){try{if(by||!bm.match.PSEUDO.test(bF)&&!/!=/.test(bF)){var bC=bz.call(bD,bF);if(bC||!bB||bD.document&&bD.document.nodeType!==11){return bC}}}catch(bE){}}return bh(bF,null,null,[bD]).length>0}}})();(function(){var e=am.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bm.order.splice(1,0,"CLASS");bm.find.CLASS=function(by,bz,bA){if(typeof bz.getElementsByClassName!=="undefined"&&!bA){return bz.getElementsByClassName(by[1])}};e=null})();function bf(by,bD,bC,bG,bE,bF){for(var bA=0,bz=bG.length;bA<bz;bA++){var e=bG[bA];if(e){var bB=false;e=e[by];while(e){if(e.sizcache===bC){bB=bG[e.sizset];break}if(e.nodeType===1&&!bF){e.sizcache=bC;e.sizset=bA}if(e.nodeName.toLowerCase()===bD){bB=e;break}e=e[by]}bG[bA]=bB}}}function bv(by,bD,bC,bG,bE,bF){for(var bA=0,bz=bG.length;bA<bz;bA++){var e=bG[bA];if(e){var bB=false;e=e[by];while(e){if(e.sizcache===bC){bB=bG[e.sizset];break}if(e.nodeType===1){if(!bF){e.sizcache=bC;e.sizset=bA}if(typeof bD!=="string"){if(e===bD){bB=true;break}}else{if(bh.filter(bD,[e]).length>0){bB=e;break}}}e=e[by]}bG[bA]=bB}}}if(am.documentElement.contains){bh.contains=function(by,e){return by!==e&&(by.contains?by.contains(e):true)}}else{if(am.documentElement.compareDocumentPosition){bh.contains=function(by,e){return !!(by.compareDocumentPosition(e)&16)}}else{bh.contains=function(){return false}}}bh.isXML=function(e){var by=(e?e.ownerDocument||e:0).documentElement;return by?by.nodeName!=="HTML":false};var bu=function(e,bE){var bC,bA=[],bB="",bz=bE.nodeType?[bE]:bE;while((bC=bm.match.PSEUDO.exec(e))){bB+=bC[0];e=e.replace(bm.match.PSEUDO,"")}e=bm.relative[e]?e+"*":e;for(var bD=0,by=bz.length;bD<by;bD++){bh(e,bz[bD],bA)}return bh.filter(bB,bA)};b.find=bh;b.expr=bh.selectors;b.expr[":"]=b.expr.filters;b.unique=bh.uniqueSort;b.text=bh.getText;b.isXMLDoc=bh.isXML;b.contains=bh.contains})();var X=/Until$/,aj=/^(?:parents|prevUntil|prevAll)/,aY=/,/,bb=/^.[^:#\[\.,]*$/,N=Array.prototype.slice,G=b.expr.match.POS,ap={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bg=this.pushStack("","find",e),bj=0;for(var bh=0,bf=this.length;bh<bf;bh++){bj=bg.length;b.find(e,this[bh],bg);if(bh>0){for(var bk=bj;bk<bg.length;bk++){for(var bi=0;bi<bj;bi++){if(bg[bi]===bg[bk]){bg.splice(bk--,1);break}}}}}return bg},has:function(bf){var e=b(bf);return this.filter(function(){for(var bh=0,bg=e.length;bh<bg;bh++){if(b.contains(this,e[bh])){return true}}})},not:function(e){return this.pushStack(aw(this,e,false),"not",e)},filter:function(e){return this.pushStack(aw(this,e,true),"filter",e)},is:function(e){return !!e&&b.filter(e,this).length>0},closest:function(bo,bf){var bl=[],bi,bg,bn=this[0];if(b.isArray(bo)){var bk,bh,bj={},e=1;if(bn&&bo.length){for(bi=0,bg=bo.length;bi<bg;bi++){bh=bo[bi];if(!bj[bh]){bj[bh]=b.expr.match.POS.test(bh)?b(bh,bf||this.context):bh}}while(bn&&bn.ownerDocument&&bn!==bf){for(bh in bj){bk=bj[bh];if(bk.jquery?bk.index(bn)>-1:b(bn).is(bk)){bl.push({selector:bh,elem:bn,level:e})}}bn=bn.parentNode;e++}}return bl}var bm=G.test(bo)?b(bo,bf||this.context):null;for(bi=0,bg=this.length;bi<bg;bi++){bn=this[bi];while(bn){if(bm?bm.index(bn)>-1:b.find.matchesSelector(bn,bo)){bl.push(bn);break}else{bn=bn.parentNode;if(!bn||!bn.ownerDocument||bn===bf){break}}}}bl=bl.length>1?b.unique(bl):bl;return this.pushStack(bl,"closest",bo)},index:function(e){if(!e||typeof e==="string"){return b.inArray(this[0],e?b(e):this.parent().children())}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bf){var bh=typeof e==="string"?b(e,bf):b.makeArray(e),bg=b.merge(this.get(),bh);return this.pushStack(C(bh[0])||C(bg[0])?bg:b.unique(bg))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bf){var e=bf.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bf,e,bg){return b.dir(bf,"parentNode",bg)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bf,e,bg){return b.dir(bf,"nextSibling",bg)},prevUntil:function(bf,e,bg){return b.dir(bf,"previousSibling",bg)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bf){b.fn[e]=function(bj,bg){var bi=b.map(this,bf,bj),bh=N.call(arguments);if(!X.test(e)){bg=bj}if(bg&&typeof bg==="string"){bi=b.filter(bg,bi)}bi=this.length>1&&!ap[e]?b.unique(bi):bi;if((this.length>1||aY.test(bg))&&aj.test(e)){bi=bi.reverse()}return this.pushStack(bi,e,bh.join(","))}});b.extend({filter:function(bg,e,bf){if(bf){bg=":not("+bg+")"}return e.length===1?b.find.matchesSelector(e[0],bg)?[e[0]]:[]:b.find.matches(bg,e)},dir:function(bg,bf,bi){var e=[],bh=bg[bf];while(bh&&bh.nodeType!==9&&(bi===I||bh.nodeType!==1||!b(bh).is(bi))){if(bh.nodeType===1){e.push(bh)}bh=bh[bf]}return e},nth:function(bi,e,bg,bh){e=e||1;var bf=0;for(;bi;bi=bi[bg]){if(bi.nodeType===1&&++bf===e){break}}return bi},sibling:function(bg,bf){var e=[];for(;bg;bg=bg.nextSibling){if(bg.nodeType===1&&bg!==bf){e.push(bg)}}return e}});function aw(bh,bg,e){if(b.isFunction(bg)){return b.grep(bh,function(bj,bi){var bk=!!bg.call(bj,bi,bj);return bk===e})}else{if(bg.nodeType){return b.grep(bh,function(bj,bi){return(bj===bg)===e})}else{if(typeof bg==="string"){var bf=b.grep(bh,function(bi){return bi.nodeType===1});if(bb.test(bg)){return b.filter(bg,bf,!e)}else{bg=b.filter(bg,bf)}}}}return b.grep(bh,function(bj,bi){return(b.inArray(bj,bg)>=0)===e})}var ac=/ jQuery\d+="(?:\d+|null)"/g,ak=/^\s+/,P=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/<tbody/i,U=/<|?\w+;/,M=/<(?:script|object|embed|option|style)/i,n=/checked\s*(?:[^=]|=\s*.checked.)/i,ao={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};ao.optgroup=ao.option;ao.tbody=ao.tfoot=ao.colgroup=ao.caption=ao.thead;ao.th=ao.td;if(!b.support.htmlSerialize){ao._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bg){var bf=b(this);bf.text(e.call(this,bg,bf.text()))})}if(typeof e!=="object"&&e!==I){return this.empty().append((this[0]&&this[0].ownerDocument||am).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bg){b(this).wrapAll(e.call(this,bg))})}if(this[0]){var bf=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bf.insertBefore(this[0])}bf.map(function(){var bg=this;while(bg.firstChild&&bg.firstChild.nodeType===1){bg=bg.firstChild}return bg}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bf){b(this).wrapInner(e.call(this,bf))})}return this.each(function(){var bf=b(this),bg=bf.contents();if(bg.length){bg.wrapAll(e)}else{bf.append(e)}})},wrap:function(e){return this.each(function(){b(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bf){this.parentNode.insertBefore(bf,this)})}else{if(arguments.length){var e=b(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bf){this.parentNode.insertBefore(bf,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b(arguments[0]).toArray());return e}}},remove:function(e,bh){for(var bf=0,bg;(bg=this[bf])!=null;bf++){if(!e||b.filter(e,[bg]).length){if(!bh&&bg.nodeType===1){b.cleanData(bg.getElementsByTagName("*"));b.cleanData([bg])}if(bg.parentNode){bg.parentNode.removeChild(bg)}}}return this},empty:function(){for(var e=0,bf;(bf=this[e])!=null;e++){if(bf.nodeType===1){b.cleanData(bf.getElementsByTagName("*"))}while(bf.firstChild){bf.removeChild(bf.firstChild)}}return this},clone:function(bf,e){bf=bf==null?false:bf;e=e==null?bf:e;return this.map(function(){return b.clone(this,bf,e)})},html:function(bh){if(bh===I){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ac,""):null}else{if(typeof bh==="string"&&!M.test(bh)&&(b.support.leadingWhitespace||!ak.test(bh))&&!ao[(d.exec(bh)||["",""])[1].toLowerCase()]){bh=bh.replace(P,"<$1></$2>");try{for(var bg=0,bf=this.length;bg<bf;bg++){if(this[bg].nodeType===1){b.cleanData(this[bg].getElementsByTagName("*"));this[bg].innerHTML=bh}}}catch(bi){this.empty().append(bh)}}else{if(b.isFunction(bh)){this.each(function(bj){var e=b(this);e.html(bh.call(this,bj,e.html()))})}else{this.empty().append(bh)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bh){var bg=b(this),bf=bg.html();bg.replaceWith(e.call(this,bh,bf))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bg=this.nextSibling,bf=this.parentNode;b(this).remove();if(bg){b(bg).before(e)}else{b(bf).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bl,bp,bo){var bh,bi,bk,bn,bm=bl[0],bf=[];if(!b.support.checkClone&&arguments.length===3&&typeof bm==="string"&&n.test(bm)){return this.each(function(){b(this).domManip(bl,bp,bo,true)})}if(b.isFunction(bm)){return this.each(function(br){var bq=b(this);bl[0]=bm.call(this,br,bp?bq.html():I);bq.domManip(bl,bp,bo)})}if(this[0]){bn=bm&&bm.parentNode;if(b.support.parentNode&&bn&&bn.nodeType===11&&bn.childNodes.length===this.length){bh={fragment:bn}}else{bh=b.buildFragment(bl,this,bf)}bk=bh.fragment;if(bk.childNodes.length===1){bi=bk=bk.firstChild}else{bi=bk.firstChild}if(bi){bp=bp&&b.nodeName(bi,"tr");for(var bg=0,e=this.length,bj=e-1;bg<e;bg++){bo.call(bp?aZ(this[bg],bi):this[bg],bh.cacheable||(e>1&&bg<bj)?b.clone(bk,true,true):bk)}}if(bf.length){b.each(bf,ba)}}return this}});function aZ(e,bf){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function t(e,bl){if(bl.nodeType!==1||!b.hasData(e)){return}var bk=b.expando,bh=b.data(e),bi=b.data(bl,bh);if((bh=bh[bk])){var bm=bh.events;bi=bi[bk]=b.extend({},bh);if(bm){delete bi.handle;bi.events={};for(var bj in bm){for(var bg=0,bf=bm[bj].length;bg<bf;bg++){b.event.add(bl,bj+(bm[bj][bg].namespace?".":"")+bm[bj][bg].namespace,bm[bj][bg],bm[bj][bg].data)}}}}}function ad(bf,e){if(e.nodeType!==1){return}var bg=e.nodeName.toLowerCase();e.clearAttributes();e.mergeAttributes(bf);if(bg==="object"){e.outerHTML=bf.outerHTML}else{if(bg==="input"&&(bf.type==="checkbox"||bf.type==="radio")){if(bf.checked){e.defaultChecked=e.checked=bf.checked}if(e.value!==bf.value){e.value=bf.value}}else{if(bg==="option"){e.selected=bf.defaultSelected}else{if(bg==="input"||bg==="textarea"){e.defaultValue=bf.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bj,bh,bf){var bi,e,bg,bk=(bh&&bh[0]?bh[0].ownerDocument||bh[0]:am);if(bj.length===1&&typeof bj[0]==="string"&&bj[0].length<512&&bk===am&&bj[0].charAt(0)==="<"&&!M.test(bj[0])&&(b.support.checkClone||!n.test(bj[0]))){e=true;bg=b.fragments[bj[0]];if(bg){if(bg!==1){bi=bg}}}if(!bi){bi=bk.createDocumentFragment();b.clean(bj,bk,bi,bf)}if(e){b.fragments[bj[0]]=bg?bi:1}return{fragment:bi,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bf){b.fn[e]=function(bg){var bj=[],bm=b(bg),bl=this.length===1&&this[0].parentNode;if(bl&&bl.nodeType===11&&bl.childNodes.length===1&&bm.length===1){bm[bf](this[0]);return this}else{for(var bk=0,bh=bm.length;bk<bh;bk++){var bi=(bk>0?this.clone(true):this).get();b(bm[bk])[bf](bi);bj=bj.concat(bi)}return this.pushStack(bj,e,bm.selector)}}});function a3(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")}else{if("querySelectorAll" in e){return e.querySelectorAll("*")}else{return[]}}}b.extend({clone:function(bi,bk,bg){var bj=bi.cloneNode(true),e,bf,bh;if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(bi.nodeType===1||bi.nodeType===11)&&!b.isXMLDoc(bi)){ad(bi,bj);e=a3(bi);bf=a3(bj);for(bh=0;e[bh];++bh){ad(e[bh],bf[bh])}}if(bk){t(bi,bj);if(bg){e=a3(bi);bf=a3(bj);for(bh=0;e[bh];++bh){t(e[bh],bf[bh])}}}return bj},clean:function(bg,bi,bp,bk){bi=bi||am;if(typeof bi.createElement==="undefined"){bi=bi.ownerDocument||bi[0]&&bi[0].ownerDocument||am}var bq=[];for(var bo=0,bj;(bj=bg[bo])!=null;bo++){if(typeof bj==="number"){bj+=""}if(!bj){continue}if(typeof bj==="string"&&!U.test(bj)){bj=bi.createTextNode(bj)}else{if(typeof bj==="string"){bj=bj.replace(P,"<$1></$2>");var br=(d.exec(bj)||["",""])[1].toLowerCase(),bh=ao[br]||ao._default,bn=bh[0],bf=bi.createElement("div");bf.innerHTML=bh[1]+bj+bh[2];while(bn--){bf=bf.lastChild}if(!b.support.tbody){var e=w.test(bj),bm=br==="table"&&!e?bf.firstChild&&bf.firstChild.childNodes:bh[1]==="<table>"&&!e?bf.childNodes:[];for(var bl=bm.length-1;bl>=0;--bl){if(b.nodeName(bm[bl],"tbody")&&!bm[bl].childNodes.length){bm[bl].parentNode.removeChild(bm[bl])}}}if(!b.support.leadingWhitespace&&ak.test(bj)){bf.insertBefore(bi.createTextNode(ak.exec(bj)[0]),bf.firstChild)}bj=bf.childNodes}}if(bj.nodeType){bq.push(bj)}else{bq=b.merge(bq,bj)}}if(bp){for(bo=0;bq[bo];bo++){if(bk&&b.nodeName(bq[bo],"script")&&(!bq[bo].type||bq[bo].type.toLowerCase()==="text/javascript")){bk.push(bq[bo].parentNode?bq[bo].parentNode.removeChild(bq[bo]):bq[bo])}else{if(bq[bo].nodeType===1){bq.splice.apply(bq,[bo+1,0].concat(b.makeArray(bq[bo].getElementsByTagName("script"))))}bp.appendChild(bq[bo])}}}return bq},cleanData:function(bf){var bi,bg,e=b.cache,bn=b.expando,bl=b.event.special,bk=b.support.deleteExpando;for(var bj=0,bh;(bh=bf[bj])!=null;bj++){if(bh.nodeName&&b.noData[bh.nodeName.toLowerCase()]){continue}bg=bh[b.expando];if(bg){bi=e[bg]&&e[bg][bn];if(bi&&bi.events){for(var bm in bi.events){if(bl[bm]){b.event.remove(bh,bm)}else{b.removeEvent(bh,bm,bi.handle)}}if(bi.handle){bi.handle.elem=null}}if(bk){delete bh[b.expando]}else{if(bh.removeAttribute){bh.removeAttribute(b.expando)}}delete e[bg]}}}});function ba(e,bf){if(bf.src){b.ajax({url:bf.src,async:false,dataType:"script"})}else{b.globalEval(bf.text||bf.textContent||bf.innerHTML||"")}if(bf.parentNode){bf.parentNode.removeChild(bf)}}var af=/alpha\([^)]*\)/i,al=/opacity=([^)]*)/,aO=/-([a-z])/ig,z=/([A-Z]|^ms)/g,a1=/^-?\d+(?:px)?$/i,a9=/^-?\d/,aX={position:"absolute",visibility:"hidden",display:"block"},ah=["Left","Right"],aT=["Top","Bottom"],V,az,aN,m=function(e,bf){return bf.toUpperCase()};b.fn.css=function(e,bf){if(arguments.length===2&&bf===I){return this}return b.access(this,e,bf,true,function(bh,bg,bi){return bi!==I?b.style(bh,bg,bi):b.css(bh,bg)})};b.extend({cssHooks:{opacity:{get:function(bg,bf){if(bf){var e=V(bg,"opacity","opacity");return e===""?"1":e}else{return bg.style.opacity}}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bh,bg,bm,bi){if(!bh||bh.nodeType===3||bh.nodeType===8||!bh.style){return}var bl,bj=b.camelCase(bg),bf=bh.style,bn=b.cssHooks[bj];bg=b.cssProps[bj]||bj;if(bm!==I){if(typeof bm==="number"&&isNaN(bm)||bm==null){return}if(typeof bm==="number"&&!b.cssNumber[bj]){bm+="px"}if(!bn||!("set" in bn)||(bm=bn.set(bh,bm))!==I){try{bf[bg]=bm}catch(bk){}}}else{if(bn&&"get" in bn&&(bl=bn.get(bh,false,bi))!==I){return bl}return bf[bg]}},css:function(bj,bi,bf){var bh,bg=b.camelCase(bi),e=b.cssHooks[bg];bi=b.cssProps[bg]||bg;if(e&&"get" in e&&(bh=e.get(bj,true,bf))!==I){return bh}else{if(V){return V(bj,bi,bg)}}},swap:function(bh,bg,bi){var e={};for(var bf in bg){e[bf]=bh.style[bf];bh.style[bf]=bg[bf]}bi.call(bh);for(bf in bg){bh.style[bf]=e[bf]}},camelCase:function(e){return e.replace(aO,m)}});b.curCSS=b.css;b.each(["height","width"],function(bf,e){b.cssHooks[e]={get:function(bi,bh,bg){var bj;if(bh){if(bi.offsetWidth!==0){bj=p(bi,e,bg)}else{b.swap(bi,aX,function(){bj=p(bi,e,bg)})}if(bj<=0){bj=V(bi,e,e);if(bj==="0px"&&aN){bj=aN(bi,e,e)}if(bj!=null){return bj===""||bj==="auto"?"0px":bj}}if(bj<0||bj==null){bj=bi.style[e];return bj===""||bj==="auto"?"0px":bj}return typeof bj==="string"?bj:bj+"px"}},set:function(bg,bh){if(a1.test(bh)){bh=parseFloat(bh);if(bh>=0){return bh+"px"}}else{return bh}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bf,e){return al.test((e&&bf.currentStyle?bf.currentStyle.filter:bf.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(bh,bi){var bg=bh.style;bg.zoom=1;var e=b.isNaN(bi)?"":"alpha(opacity="+bi*100+")",bf=bg.filter||"";bg.filter=af.test(bf)?bf.replace(af,e):bg.filter+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bg,bf){var e;b.swap(bg,{display:"inline-block"},function(){if(bf){e=V(bg,"margin-right","marginRight")}else{e=bg.style.marginRight}});return e}}}});if(am.defaultView&&am.defaultView.getComputedStyle){az=function(bj,e,bh){var bg,bi,bf;bh=bh.replace(z,"-$1").toLowerCase();if(!(bi=bj.ownerDocument.defaultView)){return I}if((bf=bi.getComputedStyle(bj,null))){bg=bf.getPropertyValue(bh);if(bg===""&&!b.contains(bj.ownerDocument.documentElement,bj)){bg=b.style(bj,bh)}}return bg}}if(am.documentElement.currentStyle){aN=function(bi,bg){var bj,bf=bi.currentStyle&&bi.currentStyle[bg],e=bi.runtimeStyle&&bi.runtimeStyle[bg],bh=bi.style;if(!a1.test(bf)&&a9.test(bf)){bj=bh.left;if(e){bi.runtimeStyle.left=bi.currentStyle.left}bh.left=bg==="fontSize"?"1em":(bf||0);bf=bh.pixelLeft+"px";bh.left=bj;if(e){bi.runtimeStyle.left=e}}return bf===""?"auto":bf}}V=az||aN;function p(bg,bf,e){var bi=bf==="width"?ah:aT,bh=bf==="width"?bg.offsetWidth:bg.offsetHeight;if(e==="border"){return bh}b.each(bi,function(){if(!e){bh-=parseFloat(b.css(bg,"padding"+this))||0}if(e==="margin"){bh+=parseFloat(b.css(bg,"margin"+this))||0}else{bh-=parseFloat(b.css(bg,"border"+this+"Width"))||0}});return bh}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bg){var bf=bg.offsetWidth,e=bg.offsetHeight;return(bf===0&&e===0)||(!b.support.reliableHiddenOffsets&&(bg.style.display||b.css(bg,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var j=/%20/g,ai=/\[\]$/,be=/\r?\n/g,bc=/#.*$/,at=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aQ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aD=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,aF=/^(?:GET|HEAD)$/,c=/^\/\//,J=/\?/,aW=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,bd=/([?&])_=[^&]*/,S=/(^|\-)([a-z])/g,aL=function(bf,e,bg){return e+bg.toUpperCase()},H=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,W={},r={},av,s;try{av=am.location.href}catch(an){av=am.createElement("a");av.href="";av=av.href}s=H.exec(av.toLowerCase())||[];function f(e){return function(bi,bk){if(typeof bi!=="string"){bk=bi;bi="*"}if(b.isFunction(bk)){var bh=bi.toLowerCase().split(h),bg=0,bj=bh.length,bf,bl,bm;for(;bg<bj;bg++){bf=bh[bg];bm=/^\+/.test(bf);if(bm){bf=bf.substr(1)||"*"}bl=e[bf]=e[bf]||[];bl[bm?"unshift":"push"](bk)}}}}function aK(bf,bo,bj,bn,bl,bh){bl=bl||bo.dataTypes[0];bh=bh||{};bh[bl]=true;var bk=bf[bl],bg=0,e=bk?bk.length:0,bi=(bf===W),bm;for(;bg<e&&(bi||!bm);bg++){bm=bk[bg](bo,bj,bn);if(typeof bm==="string"){if(!bi||bh[bm]){bm=I}else{bo.dataTypes.unshift(bm);bm=aK(bf,bo,bj,bn,bm,bh)}}}if((bi||!bm)&&!bh["*"]){bm=aK(bf,bo,bj,bn,"*",bh)}return bm}b.fn.extend({load:function(bg,bj,bk){if(typeof bg!=="string"&&A){return A.apply(this,arguments)}else{if(!this.length){return this}}var bi=bg.indexOf(" ");if(bi>=0){var e=bg.slice(bi,bg.length);bg=bg.slice(0,bi)}var bh="GET";if(bj){if(b.isFunction(bj)){bk=bj;bj=I}else{if(typeof bj==="object"){bj=b.param(bj,b.ajaxSettings.traditional);bh="POST"}}}var bf=this;b.ajax({url:bg,type:bh,dataType:"html",data:bj,complete:function(bm,bl,bn){bn=bm.responseText;if(bm.isResolved()){bm.done(function(bo){bn=bo});bf.html(e?b("<div>").append(bn.replace(aW,"")).find(e):bn)}if(bk){bf.each(bk,[bn,bl,bm])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aQ.test(this.type))}).map(function(e,bf){var bg=b(this).val();return bg==null?null:b.isArray(bg)?b.map(bg,function(bi,bh){return{name:bf.name,value:bi.replace(be,"\r\n")}}):{name:bf.name,value:bg.replace(be,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bf){b.fn[bf]=function(bg){return this.bind(bf,bg)}});b.each(["get","post"],function(e,bf){b[bf]=function(bg,bi,bj,bh){if(b.isFunction(bi)){bh=bh||bj;bj=bi;bi=I}return b.ajax({type:bf,url:bg,data:bi,success:bj,dataType:bh})}});b.extend({getScript:function(e,bf){return b.get(e,I,bf,"script")},getJSON:function(e,bf,bg){return b.get(e,bf,bg,"json")},ajaxSetup:function(bg,e){if(!e){e=bg;bg=b.extend(true,b.ajaxSettings,e)}else{b.extend(true,bg,b.ajaxSettings,e)}for(var bf in {context:1,url:1}){if(bf in e){bg[bf]=e[bf]}else{if(bf in b.ajaxSettings){bg[bf]=b.ajaxSettings[bf]}}}return bg},ajaxSettings:{url:av,isLocal:aD.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a0.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML}},ajaxPrefilter:f(W),ajaxTransport:f(r),ajax:function(bj,bh){if(typeof bj==="object"){bh=bj;bj=I}bh=bh||{};var bn=b.ajaxSetup({},bh),bB=bn.context||bn,bq=bB!==bn&&(bB.nodeType||bB instanceof b)?b(bB):b.event,bA=b.Deferred(),bx=b._Deferred(),bl=bn.statusCode||{},bm,br={},bz,bi,bv,bo,bs,bk=0,bg,bu,bt={readyState:0,setRequestHeader:function(e,bC){if(!bk){br[e.toLowerCase().replace(S,aL)]=bC}return this},getAllResponseHeaders:function(){return bk===2?bz:null},getResponseHeader:function(bC){var e;if(bk===2){if(!bi){bi={};while((e=at.exec(bz))){bi[e[1].toLowerCase()]=e[2]}}e=bi[bC.toLowerCase()]}return e===I?null:e},overrideMimeType:function(e){if(!bk){bn.mimeType=e}return this},abort:function(e){e=e||"abort";if(bv){bv.abort(e)}bp(0,e);return this}};function bp(bH,bF,bI,bE){if(bk===2){return}bk=2;if(bo){clearTimeout(bo)}bv=I;bz=bE||"";bt.readyState=bH?4:0;var bC,bM,bL,bG=bI?a6(bn,bt,bI):I,bD,bK;if(bH>=200&&bH<300||bH===304){if(bn.ifModified){if((bD=bt.getResponseHeader("Last-Modified"))){b.lastModified[bm]=bD}if((bK=bt.getResponseHeader("Etag"))){b.etag[bm]=bK}}if(bH===304){bF="notmodified";bC=true}else{try{bM=E(bn,bG);bF="success";bC=true}catch(bJ){bF="parsererror";bL=bJ}}}else{bL=bF;if(!bF||bH){bF="error";if(bH<0){bH=0}}}bt.status=bH;bt.statusText=bF;if(bC){bA.resolveWith(bB,[bM,bF,bt])}else{bA.rejectWith(bB,[bt,bF,bL])}bt.statusCode(bl);bl=I;if(bg){bq.trigger("ajax"+(bC?"Success":"Error"),[bt,bn,bC?bM:bL])}bx.resolveWith(bB,[bt,bF]);if(bg){bq.trigger("ajaxComplete",[bt,bn]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bA.promise(bt);bt.success=bt.done;bt.error=bt.fail;bt.complete=bx.done;bt.statusCode=function(bC){if(bC){var e;if(bk<2){for(e in bC){bl[e]=[bl[e],bC[e]]}}else{e=bC[bt.status];bt.then(e,e)}}return this};bn.url=((bj||bn.url)+"").replace(bc,"").replace(c,s[1]+"//");bn.dataTypes=b.trim(bn.dataType||"*").toLowerCase().split(h);if(bn.crossDomain==null){bs=H.exec(bn.url.toLowerCase());bn.crossDomain=!!(bs&&(bs[1]!=s[1]||bs[2]!=s[2]||(bs[3]||(bs[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bn.data&&bn.processData&&typeof bn.data!=="string"){bn.data=b.param(bn.data,bn.traditional)}aK(W,bn,bh,bt);if(bk===2){return false}bg=bn.global;bn.type=bn.type.toUpperCase();bn.hasContent=!aF.test(bn.type);if(bg&&b.active++===0){b.event.trigger("ajaxStart")}if(!bn.hasContent){if(bn.data){bn.url+=(J.test(bn.url)?"&":"?")+bn.data}bm=bn.url;if(bn.cache===false){var bf=b.now(),by=bn.url.replace(bd,"$1_="+bf);bn.url=by+((by===bn.url)?(J.test(bn.url)?"&":"?")+"_="+bf:"")}}if(bn.data&&bn.hasContent&&bn.contentType!==false||bh.contentType){br["Content-Type"]=bn.contentType}if(bn.ifModified){bm=bm||bn.url;if(b.lastModified[bm]){br["If-Modified-Since"]=b.lastModified[bm]}if(b.etag[bm]){br["If-None-Match"]=b.etag[bm]}}br.Accept=bn.dataTypes[0]&&bn.accepts[bn.dataTypes[0]]?bn.accepts[bn.dataTypes[0]]+(bn.dataTypes[0]!=="*"?", */*; q=0.01":""):bn.accepts["*"];for(bu in bn.headers){bt.setRequestHeader(bu,bn.headers[bu])}if(bn.beforeSend&&(bn.beforeSend.call(bB,bt,bn)===false||bk===2)){bt.abort();return false}for(bu in {success:1,error:1,complete:1}){bt[bu](bn[bu])}bv=aK(r,bn,bh,bt);if(!bv){bp(-1,"No Transport")}else{bt.readyState=1;if(bg){bq.trigger("ajaxSend",[bt,bn])}if(bn.async&&bn.timeout>0){bo=setTimeout(function(){bt.abort("timeout")},bn.timeout)}try{bk=1;bv.send(br,bp)}catch(bw){if(status<2){bp(-1,bw)}else{b.error(bw)}}}return bt},param:function(e,bg){var bf=[],bi=function(bj,bk){bk=b.isFunction(bk)?bk():bk;bf[bf.length]=encodeURIComponent(bj)+"="+encodeURIComponent(bk)};if(bg===I){bg=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){bi(this.name,this.value)})}else{for(var bh in e){v(bh,e[bh],bg,bi)}}return bf.join("&").replace(j,"+")}});function v(bg,bi,bf,bh){if(b.isArray(bi)&&bi.length){b.each(bi,function(bk,bj){if(bf||ai.test(bg)){bh(bg,bj)}else{v(bg+"["+(typeof bj==="object"||b.isArray(bj)?bk:"")+"]",bj,bf,bh)}})}else{if(!bf&&bi!=null&&typeof bi==="object"){if(b.isArray(bi)||b.isEmptyObject(bi)){bh(bg,"")}else{for(var e in bi){v(bg+"["+e+"]",bi[e],bf,bh)}}}else{bh(bg,bi)}}}b.extend({active:0,lastModified:{},etag:{}});function a6(bn,bm,bj){var bf=bn.contents,bl=bn.dataTypes,bg=bn.responseFields,bi,bk,bh,e;for(bk in bg){if(bk in bj){bm[bg[bk]]=bj[bk]}}while(bl[0]==="*"){bl.shift();if(bi===I){bi=bn.mimeType||bm.getResponseHeader("content-type")}}if(bi){for(bk in bf){if(bf[bk]&&bf[bk].test(bi)){bl.unshift(bk);break}}}if(bl[0] in bj){bh=bl[0]}else{for(bk in bj){if(!bl[0]||bn.converters[bk+" "+bl[0]]){bh=bk;break}if(!e){e=bk}}bh=bh||e}if(bh){if(bh!==bl[0]){bl.unshift(bh)}return bj[bh]}}function E(br,bj){if(br.dataFilter){bj=br.dataFilter(bj,br.dataType)}var bn=br.dataTypes,bq={},bk,bo,bg=bn.length,bl,bm=bn[0],bh,bi,bp,bf,e;for(bk=1;bk<bg;bk++){if(bk===1){for(bo in br.converters){if(typeof bo==="string"){bq[bo.toLowerCase()]=br.converters[bo]}}}bh=bm;bm=bn[bk];if(bm==="*"){bm=bh}else{if(bh!=="*"&&bh!==bm){bi=bh+" "+bm;bp=bq[bi]||bq["* "+bm];if(!bp){e=I;for(bf in bq){bl=bf.split(" ");if(bl[0]===bh||bl[0]==="*"){e=bq[bl[1]+" "+bm];if(e){bf=bq[bf];if(bf===true){bp=e}else{if(e===true){bp=bf}}break}}}}if(!(bp||e)){b.error("No conversion from "+bi.replace(" "," to "))}if(bp!==true){bj=bp?bp(bj):e(bf(bj))}}}}return bj}var ar=b.now(),u=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(ar++)}});b.ajaxPrefilter("json jsonp",function(bo,bk,bn){var bm=(typeof bo.data==="string");if(bo.dataTypes[0]==="jsonp"||bk.jsonpCallback||bk.jsonp!=null||bo.jsonp!==false&&(u.test(bo.url)||bm&&u.test(bo.data))){var bl,bg=bo.jsonpCallback=b.isFunction(bo.jsonpCallback)?bo.jsonpCallback():bo.jsonpCallback,bj=a0[bg],e=bo.url,bi=bo.data,bf="$1"+bg+"$2",bh=function(){a0[bg]=bj;if(bl&&b.isFunction(bj)){a0[bg](bl[0])}};if(bo.jsonp!==false){e=e.replace(u,bf);if(bo.url===e){if(bm){bi=bi.replace(u,bf)}if(bo.data===bi){e+=(/\?/.test(e)?"&":"?")+bo.jsonp+"="+bg}}}bo.url=e;bo.data=bi;a0[bg]=function(bp){bl=[bp]};bn.then(bh,bh);bo.converters["script json"]=function(){if(!bl){b.error(bg+" was not called")}return bl[0]};bo.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===I){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bg){if(bg.crossDomain){var e,bf=am.head||am.getElementsByTagName("head")[0]||am.documentElement;return{send:function(bh,bi){e=am.createElement("script");e.async="async";if(bg.scriptCharset){e.charset=bg.scriptCharset}e.src=bg.url;e.onload=e.onreadystatechange=function(bk,bj){if(!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bf&&e.parentNode){bf.removeChild(e)}e=I;if(!bj){bi(200,"success")}}};bf.insertBefore(e,bf.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var y=b.now(),K,au;function B(){b(a0).unload(function(){for(var e in K){K[e](0,1)}})}function aC(){try{return new a0.XMLHttpRequest()}catch(bf){}}function ae(){try{return new a0.ActiveXObject("Microsoft.XMLHTTP")}catch(bf){}}b.ajaxSettings.xhr=a0.ActiveXObject?function(){return !this.isLocal&&aC()||ae()}:aC;au=b.ajaxSettings.xhr();b.support.ajax=!!au;b.support.cors=au&&("withCredentials" in au);au=I;if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var bf;return{send:function(bl,bg){var bk=e.xhr(),bj,bi;if(e.username){bk.open(e.type,e.url,e.async,e.username,e.password)}else{bk.open(e.type,e.url,e.async)}if(e.xhrFields){for(bi in e.xhrFields){bk[bi]=e.xhrFields[bi]}}if(e.mimeType&&bk.overrideMimeType){bk.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bl["X-Requested-With"]){bl["X-Requested-With"]="XMLHttpRequest"}try{for(bi in bl){bk.setRequestHeader(bi,bl[bi])}}catch(bh){}bk.send((e.hasContent&&e.data)||null);bf=function(bu,bo){var bp,bn,bm,bs,br;try{if(bf&&(bo||bk.readyState===4)){bf=I;if(bj){bk.onreadystatechange=b.noop;delete K[bj]}if(bo){if(bk.readyState!==4){bk.abort()}}else{bp=bk.status;bm=bk.getAllResponseHeaders();bs={};br=bk.responseXML;if(br&&br.documentElement){bs.xml=br}bs.text=bk.responseText;try{bn=bk.statusText}catch(bt){bn=""}if(!bp&&e.isLocal&&!e.crossDomain){bp=bs.text?200:404}else{if(bp===1223){bp=204}}}}}catch(bq){if(!bo){bg(-1,bq)}}if(bs){bg(bp,bn,bs,bm)}};if(!e.async||bk.readyState===4){bf()}else{if(!K){K={};B()}bj=y++;bk.onreadystatechange=K[bj]=bf}},abort:function(){if(bf){bf(0,1)}}}}})}var O={},aq=/^(?:toggle|show|hide)$/,aH=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,aU,ay=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];b.fn.extend({show:function(bh,bk,bj){var bg,bi;if(bh||bh===0){return this.animate(aS("show",3),bh,bk,bj)}else{for(var bf=0,e=this.length;bf<e;bf++){bg=this[bf];bi=bg.style.display;if(!b._data(bg,"olddisplay")&&bi==="none"){bi=bg.style.display=""}if(bi===""&&b.css(bg,"display")==="none"){b._data(bg,"olddisplay",x(bg.nodeName))}}for(bf=0;bf<e;bf++){bg=this[bf];bi=bg.style.display;if(bi===""||bi==="none"){bg.style.display=b._data(bg,"olddisplay")||""}}return this}},hide:function(bg,bj,bi){if(bg||bg===0){return this.animate(aS("hide",3),bg,bj,bi)}else{for(var bf=0,e=this.length;bf<e;bf++){var bh=b.css(this[bf],"display");if(bh!=="none"&&!b._data(this[bf],"olddisplay")){b._data(this[bf],"olddisplay",bh)}}for(bf=0;bf<e;bf++){this[bf].style.display="none"}return this}},_toggle:b.fn.toggle,toggle:function(bg,bf,bh){var e=typeof bg==="boolean";if(b.isFunction(bg)&&b.isFunction(bf)){this._toggle.apply(this,arguments)}else{if(bg==null||e){this.each(function(){var bi=e?bg:b(this).is(":hidden");b(this)[bi?"show":"hide"]()})}else{this.animate(aS("toggle",3),bg,bf,bh)}}return this},fadeTo:function(e,bh,bg,bf){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bh},e,bg,bf)},animate:function(bi,bf,bh,bg){var e=b.speed(bf,bh,bg);if(b.isEmptyObject(bi)){return this.each(e.complete)}return this[e.queue===false?"each":"queue"](function(){var bl=b.extend({},e),bp,bm=this.nodeType===1,bn=bm&&b(this).is(":hidden"),bj=this;for(bp in bi){var bk=b.camelCase(bp);if(bp!==bk){bi[bk]=bi[bp];delete bi[bp];bp=bk}if(bi[bp]==="hide"&&bn||bi[bp]==="show"&&!bn){return bl.complete.call(this)}if(bm&&(bp==="height"||bp==="width")){bl.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout){this.style.display="inline-block"}else{var bo=x(this.nodeName);if(bo==="inline"){this.style.display="inline-block"}else{this.style.display="inline";this.style.zoom=1}}}}if(b.isArray(bi[bp])){(bl.specialEasing=bl.specialEasing||{})[bp]=bi[bp][1];bi[bp]=bi[bp][0]}}if(bl.overflow!=null){this.style.overflow="hidden"}bl.curAnim=b.extend({},bi);b.each(bi,function(br,bv){var bu=new b.fx(bj,bl,br);if(aq.test(bv)){bu[bv==="toggle"?bn?"show":"hide":bv](bi)}else{var bt=aH.exec(bv),bw=bu.cur();if(bt){var bq=parseFloat(bt[2]),bs=bt[3]||(b.cssNumber[br]?"":"px");if(bs!=="px"){b.style(bj,br,(bq||1)+bs);bw=((bq||1)/bu.cur())*bw;b.style(bj,br,bw+bs)}if(bt[1]){bq=((bt[1]==="-="?-1:1)*bq)+bw}bu.custom(bw,bq,bs)}else{bu.custom(bw,bv,"")}}});return true})},stop:function(bf,e){var bg=b.timers;if(bf){this.queue([])}this.each(function(){for(var bh=bg.length-1;bh>=0;bh--){if(bg[bh].elem===this){if(e){bg[bh](true)}bg.splice(bh,1)}}});if(!e){this.dequeue()}return this}});function aS(bf,e){var bg={};b.each(ay.concat.apply([],ay.slice(0,e)),function(){bg[this]=bf});return bg}b.each({slideDown:aS("show",1),slideUp:aS("hide",1),slideToggle:aS("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bf){b.fn[e]=function(bg,bi,bh){return this.animate(bf,bg,bi,bh)}});b.extend({speed:function(bg,bh,bf){var e=bg&&typeof bg==="object"?b.extend({},bg):{complete:bf||!bf&&bh||b.isFunction(bg)&&bg,duration:bg,easing:bf&&bh||bh&&!b.isFunction(bh)&&bh};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;e.old=e.complete;e.complete=function(){if(e.queue!==false){b(this).dequeue()}if(b.isFunction(e.old)){e.old.call(this)}};return e},easing:{linear:function(bg,bh,e,bf){return e+bf*bg},swing:function(bg,bh,e,bf){return((-Math.cos(bg*Math.PI)/2)+0.5)*bf+e}},timers:[],fx:function(bf,e,bg){this.options=e;this.elem=bf;this.prop=bg;if(!e.orig){e.orig={}}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.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 e,bf=b.css(this.elem,this.prop);return isNaN(e=parseFloat(bf))?!bf||bf==="auto"?0:bf:e},custom:function(bj,bi,bh){var e=this,bg=b.fx;this.startTime=b.now();this.start=bj;this.end=bi;this.unit=bh||this.unit||(b.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;function bf(bk){return e.step(bk)}bf.elem=this.elem;if(bf()&&b.timers.push(bf)&&!aU){aU=setInterval(bg.tick,bg.interval)}},show:function(){this.options.orig[this.prop]=b.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(bh){var bm=b.now(),bi=true;if(bh||bm>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var bj in this.options.curAnim){if(this.options.curAnim[bj]!==true){bi=false}}if(bi){if(this.options.overflow!=null&&!b.support.shrinkWrapBlocks){var bg=this.elem,bn=this.options;b.each(["","X","Y"],function(bo,bp){bg.style["overflow"+bp]=bn.overflow[bo]})}if(this.options.hide){b(this.elem).hide()}if(this.options.hide||this.options.show){for(var e in this.options.curAnim){b.style(this.elem,e,this.options.orig[e])}}this.options.complete.call(this.elem)}return false}else{var bf=bm-this.startTime;this.state=bf/this.options.duration;var bk=this.options.specialEasing&&this.options.specialEasing[this.prop];var bl=this.options.easing||(b.easing.swing?"swing":"linear");this.pos=b.easing[bk||bl](this.state,bf,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};b.extend(b.fx,{tick:function(){var bf=b.timers;for(var e=0;e<bf.length;e++){if(!bf[e]()){bf.splice(e--,1)}}if(!bf.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(aU);aU=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=(e.prop==="width"||e.prop==="height"?Math.max(0,e.now):e.now)+e.unit}else{e.elem[e.prop]=e.now}}}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(bf){return e===bf.elem}).length}}function x(bg){if(!O[bg]){var e=b("<"+bg+">").appendTo("body"),bf=e.css("display");e.remove();if(bf==="none"||bf===""){bf="block"}O[bg]=bf}return O[bg]}var T=/^t(?:able|d|h)$/i,Z=/^(?:body|html)$/i;if("getBoundingClientRect" in am.documentElement){b.fn.offset=function(bs){var bi=this[0],bl;if(bs){return this.each(function(e){b.offset.setOffset(this,bs,e)})}if(!bi||!bi.ownerDocument){return null}if(bi===bi.ownerDocument.body){return b.offset.bodyOffset(bi)}try{bl=bi.getBoundingClientRect()}catch(bp){}var br=bi.ownerDocument,bg=br.documentElement;if(!bl||!b.contains(bg,bi)){return bl?{top:bl.top,left:bl.left}:{top:0,left:0}}var bm=br.body,bn=aB(br),bk=bg.clientTop||bm.clientTop||0,bo=bg.clientLeft||bm.clientLeft||0,bf=bn.pageYOffset||b.support.boxModel&&bg.scrollTop||bm.scrollTop,bj=bn.pageXOffset||b.support.boxModel&&bg.scrollLeft||bm.scrollLeft,bq=bl.top+bf-bk,bh=bl.left+bj-bo;return{top:bq,left:bh}}}else{b.fn.offset=function(bp){var bj=this[0];if(bp){return this.each(function(bq){b.offset.setOffset(this,bp,bq)})}if(!bj||!bj.ownerDocument){return null}if(bj===bj.ownerDocument.body){return b.offset.bodyOffset(bj)}b.offset.initialize();var bm,bg=bj.offsetParent,bf=bj,bo=bj.ownerDocument,bh=bo.documentElement,bk=bo.body,bl=bo.defaultView,e=bl?bl.getComputedStyle(bj,null):bj.currentStyle,bn=bj.offsetTop,bi=bj.offsetLeft;while((bj=bj.parentNode)&&bj!==bk&&bj!==bh){if(b.offset.supportsFixedPosition&&e.position==="fixed"){break}bm=bl?bl.getComputedStyle(bj,null):bj.currentStyle;bn-=bj.scrollTop;bi-=bj.scrollLeft;if(bj===bg){bn+=bj.offsetTop;bi+=bj.offsetLeft;if(b.offset.doesNotAddBorder&&!(b.offset.doesAddBorderForTableAndCells&&T.test(bj.nodeName))){bn+=parseFloat(bm.borderTopWidth)||0;bi+=parseFloat(bm.borderLeftWidth)||0}bf=bg;bg=bj.offsetParent}if(b.offset.subtractsBorderForOverflowNotVisible&&bm.overflow!=="visible"){bn+=parseFloat(bm.borderTopWidth)||0;bi+=parseFloat(bm.borderLeftWidth)||0}e=bm}if(e.position==="relative"||e.position==="static"){bn+=bk.offsetTop;bi+=bk.offsetLeft}if(b.offset.supportsFixedPosition&&e.position==="fixed"){bn+=Math.max(bh.scrollTop,bk.scrollTop);bi+=Math.max(bh.scrollLeft,bk.scrollLeft)}return{top:bn,left:bi}}}b.offset={initialize:function(){var e=am.body,bf=am.createElement("div"),bi,bk,bj,bl,bg=parseFloat(b.css(e,"marginTop"))||0,bh="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";b.extend(bf.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});bf.innerHTML=bh;e.insertBefore(bf,e.firstChild);bi=bf.firstChild;bk=bi.firstChild;bl=bi.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(bk.offsetTop!==5);this.doesAddBorderForTableAndCells=(bl.offsetTop===5);bk.style.position="fixed";bk.style.top="20px";this.supportsFixedPosition=(bk.offsetTop===20||bk.offsetTop===15);bk.style.position=bk.style.top="";bi.style.overflow="hidden";bi.style.position="relative";this.subtractsBorderForOverflowNotVisible=(bk.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==bg);e.removeChild(bf);b.offset.initialize=b.noop},bodyOffset:function(e){var bg=e.offsetTop,bf=e.offsetLeft;b.offset.initialize();if(b.offset.doesNotIncludeMarginInBodyOffset){bg+=parseFloat(b.css(e,"marginTop"))||0;bf+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bg,left:bf}},setOffset:function(bh,bq,bk){var bl=b.css(bh,"position");if(bl==="static"){bh.style.position="relative"}var bj=b(bh),bf=bj.offset(),e=b.css(bh,"top"),bo=b.css(bh,"left"),bp=(bl==="absolute"||bl==="fixed")&&b.inArray("auto",[e,bo])>-1,bn={},bm={},bg,bi;if(bp){bm=bj.position()}bg=bp?bm.top:parseInt(e,10)||0;bi=bp?bm.left:parseInt(bo,10)||0;if(b.isFunction(bq)){bq=bq.call(bh,bk,bf)}if(bq.top!=null){bn.top=(bq.top-bf.top)+bg}if(bq.left!=null){bn.left=(bq.left-bf.left)+bi}if("using" in bq){bq.using.call(bh,bn)}else{bj.css(bn)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bg=this[0],bf=this.offsetParent(),bh=this.offset(),e=Z.test(bf[0].nodeName)?{top:0,left:0}:bf.offset();bh.top-=parseFloat(b.css(bg,"marginTop"))||0;bh.left-=parseFloat(b.css(bg,"marginLeft"))||0;e.top+=parseFloat(b.css(bf[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bf[0],"borderLeftWidth"))||0;return{top:bh.top-e.top,left:bh.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||am.body;while(e&&(!Z.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bf,e){var bg="scroll"+e;b.fn[bg]=function(bj){var bh=this[0],bi;if(!bh){return null}if(bj!==I){return this.each(function(){bi=aB(this);if(bi){bi.scrollTo(!bf?bj:b(bi).scrollLeft(),bf?bj:b(bi).scrollTop())}else{this[bg]=bj}})}else{bi=aB(bh);return bi?("pageXOffset" in bi)?bi[bf?"pageYOffset":"pageXOffset"]:b.support.boxModel&&bi.document.documentElement[bg]||bi.document.body[bg]:bh[bg]}}});function aB(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bf,e){var bg=e.toLowerCase();b.fn["inner"+e]=function(){return this[0]?parseFloat(b.css(this[0],bg,"padding")):null};b.fn["outer"+e]=function(bh){return this[0]?parseFloat(b.css(this[0],bg,bh?"margin":"border")):null};b.fn[bg]=function(bi){var bj=this[0];if(!bj){return bi==null?null:this}if(b.isFunction(bi)){return this.each(function(bn){var bm=b(this);bm[bg](bi.call(this,bn,bm[bg]()))})}if(b.isWindow(bj)){var bk=bj.document.documentElement["client"+e];return bj.document.compatMode==="CSS1Compat"&&bk||bj.document.body["client"+e]||bk}else{if(bj.nodeType===9){return Math.max(bj.documentElement["client"+e],bj.body["scroll"+e],bj.documentElement["scroll"+e],bj.body["offset"+e],bj.documentElement["offset"+e])}else{if(bi===I){var bl=b.css(bj,bg),bh=parseFloat(bl);return b.isNaN(bh)?bl:bh}else{return this.css(bg,typeof bi==="string"?bi:bi+"px")}}}}});a0.jQuery=a0.$=b})(window); \ No newline at end of file --- a/static/scripts/packed/trackster.js Tue Apr 12 09:35:36 2011 -0400 +++ b/static/scripts/packed/trackster.js Tue Apr 12 12:10:48 2011 -0400 @@ -1,1 +1,1 @@ -var extend=function(){var c=arguments[0];for(var b=1;b<arguments.length;b++){var a=arguments[b];for(key in a){c[key]=a[key]}}return c};var trackster_module=function(f,Q){var o=f("slotting"),G=f("painters");var V=function(W,X){this.document=W;this.default_font=X!==undefined?X:"9px Monaco, Lucida Console, monospace";this.dummy_canvas=this.new_canvas();this.dummy_context=this.dummy_canvas.getContext("2d");this.dummy_context.font=this.default_font;this.char_width_px=this.dummy_context.measureText("A").width;this.patterns={};this.load_pattern("right_strand","/visualization/strand_right.png");this.load_pattern("left_strand","/visualization/strand_left.png");this.load_pattern("right_strand_inv","/visualization/strand_right_inv.png");this.load_pattern("left_strand_inv","/visualization/strand_left_inv.png")};extend(V.prototype,{load_pattern:function(W,aa){var X=this.patterns,Y=this.dummy_context,Z=new Image();Z.src=image_path+aa;Z.onload=function(){X[W]=Y.createPattern(Z,"repeat")}},get_pattern:function(W){return this.patterns[W]},new_canvas:function(){var W=this.document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(W)}W.manager=this;return W}});var B=function(W,X){W.bind("drag",{handle:X,relative:true},function(ab,ac){var aa=$(this).parent();var Z=aa.children();var Y;for(Y=0;Y<Z.length;Y++){if(ac.offsetY<$(Z.get(Y)).position().top){break}}if(Y===Z.length){if(this!==Z.get(Y-1)){aa.append(this)}}else{if(this!==Z.get(Y)){$(this).insertBefore(Z.get(Y))}}})};var h=function(Y,W){var X=W-Y;return(X<=2?0.01:(X<=100?1:(X<=1000?5:10)))};var C=9,z=10,L=C+2,w=100,D=12000,J=200,r=10,F=5000,s=100,m="There was an error in indexing this dataset. ",E="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",A="No data for this chrom/contig.",p="Currently indexing... please wait",u="Tool cannot be rerun: ",a="Loading data...",R="Ready for display",d=10,q=5,y=5;function t(W){return Math.round(W*1000)/1000}var c=function(W){this.num_elements=W;this.clear()};extend(c.prototype,{get:function(X){var W=this.key_ary.indexOf(X);if(W!==-1){this.move_key_to_end(X,W)}return this.obj_cache[X]},set:function(X,Y){if(!this.obj_cache[X]){if(this.key_ary.length>=this.num_elements){var W=this.key_ary.shift();delete this.obj_cache[W]}this.key_ary.push(X)}this.obj_cache[X]=Y;return Y},move_key_to_end:function(X,W){this.key_ary.splice(W,1);this.key_ary.push(X)},clear:function(){this.obj_cache={};this.key_ary=[]},size:function(){return this.key_ary.length}});var K=function(X,W,Y){c.call(this,X);this.track=W;this.subset=(Y!==undefined?Y:true)};extend(K.prototype,c.prototype,{load_data:function(ad,ae,Z,ac,W,ab){var Y={chrom:ad,low:ae,high:Z,mode:ac,resolution:W,dataset_id:this.track.dataset_id,hda_ldda:this.track.hda_ldda};$.extend(Y,ab);var af=[];for(var aa=0;aa<this.track.filters.length;aa++){af[af.length]=this.track.filters[aa].name}Y.filter_cols=JSON.stringify(af);var X=this;return $.getJSON(this.track.data_url,Y,function(ag){X.set_data(ae,Z,ac,ag)})},get_data:function(Y,W,ab,ac,X,aa){var Z=this.get(this.gen_key(W,ab,ac));if(Z){return Z}Z=this.load_data(Y,W,ab,ac,X,aa);this.set_data(W,ab,ac,Z);return Z},set_data:function(X,Y,Z,W){return this.set(this.gen_key(X,Y,Z),W)},gen_key:function(W,Y,Z){var X=W+"_"+Y+"_"+Z;return X},split_key:function(W){return W.split("_")}});var U=function(W,Z,Y,X,aa){this.container=W;this.chrom=null;this.vis_id=Y;this.dbkey=X;this.title=Z;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_id_counter=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.init(aa);this.canvas_manager=new V(W.get(0).ownerDocument);this.reset()};extend(U.prototype,{init:function(Z){var Y=this.container,W=this;this.top_container=$("<div/>").addClass("top-container").appendTo(Y);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(Y);this.bottom_container=$("<div/>").addClass("bottom-container").appendTo(Y);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.top_container);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide();this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.bottom_container);this.nav_container=$("<div/>").addClass("nav-container").prependTo(this.top_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.bottom_container);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a href='javascript:void(0);'>Close Overview</a>").addClass("overview-close").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div/>").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.nav_controls);var X=function(aa){if(aa.type==="focusout"||(aa.keyCode||aa.which)===13||(aa.keyCode||aa.which)===27){if((aa.keyCode||aa.which)!==27){W.go_to($(this).val())}$(this).hide();$(this).val("");W.location_span.show();W.chrom_select.show()}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keyup focusout",X).appendTo(this.nav_controls);this.location_span=$("<span/>").addClass("location").appendTo(this.nav_controls);this.location_span.bind("click",function(){W.location_span.hide();W.chrom_select.hide();W.nav_input.val(W.chrom+":"+W.low+"-"+W.high);W.nav_input.css("display","inline-block");W.nav_input.select();W.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.nav_controls)}this.zo_link=$("<a id='zoom-out' />").click(function(){W.zoom_out();W.redraw()}).appendTo(this.nav_controls);this.zi_link=$("<a id='zoom-in' />").click(function(){W.zoom_in();W.redraw()}).appendTo(this.nav_controls);this.load_chroms({low:0},Z);this.chrom_select.bind("change",function(){W.change_chrom(W.chrom_select.val())});this.intro_div.show();this.content_div.bind("click",function(aa){$(this).find("input").trigger("blur")});this.content_div.bind("dblclick",function(aa){W.zoom_in(aa.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(aa,ab){this.current_x=ab.offsetX}).bind("drag",function(aa,ac){var ad=ac.offsetX-this.current_x;this.current_x=ac.offsetX;var ab=Math.round(ad/W.viewport_container.width()*(W.max_high-W.max_low));W.move_delta(-ab)});this.overview_close.bind("click",function(){for(var ab=0,aa=W.tracks.length;ab<aa;ab++){W.tracks[ab].is_overview=false}$(this).siblings().filter("canvas").remove();$(this).parent().css("height",W.overview_box.height());W.overview_highlight.hide();$(this).hide()});this.viewport_container.bind("draginit",function(aa,ab){if(aa.clientX>W.viewport_container.width()-16){return false}}).bind("dragstart",function(aa,ab){ab.original_low=W.low;ab.current_height=aa.clientY;ab.current_x=ab.offsetX}).bind("drag",function(ac,ae){var aa=$(this);var af=ae.offsetX-ae.current_x;var ab=aa.scrollTop()-(ac.clientY-ae.current_height);aa.scrollTop(ab);ae.current_height=ac.clientY;ae.current_x=ae.offsetX;var ad=Math.round(af/W.viewport_container.width()*(W.high-W.low));W.move_delta(ad)}).bind("mousewheel",function(ac,ae,ab,aa){if(ab){var ad=Math.round(-ab/W.viewport_container.width()*(W.high-W.low));W.move_delta(ad)}});this.top_labeltrack.bind("dragstart",function(aa,ab){return $("<div />").css({height:W.content_div.height()+W.top_labeltrack.height()+W.nav_labeltrack.height()+1,top:"0px",position:"absolute","background-color":"#ccf",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(ae,af){$(af.proxy).css({left:Math.min(ae.pageX,af.startX),width:Math.abs(ae.pageX-af.startX)});var ab=Math.min(ae.pageX,af.startX)-W.container.offset().left,aa=Math.max(ae.pageX,af.startX)-W.container.offset().left,ad=(W.high-W.low),ac=W.viewport_container.width();W.update_location(Math.round(ab/ac*ad)+W.low,Math.round(aa/ac*ad)+W.low)}).bind("dragend",function(af,ag){var ab=Math.min(af.pageX,ag.startX),aa=Math.max(af.pageX,ag.startX),ad=(W.high-W.low),ac=W.viewport_container.width(),ae=W.low;W.low=Math.round(ab/ac*ad)+ae;W.high=Math.round(aa/ac*ad)+ae;$(ag.proxy).remove();W.redraw()});this.add_label_track(new T(this,this.top_labeltrack));this.add_label_track(new T(this,this.nav_labeltrack));$(window).bind("resize",function(){W.resize_window()});$(document).bind("redraw",function(){W.redraw()});this.reset();$(window).trigger("resize")},update_location:function(W,X){this.location_span.text(commatize(W)+" - "+commatize(X));this.nav_input.val(this.chrom+":"+commatize(W)+"-"+commatize(X))},load_chroms:function(X,Y){X.num=s;$.extend(X,(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}));var W=this;$.ajax({url:chrom_url,data:X,dataType:"json",success:function(aa){if(aa.chrom_info.length===0){alert("Invalid chromosome: "+X.chrom);return}if(aa.reference){W.add_label_track(new x(W))}W.chrom_data=aa.chrom_info;var ad='<option value="">Select Chrom/Contig</option>';for(var ac=0,Z=W.chrom_data.length;ac<Z;ac++){var ab=W.chrom_data[ac].chrom;ad+='<option value="'+ab+'">'+ab+"</option>"}if(aa.prev_chroms){ad+='<option value="previous">Previous '+s+"</option>"}if(aa.next_chroms){ad+='<option value="next">Next '+s+"</option>"}W.chrom_select.html(ad);if(Y){Y()}W.chrom_start_index=aa.start_index},error:function(){alert("Could not load chroms for this dbkey:",W.dbkey)}})},change_chrom:function(aa,X,ac){if(!aa||aa==="None"){return}var Z=this;if(aa==="previous"){Z.load_chroms({low:this.chrom_start_index-s});return}if(aa==="next"){Z.load_chroms({low:this.chrom_start_index+s});return}var ab=$.grep(Z.chrom_data,function(ae,af){return ae.chrom===aa})[0];if(ab===undefined){Z.load_chroms({chrom:aa},function(){Z.change_chrom(aa,X,ac)});return}else{if(aa!==Z.chrom){Z.chrom=aa;if(!Z.chrom){Z.intro_div.show()}else{Z.intro_div.hide()}Z.chrom_select.val(Z.chrom);Z.max_high=ab.len-1;Z.reset();Z.redraw(true);for(var ad=0,W=Z.tracks.length;ad<W;ad++){var Y=Z.tracks[ad];if(Y.init){Y.init()}}}if(X!==undefined&&ac!==undefined){Z.low=Math.max(X,0);Z.high=Math.min(ac,Z.max_high)}Z.reset_overview();Z.redraw()}},go_to:function(aa){var ae=this,W,Z,X=aa.split(":"),ac=X[0],ad=X[1];if(ad!==undefined){try{var ab=ad.split("-");W=parseInt(ab[0].replace(/,/g,""),10);Z=parseInt(ab[1].replace(/,/g,""),10)}catch(Y){return false}}ae.change_chrom(ac,W,Z)},move_fraction:function(Y){var W=this;var X=W.high-W.low;this.move_delta(Y*X)},move_delta:function(Y){var W=this;var X=W.high-W.low;if(W.low-Y<W.max_low){W.low=W.max_low;W.high=W.max_low+X}else{if(W.high-Y>W.max_high){W.high=W.max_high;W.low=W.max_high-X}else{W.high-=Y;W.low-=Y}}W.redraw()},add_track:function(W){W.view=this;W.track_id=this.track_id_counter;this.tracks.push(W);if(W.init){W.init()}W.container_div.attr("id","track_"+W.track_id);B(W.container_div,".draghandle");this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(W){W.view=this;this.label_tracks.push(W)},remove_track:function(W){this.has_changes=true;W.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(W)];this.num_tracks-=1},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(ad){var ac=this.high-this.low,ab=this.low,X=this.high;if(ab<this.max_low){ab=this.max_low}if(X>this.max_high){X=this.max_high}if(this.high!==0&&ac<this.min_separation){X=ab+this.min_separation}this.low=Math.floor(ab);this.high=Math.ceil(X);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(r,Math.max(0,Math.ceil(Math.log(this.resolution,r)/Math.log(r))));var W=(this.low/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var aa=((this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ae=13;this.overview_box.css({left:W,width:Math.max(ae,aa)}).show();if(aa<ae){this.overview_box.css("left",W-(ae-aa)/2)}if(this.overview_highlight){this.overview_highlight.css({left:W,width:aa})}this.update_location(this.low,this.high);if(!ad){for(var Y=0,Z=this.tracks.length;Y<Z;Y++){if(this.tracks[Y]&&this.tracks[Y].enabled){this.tracks[Y].draw()}}for(Y=0,Z=this.label_tracks.length;Y<Z;Y++){this.label_tracks[Y].draw()}}},zoom_in:function(X,Y){if(this.max_high===0||this.high-this.low<this.min_separation){return}var Z=this.high-this.low,aa=Z/2+this.low,W=(Z/this.zoom_factor)/2;if(X){aa=X/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(aa-W);this.high=Math.round(aa+W);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var X=this.high-this.low,Y=X/2+this.low,W=(X*this.zoom_factor)/2;this.low=Math.round(Y-W);this.high=Math.round(Y+W);this.redraw()},resize_window:function(){this.viewport_container.height(this.container.height()-this.top_container.height()-this.bottom_container.height());this.nav_container.width(this.container.width());this.redraw()},reset_overview:function(){this.overview_viewport.find("canvas").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide()}});var n=function(X,aa){this.track=X;this.name=aa.name;this.params=[];var ai=aa.params;for(var Y=0;Y<ai.length;Y++){var ad=ai[Y],W=ad.name,ah=ad.label,Z=unescape(ad.html),af=ad.type;if(af==="number"){this.params[this.params.length]=new g(W,ah,Z,ad.min,ad.max)}else{if(af=="select"){this.params[this.params.length]=new I(W,ah,Z)}else{console.log("WARNING: unrecognized tool parameter type:",W,af)}}}this.parent_div=$("<div/>").addClass("dynamic-tool").hide();this.parent_div.bind("drag",function(ak){ak.stopPropagation()}).bind("click",function(ak){ak.stopPropagation()}).bind("dblclick",function(ak){ak.stopPropagation()});var ag=$("<div class='tool-name'>").appendTo(this.parent_div).text(this.name);var ae=this.params;var ab=this;$.each(this.params,function(al,ao){var an=$("<div>").addClass("param-row").appendTo(ab.parent_div);var ak=$("<div>").addClass("param-label").text(ao.label).appendTo(an);var am=$("<div/>").addClass("slider").html(ao.html).appendTo(an);$("<div style='clear: both;'/>").appendTo(an)});this.parent_div.find("input").click(function(){$(this).select()});var aj=$("<div>").addClass("slider-row").appendTo(this.parent_div);var ac=$("<input type='submit'>").attr("value","Run").appendTo(aj);var ab=this;ac.click(function(){ab.run()})};extend(n.prototype,{get_param_values_dict:function(){var W={};this.parent_div.find(":input").each(function(){var X=$(this).attr("name"),Y=$(this).val();W[X]=JSON.stringify(Y)});return W},get_param_values:function(){var X=[];var W={};this.parent_div.find(":input").each(function(){var Y=$(this).attr("name"),Z=$(this).val();if(Y){X[X.length]=Z}});return X},run:function(){var X={dataset_id:this.track.original_dataset_id,chrom:this.track.view.chrom,low:this.track.view.low,high:this.track.view.high,tool_id:this.name};$.extend(X,this.get_param_values_dict());var Z=this.track,Y=X.tool_id+Z.tool_region_and_parameters_str(X.chrom,X.low,X.high),aa;if(Z.track_type==="FeatureTrack"){aa=new N(Y,view,Z.hda_ldda,undefined,{},{},Z)}this.track.add_track(aa);aa.content_div.text("Starting job.");var W=function(){$.getJSON(run_tool_url,X,function(ab){if(ab==="no converter"){aa.container_div.addClass("error");aa.content_div.text(E)}else{if(ab.error){aa.container_div.addClass("error");aa.content_div.text(u+ab.message)}else{if(ab==="pending"){aa.container_div.addClass("pending");aa.content_div.text("Converting input data so that it can be easily reused.");setTimeout(W,2000)}else{aa.dataset_id=ab.dataset_id;aa.content_div.text("Running job.");aa.init()}}}})};W()}});var I=function(X,W,Y){this.name=X;this.label=W;this.html=Y};var g=function(Y,X,aa,Z,W){I.call(this,Y,X,aa);this.min=Z;this.max=W};var j=function(X,W,Y){this.name=X;this.index=W;this.value=Y};var O=function(X,W){this.name=X;this.index=W;this.low=-Number.MAX_VALUE;this.high=Number.MAX_VALUE;this.min=Number.MAX_VALUE;this.max=-Number.MAX_VALUE;this.slider=null;this.slider_label=null};extend(O.prototype,{applies_to:function(W){if(W.length>this.index){return true}return false},keep:function(W){if(!this.applies_to(W)){return true}return(W[this.index]>=this.low&&W[this.index]<=this.high)},update_attrs:function(X){var W=false;if(!this.applies_to(X)){return W}if(X[this.index]<this.min){this.min=Math.floor(X[this.index]);W=true}if(X[this.index]>this.max){this.max=Math.ceil(X[this.index]);W=true}return W},update_ui_elt:function(){var X=this.slider.slider("option","min"),W=this.slider.slider("option","max");if(this.min<X||this.max>W){this.slider.slider("option","min",this.min);this.slider.slider("option","max",this.max);this.slider.slider("option","step",h(this.min,this.max));this.slider.slider("option","values",[this.min,this.max])}}});var v=function(W){var ac=[];for(var Z=0;Z<W.length;Z++){var ab=W[Z];var Y=ab.name,aa=ab.type,X=ab.index;if(aa==="int"||aa==="float"){ac[Z]=new O(Y,X)}else{ac[Z]=new j(Y,X,aa)}}return ac};var S=function(W){this.track=W.track;this.params=W.params;this.values={};if(W.saved_values){this.restore_values(W.saved_values)}this.onchange=W.onchange};extend(S.prototype,{restore_values:function(W){var X=this;$.each(this.params,function(Y,Z){if(W[Z.key]!==undefined){X.values[Z.key]=W[Z.key]}else{X.values[Z.key]=Z.default_value}})},build_form:function(){var X=this;var W=$("<div />");$.each(this.params,function(ab,Z){if(!Z.hidden){var Y="param_"+ab;var ag=$("<div class='form-row' />").appendTo(W);ag.append($("<label />").attr("for",Y).text(Z.label+":"));if(Z.type==="bool"){ag.append($('<input type="checkbox" />').attr("id",Y).attr("name",Y).attr("checked",X.values[Z.key]))}else{if(Z.type==="color"){var ad=X.values[Z.key];var ac=$("<input />").attr("id",Y).attr("name",Y).val(ad);var ae=$("<div class='tipsy tipsy-north' style='position: absolute;' />").hide();var aa=$("<div style='background-color: black; padding: 10px;'></div>").appendTo(ae);var af=$("<div/>").appendTo(aa).farbtastic({width:100,height:100,callback:ac,color:ad});$("<div />").append(ac).append(ae).appendTo(ag).bind("click",function(ah){ae.css({left:$(this).position().left+($(ac).width()/2)-60,top:$(this).position().top+$(this.height)}).show();$(document).bind("click.color-picker",function(){ae.hide();$(document).unbind("click.color-picker")});ah.stopPropagation()})}else{ag.append($("<input />").attr("id",Y).attr("name",Y).val(X.values[Z.key]))}}}});return W},update_from_form:function(W){var Y=this;var X=false;$.each(this.params,function(Z,ab){if(!ab.hidden){var ac="param_"+Z;var aa=W.find("#"+ac).val();if(ab.type==="float"){aa=parseFloat(aa)}else{if(ab.type==="int"){aa=parseInt(aa)}else{if(ab.type==="bool"){aa=W.find("#"+ac).is(":checked")}}}if(aa!==Y.values[ab.key]){Y.values[ab.key]=aa;X=true}}});if(X){this.onchange()}}});var b=function(W,X){this.track=W;this.canvas=X};var k=function(X,W,aa,Y,Z){this.name=X;this.view=W;this.parent_element=aa;this.data_url=(Y?Y:default_data_url);this.data_url_extra_params={};this.data_query_wait=(Z?Z:F);this.dataset_check_url=converted_datasets_state_url;this.container_div=$("<div />").addClass("track").css("position","relative");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);if(this.view.editor){this.drag_div=$("<div class='draghandle' />").appendTo(this.header_div)}this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name);this.name_div.attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase())}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_element.append(this.container_div)};extend(k.prototype,{init:function(){var W=this;W.enabled=false;W.tile_cache.clear();W.data_cache.clear();W.initial_canvas=undefined;W.content_div.css("height","auto");W.container_div.removeClass("nodata error pending");if(!W.dataset_id){return}$.getJSON(converted_datasets_state_url,{hda_ldda:W.hda_ldda,dataset_id:W.dataset_id,chrom:W.view.chrom},function(X){if(!X||X==="error"||X.kind==="error"){W.container_div.addClass("error");W.content_div.text(m);if(X.message){var Z=W.view.tracks.indexOf(W);var Y=$(" <a href='javascript:void(0);'></a>").text("View error").bind("click",function(){show_modal("Trackster Error","<pre>"+X.message+"</pre>",{Close:hide_modal})});W.content_div.append(Y)}}else{if(X==="no converter"){W.container_div.addClass("error");W.content_div.text(E)}else{if(X==="no data"||(X.data!==undefined&&(X.data===null||X.data.length===0))){W.container_div.addClass("nodata");W.content_div.text(A)}else{if(X==="pending"){W.container_div.addClass("pending");W.content_div.text(p);setTimeout(function(){W.init()},W.data_query_wait)}else{if(X.status==="data"){if(X.valid_chroms){W.valid_chroms=X.valid_chroms;W.make_name_popup_menu()}W.content_div.text(R);if(W.view.chrom){W.content_div.text("");W.content_div.css("height",W.height_px+"px");W.enabled=true;$.when(W.predraw_init()).done(function(){W.container_div.removeClass("nodata error pending");W.draw()})}}}}}}})},predraw_init:function(){},update_name:function(W){this.old_name=this.name;this.name=W;this.name_div.text(this.name)},revert_name:function(){this.name=this.old_name;this.name_div.text(this.name)}});var H=function(X,ad,ag){var Y=this,ah=Y.view;this.filters=(X!==undefined?v(X):[]);this.filters_available=false;this.filters_visible=false;this.tool=(ad!==undefined&&obj_length(ad)>0?new n(this,ad):undefined);this.parent_track=ag;this.child_tracks=[];if(Y.hidden){return}var af=function(ai,aj,ak){ai.click(function(){var al=aj.text();max=parseFloat(ak.slider("option","max")),input_size=(max<=1?4:max<=1000000?max.toString().length:6),multi_value=false;if(ak.slider("option","values")){input_size=2*input_size+1;multi_value=true}aj.text("");$("<input type='text'/>").attr("size",input_size).attr("maxlength",input_size).attr("value",al).appendTo(aj).focus().select().click(function(am){am.stopPropagation()}).blur(function(){$(this).remove();aj.text(al)}).keyup(function(aq){if(aq.keyCode===27){$(this).trigger("blur")}else{if(aq.keyCode===13){var ao=ak.slider("option","min"),am=ak.slider("option","max"),ap=function(ar){return(isNaN(ar)||ar>am||ar<ao)},an=$(this).val();if(!multi_value){an=parseFloat(an);if(ap(an)){alert("Parameter value must be in the range ["+ao+"-"+am+"]");return $(this)}}else{an=an.split("-");an=[parseFloat(an[0]),parseFloat(an[1])];if(ap(an[0])||ap(an[1])){alert("Parameter value must be in the range ["+ao+"-"+am+"]");return $(this)}}ak.slider((multi_value?"values":"value"),an)}}})})};if(this.parent_track){this.header_div.find(".draghandle").removeClass("draghandle").addClass("child-track-icon").addClass("icon-button");this.parent_element.addClass("child-track");this.tool=undefined}this.filters_div=$("<div/>").addClass("filters").hide();this.header_div.after(this.filters_div);this.filters_div.bind("drag",function(ai){ai.stopPropagation()}).bind("click",function(ai){ai.stopPropagation()}).bind("dblclick",function(ai){ai.stopPropagation()});$.each(this.filters,function(ao,aj){var al=$("<div/>").addClass("slider-row").appendTo(Y.filters_div);var ai=$("<div/>").addClass("slider-label").appendTo(al);var aq=$("<span/>").addClass("slider-name").text(aj.name+" ").appendTo(ai);var ak=$("<span/>");var am=$("<span/>").addClass("slider-value").appendTo(ai).append("[").append(ak).append("]");var ap=$("<div/>").addClass("slider").appendTo(al);aj.control_element=$("<div/>").attr("id",aj.name+"-filter-control").appendTo(ap);var an=[0,0];aj.control_element.slider({range:true,min:Number.MAX_VALUE,max:-Number.MIN_VALUE,values:[0,0],slide:function(ar,at){an=at.values;ak.text(at.values[0]+"-"+at.values[1]);setTimeout(function(){if(at.values[0]==an[0]&&at.values[1]==an[1]){var au=at.values;ak.text(au[0]+"-"+au[1]);aj.low=au[0];aj.high=au[1];Y.draw(true,true)}},50)},change:function(ar,at){aj.control_element.slider("option","slide").call(aj.control_element,ar,at)}});aj.slider=aj.control_element;aj.slider_label=ak;af(am,ak,aj.control_element);$("<div style='clear: both;'/>").appendTo(al)});if(this.tool){this.dynamic_tool_div=this.tool.parent_div;this.header_div.after(this.dynamic_tool_div)}Y.child_tracks_container=$("<div/>").addClass("child-tracks-container").hide();Y.container_div.append(Y.child_tracks_container);if(Y.display_modes!==undefined){if(Y.mode_div===undefined){Y.mode_div=$("<div class='right-float menubutton popup' />").appendTo(Y.header_div);var aa=(Y.track_config&&Y.track_config.values.mode?Y.track_config.values.mode:Y.display_modes[0]);Y.mode=aa;Y.mode_div.text(aa);var Z=function(ai){Y.mode_div.text(ai);Y.mode=ai;Y.track_config.values.mode=ai;Y.tile_cache.clear();Y.draw()};var W={};for(var ab=0,ae=Y.display_modes.length;ab<ae;ab++){var ac=Y.display_modes[ab];W[ac]=function(ai){return function(){Z(ai)}}(ac)}make_popupmenu(Y.mode_div,W)}else{Y.mode_div.hide()}}this.make_name_popup_menu()};extend(H.prototype,k.prototype,{make_name_popup_menu:function(){var X=this;var W={};W["Edit configuration"]=function(){var ad=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ab=function(){X.track_config.update_from_form($(".dialog-box"));hide_modal();$(window).unbind("keypress.check_enter_esc")},ac=function(ae){if((ae.keyCode||ae.which)===27){ad()}else{if((ae.keyCode||ae.which)===13){ab()}}};$(window).bind("keypress.check_enter_esc",ac);show_modal("Configure Track",X.track_config.build_form(),{Cancel:ad,OK:ab})};if(X.filters_available>0){var aa=(X.filters_div.is(":visible")?"Hide filters":"Show filters");W[aa]=function(){X.filters_visible=(X.filters_div.is(":visible"));X.filters_div.toggle();X.make_name_popup_menu()}}if(X.tool){var aa=(X.dynamic_tool_div.is(":visible")?"Hide tool":"Show tool");W[aa]=function(){if(!X.dynamic_tool_div.is(":visible")){X.update_name(X.name+X.tool_region_and_parameters_str())}else{menu_option_text="Show dynamic tool";X.revert_name()}X.dynamic_tool_div.toggle();X.make_name_popup_menu()}}if(X.valid_chroms){W["List chrom/contigs with data"]=function(){show_modal("Chrom/contigs with data","<p>"+X.valid_chroms.join("<br/>")+"</p>",{Close:function(){hide_modal()}})}}var Y=view;var Z=function(){$("#no-tracks").show()};if(this.parent_track){Y=this.parent_track;Z=function(){}}W.Remove=function(){Y.remove_track(X);if(Y.num_tracks===0){Z()}};make_popupmenu(X.name_div,W)},draw:function(W,Z){var an=this.view.low,ac=this.view.high,ae=ac-an,ag=this.view.container.width(),ab=ag/ae,ah=this.view.resolution,aa=$("<div style='position: relative;'></div>");if(!Z){this.content_div.children().remove()}this.content_div.append(aa);this.max_height=0;var aj=Math.floor(an/ah/J);var Y={};while((aj*J*ah)<ac){var am=ag+"_"+ab+"_"+aj;var ad=this.tile_cache.get(am);var ak=aj*J*this.view.resolution;var X=ak+J*this.view.resolution;if(!W&&ad){this.show_tile(ad,aa,ak,ab)}else{this.delayed_draw(W,am,ak,X,aj,ah,aa,ab,Y)}aj+=1}var af=this;var al=setInterval(function(){if(obj_length(Y)===0){clearInterval(al);if(Z){var aq=af.content_div.children();var ap=false;for(var ar=aq.length-1,ao=0;ar>=ao;ar--){var av=$(aq[ar]);if(ap){av.remove()}else{if(av.children().length!==0){ap=true}}}}for(var au=0;au<af.filters.length;au++){af.filters[au].update_ui_elt()}var at=false;if(af.example_feature){for(var au=0;au<af.filters.length;au++){if(af.filters[au].applies_to(af.example_feature)){at=true;break}}}if(af.filters_available!==at){af.filters_available=at;if(!af.filters_available){af.filters_div.hide()}af.make_name_popup_menu()}}},50);for(var ai=0;ai<this.child_tracks.length;ai++){this.child_tracks[ai].draw(W,Z)}},delayed_draw:function(X,ae,ac,ag,Y,aa,af,ah,ab){var Z=this;var ad=function(ap,ai,ak,aj,an,ao,al){returned_tile=Z.draw_tile(ai,ak,aj,an,ao,al);var am=$("<div class='track-tile'>").prepend(returned_tile);tile_element=am;Z.tile_cache.set(ae,tile_element);Z.show_tile(tile_element,an,ac,ao);delete ab[ap]};var W=setTimeout(function(){if(ac<=Z.view.high&&ag>=Z.view.low){var ai=(X?undefined:Z.tile_cache.get(ae));if(ai){Z.show_tile(ai,af,ac,ah);delete ab[W]}else{$.when(Z.data_cache.get_data(view.chrom,ac,ag,Z.mode,aa,Z.data_url_extra_params)).then(function(aj){if(view.reference_track&&ah>view.canvas_manager.char_width_px){$.when(view.reference_track.data_cache.get_data(view.chrom,ac,ag,Z.mode,aa,view.reference_track.data_url_extra_params)).then(function(ak){ad(W,aj,aa,Y,af,ah,ak)})}else{ad(W,aj,aa,Y,af,ah)}})}}},50);ab[W]=true},show_tile:function(W,ab,Z,ac){var X=this;var Y=this.view.high-this.view.low,aa=(Z-this.view.low)*ac;if(this.left_offset){aa-=this.left_offset}W.css({position:"absolute",top:0,left:aa,height:""});ab.append(W);X.max_height=Math.max(X.max_height,W.height());X.content_div.css("height",X.max_height+"px");ab.children().css("height",X.max_height+"px")},set_overview:function(){var W=this.view;if(this.initial_canvas&&this.is_overview){W.overview_close.show();W.overview_viewport.append(this.initial_canvas);W.overview_highlight.show().height(this.initial_canvas.height());W.overview_viewport.height(this.initial_canvas.height()+W.overview_box.height())}$(window).trigger("resize")},tool_region_and_parameters_str:function(Y,W,Z){var X=this,aa=(Y!==undefined&&W!==undefined&&Z!==undefined?Y+":"+W+"-"+Z:"all");return" - region=["+aa+"], parameters=["+X.tool.get_param_values().join(", ")+"]"},add_track:function(W){W.track_id=this.track_id+"_"+this.child_tracks.length;W.container_div.attr("id","track_"+W.track_id);this.child_tracks_container.append(W.container_div);B(W.container_div,".child-track-icon");if(!$(this.child_tracks_container).is(":visible")){this.child_tracks_container.show()}this.child_tracks.push(W);this.view.has_changes=true},remove_track:function(W){W.container_div.fadeOut("slow",function(){$(this).remove()})}});var T=function(W,X){this.track_type="LabelTrack";this.hidden=true;k.call(this,null,W,X);this.container_div.addClass("label-track")};extend(T.prototype,k.prototype,{draw:function(){var Y=this.view,Z=Y.high-Y.low,ac=Math.floor(Math.pow(10,Math.floor(Math.log(Z)/Math.log(10)))),W=Math.floor(Y.low/ac)*ac,aa=this.view.container.width(),X=$("<div style='position: relative; height: 1.3em;'></div>");while(W<Y.high){var ab=(W-Y.low)/Z*aa;X.append($("<div class='label'>"+commatize(W)+"</div>").css({position:"absolute",left:ab-1}));W+=ac}this.content_div.children(":first").remove();this.content_div.append(X)}});var x=function(W){this.track_type="ReferenceTrack";this.hidden=true;k.call(this,null,W,W.top_labeltrack);H.call(this);W.reference_track=this;this.left_offset=200;this.height_px=12;this.container_div.addClass("reference-track");this.content_div.css("background","none");this.content_div.css("min-height","0px");this.content_div.css("border","none");this.data_url=reference_url;this.data_url_extra_params={dbkey:W.dbkey};this.data_cache=new K(y,this,false);this.tile_cache=new c(q)};extend(x.prototype,H.prototype,{draw_tile:function(ag,ab,X,ad,ah){var aa=this,Y=J*ab;if(ah>this.view.canvas_manager.char_width_px){if(ag===null){aa.content_div.css("height","0px");return}var Z=this.view.canvas_manager.new_canvas();var af=Z.getContext("2d");Z.width=Math.ceil(Y*ah+aa.left_offset);Z.height=aa.height_px;af.font=af.canvas.manager.default_font;af.textAlign="center";for(var ac=0,ae=ag.length;ac<ae;ac++){var W=Math.round(ac*ah);af.fillText(ag[ac],W+aa.left_offset,10)}return Z}this.content_div.css("height","0px")}});var l=function(aa,Y,ab,W,Z){var X=this;this.track_type="LineTrack";this.display_modes=["Histogram","Line","Filled","Intensity"];this.mode="Histogram";k.call(this,aa,Y,Y.viewport_container);H.call(this);this.min_height_px=16;this.max_height_px=400;this.height_px=80;this.hda_ldda=ab;this.dataset_id=W;this.original_dataset_id=W;this.data_cache=new K(y,this);this.tile_cache=new c(q);this.track_config=new S({track:this,params:[{key:"color",label:"Color",type:"color",default_value:"black"},{key:"min_value",label:"Min Value",type:"float",default_value:undefined},{key:"max_value",label:"Max Value",type:"float",default_value:undefined},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:this.height_px,hidden:true}],saved_values:Z,onchange:function(){X.vertical_range=X.prefs.max_value-X.prefs.min_value;$("#linetrack_"+X.track_id+"_minval").text(X.prefs.min_value);$("#linetrack_"+X.track_id+"_maxval").text(X.prefs.max_value);X.tile_cache.clear();X.draw()}});this.prefs=this.track_config.values;this.height_px=this.track_config.values.height;this.vertical_range=this.track_config.values.max_value-this.track_config.values.min_value;this.add_resize_handle()};extend(l.prototype,H.prototype,{add_resize_handle:function(){var W=this;var Z=false;var Y=false;var X=$("<div class='track-resize'>");$(W.container_div).hover(function(){Z=true;X.show()},function(){Z=false;if(!Y){X.hide()}});X.hide().bind("dragstart",function(aa,ab){Y=true;ab.original_height=$(W.content_div).height()}).bind("drag",function(ab,ac){var aa=Math.min(Math.max(ac.original_height+ac.deltaY,W.min_height_px),W.max_height_px);$(W.content_div).css("height",aa);W.height_px=aa;W.draw(true)}).bind("dragend",function(aa,ab){W.tile_cache.clear();Y=false;if(!Z){X.hide()}W.track_config.values.height=W.height_px}).appendTo(W.container_div)},predraw_init:function(){var W=this,X=W.view.tracks.indexOf(W);W.vertical_range=undefined;return $.getJSON(W.data_url,{stats:true,chrom:W.view.chrom,low:null,high:null,hda_ldda:W.hda_ldda,dataset_id:W.dataset_id},function(Y){W.container_div.addClass("line-track");var aa=Y.data;if(isNaN(parseFloat(W.prefs.min_value))||isNaN(parseFloat(W.prefs.max_value))){W.prefs.min_value=aa.min;W.prefs.max_value=aa.max;$("#track_"+X+"_minval").val(W.prefs.min_value);$("#track_"+X+"_maxval").val(W.prefs.max_value)}W.vertical_range=W.prefs.max_value-W.prefs.min_value;W.total_frequency=aa.total_frequency;W.container_div.find(".yaxislabel").remove();var ab=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+X+"_minval").text(t(W.prefs.min_value));var Z=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+X+"_maxval").text(t(W.prefs.max_value));Z.css({position:"absolute",top:"24px",left:"10px"});Z.prependTo(W.container_div);ab.css({position:"absolute",bottom:"2px",left:"10px"});ab.prependTo(W.container_div)})},draw_tile:function(ah,aa,X,ae,ag){if(this.vertical_range===undefined){return}var ab=X*J*aa,Z=J*aa,W=Math.ceil(Z*ag),ad=this.height_px;var Y=this.view.canvas_manager.new_canvas();Y.width=W,Y.height=ad;var af=Y.getContext("2d");var ac=new G.LinePainter(ah.data,ab,ab+Z,this.prefs,this.mode);ac.draw(af,W,ad);return Y}});var e=function(W,ab,aa,ae,ad,Y,Z,ac){var X=this;this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];this.track_config=new S({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:ad,onchange:function(){X.tile_cache.clear();X.draw()}});this.prefs=this.track_config.values;k.call(this,W,ab,ab.viewport_container);H.call(this,Y,Z,ac);this.height_px=0;this.container_div.addClass("feature-track");this.hda_ldda=aa;this.dataset_id=ae;this.original_dataset_id=ae;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.summary_draw_height=30;this.inc_slots={};this.start_end_dct={};this.tile_cache=new c(d);this.data_cache=new K(20,this);this.left_offset=200;this.painter=G.LinkedFeaturePainter};extend(e.prototype,H.prototype,{update_auto_mode:function(W){if(this.mode=="Auto"){if(W=="no_detail"){W="feature spans"}else{if(W=="summary_tree"){W="coverage histogram"}}this.mode_div.text("Auto ("+W+")")}},incremental_slots:function(aa,X,Z){var Y=this.view.canvas_manager.dummy_context,W=this.inc_slots[aa];if(!W||(W.mode!==Z)){W=new (o.FeatureSlotter)(aa,Z==="Pack",w,function(ab){return Y.measureText(ab)});W.mode=Z;this.inc_slots[aa]=W}return W.slot_features(X)},draw_tile:function(ai,aq,av,ae,ag,Z){var an=this,ax=av*J*aq,X=(av+1)*J*aq,ak=X-ax,ao=Math.ceil(ak*ag),am=this.mode,aB=25,aa=this.left_offset,aj,ab;if(am==="Auto"){if(ai.dataset_type==="summary_tree"){am=ai.dataset_type}else{if(ai.extra_info==="no_detail"){am="no_detail"}else{var aA=ai.data;if(this.view.high-this.view.low>D){am="Squish"}else{am="Pack"}}}this.update_auto_mode(am)}if(am==="summary_tree"){ab=this.summary_draw_height;ae.parent().css("height",Math.max(this.height_px,ab)+"px");this.container_div.find(".yaxislabel").remove();var W=$("<div />").addClass("yaxislabel");W.text(ai.max);W.css({position:"absolute",top:"22px",left:"10px"});W.prependTo(this.container_div);var Y=this.view.canvas_manager.new_canvas();Y.width=ao+aa;Y.height=ab+L;var ay=new G.SummaryTreePainter(ai,ax,X,this.prefs);var ap=Y.getContext("2d");ap.translate(aa,L);ay.draw(ap,ao,ab);return Y}var aj,ad=1;if(am==="no_detail"||am==="Squish"||am==="Pack"){ad=this.incremental_slots(ag,ai.data,am);aj=this.inc_slots[ag].slots}var af=[];if(ai.data){for(var ar=0,au=ai.data.length;ar<au;ar++){var ac=ai.data[ar];var at=false;var ah;for(var aw=0,az=this.filters.length;aw<az;aw++){ah=this.filters[aw];ah.update_attrs(ac);if(!ah.keep(ac)){at=true;break}}if(!at){af.push(ac)}}}var ay=new (this.painter)(af,ax,X,this.prefs,am,Z);var ab=ay.get_required_height(ad)+z;var Y=this.view.canvas_manager.new_canvas();Y.width=ao+aa;Y.height=ab;ae.parent().css("height",Math.max(this.height_px,ab)+"px");var ap=Y.getContext("2d");ap.fillStyle=this.prefs.block_color;ap.font=ap.canvas.manager.default_font;ap.textAlign="right";this.container_div.find(".yaxislabel").remove();if(ai.message){$(Y).css({"border-top":"1px solid red"});ap.fillStyle="red";ap.textAlign="left";var al=ap.textBaseline;ap.textBaseline="top";ap.fillText(ai.message,aa,0);ap.textBaseline=al;if(!ai.data){return Y}}this.example_feature=(ai.data.length?ai.data[0]:undefined);ap.translate(aa,z);ay.draw(ap,ao,ab,aj);return Y}});var M=function(Z,X,ab,W,Y,aa){e.call(this,Z,X,ab,W,Y,aa);this.track_type="VcfTrack";this.painter=G.VariantPainter};extend(M.prototype,H.prototype,e.prototype);var P=function(Z,X,ab,W,Y,aa){e.call(this,Z,X,ab,W,Y,aa);this.track_config=new S({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_insertions",label:"Show insertions",type:"bool",default_value:false},{key:"show_differences",label:"Show differences only",type:"bool",default_value:true},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:Y,onchange:function(){this.track.tile_cache.clear();this.track.draw()}});this.prefs=this.track_config.values;this.track_type="ReadTrack";this.painter=G.ReadPainter;this.make_name_popup_menu()};extend(P.prototype,H.prototype,e.prototype);var N=function(aa,Y,ac,W,Z,ab,X){e.call(this,aa,Y,ac,W,Z,ab,{},X);this.track_type="ToolDataFeatureTrack";this.data_url=raw_data_url;this.data_query_wait=1000;this.dataset_check_url=dataset_state_url};extend(N.prototype,H.prototype,e.prototype,{predraw_init:function(){var X=this;var W=function(){if(X.data_cache.size()===0){setTimeout(W,300)}else{X.data_url=default_data_url;X.data_query_wait=F;X.dataset_state_url=converted_datasets_state_url;$.getJSON(X.dataset_state_url,{dataset_id:X.dataset_id,hda_ldda:X.hda_ldda},function(Y){})}};W()}});Q.View=U;Q.LineTrack=l;Q.FeatureTrack=e;Q.ReadTrack=P};var slotting_module=function(c,b){var d=2,a=5;b.FeatureSlotter=function(h,g,e,f){this.slots={};this.start_end_dct={};this.w_scale=h;this.include_label=g;this.max_rows=e;this.measureText=f};extend(b.FeatureSlotter.prototype,{slot_features:function(l){var o=this.w_scale,r=this.slots,g=this.start_end_dct,x=[],z=[],m=0,y=this.max_rows;for(var v=0,w=l.length;v<w;v++){var k=l[v],n=k[0];if(r[n]!==undefined){m=Math.max(m,r[n]);z.push(r[n])}else{x.push(v)}}var p=function(F,G){for(var E=0;E<=y;E++){var C=false,H=g[E];if(H!==undefined){for(var B=0,D=H.length;B<D;B++){var A=H[B];if(G>A[0]&&F<A[1]){C=true;break}}}if(!C){return E}}return -1};for(var v=0,w=x.length;v<w;v++){var k=l[x[v]],n=k[0],t=k[1],e=k[2],q=k[3],f=Math.floor(t*o),j=Math.ceil(e*o),u=this.measureText(q).width,h;if(q!==undefined&&this.include_label){u+=(d+a);if(f-u>=0){f-=u;h="left"}else{j+=u;h="right"}}var s=p(f,j);if(s>=0){if(g[s]===undefined){g[s]=[]}g[s].push([f,j]);r[n]=s;m=Math.max(m,s)}else{}}return m+1}})};var painters_module=function(k,B){var r=function(M,E,K,D,J,H){if(H===undefined){H=4}var G=D-E;var F=J-K;var I=Math.floor(Math.sqrt(G*G+F*F)/H);var N=G/I;var L=F/I;var C;for(C=0;C<I;C++,E+=N,K+=L){if(C%2!==0){continue}M.fillRect(E,K,H,1)}};var s=function(E,D,C,H){var G=D-H/2,F=D+H/2,I=C-Math.sqrt(H*3/2);E.beginPath();E.moveTo(G,I);E.lineTo(F,I);E.lineTo(D,C);E.lineTo(G,I);E.strokeStyle=this.fillStyle;E.fill();E.stroke();E.closePath()};var o=function(E,G,C,D,F){this.data=E;this.view_start=G;this.view_end=C;this.prefs=extend({},this.default_prefs,D);this.mode=F};o.prototype.default_prefs={};var w=function(E,G,C,D,F){o.call(this,E,G,C,D,F)};w.prototype.default_prefis={show_counts:false};w.prototype.draw=function(P,C,O){var H=this.view_start,R=this.view_end-this.view_start,Q=C/R;var M=this.data.data,L=this.data.delta,J=this.data.max,E=O;delta_x_px=Math.ceil(L*Q);P.save();for(var F=0,G=M.length;F<G;F++){var K=Math.floor((M[F][0]-H)*Q);var I=M[F][1];if(!I){continue}var N=I/J*O;P.fillStyle="black";P.fillRect(K,E-N,delta_x_px,N);var D=4;if(this.prefs.show_counts&&(P.measureText(I).width+D)<delta_x_px){P.fillStyle="#666";P.textAlign="center";P.fillText(I,K+(delta_x_px/2),10)}}P.restore()};var c=function(E,G,C,D,F){o.call(this,E,G,C,D,F)};c.prototype.default_prefs={min_value:undefined,max_value:undefined,mode:"Histogram",color:"#000",overflow_color:"#F66"};c.prototype.draw=function(R,Q,O){var J=false,K=this.prefs.min_value,H=this.prefs.max_value,N=H-K,D=O,E=this.view_start,P=this.view_end-this.view_start,F=Q/P,L=this.mode,V=this.data;R.save();var W=Math.round(O+K/N*O);if(L!=="Intensity"){R.fillStyle="#aaa";R.fillRect(0,W,Q,1)}R.beginPath();R.fillStyle=this.prefs.color;var U,I,G;if(V.length>1){G=Math.ceil((V[1][0]-V[0][0])*F)}else{G=10}for(var S=0,T=V.length;S<T;S++){U=Math.round((V[S][0]-E)*F);I=V[S][1];if(I===null){if(J&&L==="Filled"){R.lineTo(U,D)}J=false;continue}if(I<K){I=K}else{if(I>H){I=H}}if(L==="Histogram"){I=Math.round(I/N*D);R.fillRect(U,W,G,-I)}else{if(L==="Intensity"){I=255-Math.floor((I-K)/N*255);R.fillStyle="rgb("+I+","+I+","+I+")";R.fillRect(U,0,G,D)}else{I=Math.round(D-(I-K)/N*D);if(J){R.lineTo(U,I)}else{J=true;if(L==="Filled"){R.moveTo(U,D);R.lineTo(U,I)}else{R.moveTo(U,I)}}}}}if(L==="Filled"){if(J){R.lineTo(U,W);R.lineTo(0,W)}R.fill()}else{R.stroke()}var C=-1,M=-1;R.fillStyle=this.prefs.overflow_color;for(var S=0,T=V.length;S<T;S++){I=V[S][1];U=Math.round((V[S][0]-E)*F);x_minus_scaled=Math.round((V[S][0]-1-E)*F);if(M>=0&&(I===null||I<H)){R.fillRect(M,0,x_minus_scaled-M+1,2);M=-1}else{if(C>=0&&(I===null||I>K)){R.fillRect(C,O-2,x_minus_scaled-C+1,2);C=-1}}if(I!==null&&I>H&&M<0){M=U}else{if(I!==null&&I<K&&C<0){C=U}}}R.restore()};var q=function(E,G,C,D,F){o.call(this,E,G,C,D,F)};q.prototype.default_prefs={block_color:"#FFF",connector_color:"#FFF"};extend(q.prototype,{get_required_height:function(D){var C=y_scale=this.get_row_height(),E=this.mode;if(E==="no_detail"||E==="Squish"||E==="Pack"){C=D*y_scale}return C+Math.max(Math.round(y_scale/2),5)},draw:function(O,F,N,K){var I=this.data,L=this.view_start,P=this.view_end;O.save();O.fillStyle=this.prefs.block_color;O.textAlign="right";var S=this.view_end-this.view_start,R=F/S,E=this.get_row_height();for(var H=0,J=I.length;H<J;H++){var Q=I[H],G=Q[0],C=Q[1],D=Q[2],M=(K&&K[G]!==undefined?K[G]:null);if((C<P&&D>L)&&(this.mode=="Dense"||M!==null)){this.draw_element(O,this.mode,Q,M,L,P,R,E,F)}}O.restore()}});var d=10,j=3,n=5,A=10,g=1,u=3,f=3,a=9,p=2,h="#ccc";var t=function(E,G,C,D,F){q.call(this,E,G,C,D,F)};extend(t.prototype,q.prototype,{get_row_height:function(){var D=this.mode,C;if(D==="Dense"){C=d}else{if(D==="no_detail"){C=j}else{if(D==="Squish"){C=n}else{C=A}}}return C},draw_element:function(O,H,W,J,Q,ag,ak,al,C){var T=W[0],ai=W[1],aa=W[2]-1,R=W[3],ab=Math.floor(Math.max(0,(ai-Q)*ak)),P=Math.ceil(Math.min(C,Math.max(0,(aa-Q)*ak))),Z=(H==="Dense"?0:(0+J))*al,N,ae,S=null,am=null,F=this.prefs.block_color,ad=this.prefs.label_color;if(H=="Dense"){J=1}if(H==="no_detail"){O.fillStyle=F;O.fillRect(ab,Z+5,P-ab,g)}else{var M=W[4],Y=W[5],ac=W[6],G=W[7];if(Y&&ac){S=Math.floor(Math.max(0,(Y-Q)*ak));am=Math.ceil(Math.min(C,Math.max(0,(ac-Q)*ak)))}var aj,U;if(H==="Squish"||H==="Dense"){aj=1;U=f}else{aj=5;U=a}if(!G){if(W.strand){if(W.strand==="+"){O.fillStyle=O.canvas.manager.get_pattern("right_strand_inv")}else{if(W.strand==="-"){O.fillStyle=O.canvas.manager.get_pattern("left_strand_inv")}}}else{O.fillStyle=F}O.fillRect(ab,Z,P-ab,U)}else{var L,V;if(H==="Squish"||H==="Dense"){O.fillStyle=h;L=Z+Math.floor(f/2)+1;V=1}else{if(M){var L=Z;var V=U;if(M==="+"){O.fillStyle=O.canvas.manager.get_pattern("right_strand")}else{if(M==="-"){O.fillStyle=O.canvas.manager.get_pattern("left_strand")}}}else{O.fillStyle=h;L+=(f/2)+1;V=1}}O.fillRect(ab,L,P-ab,V);for(var ah=0,E=G.length;ah<E;ah++){var I=G[ah],D=Math.floor(Math.max(0,(I[0]-Q)*ak)),X=Math.ceil(Math.min(C,Math.max((I[1]-1-Q)*ak)));if(D>X){continue}O.fillStyle=F;O.fillRect(D,Z+(U-aj)/2+1,X-D,aj);if(S!==undefined&&ac>Y&&!(D>am||X<S)){var af=Math.max(D,S),K=Math.min(X,am);O.fillRect(af,Z+1,K-af,U);if(G.length==1&&H=="Pack"){if(M==="+"){O.fillStyle=O.canvas.manager.get_pattern("right_strand_inv")}else{if(M==="-"){O.fillStyle=O.canvas.manager.get_pattern("left_strand_inv")}}if(af+14<K){af+=2;K-=2}O.fillRect(af,Z+1,K-af,U)}}}}if(H==="Pack"&&ai>Q){O.fillStyle=ad;if(Q===0&&ab-O.measureText(R).width<0){O.textAlign="left";O.fillText(R,P+p,Z+8)}else{O.textAlign="right";O.fillText(R,ab-p,Z+8)}O.fillStyle=F}}}});var b=function(E,G,C,D,F){q.call(this,E,G,C,D,F)};extend(b.prototype,q.prototype,{draw_element:function(V,Q,K,G,Y,E,N,W,T){var K=data[i],M=K[0],U=K[1],F=K[2]-1,P=K[3],I=Math.floor(Math.max(0,(U-Y)*N)),L=Math.ceil(Math.min(T,Math.max(0,(F-Y)*N))),H=(Q==="Dense"?0:(0+G))*W,C,Z,D=null,O=null;if(no_label){V.fillStyle=block_color;V.fillRect(I+left_offset,H+5,L-I,1)}else{var X=K[4],S=K[5],J=K[6];C=9;Z=1;V.fillRect(I+left_offset,H,L-I,C);if(Q!=="Dense"&&P!==undefined&&U>Y){V.fillStyle=label_color;if(Y===0&&I-V.measureText(P).width<0){V.textAlign="left";V.fillText(P,L+2+left_offset,H+8)}else{V.textAlign="right";V.fillText(P,I-2+left_offset,H+8)}V.fillStyle=block_color}var R=X+" / "+S;if(U>Y&&V.measureText(R).width<(L-I)){V.fillStyle="white";V.textAlign="center";V.fillText(R,left_offset+I+(L-I)/2,H+8);V.fillStyle=block_color}}}});var z=1001,m=1002,e=1003,y=1004,l=1005;var x=function(G,D){var I=G[0],H=G[1],F=D[0],E=D[1],C;if(I<F){if(H<F){C=z}else{if(H<=E){C=e}else{C=m}}}else{if(I>E){C=z}else{if(H<=E){C=l}else{C=y}}}return C};var v=function(F,H,C,E,G,D){q.call(this,F,H,C,E,G);this.ref_seq=D};v.prototype.default_prefs=extend({},q.prototype.default_prefs,{show_insertions:false});extend(v.prototype,q.prototype,{get_row_height:function(){var C,D=this.mode;if(D==="Dense"){C=d}else{if(D==="Squish"){C=n}else{C=A;if(this.prefs.show_insertions){C*=2}}}return C},draw_read:function(Z,U,P,ae,E,Y,M,J,I){Z.textAlign="center";var X=this,D=[ae,E],S=0,aa=0,W=0;ref_seq=this.ref_seq,char_width_px=Z.canvas.manager.char_width_px;var aj=[];if((U==="Pack"||this.mode==="Auto")&&J!==undefined&&P>char_width_px){W=Math.round(P/2)}if(!M){M=[[0,J.length]]}for(var Q=0,ac=M.length;Q<ac;Q++){var N=M[Q],F="MIDNSHP=X"[N[0]],R=N[1];if(F==="H"||F==="S"){S-=R}var K=Y+S,ai=Math.floor(Math.max(0,(K-ae)*P)),L=Math.floor(Math.max(0,(K+R-ae)*P));if(ai===L){L+=1}switch(F){case"H":break;case"S":case"M":case"=":var T=x([K,K+R],D);if(T!==z){var V=J.slice(aa,aa+R);if(W>0){Z.fillStyle=this.prefs.block_color;Z.fillRect(ai-W,I+1,L-ai,9);Z.fillStyle=h;for(var ag=0,C=V.length;ag<C;ag++){if(this.prefs.show_differences&&ref_seq){var O=ref_seq[K-ae+ag];if(!O||O.toLowerCase()===V[ag].toLowerCase()){continue}}if(K+ag>=ae&&K+ag<=E){var ah=Math.floor(Math.max(0,(K+ag-ae)*P));Z.fillText(V[ag],ah,I+9)}}}else{Z.fillStyle=this.prefs.block_color;Z.fillRect(ai,I+4,L-ai,f)}}aa+=R;S+=R;break;case"N":Z.fillStyle=h;Z.fillRect(ai-W,I+5,L-ai,1);S+=R;break;case"D":Z.fillStyle="red";Z.fillRect(ai-W,I+4,L-ai,3);S+=R;break;case"P":break;case"I":var T=x([K,K+R],D),ad=ai-W;if(T!==z){var V=J.slice(aa,aa+R);if(this.prefs.show_insertions){var H=ai-(L-ai)/2;if((U==="Pack"||this.mode==="Auto")&&J!==undefined&&P>char_width_px){Z.fillStyle="yellow";Z.fillRect(H-W,I-9,L-ai,9);aj[aj.length]={type:"triangle",data:[ad,I+4,5]};Z.fillStyle=h;switch(T){case (e):V=V.slice(ae-K);break;case (y):V=V.slice(0,K-E);break;case (l):break;case (m):V=V.slice(ae-K,K-E);break}for(var ag=0,C=V.length;ag<C;ag++){var ah=Math.floor(Math.max(0,(K+ag-ae)*P));Z.fillText(V[ag],ah-(L-ai)/2,I)}}else{Z.fillStyle="yellow";Z.fillRect(H,I+(this.mode!=="Dense"?2:5),L-ai,(U!=="Dense"?f:u))}}else{if((U==="Pack"||this.mode==="Auto")&&J!==undefined&&P>char_width_px){aj[aj.length]={type:"text",data:[V.length,ad,I+9]}}else{}}}aa+=R;break;case"X":aa+=R;break}}Z.fillStyle="yellow";var af,G,ak;for(var ab=0;ab<aj.length;ab++){af=aj[ab];G=af.type;ak=af.data;if(G==="text"){Z.save();Z.font="bold "+Z.font;Z.fillText(ak[0],ak[1],ak[2]);Z.restore()}else{if(G=="triangle"){s(Z,ak[0],ak[1],ak[2])}}}},draw_element:function(V,Q,I,F,Y,D,M,W,T){var L=I[0],U=I[1],E=I[2],N=I[3],H=Math.floor(Math.max(0,(U-Y)*M)),J=Math.ceil(Math.min(T,Math.max(0,(E-Y)*M))),G=(Q==="Dense"?0:(0+F))*W,Z=this.prefs.block_color,K=this.prefs.label_color,S=0;if((Q==="Pack"||this.mode==="Auto")&&M>V.canvas.manager.char_width_px){var S=Math.round(M/2)}V.fillStyle=Z;if(I[5] instanceof Array){var R=Math.floor(Math.max(0,(I[4][0]-Y)*M)),P=Math.ceil(Math.min(T,Math.max(0,(I[4][1]-Y)*M))),O=Math.floor(Math.max(0,(I[5][0]-Y)*M)),C=Math.ceil(Math.min(T,Math.max(0,(I[5][1]-Y)*M)));if(I[4][1]>=Y&&I[4][0]<=D&&I[4][2]){this.draw_read(V,Q,M,Y,D,I[4][0],I[4][2],I[4][3],G)}if(I[5][1]>=Y&&I[5][0]<=D&&I[5][2]){this.draw_read(V,Q,M,Y,D,I[5][0],I[5][2],I[5][3],G)}if(O>P){V.fillStyle=h;r(V,P-S,G+5,O-S,G+5)}}else{V.fillStyle=Z;this.draw_read(V,Q,M,Y,D,U,I[4],I[5],G)}if(Q==="Pack"&&U>Y){V.fillStyle=this.prefs.label_color;var X=1;if(X===0&&H-V.measureText(N).width<0){V.textAlign="left";V.fillText(N,J+p-S,G+8)}else{V.textAlign="right";V.fillText(N,H-p-S,G+8)}V.fillStyle=Z}}});B.SummaryTreePainter=w;B.LinePainter=c;B.LinkedFeaturePainter=t;B.ReadPainter=v;B.VariantPainter=b};(function(d){var c={};var b=function(e){return c[e]};var a=function(f,g){var e={};g(b,e);c[f]=e};a("slotting",slotting_module);a("painters",painters_module);a("trackster",trackster_module);for(key in c.trackster){d[key]=c.trackster[key]}})(window); \ No newline at end of file +var extend=function(){var c=arguments[0];for(var b=1;b<arguments.length;b++){var a=arguments[b];for(key in a){c[key]=a[key]}}return c};var trackster_module=function(f,P){var o=f("slotting"),F=f("painters");var V=function(W,X){this.document=W;this.default_font=X!==undefined?X:"9px Monaco, Lucida Console, monospace";this.dummy_canvas=this.new_canvas();this.dummy_context=this.dummy_canvas.getContext("2d");this.dummy_context.font=this.default_font;this.char_width_px=this.dummy_context.measureText("A").width;this.patterns={};this.load_pattern("right_strand","/visualization/strand_right.png");this.load_pattern("left_strand","/visualization/strand_left.png");this.load_pattern("right_strand_inv","/visualization/strand_right_inv.png");this.load_pattern("left_strand_inv","/visualization/strand_left_inv.png")};extend(V.prototype,{load_pattern:function(W,aa){var X=this.patterns,Y=this.dummy_context,Z=new Image();Z.src=image_path+aa;Z.onload=function(){X[W]=Y.createPattern(Z,"repeat")}},get_pattern:function(W){return this.patterns[W]},new_canvas:function(){var W=this.document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(W)}W.manager=this;return W}});var A=function(W,X){W.bind("drag",{handle:X,relative:true},function(ab,ac){var aa=$(this).parent();var Z=aa.children();var Y;for(Y=0;Y<Z.length;Y++){if(ac.offsetY<$(Z.get(Y)).position().top){break}}if(Y===Z.length){if(this!==Z.get(Y-1)){aa.append(this)}}else{if(this!==Z.get(Y)){$(this).insertBefore(Z.get(Y))}}})};var h=function(Y,W){var X=W-Y;return(X<=2?0.01:(X<=100?1:(X<=1000?5:10)))};var B=9,y=10,K=B+2,v=100,C=12000,I=200,r=10,E=5000,s=100,m="There was an error in indexing this dataset. ",D="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",z="No data for this chrom/contig.",p="Currently indexing... please wait",u="Tool cannot be rerun: ",a="Loading data...",Q="Ready for display",d=10,q=5,x=5;function t(W){return Math.round(W*1000)/1000}var c=function(W){this.num_elements=W;this.clear()};extend(c.prototype,{get:function(X){var W=this.key_ary.indexOf(X);if(W!==-1){this.move_key_to_end(X,W)}return this.obj_cache[X]},set:function(X,Y){if(!this.obj_cache[X]){if(this.key_ary.length>=this.num_elements){var W=this.key_ary.shift();delete this.obj_cache[W]}this.key_ary.push(X)}this.obj_cache[X]=Y;return Y},move_key_to_end:function(X,W){this.key_ary.splice(W,1);this.key_ary.push(X)},clear:function(){this.obj_cache={};this.key_ary=[]},size:function(){return this.key_ary.length}});var J=function(X,W,Y){c.call(this,X);this.track=W;this.subset=(Y!==undefined?Y:true)};extend(J.prototype,c.prototype,{load_data:function(ae,af,aa,ad,X,ac){var Z={chrom:ae,low:af,high:aa,mode:ad,resolution:X,dataset_id:this.track.dataset_id,hda_ldda:this.track.hda_ldda};$.extend(Z,ac);if(this.track.filters_manager){var ag=[];var W=this.track.filters_manager.filters;for(var ab=0;ab<W.length;ab++){ag[ag.length]=W[ab].name}Z.filter_cols=JSON.stringify(ag)}var Y=this;return $.getJSON(this.track.data_url,Z,function(ah){Y.set_data(af,aa,ad,ah)})},get_data:function(Y,W,ab,ac,X,aa){var Z=this.get(this.gen_key(W,ab,ac));if(Z){return Z}Z=this.load_data(Y,W,ab,ac,X,aa);this.set_data(W,ab,ac,Z);return Z},set_data:function(X,Y,Z,W){return this.set(this.gen_key(X,Y,Z),W)},gen_key:function(W,Y,Z){var X=W+"_"+Y+"_"+Z;return X},split_key:function(W){return W.split("_")}});var U=function(W,Z,Y,X,aa){this.container=W;this.chrom=null;this.vis_id=Y;this.dbkey=X;this.title=Z;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_id_counter=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.init(aa);this.canvas_manager=new V(W.get(0).ownerDocument);this.reset()};extend(U.prototype,{init:function(Z){var Y=this.container,W=this;this.top_container=$("<div/>").addClass("top-container").appendTo(Y);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(Y);this.bottom_container=$("<div/>").addClass("bottom-container").appendTo(Y);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.top_container);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide();this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.bottom_container);this.nav_container=$("<div/>").addClass("nav-container").prependTo(this.top_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.bottom_container);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a href='javascript:void(0);'>Close Overview</a>").addClass("overview-close").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div/>").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.nav_controls);var X=function(aa){if(aa.type==="focusout"||(aa.keyCode||aa.which)===13||(aa.keyCode||aa.which)===27){if((aa.keyCode||aa.which)!==27){W.go_to($(this).val())}$(this).hide();$(this).val("");W.location_span.show();W.chrom_select.show()}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keyup focusout",X).appendTo(this.nav_controls);this.location_span=$("<span/>").addClass("location").appendTo(this.nav_controls);this.location_span.bind("click",function(){W.location_span.hide();W.chrom_select.hide();W.nav_input.val(W.chrom+":"+W.low+"-"+W.high);W.nav_input.css("display","inline-block");W.nav_input.select();W.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.nav_controls)}this.zo_link=$("<a id='zoom-out' />").click(function(){W.zoom_out();W.redraw()}).appendTo(this.nav_controls);this.zi_link=$("<a id='zoom-in' />").click(function(){W.zoom_in();W.redraw()}).appendTo(this.nav_controls);this.load_chroms({low:0},Z);this.chrom_select.bind("change",function(){W.change_chrom(W.chrom_select.val())});this.intro_div.show();this.content_div.bind("click",function(aa){$(this).find("input").trigger("blur")});this.content_div.bind("dblclick",function(aa){W.zoom_in(aa.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(aa,ab){this.current_x=ab.offsetX}).bind("drag",function(aa,ac){var ad=ac.offsetX-this.current_x;this.current_x=ac.offsetX;var ab=Math.round(ad/W.viewport_container.width()*(W.max_high-W.max_low));W.move_delta(-ab)});this.overview_close.bind("click",function(){for(var ab=0,aa=W.tracks.length;ab<aa;ab++){W.tracks[ab].is_overview=false}$(this).siblings().filter("canvas").remove();$(this).parent().css("height",W.overview_box.height());W.overview_highlight.hide();$(this).hide()});this.viewport_container.bind("draginit",function(aa,ab){if(aa.clientX>W.viewport_container.width()-16){return false}}).bind("dragstart",function(aa,ab){ab.original_low=W.low;ab.current_height=aa.clientY;ab.current_x=ab.offsetX}).bind("drag",function(ac,ae){var aa=$(this);var af=ae.offsetX-ae.current_x;var ab=aa.scrollTop()-(ac.clientY-ae.current_height);aa.scrollTop(ab);ae.current_height=ac.clientY;ae.current_x=ae.offsetX;var ad=Math.round(af/W.viewport_container.width()*(W.high-W.low));W.move_delta(ad)}).bind("mousewheel",function(ac,ae,ab,aa){if(ab){var ad=Math.round(-ab/W.viewport_container.width()*(W.high-W.low));W.move_delta(ad)}});this.top_labeltrack.bind("dragstart",function(aa,ab){return $("<div />").css({height:W.content_div.height()+W.top_labeltrack.height()+W.nav_labeltrack.height()+1,top:"0px",position:"absolute","background-color":"#ccf",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(ae,af){$(af.proxy).css({left:Math.min(ae.pageX,af.startX),width:Math.abs(ae.pageX-af.startX)});var ab=Math.min(ae.pageX,af.startX)-W.container.offset().left,aa=Math.max(ae.pageX,af.startX)-W.container.offset().left,ad=(W.high-W.low),ac=W.viewport_container.width();W.update_location(Math.round(ab/ac*ad)+W.low,Math.round(aa/ac*ad)+W.low)}).bind("dragend",function(af,ag){var ab=Math.min(af.pageX,ag.startX),aa=Math.max(af.pageX,ag.startX),ad=(W.high-W.low),ac=W.viewport_container.width(),ae=W.low;W.low=Math.round(ab/ac*ad)+ae;W.high=Math.round(aa/ac*ad)+ae;$(ag.proxy).remove();W.redraw()});this.add_label_track(new T(this,this.top_labeltrack));this.add_label_track(new T(this,this.nav_labeltrack));$(window).bind("resize",function(){W.resize_window()});$(document).bind("redraw",function(){W.redraw()});this.reset();$(window).trigger("resize")},update_location:function(W,X){this.location_span.text(commatize(W)+" - "+commatize(X));this.nav_input.val(this.chrom+":"+commatize(W)+"-"+commatize(X))},load_chroms:function(X,Y){X.num=s;$.extend(X,(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}));var W=this;$.ajax({url:chrom_url,data:X,dataType:"json",success:function(aa){if(aa.chrom_info.length===0){alert("Invalid chromosome: "+X.chrom);return}if(aa.reference){W.add_label_track(new w(W))}W.chrom_data=aa.chrom_info;var ad='<option value="">Select Chrom/Contig</option>';for(var ac=0,Z=W.chrom_data.length;ac<Z;ac++){var ab=W.chrom_data[ac].chrom;ad+='<option value="'+ab+'">'+ab+"</option>"}if(aa.prev_chroms){ad+='<option value="previous">Previous '+s+"</option>"}if(aa.next_chroms){ad+='<option value="next">Next '+s+"</option>"}W.chrom_select.html(ad);if(Y){Y()}W.chrom_start_index=aa.start_index},error:function(){alert("Could not load chroms for this dbkey:",W.dbkey)}})},change_chrom:function(aa,X,ac){if(!aa||aa==="None"){return}var Z=this;if(aa==="previous"){Z.load_chroms({low:this.chrom_start_index-s});return}if(aa==="next"){Z.load_chroms({low:this.chrom_start_index+s});return}var ab=$.grep(Z.chrom_data,function(ae,af){return ae.chrom===aa})[0];if(ab===undefined){Z.load_chroms({chrom:aa},function(){Z.change_chrom(aa,X,ac)});return}else{if(aa!==Z.chrom){Z.chrom=aa;if(!Z.chrom){Z.intro_div.show()}else{Z.intro_div.hide()}Z.chrom_select.val(Z.chrom);Z.max_high=ab.len-1;Z.reset();Z.redraw(true);for(var ad=0,W=Z.tracks.length;ad<W;ad++){var Y=Z.tracks[ad];if(Y.init){Y.init()}}}if(X!==undefined&&ac!==undefined){Z.low=Math.max(X,0);Z.high=Math.min(ac,Z.max_high)}Z.reset_overview();Z.redraw()}},go_to:function(aa){var ae=this,W,Z,X=aa.split(":"),ac=X[0],ad=X[1];if(ad!==undefined){try{var ab=ad.split("-");W=parseInt(ab[0].replace(/,/g,""),10);Z=parseInt(ab[1].replace(/,/g,""),10)}catch(Y){return false}}ae.change_chrom(ac,W,Z)},move_fraction:function(Y){var W=this;var X=W.high-W.low;this.move_delta(Y*X)},move_delta:function(Y){var W=this;var X=W.high-W.low;if(W.low-Y<W.max_low){W.low=W.max_low;W.high=W.max_low+X}else{if(W.high-Y>W.max_high){W.high=W.max_high;W.low=W.max_high-X}else{W.high-=Y;W.low-=Y}}W.redraw()},add_track:function(W){W.view=this;W.track_id=this.track_id_counter;this.tracks.push(W);if(W.init){W.init()}W.container_div.attr("id","track_"+W.track_id);A(W.container_div,".draghandle");this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(W){W.view=this;this.label_tracks.push(W)},remove_track:function(W){this.has_changes=true;W.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(W)];this.num_tracks-=1},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(ad){var ac=this.high-this.low,ab=this.low,X=this.high;if(ab<this.max_low){ab=this.max_low}if(X>this.max_high){X=this.max_high}if(this.high!==0&&ac<this.min_separation){X=ab+this.min_separation}this.low=Math.floor(ab);this.high=Math.ceil(X);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(r,Math.max(0,Math.ceil(Math.log(this.resolution,r)/Math.log(r))));var W=(this.low/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var aa=((this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())||0;var ae=13;this.overview_box.css({left:W,width:Math.max(ae,aa)}).show();if(aa<ae){this.overview_box.css("left",W-(ae-aa)/2)}if(this.overview_highlight){this.overview_highlight.css({left:W,width:aa})}this.update_location(this.low,this.high);if(!ad){for(var Y=0,Z=this.tracks.length;Y<Z;Y++){if(this.tracks[Y]&&this.tracks[Y].enabled){this.tracks[Y].draw()}}for(Y=0,Z=this.label_tracks.length;Y<Z;Y++){this.label_tracks[Y].draw()}}},zoom_in:function(X,Y){if(this.max_high===0||this.high-this.low<this.min_separation){return}var Z=this.high-this.low,aa=Z/2+this.low,W=(Z/this.zoom_factor)/2;if(X){aa=X/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(aa-W);this.high=Math.round(aa+W);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var X=this.high-this.low,Y=X/2+this.low,W=(X*this.zoom_factor)/2;this.low=Math.round(Y-W);this.high=Math.round(Y+W);this.redraw()},resize_window:function(){this.viewport_container.height(this.container.height()-this.top_container.height()-this.bottom_container.height());this.nav_container.width(this.container.width());this.redraw()},reset_overview:function(){this.overview_viewport.find("canvas").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide()}});var n=function(X,aa){this.track=X;this.name=aa.name;this.params=[];var ai=aa.params;for(var Y=0;Y<ai.length;Y++){var ad=ai[Y],W=ad.name,ah=ad.label,Z=unescape(ad.html),af=ad.type;if(af==="number"){this.params[this.params.length]=new g(W,ah,Z,ad.min,ad.max)}else{if(af=="select"){this.params[this.params.length]=new H(W,ah,Z)}else{console.log("WARNING: unrecognized tool parameter type:",W,af)}}}this.parent_div=$("<div/>").addClass("dynamic-tool").hide();this.parent_div.bind("drag",function(ak){ak.stopPropagation()}).bind("click",function(ak){ak.stopPropagation()}).bind("dblclick",function(ak){ak.stopPropagation()});var ag=$("<div class='tool-name'>").appendTo(this.parent_div).text(this.name);var ae=this.params;var ab=this;$.each(this.params,function(al,ao){var an=$("<div>").addClass("param-row").appendTo(ab.parent_div);var ak=$("<div>").addClass("param-label").text(ao.label).appendTo(an);var am=$("<div/>").addClass("slider").html(ao.html).appendTo(an);$("<div style='clear: both;'/>").appendTo(an)});this.parent_div.find("input").click(function(){$(this).select()});var aj=$("<div>").addClass("slider-row").appendTo(this.parent_div);var ac=$("<input type='submit'>").attr("value","Run").appendTo(aj);var ab=this;ac.click(function(){ab.run()})};extend(n.prototype,{get_param_values_dict:function(){var W={};this.parent_div.find(":input").each(function(){var X=$(this).attr("name"),Y=$(this).val();W[X]=JSON.stringify(Y)});return W},get_param_values:function(){var X=[];var W={};this.parent_div.find(":input").each(function(){var Y=$(this).attr("name"),Z=$(this).val();if(Y){X[X.length]=Z}});return X},run:function(){var X={dataset_id:this.track.original_dataset_id,chrom:this.track.view.chrom,low:this.track.view.low,high:this.track.view.high,tool_id:this.name};$.extend(X,this.get_param_values_dict());var Z=this.track,Y=X.tool_id+Z.tool_region_and_parameters_str(X.chrom,X.low,X.high),aa;if(Z.track_type==="FeatureTrack"){aa=new M(Y,view,Z.hda_ldda,undefined,{},{},Z)}this.track.add_track(aa);aa.content_div.text("Starting job.");var W=function(){$.getJSON(run_tool_url,X,function(ab){if(ab==="no converter"){aa.container_div.addClass("error");aa.content_div.text(D)}else{if(ab.error){aa.container_div.addClass("error");aa.content_div.text(u+ab.message)}else{if(ab==="pending"){aa.container_div.addClass("pending");aa.content_div.text("Converting input data so that it can be easily reused.");setTimeout(W,2000)}else{aa.dataset_id=ab.dataset_id;aa.content_div.text("Running job.");aa.init()}}}})};W()}});var H=function(X,W,Y){this.name=X;this.label=W;this.html=Y};var g=function(Y,X,aa,Z,W){H.call(this,Y,X,aa);this.min=Z;this.max=W};var j=function(X,W,Y){this.name=X;this.index=W;this.value=Y};var N=function(X,W){this.name=X;this.index=W;this.low=-Number.MAX_VALUE;this.high=Number.MAX_VALUE;this.min=Number.MAX_VALUE;this.max=-Number.MAX_VALUE;this.slider=null;this.slider_label=null};extend(N.prototype,{applies_to:function(W){if(W.length>this.index){return true}return false},keep:function(W){if(!this.applies_to(W)){return true}return(W[this.index]>=this.low&&W[this.index]<=this.high)},update_attrs:function(X){var W=false;if(!this.applies_to(X)){return W}if(X[this.index]<this.min){this.min=Math.floor(X[this.index]);W=true}if(X[this.index]>this.max){this.max=Math.ceil(X[this.index]);W=true}return W},update_ui_elt:function(){var X=this.slider.slider("option","min"),W=this.slider.slider("option","max");if(this.min<X||this.max>W){this.slider.slider("option","min",this.min);this.slider.slider("option","max",this.max);this.slider.slider("option","step",h(this.min,this.max));this.slider.slider("option","values",[this.min,this.max])}}});var S=function(Y,ae){this.track=Y;this.filters=[];for(var aa=0;aa<ae.length;aa++){var W=ae[aa];var X=W.name,ad=W.type,ab=W.index;if(ad==="int"||ad==="float"){this.filters[aa]=new N(X,ab)}else{this.filters[aa]=new j(X,ab,ad)}}var ac=function(af,ag,ah){af.click(function(){var ai=ag.text();max=parseFloat(ah.slider("option","max")),input_size=(max<=1?4:max<=1000000?max.toString().length:6),multi_value=false;if(ah.slider("option","values")){input_size=2*input_size+1;multi_value=true}ag.text("");$("<input type='text'/>").attr("size",input_size).attr("maxlength",input_size).attr("value",ai).appendTo(ag).focus().select().click(function(aj){aj.stopPropagation()}).blur(function(){$(this).remove();ag.text(ai)}).keyup(function(an){if(an.keyCode===27){$(this).trigger("blur")}else{if(an.keyCode===13){var al=ah.slider("option","min"),aj=ah.slider("option","max"),am=function(ao){return(isNaN(ao)||ao>aj||ao<al)},ak=$(this).val();if(!multi_value){ak=parseFloat(ak);if(am(ak)){alert("Parameter value must be in the range ["+al+"-"+aj+"]");return $(this)}}else{ak=ak.split("-");ak=[parseFloat(ak[0]),parseFloat(ak[1])];if(am(ak[0])||am(ak[1])){alert("Parameter value must be in the range ["+al+"-"+aj+"]");return $(this)}}ah.slider((multi_value?"values":"value"),ak)}}})})};this.parent_div=$("<div/>").addClass("filters").hide();this.parent_div.bind("drag",function(af){af.stopPropagation()}).bind("click",function(af){af.stopPropagation()}).bind("dblclick",function(af){af.stopPropagation()});var Z=this;$.each(this.filters,function(al,ag){var ai=$("<div/>").addClass("slider-row").appendTo(Z.parent_div);var af=$("<div/>").addClass("slider-label").appendTo(ai);var an=$("<span/>").addClass("slider-name").text(ag.name+" ").appendTo(af);var ah=$("<span/>");var aj=$("<span/>").addClass("slider-value").appendTo(af).append("[").append(ah).append("]");var am=$("<div/>").addClass("slider").appendTo(ai);ag.control_element=$("<div/>").attr("id",ag.name+"-filter-control").appendTo(am);var ak=[0,0];ag.control_element.slider({range:true,min:Number.MAX_VALUE,max:-Number.MIN_VALUE,values:[0,0],slide:function(ao,ap){ak=ap.values;ah.text(ap.values[0]+"-"+ap.values[1]);setTimeout(function(){if(ap.values[0]==ak[0]&&ap.values[1]==ak[1]){var aq=ap.values;ah.text(aq[0]+"-"+aq[1]);ag.low=aq[0];ag.high=aq[1];Z.track.draw(true,true)}},50)},change:function(ao,ap){ag.control_element.slider("option","slide").call(ag.control_element,ao,ap)}});ag.slider=ag.control_element;ag.slider_label=ah;ac(aj,ah,ag.control_element);$("<div style='clear: both;'/>").appendTo(ai)})};var R=function(W){this.track=W.track;this.params=W.params;this.values={};if(W.saved_values){this.restore_values(W.saved_values)}this.onchange=W.onchange};extend(R.prototype,{restore_values:function(W){var X=this;$.each(this.params,function(Y,Z){if(W[Z.key]!==undefined){X.values[Z.key]=W[Z.key]}else{X.values[Z.key]=Z.default_value}})},build_form:function(){var X=this;var W=$("<div />");$.each(this.params,function(ab,Z){if(!Z.hidden){var Y="param_"+ab;var ag=$("<div class='form-row' />").appendTo(W);ag.append($("<label />").attr("for",Y).text(Z.label+":"));if(Z.type==="bool"){ag.append($('<input type="checkbox" />').attr("id",Y).attr("name",Y).attr("checked",X.values[Z.key]))}else{if(Z.type==="color"){var ad=X.values[Z.key];var ac=$("<input />").attr("id",Y).attr("name",Y).val(ad);var ae=$("<div class='tipsy tipsy-north' style='position: absolute;' />").hide();var aa=$("<div style='background-color: black; padding: 10px;'></div>").appendTo(ae);var af=$("<div/>").appendTo(aa).farbtastic({width:100,height:100,callback:ac,color:ad});$("<div />").append(ac).append(ae).appendTo(ag).bind("click",function(ah){ae.css({left:$(this).position().left+($(ac).width()/2)-60,top:$(this).position().top+$(this.height)}).show();$(document).bind("click.color-picker",function(){ae.hide();$(document).unbind("click.color-picker")});ah.stopPropagation()})}else{ag.append($("<input />").attr("id",Y).attr("name",Y).val(X.values[Z.key]))}}}});return W},update_from_form:function(W){var Y=this;var X=false;$.each(this.params,function(Z,ab){if(!ab.hidden){var ac="param_"+Z;var aa=W.find("#"+ac).val();if(ab.type==="float"){aa=parseFloat(aa)}else{if(ab.type==="int"){aa=parseInt(aa)}else{if(ab.type==="bool"){aa=W.find("#"+ac).is(":checked")}}}if(aa!==Y.values[ab.key]){Y.values[ab.key]=aa;X=true}}});if(X){this.onchange()}}});var b=function(W,X){this.track=W;this.canvas=X};var k=function(X,W,aa,Y,Z){this.name=X;this.view=W;this.parent_element=aa;this.data_url=(Y?Y:default_data_url);this.data_url_extra_params={};this.data_query_wait=(Z?Z:E);this.dataset_check_url=converted_datasets_state_url;this.container_div=$("<div />").addClass("track").css("position","relative");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);if(this.view.editor){this.drag_div=$("<div class='draghandle' />").appendTo(this.header_div)}this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name);this.name_div.attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase())}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_element.append(this.container_div)};extend(k.prototype,{init:function(){var W=this;W.enabled=false;W.tile_cache.clear();W.data_cache.clear();W.initial_canvas=undefined;W.content_div.css("height","auto");W.container_div.removeClass("nodata error pending");if(!W.dataset_id){return}$.getJSON(converted_datasets_state_url,{hda_ldda:W.hda_ldda,dataset_id:W.dataset_id,chrom:W.view.chrom},function(X){if(!X||X==="error"||X.kind==="error"){W.container_div.addClass("error");W.content_div.text(m);if(X.message){var Z=W.view.tracks.indexOf(W);var Y=$(" <a href='javascript:void(0);'></a>").text("View error").bind("click",function(){show_modal("Trackster Error","<pre>"+X.message+"</pre>",{Close:hide_modal})});W.content_div.append(Y)}}else{if(X==="no converter"){W.container_div.addClass("error");W.content_div.text(D)}else{if(X==="no data"||(X.data!==undefined&&(X.data===null||X.data.length===0))){W.container_div.addClass("nodata");W.content_div.text(z)}else{if(X==="pending"){W.container_div.addClass("pending");W.content_div.text(p);setTimeout(function(){W.init()},W.data_query_wait)}else{if(X.status==="data"){if(X.valid_chroms){W.valid_chroms=X.valid_chroms;W.make_name_popup_menu()}W.content_div.text(Q);if(W.view.chrom){W.content_div.text("");W.content_div.css("height",W.height_px+"px");W.enabled=true;$.when(W.predraw_init()).done(function(){W.container_div.removeClass("nodata error pending");W.draw()})}}}}}}})},predraw_init:function(){},update_name:function(W){this.old_name=this.name;this.name=W;this.name_div.text(this.name)},revert_name:function(){this.name=this.old_name;this.name_div.text(this.name)}});var G=function(ae,ac,af){var X=this,ag=X.view;this.filters_manager=(ae!==undefined?new S(this,ae):undefined);this.filters_available=false;this.filters_visible=false;this.tool=(ac!==undefined&&obj_length(ac)>0?new n(this,ac):undefined);this.parent_track=af;this.child_tracks=[];if(X.hidden){return}if(this.parent_track){this.header_div.find(".draghandle").removeClass("draghandle").addClass("child-track-icon").addClass("icon-button");this.parent_element.addClass("child-track");this.tool=undefined}X.child_tracks_container=$("<div/>").addClass("child-tracks-container").hide();X.container_div.append(X.child_tracks_container);if(this.filters_manager){this.filters_div=this.filters_manager.parent_div;this.header_div.after(this.filters_div)}if(this.tool){this.dynamic_tool_div=this.tool.parent_div;this.header_div.after(this.dynamic_tool_div)}if(X.display_modes!==undefined){if(X.mode_div===undefined){X.mode_div=$("<div class='right-float menubutton popup' />").appendTo(X.header_div);var Z=(X.track_config&&X.track_config.values.mode?X.track_config.values.mode:X.display_modes[0]);X.mode=Z;X.mode_div.text(Z);var Y=function(ah){X.mode_div.text(ah);X.mode=ah;X.track_config.values.mode=ah;X.tile_cache.clear();X.draw()};var W={};for(var aa=0,ad=X.display_modes.length;aa<ad;aa++){var ab=X.display_modes[aa];W[ab]=function(ah){return function(){Y(ah)}}(ab)}make_popupmenu(X.mode_div,W)}else{X.mode_div.hide()}}this.make_name_popup_menu()};extend(G.prototype,k.prototype,{make_name_popup_menu:function(){var X=this;var W={};W["Edit configuration"]=function(){var ad=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},ab=function(){X.track_config.update_from_form($(".dialog-box"));hide_modal();$(window).unbind("keypress.check_enter_esc")},ac=function(ae){if((ae.keyCode||ae.which)===27){ad()}else{if((ae.keyCode||ae.which)===13){ab()}}};$(window).bind("keypress.check_enter_esc",ac);show_modal("Configure Track",X.track_config.build_form(),{Cancel:ad,OK:ab})};if(X.filters_available>0){var aa=(X.filters_div.is(":visible")?"Hide filters":"Show filters");W[aa]=function(){X.filters_visible=(X.filters_div.is(":visible"));X.filters_div.toggle();X.make_name_popup_menu()}}if(X.tool){var aa=(X.dynamic_tool_div.is(":visible")?"Hide tool":"Show tool");W[aa]=function(){if(!X.dynamic_tool_div.is(":visible")){X.update_name(X.name+X.tool_region_and_parameters_str())}else{menu_option_text="Show dynamic tool";X.revert_name()}X.dynamic_tool_div.toggle();X.make_name_popup_menu()}}if(X.valid_chroms){W["List chrom/contigs with data"]=function(){show_modal("Chrom/contigs with data","<p>"+X.valid_chroms.join("<br/>")+"</p>",{Close:function(){hide_modal()}})}}var Y=view;var Z=function(){$("#no-tracks").show()};if(this.parent_track){Y=this.parent_track;Z=function(){}}W.Remove=function(){Y.remove_track(X);if(Y.num_tracks===0){Z()}};make_popupmenu(X.name_div,W)},draw:function(W,Z){var an=this.view.low,ac=this.view.high,ae=ac-an,ag=this.view.container.width(),ab=ag/ae,ah=this.view.resolution,aa=$("<div style='position: relative;'></div>");if(!Z){this.content_div.children().remove()}this.content_div.append(aa);this.max_height=0;var aj=Math.floor(an/ah/I);var Y={};while((aj*I*ah)<ac){var am=ag+"_"+ab+"_"+aj;var ad=this.tile_cache.get(am);var ak=aj*I*this.view.resolution;var X=ak+I*this.view.resolution;if(!W&&ad){this.show_tile(ad,aa,ak,ab)}else{this.delayed_draw(W,am,ak,X,aj,ah,aa,ab,Y)}aj+=1}var af=this;var al=setInterval(function(){if(obj_length(Y)===0){clearInterval(al);if(Z){var aq=af.content_div.children();var ap=false;for(var ar=aq.length-1,ao=0;ar>=ao;ar--){var aw=$(aq[ar]);if(ap){aw.remove()}else{if(aw.children().length!==0){ap=true}}}}if(af.filters_manager){var au=af.filters_manager.filters;for(var av=0;av<au.length;av++){au[av].update_ui_elt()}var at=false;if(af.example_feature){for(var av=0;av<au.length;av++){if(au[av].applies_to(af.example_feature)){at=true;break}}}if(af.filters_available!==at){af.filters_available=at;if(!af.filters_available){af.filters_div.hide()}af.make_name_popup_menu()}}}},50);for(var ai=0;ai<this.child_tracks.length;ai++){this.child_tracks[ai].draw(W,Z)}},delayed_draw:function(X,ae,ac,ag,Y,aa,af,ah,ab){var Z=this;var ad=function(ap,ai,ak,aj,an,ao,al){returned_tile=Z.draw_tile(ai,ak,aj,an,ao,al);var am=$("<div class='track-tile'>").prepend(returned_tile);tile_element=am;Z.tile_cache.set(ae,tile_element);Z.show_tile(tile_element,an,ac,ao);delete ab[ap]};var W=setTimeout(function(){if(ac<=Z.view.high&&ag>=Z.view.low){var ai=(X?undefined:Z.tile_cache.get(ae));if(ai){Z.show_tile(ai,af,ac,ah);delete ab[W]}else{$.when(Z.data_cache.get_data(view.chrom,ac,ag,Z.mode,aa,Z.data_url_extra_params)).then(function(aj){if(view.reference_track&&ah>view.canvas_manager.char_width_px){$.when(view.reference_track.data_cache.get_data(view.chrom,ac,ag,Z.mode,aa,view.reference_track.data_url_extra_params)).then(function(ak){ad(W,aj,aa,Y,af,ah,ak)})}else{ad(W,aj,aa,Y,af,ah)}})}}},50);ab[W]=true},show_tile:function(W,ab,Z,ac){var X=this;var Y=this.view.high-this.view.low,aa=(Z-this.view.low)*ac;if(this.left_offset){aa-=this.left_offset}W.css({position:"absolute",top:0,left:aa,height:""});ab.append(W);X.max_height=Math.max(X.max_height,W.height());X.content_div.css("height",X.max_height+"px");ab.children().css("height",X.max_height+"px")},set_overview:function(){var W=this.view;if(this.initial_canvas&&this.is_overview){W.overview_close.show();W.overview_viewport.append(this.initial_canvas);W.overview_highlight.show().height(this.initial_canvas.height());W.overview_viewport.height(this.initial_canvas.height()+W.overview_box.height())}$(window).trigger("resize")},tool_region_and_parameters_str:function(Y,W,Z){var X=this,aa=(Y!==undefined&&W!==undefined&&Z!==undefined?Y+":"+W+"-"+Z:"all");return" - region=["+aa+"], parameters=["+X.tool.get_param_values().join(", ")+"]"},add_track:function(W){W.track_id=this.track_id+"_"+this.child_tracks.length;W.container_div.attr("id","track_"+W.track_id);this.child_tracks_container.append(W.container_div);A(W.container_div,".child-track-icon");if(!$(this.child_tracks_container).is(":visible")){this.child_tracks_container.show()}this.child_tracks.push(W);this.view.has_changes=true},remove_track:function(W){W.container_div.fadeOut("slow",function(){$(this).remove()})}});var T=function(W,X){this.track_type="LabelTrack";this.hidden=true;k.call(this,null,W,X);this.container_div.addClass("label-track")};extend(T.prototype,k.prototype,{draw:function(){var Y=this.view,Z=Y.high-Y.low,ac=Math.floor(Math.pow(10,Math.floor(Math.log(Z)/Math.log(10)))),W=Math.floor(Y.low/ac)*ac,aa=this.view.container.width(),X=$("<div style='position: relative; height: 1.3em;'></div>");while(W<Y.high){var ab=(W-Y.low)/Z*aa;X.append($("<div class='label'>"+commatize(W)+"</div>").css({position:"absolute",left:ab-1}));W+=ac}this.content_div.children(":first").remove();this.content_div.append(X)}});var w=function(W){this.track_type="ReferenceTrack";this.hidden=true;k.call(this,null,W,W.top_labeltrack);G.call(this);W.reference_track=this;this.left_offset=200;this.height_px=12;this.container_div.addClass("reference-track");this.content_div.css("background","none");this.content_div.css("min-height","0px");this.content_div.css("border","none");this.data_url=reference_url;this.data_url_extra_params={dbkey:W.dbkey};this.data_cache=new J(x,this,false);this.tile_cache=new c(q)};extend(w.prototype,G.prototype,{draw_tile:function(ag,ab,X,ad,ah){var aa=this,Y=I*ab;if(ah>this.view.canvas_manager.char_width_px){if(ag===null){aa.content_div.css("height","0px");return}var Z=this.view.canvas_manager.new_canvas();var af=Z.getContext("2d");Z.width=Math.ceil(Y*ah+aa.left_offset);Z.height=aa.height_px;af.font=af.canvas.manager.default_font;af.textAlign="center";for(var ac=0,ae=ag.length;ac<ae;ac++){var W=Math.round(ac*ah);af.fillText(ag[ac],W+aa.left_offset,10)}return Z}this.content_div.css("height","0px")}});var l=function(aa,Y,ab,W,Z){var X=this;this.track_type="LineTrack";this.display_modes=["Histogram","Line","Filled","Intensity"];this.mode="Histogram";k.call(this,aa,Y,Y.viewport_container);G.call(this);this.min_height_px=16;this.max_height_px=400;this.height_px=80;this.hda_ldda=ab;this.dataset_id=W;this.original_dataset_id=W;this.data_cache=new J(x,this);this.tile_cache=new c(q);this.track_config=new R({track:this,params:[{key:"color",label:"Color",type:"color",default_value:"black"},{key:"min_value",label:"Min Value",type:"float",default_value:undefined},{key:"max_value",label:"Max Value",type:"float",default_value:undefined},{key:"mode",type:"string",default_value:this.mode,hidden:true},{key:"height",type:"int",default_value:this.height_px,hidden:true}],saved_values:Z,onchange:function(){X.vertical_range=X.prefs.max_value-X.prefs.min_value;$("#linetrack_"+X.track_id+"_minval").text(X.prefs.min_value);$("#linetrack_"+X.track_id+"_maxval").text(X.prefs.max_value);X.tile_cache.clear();X.draw()}});this.prefs=this.track_config.values;this.height_px=this.track_config.values.height;this.vertical_range=this.track_config.values.max_value-this.track_config.values.min_value;this.add_resize_handle()};extend(l.prototype,G.prototype,{add_resize_handle:function(){var W=this;var Z=false;var Y=false;var X=$("<div class='track-resize'>");$(W.container_div).hover(function(){Z=true;X.show()},function(){Z=false;if(!Y){X.hide()}});X.hide().bind("dragstart",function(aa,ab){Y=true;ab.original_height=$(W.content_div).height()}).bind("drag",function(ab,ac){var aa=Math.min(Math.max(ac.original_height+ac.deltaY,W.min_height_px),W.max_height_px);$(W.content_div).css("height",aa);W.height_px=aa;W.draw(true)}).bind("dragend",function(aa,ab){W.tile_cache.clear();Y=false;if(!Z){X.hide()}W.track_config.values.height=W.height_px}).appendTo(W.container_div)},predraw_init:function(){var W=this,X=W.view.tracks.indexOf(W);W.vertical_range=undefined;return $.getJSON(W.data_url,{stats:true,chrom:W.view.chrom,low:null,high:null,hda_ldda:W.hda_ldda,dataset_id:W.dataset_id},function(Y){W.container_div.addClass("line-track");var aa=Y.data;if(isNaN(parseFloat(W.prefs.min_value))||isNaN(parseFloat(W.prefs.max_value))){W.prefs.min_value=aa.min;W.prefs.max_value=aa.max;$("#track_"+X+"_minval").val(W.prefs.min_value);$("#track_"+X+"_maxval").val(W.prefs.max_value)}W.vertical_range=W.prefs.max_value-W.prefs.min_value;W.total_frequency=aa.total_frequency;W.container_div.find(".yaxislabel").remove();var ab=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+X+"_minval").text(t(W.prefs.min_value));var Z=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+X+"_maxval").text(t(W.prefs.max_value));Z.css({position:"absolute",top:"24px",left:"10px"});Z.prependTo(W.container_div);ab.css({position:"absolute",bottom:"2px",left:"10px"});ab.prependTo(W.container_div)})},draw_tile:function(ah,aa,X,ae,ag){if(this.vertical_range===undefined){return}var ab=X*I*aa,Z=I*aa,W=Math.ceil(Z*ag),ad=this.height_px;var Y=this.view.canvas_manager.new_canvas();Y.width=W,Y.height=ad;var af=Y.getContext("2d");var ac=new F.LinePainter(ah.data,ab,ab+Z,this.prefs,this.mode);ac.draw(af,W,ad);return Y}});var e=function(W,ab,aa,ae,ad,Y,Z,ac){var X=this;this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];this.track_config=new R({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:ad,onchange:function(){X.tile_cache.clear();X.draw()}});this.prefs=this.track_config.values;k.call(this,W,ab,ab.viewport_container);G.call(this,Y,Z,ac);this.height_px=0;this.container_div.addClass("feature-track");this.hda_ldda=aa;this.dataset_id=ae;this.original_dataset_id=ae;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.summary_draw_height=30;this.inc_slots={};this.start_end_dct={};this.tile_cache=new c(d);this.data_cache=new J(20,this);this.left_offset=200;this.painter=F.LinkedFeaturePainter};extend(e.prototype,G.prototype,{update_auto_mode:function(W){if(this.mode=="Auto"){if(W=="no_detail"){W="feature spans"}else{if(W=="summary_tree"){W="coverage histogram"}}this.mode_div.text("Auto ("+W+")")}},incremental_slots:function(aa,X,Z){var Y=this.view.canvas_manager.dummy_context,W=this.inc_slots[aa];if(!W||(W.mode!==Z)){W=new (o.FeatureSlotter)(aa,Z==="Pack",v,function(ab){return Y.measureText(ab)});W.mode=Z;this.inc_slots[aa]=W}return W.slot_features(X)},draw_tile:function(aj,ar,aw,ae,ag,Z){var ao=this,ay=aw*I*ar,X=(aw+1)*I*ar,al=X-ay,ap=Math.ceil(al*ag),an=this.mode,aC=25,aa=this.left_offset,ak,ab;if(an==="Auto"){if(aj.dataset_type==="summary_tree"){an=aj.dataset_type}else{if(aj.extra_info==="no_detail"){an="no_detail"}else{var aB=aj.data;if(this.view.high-this.view.low>C){an="Squish"}else{an="Pack"}}}this.update_auto_mode(an)}if(an==="summary_tree"){ab=this.summary_draw_height;ae.parent().css("height",Math.max(this.height_px,ab)+"px");this.container_div.find(".yaxislabel").remove();var W=$("<div />").addClass("yaxislabel");W.text(aj.max);W.css({position:"absolute",top:"22px",left:"10px"});W.prependTo(this.container_div);var Y=this.view.canvas_manager.new_canvas();Y.width=ap+aa;Y.height=ab+K;var az=new F.SummaryTreePainter(aj,ay,X,this.prefs);var aq=Y.getContext("2d");aq.translate(aa,K);az.draw(aq,ap,ab);return Y}var ak,ad=1;if(an==="no_detail"||an==="Squish"||an==="Pack"){ad=this.incremental_slots(ag,aj.data,an);ak=this.inc_slots[ag].slots}var af=[];if(aj.data){var ah=this.filters_manager.filters;for(var at=0,av=aj.data.length;at<av;at++){var ac=aj.data[at];var au=false;var ai;for(var ax=0,aA=ah.length;ax<aA;ax++){ai=ah[ax];ai.update_attrs(ac);if(!ai.keep(ac)){au=true;break}}if(!au){af.push(ac)}}}var az=new (this.painter)(af,ay,X,this.prefs,an,Z);var ab=az.get_required_height(ad)+y;var Y=this.view.canvas_manager.new_canvas();Y.width=ap+aa;Y.height=ab;ae.parent().css("height",Math.max(this.height_px,ab)+"px");var aq=Y.getContext("2d");aq.fillStyle=this.prefs.block_color;aq.font=aq.canvas.manager.default_font;aq.textAlign="right";this.container_div.find(".yaxislabel").remove();if(aj.message){$(Y).css({"border-top":"1px solid red"});aq.fillStyle="red";aq.textAlign="left";var am=aq.textBaseline;aq.textBaseline="top";aq.fillText(aj.message,aa,0);aq.textBaseline=am;if(!aj.data){return Y}}this.example_feature=(aj.data.length?aj.data[0]:undefined);aq.translate(aa,y);az.draw(aq,ap,ab,ak);return Y}});var L=function(Z,X,ab,W,Y,aa){e.call(this,Z,X,ab,W,Y,aa);this.track_type="VcfTrack";this.painter=F.VariantPainter};extend(L.prototype,G.prototype,e.prototype);var O=function(Z,X,ab,W,Y,aa){e.call(this,Z,X,ab,W,Y,aa);this.track_config=new R({track:this,params:[{key:"block_color",label:"Block color",type:"color",default_value:"#444"},{key:"label_color",label:"Label color",type:"color",default_value:"black"},{key:"show_insertions",label:"Show insertions",type:"bool",default_value:false},{key:"show_differences",label:"Show differences only",type:"bool",default_value:true},{key:"show_counts",label:"Show summary counts",type:"bool",default_value:true},{key:"mode",type:"string",default_value:this.mode,hidden:true},],saved_values:Y,onchange:function(){this.track.tile_cache.clear();this.track.draw()}});this.prefs=this.track_config.values;this.track_type="ReadTrack";this.painter=F.ReadPainter;this.make_name_popup_menu()};extend(O.prototype,G.prototype,e.prototype);var M=function(aa,Y,ac,W,Z,ab,X){e.call(this,aa,Y,ac,W,Z,ab,{},X);this.track_type="ToolDataFeatureTrack";this.data_url=raw_data_url;this.data_query_wait=1000;this.dataset_check_url=dataset_state_url};extend(M.prototype,G.prototype,e.prototype,{predraw_init:function(){var X=this;var W=function(){if(X.data_cache.size()===0){setTimeout(W,300)}else{X.data_url=default_data_url;X.data_query_wait=E;X.dataset_state_url=converted_datasets_state_url;$.getJSON(X.dataset_state_url,{dataset_id:X.dataset_id,hda_ldda:X.hda_ldda},function(Y){})}};W()}});P.View=U;P.LineTrack=l;P.FeatureTrack=e;P.ReadTrack=O};var slotting_module=function(c,b){var d=2,a=5;b.FeatureSlotter=function(h,g,e,f){this.slots={};this.start_end_dct={};this.w_scale=h;this.include_label=g;this.max_rows=e;this.measureText=f};extend(b.FeatureSlotter.prototype,{slot_features:function(l){var o=this.w_scale,r=this.slots,g=this.start_end_dct,x=[],z=[],m=0,y=this.max_rows;for(var v=0,w=l.length;v<w;v++){var k=l[v],n=k[0];if(r[n]!==undefined){m=Math.max(m,r[n]);z.push(r[n])}else{x.push(v)}}var p=function(F,G){for(var E=0;E<=y;E++){var C=false,H=g[E];if(H!==undefined){for(var B=0,D=H.length;B<D;B++){var A=H[B];if(G>A[0]&&F<A[1]){C=true;break}}}if(!C){return E}}return -1};for(var v=0,w=x.length;v<w;v++){var k=l[x[v]],n=k[0],t=k[1],e=k[2],q=k[3],f=Math.floor(t*o),j=Math.ceil(e*o),u=this.measureText(q).width,h;if(q!==undefined&&this.include_label){u+=(d+a);if(f-u>=0){f-=u;h="left"}else{j+=u;h="right"}}var s=p(f,j);if(s>=0){if(g[s]===undefined){g[s]=[]}g[s].push([f,j]);r[n]=s;m=Math.max(m,s)}else{}}return m+1}})};var painters_module=function(k,B){var r=function(M,E,K,D,J,H){if(H===undefined){H=4}var G=D-E;var F=J-K;var I=Math.floor(Math.sqrt(G*G+F*F)/H);var N=G/I;var L=F/I;var C;for(C=0;C<I;C++,E+=N,K+=L){if(C%2!==0){continue}M.fillRect(E,K,H,1)}};var s=function(E,D,C,H){var G=D-H/2,F=D+H/2,I=C-Math.sqrt(H*3/2);E.beginPath();E.moveTo(G,I);E.lineTo(F,I);E.lineTo(D,C);E.lineTo(G,I);E.strokeStyle=this.fillStyle;E.fill();E.stroke();E.closePath()};var o=function(E,G,C,D,F){this.data=E;this.view_start=G;this.view_end=C;this.prefs=extend({},this.default_prefs,D);this.mode=F};o.prototype.default_prefs={};var w=function(E,G,C,D,F){o.call(this,E,G,C,D,F)};w.prototype.default_prefis={show_counts:false};w.prototype.draw=function(P,C,O){var H=this.view_start,R=this.view_end-this.view_start,Q=C/R;var M=this.data.data,L=this.data.delta,J=this.data.max,E=O;delta_x_px=Math.ceil(L*Q);P.save();for(var F=0,G=M.length;F<G;F++){var K=Math.floor((M[F][0]-H)*Q);var I=M[F][1];if(!I){continue}var N=I/J*O;P.fillStyle="black";P.fillRect(K,E-N,delta_x_px,N);var D=4;if(this.prefs.show_counts&&(P.measureText(I).width+D)<delta_x_px){P.fillStyle="#666";P.textAlign="center";P.fillText(I,K+(delta_x_px/2),10)}}P.restore()};var c=function(E,G,C,D,F){o.call(this,E,G,C,D,F)};c.prototype.default_prefs={min_value:undefined,max_value:undefined,mode:"Histogram",color:"#000",overflow_color:"#F66"};c.prototype.draw=function(R,Q,O){var J=false,K=this.prefs.min_value,H=this.prefs.max_value,N=H-K,D=O,E=this.view_start,P=this.view_end-this.view_start,F=Q/P,L=this.mode,V=this.data;R.save();var W=Math.round(O+K/N*O);if(L!=="Intensity"){R.fillStyle="#aaa";R.fillRect(0,W,Q,1)}R.beginPath();R.fillStyle=this.prefs.color;var U,I,G;if(V.length>1){G=Math.ceil((V[1][0]-V[0][0])*F)}else{G=10}for(var S=0,T=V.length;S<T;S++){U=Math.round((V[S][0]-E)*F);I=V[S][1];if(I===null){if(J&&L==="Filled"){R.lineTo(U,D)}J=false;continue}if(I<K){I=K}else{if(I>H){I=H}}if(L==="Histogram"){I=Math.round(I/N*D);R.fillRect(U,W,G,-I)}else{if(L==="Intensity"){I=255-Math.floor((I-K)/N*255);R.fillStyle="rgb("+I+","+I+","+I+")";R.fillRect(U,0,G,D)}else{I=Math.round(D-(I-K)/N*D);if(J){R.lineTo(U,I)}else{J=true;if(L==="Filled"){R.moveTo(U,D);R.lineTo(U,I)}else{R.moveTo(U,I)}}}}}if(L==="Filled"){if(J){R.lineTo(U,W);R.lineTo(0,W)}R.fill()}else{R.stroke()}var C=-1,M=-1;R.fillStyle=this.prefs.overflow_color;for(var S=0,T=V.length;S<T;S++){I=V[S][1];U=Math.round((V[S][0]-E)*F);x_minus_scaled=Math.round((V[S][0]-1-E)*F);if(M>=0&&(I===null||I<H)){R.fillRect(M,0,x_minus_scaled-M+1,2);M=-1}else{if(C>=0&&(I===null||I>K)){R.fillRect(C,O-2,x_minus_scaled-C+1,2);C=-1}}if(I!==null&&I>H&&M<0){M=U}else{if(I!==null&&I<K&&C<0){C=U}}}R.restore()};var q=function(E,G,C,D,F){o.call(this,E,G,C,D,F)};q.prototype.default_prefs={block_color:"#FFF",connector_color:"#FFF"};extend(q.prototype,{get_required_height:function(D){var C=y_scale=this.get_row_height(),E=this.mode;if(E==="no_detail"||E==="Squish"||E==="Pack"){C=D*y_scale}return C+Math.max(Math.round(y_scale/2),5)},draw:function(O,F,N,K){var I=this.data,L=this.view_start,P=this.view_end;O.save();O.fillStyle=this.prefs.block_color;O.textAlign="right";var S=this.view_end-this.view_start,R=F/S,E=this.get_row_height();for(var H=0,J=I.length;H<J;H++){var Q=I[H],G=Q[0],C=Q[1],D=Q[2],M=(K&&K[G]!==undefined?K[G]:null);if((C<P&&D>L)&&(this.mode=="Dense"||M!==null)){this.draw_element(O,this.mode,Q,M,L,P,R,E,F)}}O.restore()}});var d=10,j=3,n=5,A=10,g=1,u=3,f=3,a=9,p=2,h="#ccc";var t=function(E,G,C,D,F){q.call(this,E,G,C,D,F)};extend(t.prototype,q.prototype,{get_row_height:function(){var D=this.mode,C;if(D==="Dense"){C=d}else{if(D==="no_detail"){C=j}else{if(D==="Squish"){C=n}else{C=A}}}return C},draw_element:function(O,H,W,J,Q,ag,ak,al,C){var T=W[0],ai=W[1],aa=W[2]-1,R=W[3],ab=Math.floor(Math.max(0,(ai-Q)*ak)),P=Math.ceil(Math.min(C,Math.max(0,(aa-Q)*ak))),Z=(H==="Dense"?0:(0+J))*al,N,ae,S=null,am=null,F=this.prefs.block_color,ad=this.prefs.label_color;if(H=="Dense"){J=1}if(H==="no_detail"){O.fillStyle=F;O.fillRect(ab,Z+5,P-ab,g)}else{var M=W[4],Y=W[5],ac=W[6],G=W[7];if(Y&&ac){S=Math.floor(Math.max(0,(Y-Q)*ak));am=Math.ceil(Math.min(C,Math.max(0,(ac-Q)*ak)))}var aj,U;if(H==="Squish"||H==="Dense"){aj=1;U=f}else{aj=5;U=a}if(!G){if(W.strand){if(W.strand==="+"){O.fillStyle=O.canvas.manager.get_pattern("right_strand_inv")}else{if(W.strand==="-"){O.fillStyle=O.canvas.manager.get_pattern("left_strand_inv")}}}else{O.fillStyle=F}O.fillRect(ab,Z,P-ab,U)}else{var L,V;if(H==="Squish"||H==="Dense"){O.fillStyle=h;L=Z+Math.floor(f/2)+1;V=1}else{if(M){var L=Z;var V=U;if(M==="+"){O.fillStyle=O.canvas.manager.get_pattern("right_strand")}else{if(M==="-"){O.fillStyle=O.canvas.manager.get_pattern("left_strand")}}}else{O.fillStyle=h;L+=(f/2)+1;V=1}}O.fillRect(ab,L,P-ab,V);for(var ah=0,E=G.length;ah<E;ah++){var I=G[ah],D=Math.floor(Math.max(0,(I[0]-Q)*ak)),X=Math.ceil(Math.min(C,Math.max((I[1]-1-Q)*ak)));if(D>X){continue}O.fillStyle=F;O.fillRect(D,Z+(U-aj)/2+1,X-D,aj);if(S!==undefined&&ac>Y&&!(D>am||X<S)){var af=Math.max(D,S),K=Math.min(X,am);O.fillRect(af,Z+1,K-af,U);if(G.length==1&&H=="Pack"){if(M==="+"){O.fillStyle=O.canvas.manager.get_pattern("right_strand_inv")}else{if(M==="-"){O.fillStyle=O.canvas.manager.get_pattern("left_strand_inv")}}if(af+14<K){af+=2;K-=2}O.fillRect(af,Z+1,K-af,U)}}}}if(H==="Pack"&&ai>Q){O.fillStyle=ad;if(Q===0&&ab-O.measureText(R).width<0){O.textAlign="left";O.fillText(R,P+p,Z+8)}else{O.textAlign="right";O.fillText(R,ab-p,Z+8)}O.fillStyle=F}}}});var b=function(E,G,C,D,F){q.call(this,E,G,C,D,F)};extend(b.prototype,q.prototype,{draw_element:function(V,Q,K,G,Y,E,N,W,T){var K=data[i],M=K[0],U=K[1],F=K[2]-1,P=K[3],I=Math.floor(Math.max(0,(U-Y)*N)),L=Math.ceil(Math.min(T,Math.max(0,(F-Y)*N))),H=(Q==="Dense"?0:(0+G))*W,C,Z,D=null,O=null;if(no_label){V.fillStyle=block_color;V.fillRect(I+left_offset,H+5,L-I,1)}else{var X=K[4],S=K[5],J=K[6];C=9;Z=1;V.fillRect(I+left_offset,H,L-I,C);if(Q!=="Dense"&&P!==undefined&&U>Y){V.fillStyle=label_color;if(Y===0&&I-V.measureText(P).width<0){V.textAlign="left";V.fillText(P,L+2+left_offset,H+8)}else{V.textAlign="right";V.fillText(P,I-2+left_offset,H+8)}V.fillStyle=block_color}var R=X+" / "+S;if(U>Y&&V.measureText(R).width<(L-I)){V.fillStyle="white";V.textAlign="center";V.fillText(R,left_offset+I+(L-I)/2,H+8);V.fillStyle=block_color}}}});var z=1001,m=1002,e=1003,y=1004,l=1005;var x=function(G,D){var I=G[0],H=G[1],F=D[0],E=D[1],C;if(I<F){if(H<F){C=z}else{if(H<=E){C=e}else{C=m}}}else{if(I>E){C=z}else{if(H<=E){C=l}else{C=y}}}return C};var v=function(F,H,C,E,G,D){q.call(this,F,H,C,E,G);this.ref_seq=D};v.prototype.default_prefs=extend({},q.prototype.default_prefs,{show_insertions:false});extend(v.prototype,q.prototype,{get_row_height:function(){var C,D=this.mode;if(D==="Dense"){C=d}else{if(D==="Squish"){C=n}else{C=A;if(this.prefs.show_insertions){C*=2}}}return C},draw_read:function(Z,U,P,ae,E,Y,M,J,I){Z.textAlign="center";var X=this,D=[ae,E],S=0,aa=0,W=0;ref_seq=this.ref_seq,char_width_px=Z.canvas.manager.char_width_px;var aj=[];if((U==="Pack"||this.mode==="Auto")&&J!==undefined&&P>char_width_px){W=Math.round(P/2)}if(!M){M=[[0,J.length]]}for(var Q=0,ac=M.length;Q<ac;Q++){var N=M[Q],F="MIDNSHP=X"[N[0]],R=N[1];if(F==="H"||F==="S"){S-=R}var K=Y+S,ai=Math.floor(Math.max(0,(K-ae)*P)),L=Math.floor(Math.max(0,(K+R-ae)*P));if(ai===L){L+=1}switch(F){case"H":break;case"S":case"M":case"=":var T=x([K,K+R],D);if(T!==z){var V=J.slice(aa,aa+R);if(W>0){Z.fillStyle=this.prefs.block_color;Z.fillRect(ai-W,I+1,L-ai,9);Z.fillStyle=h;for(var ag=0,C=V.length;ag<C;ag++){if(this.prefs.show_differences&&ref_seq){var O=ref_seq[K-ae+ag];if(!O||O.toLowerCase()===V[ag].toLowerCase()){continue}}if(K+ag>=ae&&K+ag<=E){var ah=Math.floor(Math.max(0,(K+ag-ae)*P));Z.fillText(V[ag],ah,I+9)}}}else{Z.fillStyle=this.prefs.block_color;Z.fillRect(ai,I+4,L-ai,f)}}aa+=R;S+=R;break;case"N":Z.fillStyle=h;Z.fillRect(ai-W,I+5,L-ai,1);S+=R;break;case"D":Z.fillStyle="red";Z.fillRect(ai-W,I+4,L-ai,3);S+=R;break;case"P":break;case"I":var T=x([K,K+R],D),ad=ai-W;if(T!==z){var V=J.slice(aa,aa+R);if(this.prefs.show_insertions){var H=ai-(L-ai)/2;if((U==="Pack"||this.mode==="Auto")&&J!==undefined&&P>char_width_px){Z.fillStyle="yellow";Z.fillRect(H-W,I-9,L-ai,9);aj[aj.length]={type:"triangle",data:[ad,I+4,5]};Z.fillStyle=h;switch(T){case (e):V=V.slice(ae-K);break;case (y):V=V.slice(0,K-E);break;case (l):break;case (m):V=V.slice(ae-K,K-E);break}for(var ag=0,C=V.length;ag<C;ag++){var ah=Math.floor(Math.max(0,(K+ag-ae)*P));Z.fillText(V[ag],ah-(L-ai)/2,I)}}else{Z.fillStyle="yellow";Z.fillRect(H,I+(this.mode!=="Dense"?2:5),L-ai,(U!=="Dense"?f:u))}}else{if((U==="Pack"||this.mode==="Auto")&&J!==undefined&&P>char_width_px){aj[aj.length]={type:"text",data:[V.length,ad,I+9]}}else{}}}aa+=R;break;case"X":aa+=R;break}}Z.fillStyle="yellow";var af,G,ak;for(var ab=0;ab<aj.length;ab++){af=aj[ab];G=af.type;ak=af.data;if(G==="text"){Z.save();Z.font="bold "+Z.font;Z.fillText(ak[0],ak[1],ak[2]);Z.restore()}else{if(G=="triangle"){s(Z,ak[0],ak[1],ak[2])}}}},draw_element:function(V,Q,I,F,Y,D,M,W,T){var L=I[0],U=I[1],E=I[2],N=I[3],H=Math.floor(Math.max(0,(U-Y)*M)),J=Math.ceil(Math.min(T,Math.max(0,(E-Y)*M))),G=(Q==="Dense"?0:(0+F))*W,Z=this.prefs.block_color,K=this.prefs.label_color,S=0;if((Q==="Pack"||this.mode==="Auto")&&M>V.canvas.manager.char_width_px){var S=Math.round(M/2)}V.fillStyle=Z;if(I[5] instanceof Array){var R=Math.floor(Math.max(0,(I[4][0]-Y)*M)),P=Math.ceil(Math.min(T,Math.max(0,(I[4][1]-Y)*M))),O=Math.floor(Math.max(0,(I[5][0]-Y)*M)),C=Math.ceil(Math.min(T,Math.max(0,(I[5][1]-Y)*M)));if(I[4][1]>=Y&&I[4][0]<=D&&I[4][2]){this.draw_read(V,Q,M,Y,D,I[4][0],I[4][2],I[4][3],G)}if(I[5][1]>=Y&&I[5][0]<=D&&I[5][2]){this.draw_read(V,Q,M,Y,D,I[5][0],I[5][2],I[5][3],G)}if(O>P){V.fillStyle=h;r(V,P-S,G+5,O-S,G+5)}}else{V.fillStyle=Z;this.draw_read(V,Q,M,Y,D,U,I[4],I[5],G)}if(Q==="Pack"&&U>Y){V.fillStyle=this.prefs.label_color;var X=1;if(X===0&&H-V.measureText(N).width<0){V.textAlign="left";V.fillText(N,J+p-S,G+8)}else{V.textAlign="right";V.fillText(N,H-p-S,G+8)}V.fillStyle=Z}}});B.SummaryTreePainter=w;B.LinePainter=c;B.LinkedFeaturePainter=t;B.ReadPainter=v;B.VariantPainter=b};(function(d){var c={};var b=function(e){return c[e]};var a=function(f,g){var e={};g(b,e);c[f]=e};a("slotting",slotting_module);a("painters",painters_module);a("trackster",trackster_module);for(key in c.trackster){d[key]=c.trackster[key]}})(window); \ No newline at end of file Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket