From d0777e2b85c3f4ece06d9b0325eaeaa15edabb26 Mon Sep 17 00:00:00 2001 From: Matthew Scragg Date: Thu, 6 Feb 2014 21:40:58 -0600 Subject: [PATCH] assets --- .gitignore | 3 +- bower.json | 2 +- realms/__init__.py | 38 +- realms/lib/assets.py | 10 + realms/modules/wiki/assets.py | 8 + realms/static/js/dillinger.js | 183 ++++---- realms/static/js/main.js | 10 +- realms/static/js/wmd.js | 3 +- realms/static/packed-common.js | 567 ----------------------- realms/static/packed-editor.js | 652 --------------------------- realms/templates/layout.html | 6 +- realms/templates/wiki/edit.html | 4 - srv/salt/realms/init.sls | 29 +- srv/salt/supervisor/init.sls | 9 +- srv/salt/supervisor/supervisord.conf | 3 +- 15 files changed, 164 insertions(+), 1363 deletions(-) create mode 100644 realms/lib/assets.py create mode 100644 realms/modules/wiki/assets.py delete mode 100644 realms/static/packed-common.js delete mode 100644 realms/static/packed-editor.js diff --git a/.gitignore b/.gitignore index 3547e3b..0f062d2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ *.pyc config.py config.sls -realms/static/vendor \ No newline at end of file +realms/static/vendor +realms/static/assets/* \ No newline at end of file diff --git a/bower.json b/bower.json index d765160..73cc04d 100644 --- a/bower.json +++ b/bower.json @@ -11,6 +11,6 @@ "components-font-awesome": "~3.2.1", "showdown": "~0.3.1", "keymaster": "madrobby/keymaster", - "ace": "~1.0.0" + "ace": "~1.1.0" } } \ No newline at end of file diff --git a/realms/__init__.py b/realms/__init__.py index 84c450a..917f49b 100644 --- a/realms/__init__.py +++ b/realms/__init__.py @@ -224,33 +224,25 @@ for status_code in httplib.responses: if status_code >= 400: app.register_error_handler(status_code, error_handler) -assets = Environment() +from realms.lib.assets import assets, register assets.init_app(app) +assets.app = app +app.jinja_env.globals['bundles'] = assets -js = Bundle( - Bundle('vendor/jquery/jquery.js', - 'vendor/components-underscore/underscore.js', - 'vendor/components-bootstrap/js/bootstrap.js', - 'vendor/handlebars/handlebars.js', - 'vendor/showdown/src/showdown.js', - 'vendor/showdown/src/extensions/table.js', - 'js/wmd.js', - filters='closure_js'), - 'js/html-sanitizer-minified.js', +register( + 'vendor/jquery/jquery.js', + 'vendor/components-underscore/underscore.js', + 'vendor/components-bootstrap/js/bootstrap.js', + 'vendor/handlebars/handlebars.js', + 'vendor/showdown/src/showdown.js', + 'vendor/marked/lib/marked.js', + 'vendor/showdown/src/extensions/table.js', + 'js/wmd.js', + 'js/html-sanitizer-minified.js', # don't minify 'vendor/highlightjs/highlight.pack.js', - Bundle('js/main.js', filters='closure_js'), - output='packed-common.js') -assets.register('js_common', js) - -js = Bundle('js/ace/ace.js', - 'js/ace/mode-markdown.js', - 'vendor/keymaster/keymaster.js', - 'js/dillinger.js', - filters='closure_js', output='packed-editor.js') - -assets.register('js_editor', js) - + 'js/main.js' +) @app.before_request def check_subdomain(): diff --git a/realms/lib/assets.py b/realms/lib/assets.py new file mode 100644 index 0000000..4813b9f --- /dev/null +++ b/realms/lib/assets.py @@ -0,0 +1,10 @@ +from flask.ext.assets import Bundle, Environment + +assets = Environment() + + +def register(*files): + assets.debug = True + filters = 'uglifyjs' + output = 'assets/%(version)s.js' + assets.add(Bundle(*files, filters=filters, output=output)) diff --git a/realms/modules/wiki/assets.py b/realms/modules/wiki/assets.py new file mode 100644 index 0000000..bc19a60 --- /dev/null +++ b/realms/modules/wiki/assets.py @@ -0,0 +1,8 @@ +from realms.lib.assets import register + +register( + 'js/ace/ace.js', + 'js/ace/mode-markdown.js', + 'vendor/keymaster/keymaster.js', + 'js/dillinger.js' +) \ No newline at end of file diff --git a/realms/static/js/dillinger.js b/realms/static/js/dillinger.js index 990cbd2..86344ac 100644 --- a/realms/static/js/dillinger.js +++ b/realms/static/js/dillinger.js @@ -1,4 +1,4 @@ -$(function(){ +$(function () { var url_prefix = "/wiki"; @@ -13,14 +13,9 @@ $(function(){ , autoInterval , profile = { - theme: 'ace/theme/idle_fingers' - , currentMd: '' - , autosave: - { - enabled: true - , interval: 3000 // might be too aggressive; don't want to block UI for large saves. - } - , current_filename : $pagename.val() + theme: 'ace/theme/idle_fingers', currentMd: '', autosave: { + enabled: true, interval: 3000 // might be too aggressive; don't want to block UI for large saves. + }, current_filename: $pagename.val() }; // Feature detect ish @@ -39,21 +34,21 @@ $(function(){ * @param {Function} Optional callback to be executed after the script loads. * @return {void} */ - function asyncLoad(filename,cb){ - (function(d,t){ + function asyncLoad(filename, cb) { + (function (d, t) { var leScript = d.createElement(t) , scripts = d.getElementsByTagName(t)[0]; leScript.async = 1; leScript.src = filename; - scripts.parentNode.insertBefore(leScript,scripts); + scripts.parentNode.insertBefore(leScript, scripts); - leScript.onload = function(){ + leScript.onload = function () { cb && cb(); } - }(document,'script')); + }(document, 'script')); } /** @@ -61,10 +56,15 @@ $(function(){ * * @return {Boolean} */ - function hasLocalStorage(){ + function hasLocalStorage() { // http://mathiasbynens.be/notes/localstorage-pattern var storage; - try{ if(localStorage.getItem) {storage = localStorage} }catch(e){} + try { + if (localStorage.getItem) { + storage = localStorage + } + } catch (e) { + } return storage; } @@ -73,16 +73,16 @@ $(function(){ * * @return {Void} */ - function getUserProfile(){ + function getUserProfile() { var p; - try{ - p = JSON.parse( localStorage.profile ); + try { + p = JSON.parse(localStorage.profile); // Need to merge in any undefined/new properties from last release // Meaning, if we add new features they may not have them in profile p = $.extend(true, profile, p); - }catch(e){ + } catch (e) { p = profile } @@ -98,9 +98,9 @@ $(function(){ * @param {Object} An object containg proper keys and values to be JSON.stringify'd * @return {Void} */ - function updateUserProfile(obj){ + function updateUserProfile(obj) { localStorage.clear(); - localStorage.profile = JSON.stringify( $.extend(true, profile, obj) ); + localStorage.profile = JSON.stringify($.extend(true, profile, obj)); } /** @@ -111,7 +111,9 @@ $(function(){ * @param {String} The property to test * @return {Boolean} */ - function prefixed(prop){ return testPropsAll(prop, 'pfx') } + function prefixed(prop) { + return testPropsAll(prop, 'pfx') + } /** * A generic CSS / DOM property test; if a browser supports @@ -122,11 +124,11 @@ $(function(){ * @param {String} A prefix * @return {Boolean} */ - function testProps( props, prefixed ) { + function testProps(props, prefixed) { - for ( var i in props ) { + for (var i in props) { - if( dillingerStyle[ props[i] ] !== undefined ) { + if (dillingerStyle[ props[i] ] !== undefined) { return prefixed === 'pfx' ? props[i] : true; } @@ -144,10 +146,10 @@ $(function(){ * @param {String} The prefix string * @return {Boolean} */ - function testPropsAll( prop, prefixed ) { + function testPropsAll(prop, prefixed) { - var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1) - , props = (prop + ' ' + domPrefixes.join(ucProp + ' ') + ucProp).split(' '); + var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1) + , props = (prop + ' ' + domPrefixes.join(ucProp + ' ') + ucProp).split(' '); return testProps(props, prefixed); } @@ -157,29 +159,24 @@ $(function(){ * * @return {String} */ - function normalizeTransitionEnd() - { + function normalizeTransitionEnd() { var transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd' - , 'msTransition' : 'msTransitionEnd' // maybe? - , 'transition' : 'transitionend' + 'WebkitTransition': 'webkitTransitionEnd', 'MozTransition': 'transitionend', 'OTransition': 'oTransitionEnd', 'msTransition': 'msTransitionEnd' // maybe? + , 'transition': 'transitionend' }; return transEndEventNames[ prefixed('transition') ]; } - /** * Get current filename from contenteditable field. * * @return {String} */ - function getCurrentFilenameFromField(){ + function getCurrentFilenameFromField() { return $('#filename > span[contenteditable="true"]').text() } @@ -190,8 +187,8 @@ $(function(){ * @param {String} Optional string to force set the value. * @return {String} */ - function setCurrentFilenameField(str){ - $('#filename > span[contenteditable="true"]').text( str || profile.current_filename || "Untitled Document") + function setCurrentFilenameField(str) { + $('#filename > span[contenteditable="true"]').text(str || profile.current_filename || "Untitled Document") } /** @@ -236,10 +233,12 @@ $(function(){ * * @return {Void} */ - function init(){ + function init() { - if( !hasLocalStorage() ) { sadPanda() } - else{ + if (!hasLocalStorage()) { + sadPanda() + } + else { // Attach to jQuery support object for later use. $.support.transitionEnd = normalizeTransitionEnd(); @@ -262,29 +261,29 @@ $(function(){ } - function initAce(){ + function initAce() { editor = ace.edit("editor"); editor.focus(); } - function initUi(){ + function initUi() { // Set proper theme value in theme dropdown - fetchTheme(profile.theme, function(){ - $theme.find('li > a[data-value="'+profile.theme+'"]').addClass('selected'); + fetchTheme(profile.theme, function () { + $theme.find('li > a[data-value="' + profile.theme + '"]').addClass('selected'); editor.getSession().setUseWrapMode(true); editor.setShowPrintMargin(false); editor.getSession().setMode('ace/mode/markdown'); - editor.getSession().setValue( profile.currentMd || editor.getSession().getValue()); + editor.getSession().setValue(profile.currentMd || editor.getSession().getValue()); previewMd(); }); // Set text for dis/enable autosave / word counter - $autosave.html( profile.autosave.enabled ? ' Disable Autosave' : ' Enable Autosave' ); - $wordcount.html( !profile.wordcount ? ' Disabled Word Count' : ' Enabled Word Count' ); + $autosave.html(profile.autosave.enabled ? ' Disable Autosave' : ' Enable Autosave'); + $wordcount.html(!profile.wordcount ? ' Disabled Word Count' : ' Enabled Word Count'); setCurrentFilenameField(); @@ -297,12 +296,12 @@ $(function(){ } - function clearSelection(){ + function clearSelection() { editor.getSession().setValue(""); previewMd(); } - function saveFile(isManual){ + function saveFile(isManual) { updateUserProfile({currentMd: editor.getSession().getValue()}); if (isManual) { @@ -313,47 +312,50 @@ $(function(){ message: $("#page-message").val(), content: editor.getSession().getValue() }; - $.post(window.location, data, function(){ + $.post(window.location, data, function () { location.href = url_prefix + '/' + data['name']; }); } } - function autoSave(){ + function autoSave() { - if(profile.autosave.enabled) { - autoInterval = setInterval( function(){ + if (profile.autosave.enabled) { + autoInterval = setInterval(function () { // firefox barfs if I don't pass in anon func to setTimeout. saveFile(); }, profile.autosave.interval); } else { - clearInterval( autoInterval ) + clearInterval(autoInterval) } } - $("#save-native").on('click', function() { + $("#save-native").on('click', function () { saveFile(true); }); - function resetProfile(){ + function resetProfile() { // For some reason, clear() is not working in Chrome. localStorage.clear(); // Let's turn off autosave profile.autosave.enabled = false // Delete the property altogether --> need ; for JSHint bug. - ; delete localStorage.profile; + ; + delete localStorage.profile; // Now reload the page to start fresh window.location.reload(); } - function changeTheme(e){ + function changeTheme(e) { // check for same theme var $target = $(e.target); - if( $target.attr('data-value') === profile.theme) { return; } + if ($target.attr('data-value') === profile.theme) { + return; + } else { // add/remove class $theme.find('li > a.selected').removeClass('selected'); @@ -361,15 +363,15 @@ $(function(){ // grabnew theme var newTheme = $target.attr('data-value'); $(e.target).blur(); - fetchTheme(newTheme, function(){ + fetchTheme(newTheme, function () { }); } } - function fetchTheme(th, cb){ + function fetchTheme(th, cb) { var name = th.split('/').pop(); - asyncLoad("/static/js/ace/theme-"+ name +".js", function() { + asyncLoad("/static/js/ace/theme-" + name + ".js", function () { editor.setTheme(th); cb && cb(); updateBg(name); @@ -378,15 +380,14 @@ $(function(){ } - function updateBg(name){ + function updateBg(name) { // document.body.style.backgroundColor = bgColors[name] } - function previewMd(){ + function previewMd() { var unmd = editor.getSession().getValue() , md = MDR.convert(unmd, true); - $preview .html('') // unnecessary? .html(md); @@ -394,32 +395,32 @@ $(function(){ //refreshWordCount(); } - function updateFilename(str){ + function updateFilename(str) { // Check for string because it may be keyup event object var f; - if(typeof str === 'string'){ + if (typeof str === 'string') { f = str; } else { f = getCurrentFilenameFromField(); } - updateUserProfile( { current_filename: f }); + updateUserProfile({ current_filename: f }); } - function showHtml(){ + function showHtml() { // TODO: UPDATE TO SUPPORT FILENAME NOT JUST A RANDOM FILENAME var unmd = editor.getSession().getValue(); - function _doneHandler(jqXHR, data, response){ + function _doneHandler(jqXHR, data, response) { // console.dir(resp) var resp = JSON.parse(response.responseText); $('#myModalBody').text(resp.data); $('#myModal').modal(); } - function _failHandler(){ + function _failHandler() { alert("Roh-roh. Something went wrong. :("); } @@ -436,52 +437,52 @@ $(function(){ } - function sadPanda(){ + function sadPanda() { // TODO: ACTUALLY SHOW A SAD PANDA. alert('Sad Panda - No localStorage for you!') } - function toggleAutoSave(){ - $autosave.html( profile.autosave.enabled ? ' Disable Autosave' : ' Enable Autosave' ); + function toggleAutoSave() { + $autosave.html(profile.autosave.enabled ? ' Disable Autosave' : ' Enable Autosave'); updateUserProfile({autosave: {enabled: !profile.autosave.enabled }}); autoSave(); } - function bindPreview(){ - editor.getSession().on('change', function(e) { + function bindPreview() { + editor.getSession().on('change', function (e) { previewMd(); }); } - function bindNav(){ + function bindNav() { $theme .find('li > a') - .bind('click', function(e){ + .bind('click', function (e) { changeTheme(e); return false; }); $('#clear') - .on('click', function(){ + .on('click', function () { clearSelection(); return false; }); $("#autosave") - .on('click', function(){ + .on('click', function () { toggleAutoSave(); return false; }); $('#reset') - .on('click', function(){ + .on('click', function () { resetProfile(); return false; }); $('#cheat'). - on('click', function(){ + on('click', function () { window.open("https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", "_blank"); return false; }); @@ -489,9 +490,9 @@ $(function(){ } // end bindNav() - function bindKeyboard(){ + function bindKeyboard() { // CMD+s TO SAVE DOC - key('command+s, ctrl+s', function(e){ + key('command+s, ctrl+s', function (e) { saveFile(true); e.preventDefault(); // so we don't save the web page - native browser functionality }); @@ -502,7 +503,7 @@ $(function(){ mac: "Command-S", win: "Ctrl-S" }, - exec: function(){ + exec: function () { saveFile(true); } }; @@ -545,12 +546,12 @@ function syncPreview() { $prev.scrollTop(scrollFactor * previewScrollRange); } -window.onload = function(){ +window.onload = function () { var $loading = $('#loading'); - if ($.support.transition){ + if ($.support.transition) { $loading - .bind( $.support.transitionEnd, function(){ + .bind($.support.transitionEnd, function () { $('#main').removeClass('bye'); $loading.remove(); }) diff --git a/realms/static/js/main.js b/realms/static/js/main.js index b9b2d62..a36385a 100644 --- a/realms/static/js/main.js +++ b/realms/static/js/main.js @@ -5,7 +5,7 @@ hljs.initHighlightingOnLoad(); MDR = { doc: null, callback: WMD.convert, - sanitize: null, // Override + sanitize: true, // Override convert: function(md, sanitize){ if (this.sanitize !== null) { sanitize = this.sanitize; @@ -14,7 +14,13 @@ MDR = { var html = this.doc.html; if (sanitize) { // Causes some problems with inline styles - html = html_sanitize(html); + html = html_sanitize(html, function(url) { + if(/^https?:\/\//.test(url)) { + return url + } + }, function(id){ + return id; + }); } html = this.hook(html); return html; diff --git a/realms/static/js/wmd.js b/realms/static/js/wmd.js index 15659f7..07450c8 100644 --- a/realms/static/js/wmd.js +++ b/realms/static/js/wmd.js @@ -51,7 +51,8 @@ function gsub(str, re, fn, /*optional*/newstr) { return gsub(remaining, re, fn, newstr); } return newstr + str; -} +}; + WMD.showdown = new Showdown.converter({extensions: ['table']}); WMD.processor = WMD.showdown.makeHtml; diff --git a/realms/static/packed-common.js b/realms/static/packed-common.js deleted file mode 100644 index b00458a..0000000 --- a/realms/static/packed-common.js +++ /dev/null @@ -1,567 +0,0 @@ -(function(window,undefined){var readyList,rootjQuery,core_strundefined=typeof undefined,document=window.document,location=window.location,_jQuery=window.jQuery,_$=window.$,class2type={},core_deletedIds=[],core_version="1.9.1",core_concat=core_deletedIds.concat,core_push=core_deletedIds.push,core_slice=core_deletedIds.slice,core_indexOf=core_deletedIds.indexOf,core_toString=class2type.toString,core_hasOwn=class2type.hasOwnProperty,core_trim=core_version.trim,jQuery=function(selector,context){return new jQuery.fn.init(selector, -context,rootjQuery)},core_pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,core_rnotwhite=/\S+/g,rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rquickExpr=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,rvalidchars=/^[\],:{}\s]*$/,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rvalidescape=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,rvalidtokens=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()}, -completed=function(event){if(document.addEventListener||event.type==="load"||document.readyState==="complete"){detach();jQuery.ready()}},detach=function(){if(document.addEventListener){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false)}else{document.detachEvent("onreadystatechange",completed);window.detachEvent("onload",completed)}};jQuery.fn=jQuery.prototype={jquery:core_version,constructor:jQuery,init:function(selector,context,rootjQuery){var match, -elem;if(!selector)return this;if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3)match=[null,selector,null];else match=rquickExpr.exec(selector);if(match&&(match[1]||!context))if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)if(jQuery.isFunction(this[match]))this[match](context[match]); -else this.attr(match,context[match]);return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2])return rootjQuery.find(selector);this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}else if(!context||context.jquery)return(context||rootjQuery).find(selector);else return this.constructor(context).find(selector)}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector))return rootjQuery.ready(selector); -if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)},selector:"",length:0,size:function(){return this.length},toArray:function(){return core_slice.call(this)},get:function(num){return num==null?this.toArray():num<0?this[this.length+num]:this[num]},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback,args){return jQuery.each(this, -callback,args)},ready:function(fn){jQuery.ready.promise().done(fn);return this},slice:function(){return this.pushStack(core_slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j0)return;readyList.resolveWith(document,[jQuery]);if(jQuery.fn.trigger)jQuery(document).trigger("ready").off("ready")},isFunction:function(obj){return jQuery.type(obj)==="function"},isArray:Array.isArray||function(obj){return jQuery.type(obj)==="array"},isWindow:function(obj){return obj!=null&& -obj==obj.window},isNumeric:function(obj){return!isNaN(parseFloat(obj))&&isFinite(obj)},type:function(obj){if(obj==null)return String(obj);return typeof obj==="object"||typeof obj==="function"?class2type[core_toString.call(obj)]||"object":typeof obj},isPlainObject:function(obj){if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj))return false;try{if(obj.constructor&&!core_hasOwn.call(obj,"constructor")&&!core_hasOwn.call(obj.constructor.prototype,"isPrototypeOf"))return false}catch(e){return false}var key; -for(key in obj);return key===undefined||core_hasOwn.call(obj,key)},isEmptyObject:function(obj){var name;for(name in obj)return false;return true},error:function(msg){throw new Error(msg);},parseHTML:function(data,context,keepScripts){if(!data||typeof data!=="string")return null;if(typeof context==="boolean"){keepScripts=context;context=false}context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];if(parsed)return[context.createElement(parsed[1])];parsed=jQuery.buildFragment([data], -context,scripts);if(scripts)jQuery(scripts).remove();return jQuery.merge([],parsed.childNodes)},parseJSON:function(data){if(window.JSON&&window.JSON.parse)return window.JSON.parse(data);if(data===null)return data;if(typeof data==="string"){data=jQuery.trim(data);if(data)if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,"")))return(new Function("return "+data))()}jQuery.error("Invalid JSON: "+data)},parseXML:function(data){var xml,tmp;if(!data||typeof data!== -"string")return null;try{if(window.DOMParser){tmp=new DOMParser;xml=tmp.parseFromString(data,"text/xml")}else{xml=new ActiveXObject("Microsoft.XMLDOM");xml.async="false";xml.loadXML(data)}}catch(e){xml=undefined}if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length)jQuery.error("Invalid XML: "+data);return xml},noop:function(){},globalEval:function(data){if(data&&jQuery.trim(data))(window.execScript||function(data){window["eval"].call(window,data)})(data)},camelCase:function(string){return string.replace(rmsPrefix, -"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args)if(isArray)for(;i0&&length-1 in obj)}rootjQuery=jQuery(document);var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(core_rnotwhite)||[],function(_,flag){object[flag]= -true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var firing,memory,fired,firingLength,firingIndex,firingStart,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex-1){list.splice(index,1);if(firing){if(index<=firingLength)firingLength--;if(index<=firingIndex)firingIndex--}}});return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){list=[];return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return!list},lock:function(){stack=undefined;if(!memory)self.disable();return this},locked:function(){return!stack}, -fireWith:function(context,args){args=args||[];args=[context,args.slice?args.slice():args];if(list&&(!fired||stack))if(firing)stack.push(args);else fire(args);return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state= -"pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var action=tuple[0],fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise))returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify); -else newDefer[action+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString)list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred? -promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func)func.call(deferred,deferred);return deferred},when:function(subordinate){var i=0,resolveValues=core_slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length> -1?core_slice.call(arguments):value;if(values===progressValues)deferred.notifyWith(contexts,values);else if(!--remaining)deferred.resolveWith(contexts,values)}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i
a";all=div.getElementsByTagName("*");a=div.getElementsByTagName("a")[0];if(!all||!a||!all.length)return{};select=document.createElement("select"); -opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];a.style.cssText="top:1px;float:left;opacity:.5";support={getSetAttribute:div.className!=="t",leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.5/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:!!input.value, -optSelected:opt.selected,enctype:!!document.createElement("form").enctype,html5Clone:document.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:document.compatMode==="CSS1Compat",deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};input.checked=true;support.noCloneChecked=input.cloneNode(true).checked;select.disabled=true;support.optDisabled=!opt.disabled;try{delete div.test}catch(e){support.deleteExpando= -false}input=document.createElement("input");input.setAttribute("value","");support.input=input.getAttribute("value")==="";input.value="t";input.setAttribute("type","radio");support.radioValue=input.value==="t";input.setAttribute("checked","t");input.setAttribute("name","t");fragment=document.createDocumentFragment();fragment.appendChild(input);support.appendChecked=input.checked;support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;if(div.attachEvent){div.attachEvent("onclick", -function(){support.noCloneEvent=false});div.cloneNode(true).click()}for(i in{submit:true,change:true,focusin:true}){div.setAttribute(eventName="on"+i,"t");support[i+"Bubbles"]=eventName in window||div.attributes[eventName].expando===false}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery(function(){var container,marginDiv,tds,divReset="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", -body=document.getElementsByTagName("body")[0];if(!body)return;container=document.createElement("div");container.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";body.appendChild(container).appendChild(div);div.innerHTML="
t
";tds=div.getElementsByTagName("td");tds[0].style.cssText="padding:0;margin:0;border:0;display:none";isSupported=tds[0].offsetHeight===0;tds[0].style.display="";tds[1].style.display="none";support.reliableHiddenOffsets= -isSupported&&tds[0].offsetHeight===0;div.innerHTML="";div.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";support.boxSizing=div.offsetWidth===4;support.doesNotIncludeMarginInBodyOffset=body.offsetTop!==1;if(window.getComputedStyle){support.pixelPosition=(window.getComputedStyle(div,null)||{}).top!=="1%";support.boxSizingReliable=(window.getComputedStyle(div,null)|| -{width:"4px"}).width==="4px";marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText=divReset;marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";support.reliableMarginRight=!parseFloat((window.getComputedStyle(marginDiv,null)||{}).marginRight)}if(typeof div.style.zoom!==core_strundefined){div.innerHTML="";div.style.cssText=divReset+"width:1px;padding:1px;display:inline;zoom:1";support.inlineBlockNeedsLayout=div.offsetWidth===3;div.style.display= -"block";div.innerHTML="
";div.firstChild.style.width="5px";support.shrinkWrapBlocks=div.offsetWidth!==3;if(support.inlineBlockNeedsLayout)body.style.zoom=1}body.removeChild(container);container=div=tds=marginDiv=null});all=select=fragment=opt=a=input=null;return support}();var rbrace=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,rmultiDash=/([A-Z])/g;function internalData(elem,name,data,pvt){if(!jQuery.acceptData(elem))return;var thisCache,ret,internalKey=jQuery.expando,getByName=typeof name==="string", -isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if((!id||!cache[id]||!pvt&&!cache[id].data)&&getByName&&data===undefined)return;if(!id)if(isNode)elem[internalKey]=id=core_deletedIds.pop()||jQuery.guid++;else id=internalKey;if(!cache[id]){cache[id]={};if(!isNode)cache[id].toJSON=jQuery.noop}if(typeof name==="object"||typeof name==="function")if(pvt)cache[id]=jQuery.extend(cache[id],name);else cache[id].data=jQuery.extend(cache[id].data, -name);thisCache=cache[id];if(!pvt){if(!thisCache.data)thisCache.data={};thisCache=thisCache.data}if(data!==undefined)thisCache[jQuery.camelCase(name)]=data;if(getByName){ret=thisCache[name];if(ret==null)ret=thisCache[jQuery.camelCase(name)]}else ret=thisCache;return ret}function internalRemoveData(elem,name,pvt){if(!jQuery.acceptData(elem))return;var i,l,thisCache,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(!cache[id])return;if(name){thisCache= -pvt?cache[id]:cache[id].data;if(thisCache){if(!jQuery.isArray(name))if(name in thisCache)name=[name];else{name=jQuery.camelCase(name);if(name in thisCache)name=[name];else name=name.split(" ")}else name=name.concat(jQuery.map(name,jQuery.camelCase));for(i=0,l=name.length;i1,null,true)},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}});function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}jQuery.data(elem,key,data)}else data= -undefined}return data}function isEmptyDataObject(obj){var name;for(name in obj){if(name==="data"&&jQuery.isEmptyObject(obj[name]))continue;if(name!=="toJSON")return false}return true}jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=jQuery._data(elem,type);if(data)if(!queue||jQuery.isArray(data))queue=jQuery._data(elem,type,jQuery.makeArray(data));else queue.push(data);return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem, -type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}hooks.cur=fn;if(fn){if(type==="fx")queue.unshift("inprogress");delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks)hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem, -type+"queue");jQuery._removeData(elem,key)})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.length1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})},prop:function(name,value){return jQuery.access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){name=jQuery.propFix[name]||name;return this.each(function(){try{this[name]=undefined;delete this[name]}catch(e){}})},addClass:function(value){var classes,elem, -cur,clazz,j,i=0,len=this.length,proceed=typeof value==="string"&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed){classes=(value||"").match(core_rnotwhite)||[];for(;i=0)cur=cur.replace(" "+clazz+" "," ");elem.className= -value?jQuery.trim(cur):""}}}return this},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(jQuery.isFunction(value))return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)});return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),state=stateVal,classNames=value.match(core_rnotwhite)||[];while(className=classNames[i++]){state=isBool?state:!self.hasClass(className);self[state? -"addClass":"removeClass"](className)}}else if(type===core_strundefined||type==="boolean"){if(this.className)jQuery._data(this,"__className__",this.className);this.className=this.className||value===false?"":jQuery._data(this,"__className__")||""}})},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i=0)return true;return false},val:function(value){var ret,hooks,isFunction, -elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined)return ret;ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val,self=jQuery(this);if(this.nodeType!==1)return;if(isFunction)val=value.call(this,i,self.val());else val=value;if(val==null)val="";else if(typeof val=== -"number")val+="";else if(jQuery.isArray(val))val=jQuery.map(val,function(value){return value==null?"":value+""});hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined)this.value=val})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex, -one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i=0});if(!values.length)elem.selectedIndex=-1;return values}}},attr:function(elem,name,value){var hooks,notxml,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2)return;if(typeof elem.getAttribute===core_strundefined)return jQuery.prop(elem,name,value);notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook)}if(value!==undefined)if(value===null)jQuery.removeAttr(elem, -name);else if(hooks&¬xml&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined)return ret;else{elem.setAttribute(name,value+"");return value}else if(hooks&¬xml&&"get"in hooks&&(ret=hooks.get(elem,name))!==null)return ret;else{if(typeof elem.getAttribute!==core_strundefined)ret=elem.getAttribute(name);return ret==null?undefined:ret}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(core_rnotwhite);if(attrNames&&elem.nodeType===1)while(name=attrNames[i++]){propName= -jQuery.propFix[name]||name;if(rboolean.test(name))if(!getSetAttribute&&ruseDefault.test(name))elem[jQuery.camelCase("default-"+name)]=elem[propName]=false;else elem[propName]=false;else jQuery.attr(elem,name,"");elem.removeAttribute(getSetAttribute?name:propName)}},attrHooks:{type:{set:function(elem,value){if(!jQuery.support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val)elem.value=val;return value}}}},propFix:{tabindex:"tabIndex", -readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2)return;notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined)if(hooks&& -"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined)return ret;else return elem[name]=value;else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null)return ret;else return elem[name]},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined}}}});boolHook={get:function(elem,name){var prop= -jQuery.prop(elem,name),attr=typeof prop==="boolean"&&elem.getAttribute(name),detail=typeof prop==="boolean"?getSetInput&&getSetAttribute?attr!=null:ruseDefault.test(name)?elem[jQuery.camelCase("default-"+name)]:!!attr:elem.getAttributeNode(name);return detail&&detail.value!==false?name.toLowerCase():undefined},set:function(elem,value,name){if(value===false)jQuery.removeAttr(elem,name);else if(getSetInput&&getSetAttribute||!ruseDefault.test(name))elem.setAttribute(!getSetAttribute&&jQuery.propFix[name]|| -name,name);else elem[jQuery.camelCase("default-"+name)]=elem[name]=true;return name}};if(!getSetInput||!getSetAttribute)jQuery.attrHooks.value={get:function(elem,name){var ret=elem.getAttributeNode(name);return jQuery.nodeName(elem,"input")?elem.defaultValue:ret&&ret.specified?ret.value:undefined},set:function(elem,value,name){if(jQuery.nodeName(elem,"input"))elem.defaultValue=value;else return nodeHook&&nodeHook.set(elem,value,name)}};if(!getSetAttribute){nodeHook=jQuery.valHooks.button={get:function(elem, -name){var ret=elem.getAttributeNode(name);return ret&&(name==="id"||name==="name"||name==="coords"?ret.value!=="":ret.specified)?ret.value:undefined},set:function(elem,value,name){var ret=elem.getAttributeNode(name);if(!ret)elem.setAttributeNode(ret=elem.ownerDocument.createAttribute(name));ret.value=value+="";return name==="value"||value===elem.getAttribute(name)?value:undefined}};jQuery.attrHooks.contenteditable={get:nodeHook.get,set:function(elem,value,name){nodeHook.set(elem,value===""?false: -value,name)}};jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{set:function(elem,value){if(value===""){elem.setAttribute(name,"auto");return value}}})})}if(!jQuery.support.hrefNormalized){jQuery.each(["href","src","width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{get:function(elem){var ret=elem.getAttribute(name,2);return ret==null?undefined:ret}})});jQuery.each(["href","src"],function(i,name){jQuery.propHooks[name]= -{get:function(elem){return elem.getAttribute(name,4)}}})}if(!jQuery.support.style)jQuery.attrHooks.style={get:function(elem){return elem.style.cssText||undefined},set:function(elem,value){return elem.style.cssText=value+""}};if(!jQuery.support.optSelected)jQuery.propHooks.selected=jQuery.extend(jQuery.propHooks.selected,{get:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode)parent.parentNode.selectedIndex}return null}});if(!jQuery.support.enctype)jQuery.propFix.enctype= -"encoding";if(!jQuery.support.checkOn)jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={get:function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]=jQuery.extend(jQuery.valHooks[this],{set:function(elem,value){if(jQuery.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}})});var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/, -rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true}function returnFalse(){return false}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var tmp,events,t,handleObjIn,special,eventHandle,handleObj,handlers,type,namespaces,origType,elemData=jQuery._data(elem);if(!elemData)return;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid)handler.guid=jQuery.guid++; -if(!(events=elemData.events))events=elemData.events={};if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==core_strundefined&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined};eventHandle.elem=elem}types=(types||"").match(core_rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();special=jQuery.event.special[type]|| -{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false)if(elem.addEventListener)elem.addEventListener(type, -eventHandle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,eventHandle)}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid)handleObj.handler.guid=handler.guid}if(selector)handlers.splice(handlers.delegateCount++,0,handleObj);else handlers.push(handleObj);jQuery.event.global[type]=true}elem=null},remove:function(elem,types,handler,selector,mappedTypes){var j,handleObj,tmp,origCount,t,events,special,handlers,type,namespaces,origType,elemData=jQuery.hasData(elem)&& -jQuery._data(elem);if(!elemData||!(events=elemData.events))return;types=(types||"").match(core_rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,true);continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+ -"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector)handlers.delegateCount--;if(special.remove)special.remove.call(elem,handleObj)}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)=== -false)jQuery.removeEvent(elem,type,elemData.handle);delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;jQuery._removeData(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var handle,ontype,cur,bubbleType,special,tmp,i,eventPath=[elem||document],type=core_hasOwn.call(event,"type")?event.type:event,namespaces=core_hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8)return;if(rfocusMorph.test(type+ -jQuery.event.triggered))return;if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=true;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target)event.target=elem;data=data==null?[event]:jQuery.makeArray(data, -[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false)return;if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type))cur=cur.parentNode;for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document))eventPath.push(tmp.defaultView||tmp.parentWindow||window)}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type= -i>1?bubbleType:special.bindType||type;handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle");if(handle)handle.apply(cur,data);handle=ontype&&cur[ontype];if(handle&&jQuery.acceptData(cur)&&handle.apply&&handle.apply(cur,data)===false)event.preventDefault()}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented())if((!special._default||special._default.apply(elem.ownerDocument,data)===false)&&!(type==="click"&&jQuery.nodeName(elem,"a"))&&jQuery.acceptData(elem))if(ontype&& -elem[type]&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp)elem[ontype]=null;jQuery.event.triggered=type;try{elem[type]()}catch(e){}jQuery.event.triggered=undefined;if(tmp)elem[ontype]=tmp}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,ret,handleObj,matched,j,handlerQueue=[],args=core_slice.call(arguments),handlers=(jQuery._data(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&& -special.preDispatch.call(this,event)===false)return;handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped())if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem, -args);if(ret!==undefined)if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}if(special.postDispatch)special.postDispatch.call(this,event);return event.result},handlers:function(event,handlers){var sel,handleObj,matches,i,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click"))for(;cur!=this;cur=cur.parentNode||this)if(cur.nodeType===1&&(cur.disabled!==true||event.type!=="click")){matches= -[];for(i=0;i=0:jQuery.find(sel,this,null,[cur]).length;if(matches[sel])matches.push(handleObj)}if(matches.length)handlerQueue.push({elem:cur,handlers:matches})}if(delegateCount+~])"+whitespace+"*"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+ -"$"),matchExpr={"ID":new RegExp("^#("+characterEncoding+")"),"CLASS":new RegExp("^\\.("+characterEncoding+")"),"NAME":new RegExp("^\\[name=['\"]?("+characterEncoding+")['\"]?\\]"),"TAG":new RegExp("^("+characterEncoding.replace("w","w*")+")"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"), -"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rsibling=/[\x20\t\r\n\f]*[+~]/,rnative=/^[^{]+\{\s*\[native code/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rescape=/'|\\/g,rattributeQuotes=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,runescape=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,funescape=function(_,escaped){var high= -"0x"+escaped-65536;return high!==high?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)};try{slice.call(preferredDoc.documentElement.childNodes,0)[0].nodeType}catch(e){slice=function(i){var elem,results=[];while(elem=this[i++])results.push(elem);return results}}function isNative(fn){return rnative.test(fn+"")}function createCache(){var cache,keys=[];return cache=function(key,value){if(keys.push(key+=" ")>Expr.cacheLength)delete cache[keys.shift()]; -return cache[key]=value}}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return fn(div)}catch(e){return false}finally{div=null}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document)setDocument(context);context=context||document;results=results||[];if(!selector||typeof selector!=="string")return results;if((nodeType= -context.nodeType)!==1&&nodeType!==9)return[];if(!documentIsXML&&!seed){if(match=rquickExpr.exec(selector))if(m=match[1])if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else return results}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}else if(match[2]){push.apply(results,slice.call(context.getElementsByTagName(selector), -0));return results}else if((m=match[3])&&support.getByClassName&&context.getElementsByClassName){push.apply(results,slice.call(context.getElementsByClassName(m),0));return results}if(support.qsa&&!rbuggyQSA.test(selector)){old=true;nid=expando;newContext=context;newSelector=nodeType===9&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if(old=context.getAttribute("id"))nid=old.replace(rescape,"\\$&");else context.setAttribute("id",nid);nid="[id='"+nid+ -"'] ";i=groups.length;while(i--)groups[i]=nid+toSelector(groups[i]);newContext=rsibling.test(selector)&&context.parentNode||context;newSelector=groups.join(",")}if(newSelector)try{push.apply(results,slice.call(newContext.querySelectorAll(newSelector),0));return results}catch(qsaError){}finally{if(!old)context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement; -return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement)return document;document=doc;docElem=doc.documentElement;documentIsXML=isXML(doc);support.tagNameNoComments=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length});support.attributes=assert(function(div){div.innerHTML=""; -var type=typeof div.lastChild.getAttribute("multiple");return type!=="boolean"&&type!=="string"});support.getByClassName=assert(function(div){div.innerHTML="";if(!div.getElementsByClassName||!div.getElementsByClassName("e").length)return false;div.lastChild.className="e";return div.getElementsByClassName("e").length===2});support.getByName=assert(function(div){div.id=expando+0;div.innerHTML="
"; -docElem.insertBefore(div,docElem.firstChild);var pass=doc.getElementsByName&&doc.getElementsByName(expando).length===2+doc.getElementsByName(expando+0).length;support.getIdNotName=!doc.getElementById(expando);docElem.removeChild(div);return pass});Expr.attrHandle=assert(function(div){div.innerHTML="";return div.firstChild&&typeof div.firstChild.getAttribute!==strundefined&&div.firstChild.getAttribute("href")==="#"})?{}:{"href":function(elem){return elem.getAttribute("href",2)},"type":function(elem){return elem.getAttribute("type")}}; -if(support.getIdNotName){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!==strundefined&&!documentIsXML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{Expr.find["ID"]=function(id,context){if(typeof context.getElementById!==strundefined&&!documentIsXML){var m=context.getElementById(id);return m?m.id===id||typeof m.getAttributeNode!== -strundefined&&m.getAttributeNode("id").value===id?[m]:undefined:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.tagNameNoComments?function(tag,context){if(typeof context.getElementsByTagName!==strundefined)return context.getElementsByTagName(tag)}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag); -if(tag==="*"){while(elem=results[i++])if(elem.nodeType===1)tmp.push(elem);return tmp}return results};Expr.find["NAME"]=support.getByName&&function(tag,context){if(typeof context.getElementsByName!==strundefined)return context.getElementsByName(name)};Expr.find["CLASS"]=support.getByClassName&&function(className,context){if(typeof context.getElementsByClassName!==strundefined&&!documentIsXML)return context.getElementsByClassName(className)};rbuggyMatches=[];rbuggyQSA=[":focus"];if(support.qsa=isNative(doc.querySelectorAll)){assert(function(div){div.innerHTML= -"";if(!div.querySelectorAll("[selected]").length)rbuggyQSA.push("\\["+whitespace+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");if(!div.querySelectorAll(":checked").length)rbuggyQSA.push(":checked")});assert(function(div){div.innerHTML="";if(div.querySelectorAll("[i^='']").length)rbuggyQSA.push("[*^$]="+whitespace+"*(?:\"\"|'')");if(!div.querySelectorAll(":enabled").length)rbuggyQSA.push(":enabled",":disabled"); -div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=isNative(matches=docElem.matchesSelector||docElem.mozMatchesSelector||docElem.webkitMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)});rbuggyQSA=new RegExp(rbuggyQSA.join("|"));rbuggyMatches=new RegExp(rbuggyMatches.join("|"));contains=isNative(docElem.contains)||docElem.compareDocumentPosition? -function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return true;return false};sortOrder=docElem.compareDocumentPosition?function(a,b){var compare;if(a===b){hasDuplicate=true;return 0}if(compare=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b)){if(compare& -1||a.parentNode&&a.parentNode.nodeType===11){if(a===doc||contains(preferredDoc,a))return-1;if(b===doc||contains(preferredDoc,b))return 1;return 0}return compare&4?-1:1}return a.compareDocumentPosition?-1:1}:function(a,b){var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(a===b){hasDuplicate=true;return 0}else if(!aup||!bup)return a===doc?-1:b===doc?1:aup?-1:bup?1:0;else if(aup===bup)return siblingCheck(a,b);cur=a;while(cur=cur.parentNode)ap.unshift(cur);cur=b;while(cur=cur.parentNode)bp.unshift(cur); -while(ap[i]===bp[i])i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};hasDuplicate=false;[0,0].sort(sortOrder);support.detectDuplicates=hasDuplicate;return document};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document)setDocument(elem);expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&!documentIsXML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&& -!rbuggyQSA.test(expr))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document)setDocument(context);return contains(context,elem)};Sizzle.attr=function(elem,name){var val;if((elem.ownerDocument||elem)!==document)setDocument(elem);if(!documentIsXML)name=name.toLowerCase();if(val=Expr.attrHandle[name])return val(elem); -if(documentIsXML||support.attributes)return elem.getAttribute(name);return((val=elem.getAttributeNode(name))||elem.getAttribute(name))&&elem[name]===true?name:val&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],i=1,j=0;hasDuplicate=!support.detectDuplicates;results.sort(sortOrder);if(hasDuplicate){for(;elem=results[i];i++)if(elem===results[i-1])j=duplicates.push(i); -while(j--)results.splice(duplicates[j],1)}return results};function siblingCheck(a,b){var cur=b&&a,diff=cur&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff)return diff;if(cur)while(cur=cur.nextSibling)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"|| -name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--)if(seed[j=matchIndexes[i]])seed[j]=!(matches[j]=seed[j])})})}getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType)for(;node=elem[i];i++)ret+=getText(node);else if(nodeType===1||nodeType===9||nodeType===11)if(typeof elem.textContent=== -"string")return elem.textContent;else for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem);else if(nodeType===3||nodeType===4)return elem.nodeValue;return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[4]|| -match[5]||"").replace(runescape,funescape);if(match[2]==="~=")match[3]=" "+match[3]+" ";return match.slice(0,4)},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3])Sizzle.error(match[0]);match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3])Sizzle.error(match[0]);return match},"PSEUDO":function(match){var excess,unquoted=!match[5]&&match[2];if(matchExpr["CHILD"].test(match[0]))return null; -if(match[4])match[2]=match[4];else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{"TAG":function(nodeName){if(nodeName==="*")return function(){return true};nodeName=nodeName.replace(runescape,funescape).toLowerCase();return function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},"CLASS":function(className){var pattern= -classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"")})},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null)return operator==="!=";if(!operator)return true;result+="";return operator==="="?result===check:operator==="!="?result!==check: -operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem, -context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while(node=node[dir])if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)return false;start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]= -{});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns)diff=cache[1];else while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())if((ofType? -node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache)(node[expando]||(node[expando]={}))[type]=[dirruns,diff];if(node===elem)break}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},"PSEUDO":function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando])return fn(argument);if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())? -markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf.call(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{"not":markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--)if(elem=unmatched[i])seed[i]= -!(matches[i]=elem)}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);return!results.pop()}}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),"contains":markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||""))Sizzle.error("unsupported lang: "+lang);lang=lang.replace(runescape,funescape).toLowerCase(); -return function(elem){var elemLang;do if(elemLang=documentIsXML?elem.getAttribute("xml:lang")||elem.getAttribute("lang"):elem.lang){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),"target":function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},"root":function(elem){return elem===docElem},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus|| -document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},"enabled":function(elem){return elem.disabled===false},"disabled":function(elem){return elem.disabled===true},"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},"selected":function(elem){if(elem.parentNode)elem.parentNode.selectedIndex;return elem.selected===true},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeName> -"@"||elem.nodeType===3||elem.nodeType===4)return false;return true},"parent":function(elem){return!Expr.pseudos["empty"](elem)},"header":function(elem){return rheader.test(elem.nodeName)},"input":function(elem){return rinputs.test(elem.nodeName)},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},"text":function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))== -null||attr.toLowerCase()===elem.type)},"first":createPositionalPseudo(function(){return[0]}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1]}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;)matchIndexes.push(i);return matchIndexes}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--)if(!matchers[i](elem,context,xml))return false;return true}:matchers[0]}function condense(unmatched,map,filter,context,xml){var elem, -newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i-1)seed[temp]=!(results[temp]=elem)}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder)postFinder(null,results,matcherOut, -xml);else push.apply(results,matcherOut)}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){return!leadingRelative&& -(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1)).replace(rtrim, -"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,expandContext){var elem,j,matcher,setMatched=[],matchedCount=0,i="0",unmatched=seed&&[],outermost=expandContext!=null, -contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",expandContext&&context.parentNode||context),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||0.1;if(outermost){outermostContext=context!==document&&context;cachedruns=matcherCachedRuns}for(;(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while(matcher=elementMatchers[j++])if(matcher(elem,context,xml)){results.push(elem);break}if(outermost){dirruns=dirrunsUnique;cachedruns=++matcherCachedRuns}}if(bySet){if(elem= -!matcher&&elem)matchedCount--;if(seed)unmatched.push(elem)}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++])matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)while(i--)if(!(unmatched[i]||setMatched[i]))setMatched[i]=pop.call(results);setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1)Sizzle.uniqueSort(results)}if(outermost){dirruns=dirrunsUnique;outermostContext= -contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,group){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!group)group=tokenize(selector);i=group.length;while(i--){cached=matcherFromTokens(group[i]);if(cached[expando])setMatchers.push(cached);else elementMatchers.push(cached)}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers))}return cached};function multipleContexts(selector, -contexts,results){var i=0,len=contexts.length;for(;i2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&!documentIsXML&&Expr.relative[tokens[1].type]){context=Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)[0];if(!context)return results; -selector=selector.slice(tokens.shift().value.length)}i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type])break;if(find=Expr.find[type])if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&context.parentNode||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,slice.call(seed,0));return results}break}}}compile(selector,match)(seed,context,documentIsXML, -results,rsibling.test(selector));return results}Expr.pseudos["nth"]=Expr.pseudos["eq"];function setFilters(){}Expr.filters=setFilters.prototype=Expr.pseudos;Expr.setFilters=new setFilters;setDocument();Sizzle.attr=jQuery.attr;jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains})(window);var runtil=/Until$/,rparentsprev=/^(?:parents|prev(?:Until|All))/, -isSimple=/^.[^:#\[\.,]*$/,rneedsContext=jQuery.expr.match.needsContext,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({find:function(selector){var i,ret,self,len=this.length;if(typeof selector!=="string"){self=this;return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.unique(ret):ret);ret.selector=(this.selector? -this.selector+" ":"")+selector;return ret},has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;i= -0:jQuery.filter(selector,this).length>0:this.filter(selector).length>0)},closest:function(selectors,context){var cur,i=0,l=this.length,ret=[],pos=rneedsContext.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;for(;i-1:jQuery.find.matchesSelector(cur,selectors)){ret.push(cur);break}cur=cur.parentNode}}return this.pushStack(ret.length>1?jQuery.unique(ret):ret)}, -index:function(elem){if(!elem)return this[0]&&this[0].parentNode?this.first().prevAll().length:-1;if(typeof elem==="string")return jQuery.inArray(this[0],jQuery(elem));return jQuery.inArray(elem.jquery?elem[0]:elem,this)},add:function(selector,context){var set=typeof selector==="string"?jQuery(selector,context):jQuery.makeArray(selector&&selector.nodeType?[selector]:selector),all=jQuery.merge(this.get(),set);return this.pushStack(jQuery.unique(all))},addBack:function(selector){return this.add(selector== -null?this.prevObject:this.prevObject.filter(selector))}});jQuery.fn.andSelf=jQuery.fn.addBack;function sibling(cur,dir){do cur=cur[dir];while(cur&&cur.nodeType!==1);return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem, -"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem, -"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(!runtil.test(name))selector=until;if(selector&&typeof selector==="string")ret=jQuery.filter(selector,ret);ret=this.length>1&&!guaranteedUnique[name]?jQuery.unique(ret):ret;if(this.length>1&&rparentsprev.test(name))ret=ret.reverse();return this.pushStack(ret)}});jQuery.extend({filter:function(expr,elems,not){if(not)expr= -":not("+expr+")";return elems.length===1?jQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:jQuery.find.matches(expr,elems)},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1)matched.push(cur);cur=cur[dir]}return matched},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling)if(n.nodeType===1&&n!==elem)r.push(n);return r}});function winnow(elements,qualifier,keep){qualifier= -qualifier||0;if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep});else if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier===keep});else if(typeof qualifier==="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1});if(isSimple.test(qualifier))return jQuery.filter(qualifier,filtered,!keep);else qualifier=jQuery.filter(qualifier,filtered)}return jQuery.grep(elements, -function(elem){return jQuery.inArray(elem,qualifier)>=0===keep})}function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement)while(list.length)safeFrag.createElement(list.pop());return safeFrag}var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rnoshimcache= -new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/\s*$/g,wrapMap={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:jQuery.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));wrapMap.optgroup=wrapMap.option; -wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;jQuery.fn.extend({text:function(value){return jQuery.access(this,function(value){return value===undefined?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value))},null,value,arguments.length)},wrapAll:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))});if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true); -if(this[0].parentNode)wrap.insertBefore(this[0]);wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1)elem=elem.firstChild;return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))});return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length)contents.wrapAll(html);else self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html); -return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body"))jQuery(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9)this.appendChild(elem)})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType=== -9)this.insertBefore(elem,this.firstChild)})},before:function(){return this.domManip(arguments,false,function(elem){if(this.parentNode)this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){if(this.parentNode)this.parentNode.insertBefore(elem,this.nextSibling)})},remove:function(selector,keepData){var elem,i=0;for(;(elem=this[i])!=null;i++)if(!selector||jQuery.filter(selector,[elem]).length>0){if(!keepData&&elem.nodeType===1)jQuery.cleanData(getAll(elem)); -if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem))setGlobalEval(getAll(elem,"script"));elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1)jQuery.cleanData(getAll(elem,false));while(elem.firstChild)elem.removeChild(elem.firstChild);if(elem.options&&jQuery.nodeName(elem,"select"))elem.options.length=0}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false: -dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return jQuery.access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined)return elem.nodeType===1?elem.innerHTML.replace(rinlinejQuery,""):undefined;if(typeof value==="string"&&!rnoInnerhtml.test(value)&&(jQuery.support.htmlSerialize||!rnoshimcache.test(value))&&(jQuery.support.leadingWhitespace|| -!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1>");try{for(;i"))clone=elem.cloneNode(true);else{fragmentDiv.innerHTML=elem.outerHTML;fragmentDiv.removeChild(clone=fragmentDiv.firstChild)}if((!jQuery.support.noCloneEvent||!jQuery.support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0;(node=srcElements[i])!= -null;++i)if(destElements[i])fixCloneNodeIssues(node,destElements[i])}if(dataAndEvents)if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0;(node=srcElements[i])!=null;i++)cloneCopyEvent(node,destElements[i])}else cloneCopyEvent(elem,clone);destElements=getAll(clone,"script");if(destElements.length>0)setGlobalEval(destElements,!inPage&&getAll(elem,"script"));destElements=srcElements=node=null;return clone},buildFragment:function(elems,context, -scripts,selection){var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;for(;i")+wrap[2];j=wrap[0];while(j--)tmp=tmp.lastChild;if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem))nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0]));if(!jQuery.support.tbody){elem=tag==="table"&&!rtbody.test(elem)?tmp.firstChild:wrap[1]===""&&!rtbody.test(elem)?tmp:0;j=elem&&elem.childNodes.length;while(j--)if(jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length)elem.removeChild(tbody)}jQuery.merge(nodes,tmp.childNodes); -tmp.textContent="";while(tmp.firstChild)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild}}if(tmp)safe.removeChild(tmp);if(!jQuery.support.appendChecked)jQuery.grep(getAll(nodes,"input"),fixDefaultChecked);i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)!==-1)continue;contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(safe.appendChild(elem),"script");if(contains)setGlobalEval(tmp);if(scripts){j=0;while(elem=tmp[j++])if(rscriptType.test(elem.type||""))scripts.push(elem)}}tmp= -null;return safe},cleanData:function(elems,acceptData){var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=jQuery.support.deleteExpando,special=jQuery.event.special;for(;(elem=elems[i])!=null;i++)if(acceptData||jQuery.acceptData(elem)){id=elem[internalKey];data=id&&cache[id];if(data){if(data.events)for(type in data.events)if(special[type])jQuery.event.remove(elem,type);else jQuery.removeEvent(elem,type,data.handle);if(cache[id]){delete cache[id];if(deleteExpando)delete elem[internalKey]; -else if(typeof elem.removeAttribute!==core_strundefined)elem.removeAttribute(internalKey);else elem[internalKey]=null;core_deletedIds.push(id)}}}}});var iframe,getStyles,curCSS,ralpha=/alpha\([^)]*\)/i,ropacity=/opacity\s*=\s*([^)]*)/,rposition=/^(top|right|bottom|left)$/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rmargin=/^margin/,rnumsplit=new RegExp("^("+core_pnum+")(.*)$","i"),rnumnonpx=new RegExp("^("+core_pnum+")(?!px)[a-z%]+$","i"),rrelNum=new RegExp("^([+-])=("+core_pnum+")","i"),elemdisplay= -{BODY:"block"},cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssExpand=["Top","Right","Bottom","Left"],cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style)return name;var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style)return name}return origName}function isHidden(elem,el){elem=el||elem;return jQuery.css(elem, -"display")==="none"||!jQuery.contains(elem.ownerDocument,elem)}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){var bool=typeof state==="boolean";return this.each(function(){if(bool?state:isHidden(this))jQuery(this).show();else jQuery(this).hide()})}});jQuery.extend({cssHooks:{opacity:{get:function(elem, -computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{"columnCount":true,"fillOpacity":true,"fontWeight":true,"lineHeight":true,"opacity":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":jQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style)return;var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;name=jQuery.cssProps[origName]|| -(jQuery.cssProps[origName]=vendorPropName(style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name));type="number"}if(value==null||type==="number"&&isNaN(value))return;if(type==="number"&&!jQuery.cssNumber[origName])value+="px";if(!jQuery.support.clearCloneStyle&&value===""&&name.indexOf("background")===0)style[name]="inherit";if(!hooks||!("set"in -hooks)||(value=hooks.set(elem,value,extra))!==undefined)try{style[name]=value}catch(e){}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined)return ret;return style[name]}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks)val=hooks.get(elem,true,extra);if(val===undefined)val= -curCSS(elem,name,styles);if(val==="normal"&&name in cssNormalTransform)val=cssNormalTransform[name];if(extra===""||extra){num=parseFloat(val);return extra===true||jQuery.isNumeric(num)?num||0:val}return val},swap:function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret}});if(window.getComputedStyle){getStyles=function(elem){return window.getComputedStyle(elem, -null)};curCSS=function(elem,name,_computed){var width,minWidth,maxWidth,computed=_computed||getStyles(elem),ret=computed?computed.getPropertyValue(name)||computed[name]:undefined,style=elem.style;if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem))ret=jQuery.style(elem,name);if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth; -style.maxWidth=maxWidth}}return ret}}else if(document.documentElement.currentStyle){getStyles=function(elem){return elem.currentStyle};curCSS=function(elem,name,_computed){var left,rs,rsLeft,computed=_computed||getStyles(elem),ret=computed?computed[name]:undefined,style=elem.style;if(ret==null&&style&&style[name])ret=style[name];if(rnumnonpx.test(ret)&&!rposition.test(name)){left=style.left;rs=elem.runtimeStyle;rsLeft=rs&&rs.left;if(rsLeft)rs.left=elem.currentStyle.left;style.left=name==="fontSize"? -"1em":ret;ret=style.pixelLeft+"px";style.left=left;if(rsLeft)rs.left=rsLeft}return ret===""?"auto":ret}}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin")val+=jQuery.css(elem,extra+cssExpand[i],true,styles);if(isBorderBox){if(extra=== -"content")val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="margin")val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding")val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.support.boxSizing&&jQuery.css(elem, -"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null)val=elem.style[name];if(rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(jQuery.support.boxSizingReliable||val===elem.style[name]);val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function css_defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName, -doc);if(display==="none"||!display){iframe=(iframe||jQuery("