;window.Modernizr=(function(window,document,undefined){var version='2.8.3',Modernizr={},enableClasses=true,docElement=document.documentElement,mod='modernizr',modElem=document.createElement(mod),mStyle=modElem.style,inputElem=document.createElement('input'),smile=':)',toString={}.toString,prefixes=' -webkit- -moz- -o- -ms- '.split(' '),omPrefixes='Webkit Moz O ms',cssomPrefixes=omPrefixes.split(' '),domPrefixes=omPrefixes.toLowerCase().split(' '),ns={'svg':'http://www.w3.org/2000/svg'},tests={},inputs={},attrs={},classes=[],slice=classes.slice,featureName,injectElementWithStyles=function(rule,callback,nodes,testnames){var style,ret,node,docOverflow,div=document.createElement('div'),body=document.body,fakeBody=body||document.createElement('body');if(parseInt(nodes,10)){while(nodes--){node=document.createElement('div');node.id=testnames?testnames[nodes]:mod+(nodes+1);div.appendChild(node);}}style=['­',''].join('');div.id=mod;(body?div:fakeBody).innerHTML+=style;fakeBody.appendChild(div);if(!body){fakeBody.style.background='';fakeBody.style.overflow='hidden';docOverflow=docElement.style.overflow;docElement.style.overflow='hidden';docElement.appendChild(fakeBody);}ret=callback(div,rule);if(!body){fakeBody.parentNode.removeChild(fakeBody);docElement.style.overflow=docOverflow;}else{div.parentNode.removeChild(div);}return!!ret;},isEventSupported=(function(){var TAGNAMES={'select':'input','change':'input','submit':'form','reset':'form','error':'img','load':'img','abort':'img'};function isEventSupported(eventName,element){element=element||document.createElement(TAGNAMES[eventName]||'div');eventName='on'+eventName;var isSupported=eventName in element;if(!isSupported){if(!element.setAttribute){element=document.createElement('div');}if(element.setAttribute&&element.removeAttribute){element.setAttribute(eventName,'');isSupported=is(element[eventName],'function');if(!is(element[eventName],'undefined')){element[eventName]=undefined;}element.removeAttribute(eventName);}}element=null;return isSupported;}return isEventSupported;})(),_hasOwnProperty=({}).hasOwnProperty,hasOwnProp;if(!is(_hasOwnProperty,'undefined')&&!is(_hasOwnProperty.call,'undefined')){hasOwnProp=function(object,property){return _hasOwnProperty.call(object,property);};}else{hasOwnProp=function(object,property){return((property in object)&&is(object.constructor.prototype[property],'undefined'));};}if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;if(typeof target!="function"){throw new TypeError();}var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var F=function(){};F.prototype=target.prototype;var self=new F();var result=target.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result){return result;}return self;}else{return target.apply(that,args.concat(slice.call(arguments)));}};return bound;};}function setCss(str){mStyle.cssText=str;}function setCssAll(str1,str2){return setCss(prefixes.join(str1+';')+(str2||''));}function is(obj,type){return typeof obj===type;}function contains(str,substr){return!!~(''+str).indexOf(substr);}function testProps(props,prefixed){for(var i in props){var prop=props[i];if(!contains(prop,"-")&&mStyle[prop]!==undefined){return prefixed=='pfx'?prop:true;}}return false;}function testDOMProps(props,obj,elem){for(var i in props){var item=obj[props[i]];if(item!==undefined){if(elem===false)return props[i];if(is(item,'function')){return item.bind(elem||obj);}return item;}}return false;}function testPropsAll(prop,prefixed,elem){var ucProp=prop.charAt(0).toUpperCase()+prop.slice(1),props=(prop+' '+cssomPrefixes.join(ucProp+' ')+ucProp).split(' ');if(is(prefixed,"string")||is(prefixed,"undefined")){return testProps(props,prefixed);}else{props=(prop+' '+(domPrefixes).join(ucProp+' ')+ucProp).split(' ');return testDOMProps(props,prefixed,elem);}}tests['flexbox']=function(){return testPropsAll('flexWrap');};tests['canvas']=function(){var elem=document.createElement('canvas');return!!(elem.getContext&&elem.getContext('2d'));};tests['touch']=function(){var bool;if(('ontouchstart'in window)||window.DocumentTouch&&document instanceof DocumentTouch){bool=true;}else{injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''),function(node){bool=node.offsetTop===9;});}return bool;};tests['geolocation']=function(){return'geolocation'in navigator;};tests['hashchange']=function(){return isEventSupported('hashchange',window)&&(document.documentMode===undefined||document.documentMode>7);};tests['history']=function(){return!!(window.history&&history.pushState);};tests['websockets']=function(){return'WebSocket'in window||'MozWebSocket'in window;};tests['rgba']=function(){setCss('background-color:rgba(150,255,150,.5)');return contains(mStyle.backgroundColor,'rgba');};tests['multiplebgs']=function(){setCss('background:url(https://),url(https://),red url(https://)');return(/(url\s*\(.*?){3}/).test(mStyle.background);};tests['backgroundsize']=function(){return testPropsAll('backgroundSize');};tests['boxshadow']=function(){return testPropsAll('boxShadow');};tests['opacity']=function(){setCssAll('opacity:.55');return(/^0.55$/).test(mStyle.opacity);};tests['cssanimations']=function(){return testPropsAll('animationName');};tests['csscolumns']=function(){return testPropsAll('columnCount');};tests['cssgradients']=function(){var str1='background-image:',str2='gradient(linear,left top,right bottom,from(#9f9),to(white));',str3='linear-gradient(left top,#9f9, white);';setCss((str1+'-webkit- '.split(' ').join(str2+str1)+prefixes.join(str3+str1)).slice(0,-str1.length));return contains(mStyle.backgroundImage,'gradient');};tests['csstransforms']=function(){return!!testPropsAll('transform');};tests['csstransforms3d']=function(){var ret=!!testPropsAll('perspective');if(ret&&'webkitPerspective'in docElement.style){injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}',function(node,rule){ret=node.offsetLeft===9&&node.offsetHeight===3;});}return ret;};tests['csstransitions']=function(){return testPropsAll('transition');};tests['generatedcontent']=function(){var bool;injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''),function(node){bool=node.offsetHeight>=3;});return bool;};tests['localstorage']=function(){try{localStorage.setItem(mod,mod);localStorage.removeItem(mod);return true;}catch(e){return false;}};tests['svg']=function(){return!!document.createElementNS&&!!document.createElementNS(ns.svg,'svg').createSVGRect;};function webforms(){Modernizr['input']=(function(props){for(var i=0,len=props.length;i';supportsHtml5Styles=('hidden'in a);supportsUnknownElements=a.childNodes.length==1||(function(){(document.createElement)('a');var frag=document.createDocumentFragment();return(typeof frag.cloneNode=='undefined'||typeof frag.createDocumentFragment=='undefined'||typeof frag.createElement=='undefined');}());}catch(e){supportsHtml5Styles=true;supportsUnknownElements=true;}}());function addStyleSheet(ownerDocument,cssText){var p=ownerDocument.createElement('p'),parent=ownerDocument.getElementsByTagName('head')[0]||ownerDocument.documentElement;p.innerHTML='x';return parent.insertBefore(p.lastChild,parent.firstChild);}function getElements(){var elements=html5.elements;return typeof elements=='string'?elements.split(' '):elements;}function getExpandoData(ownerDocument){var data=expandoData[ownerDocument[expando]];if(!data){data={};expanID++;ownerDocument[expando]=expanID;expandoData[expanID]=data;}return data;}function createElement(nodeName,ownerDocument,data){if(!ownerDocument){ownerDocument=document;}if(supportsUnknownElements){return ownerDocument.createElement(nodeName);}if(!data){data=getExpandoData(ownerDocument);}var node;if(data.cache[nodeName]){node=data.cache[nodeName].cloneNode();}else if(saveClones.test(nodeName)){node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode();}else{node=data.createElem(nodeName);}return node.canHaveChildren&&!reSkip.test(nodeName)&&!node.tagUrn?data.frag.appendChild(node):node;}function createDocumentFragment(ownerDocument,data){if(!ownerDocument){ownerDocument=document;}if(supportsUnknownElements){return ownerDocument.createDocumentFragment();}data=data||getExpandoData(ownerDocument);var clone=data.frag.cloneNode(),i=0,elems=getElements(),l=elems.length;for(;i7);});Modernizr.addTest('csscalc',function(){var prop='width:';var value='calc(10px);';var el=document.createElement('div');el.style.cssText=prop+Modernizr._prefixes.join(value+prop);return!!el.style.length;});Modernizr.addTest("display-table",function(){var doc=window.document,docElem=doc.documentElement,parent=doc.createElement("div"),child=doc.createElement("div"),childb=doc.createElement("div"),ret;parent.style.cssText="display: table";child.style.cssText=childb.style.cssText="display: table-cell; padding: 10px";parent.appendChild(child);parent.appendChild(childb);docElem.insertBefore(parent,docElem.firstChild);ret=child.offsetLeftelem.firstChild.offsetWidth;},2);});Modernizr.addTest('cssscrollbar',function(){var bool,styles="#modernizr{overflow: scroll; width: 40px }#"+Modernizr._prefixes.join("scrollbar{width:2px}"+' #modernizr::').split('#').slice(1).join('#')+"scrollbar{width:2px}";Modernizr.testStyles(styles,function(node){bool='scrollWidth'in node&&node.scrollWidth==38;});return bool;});Modernizr.addTest('cssvwunit',function(){var bool;Modernizr.testStyles("#modernizr { width: 50vw; }",function(elem,rule){var width=parseInt(window.innerWidth/2,10),compStyle=parseInt((window.getComputedStyle?getComputedStyle(elem,null):elem.currentStyle)["width"],10);bool=(compStyle==width);});return bool;});Modernizr.addTest('placeholder',function(){return!!('placeholder'in(Modernizr.input||document.createElement('input'))&&'placeholder'in(Modernizr.textarea||document.createElement('textarea')));});(function(document,Modernizr){Modernizr.formvalidationapi=false;Modernizr.formvalidationmessage=false;Modernizr.addTest('formvalidation',function(){var form=document.createElement('form');if(!('checkValidity'in form)||!('addEventListener'in form)){return false;}if('reportValidity'in form){return true;}var invalidFired=false;var input;Modernizr.formvalidationapi=true;form.addEventListener('submit',function(e){if(!window.opera){e.preventDefault();}e.stopPropagation();},false);form.innerHTML='';Modernizr.testStyles('#modernizr form{position:absolute;top:-99999em}',function(node){node.appendChild(form);input=form.getElementsByTagName('input')[0];input.addEventListener('invalid',function(e){invalidFired=true;e.preventDefault();e.stopPropagation();},false);Modernizr.formvalidationmessage=!!input.validationMessage;form.getElementsByTagName('button')[0].click();});return invalidFired;});})(document,window.Modernizr);; (function(window,undefined){var readyList,rootjQuery,core_strundefined=typeof undefined,location=window.location,document=window.document,docElem=document.documentElement,_jQuery=window.jQuery,_$=window.$,class2type={},core_deletedIds=[],core_version="1.10.2",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=/^(?:\s*(<[\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,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){var key;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;}if(jQuery.support.ownLast){for(key in obj){return core_hasOwn.call(obj,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(data&&/new Date\(/.test(data)){try{return(new Function("return "+data))();}catch(ex){jQuery.error("Invalid JSON: "+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);(function(window,undefined){var i,support,cachedruns,Expr,getText,isXML,compile,outermostContext,sortInput,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+ -(new Date()),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),hasDuplicate=false,sortOrder=function(a,b){if(a===b){hasDuplicate=true;return 0;}return 0;},strundefined=typeof undefined,MAX_NEGATIVE=1<<31,hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){var i=0,len=this.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rsibling=new RegExp(whitespace+"*[+~]"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+characterEncoding+")"),"CLASS":new RegExp("^\\.("+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"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);};try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els));}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}target.length=j-1;}};}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(documentIsHTML&&!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,context.getElementsByTagName(selector));return results;}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=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,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(!old){context.removeAttribute("id");}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed);}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+=" ")>Expr.cacheLength){delete cache[keys.shift()];}return(cache[key]=value);}return cache;}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{if(div.parentNode){div.parentNode.removeChild(div);}div=null;}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler;}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~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]);}}});});}isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};support=Sizzle.support={};setDocument=Sizzle.setDocument=function(node){var doc=node?node.ownerDocument||node:preferredDoc,parent=doc.defaultView;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;}document=doc;docElem=doc.documentElement;documentIsHTML=!isXML(doc);if(parent&&parent.attachEvent&&parent!==parent.top){parent.attachEvent("onbeforeunload",function(){setDocument();});}support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className");});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length;});support.getElementsByClassName=assert(function(div){div.innerHTML="
";div.firstChild.className="i";return div.getElementsByClassName("i").length===2;});support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!doc.getElementsByName||!doc.getElementsByName(expando).length;});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!==strundefined&&documentIsHTML){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{delete Expr.find["ID"];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.getElementsByTagName?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["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!==strundefined&&documentIsHTML){return context.getElementsByClassName(className);}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(doc.querySelectorAll))){assert(function(div){div.innerHTML="";if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("t","");if(div.querySelectorAll("[t^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled");}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});}if((support.matchesSelector=rnative.test((matches=docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));contains=rnative.test(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){if(a===b){hasDuplicate=true;return 0;}var compare=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b);if(compare){if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===doc||contains(preferredDoc,a)){return-1;}if(b===doc||contains(preferredDoc,b)){return 1;}return sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):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:sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):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;};return doc;};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&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!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){if((elem.ownerDocument||elem)!==document){setDocument(elem);}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val===undefined?support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null:val;};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i);}}while(j--){results.splice(duplicates[j],1);}}return results;};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,attrHandle:{},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[3]&&match[4]!==undefined){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(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}: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(typeof elem.className==="string"&&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=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("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).concat({value:tokens[i-2].type===" "?"*":""})).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"&&support.getById&&context.nodeType===9&&documentIsHTML&&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,seed);return results;}break;}}}}}compile(selector,match)(seed,context,!documentIsHTML,results,rsibling.test(selector));return results;}support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1;});if(!assert(function(div){div.innerHTML="";return div.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});}if(!support.attributes||!assert(function(div){div.innerHTML="";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});}if(!assert(function(div){return div.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return(val=elem.getAttributeNode(name))&&val.specified?val.value:elem[name]===true?name.toLowerCase():null;}});}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 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=[];firingLength=0;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){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];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(!a||!a.style||!all.length){return support;}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";support.leadingWhitespace=div.firstChild.nodeType===3;support.tbody=!div.getElementsByTagName("tbody").length;support.htmlSerialize=!!div.getElementsByTagName("link").length;support.style=/top/.test(a.getAttribute("style"));support.hrefNormalized=a.getAttribute("href")==="/a";support.opacity=/^0.5/.test(a.style.opacity);support.cssFloat=!!a.style.cssFloat;support.checkOn=!!input.value;support.optSelected=opt.selected;support.enctype=!!document.createElement("form").enctype;support.html5Clone=document.createElement("nav").cloneNode(true).outerHTML!=="<:nav>";support.inlineBlockNeedsLayout=false;support.shrinkWrapBlocks=false;support.pixelPosition=false;support.deleteExpando=true;support.noCloneEvent=true;support.reliableMarginRight=true;support.boxSizingReliable=true;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";for(i in jQuery(support)){break;}support.ownLast=i!=="0";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%;";jQuery.swap(body,body.style.zoom!=null?{zoom:1}:{},function(){support.boxSizing=div.offsetWidth===4;});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 ret,thisCache,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if((!id||!cache[id]||(!pvt&&!cache[id].data))&&data===undefined&&typeof name==="string"){return;}if(!id){if(isNode){id=elem[internalKey]=core_deletedIds.pop()||jQuery.guid++;}else{id=internalKey;}}if(!cache[id]){cache[id]=isNode?{}:{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(typeof name==="string"){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 thisCache,i,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));}i=name.length;while(i--){delete thisCache[name[i]];}if(pvt?!isEmptyDataObject(thisCache):!jQuery.isEmptyObject(thisCache)){return;}}}if(!pvt){delete cache[id].data;if(!isEmptyDataObject(cache[id])){return;}}if(isNode){jQuery.cleanData([elem],true);}else if(jQuery.support.deleteExpando||cache!=cache.window){delete cache[id];}else{cache[id]=null;}}jQuery.extend({cache:{},noData:{"applet":true,"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(elem){elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando];return!!elem&&!isEmptyDataObject(elem);},data:function(elem,name,data){return internalData(elem,name,data);},removeData:function(elem,name){return internalRemoveData(elem,name);},_data:function(elem,name,data){return internalData(elem,name,data,true);},_removeData:function(elem,name){return internalRemoveData(elem,name,true);},acceptData:function(elem){if(elem.nodeType&&elem.nodeType!==1&&elem.nodeType!==9){return false;}var noData=elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()];return!noData||noData!==true&&elem.getAttribute&&elem.getAttribute("classid")===noData;}});jQuery.fn.extend({data:function(key,value){var attrs,name,data=null,i=0,elem=this[0];if(key===undefined){if(this.length){data=jQuery.data(elem);if(elem.nodeType===1&&!jQuery._data(elem,"parsedAttrs")){attrs=elem.attributes;for(;i1?this.each(function(){jQuery.data(this,key,value);}):elem?dataAttr(elem,key,jQuery.data(elem,key)):null;},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--;}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;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value);}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),classNames=value.match(core_rnotwhite)||[];while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(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;if(this.nodeType!==1){return;}if(isFunction){val=value.call(this,i,jQuery(this).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=jQuery.find.attr(elem,"value");return val!=null?val: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)){optionSet=true;}}if(!optionSet){elem.selectedIndex=-1;}return values;}}},attr:function(elem,name,value){var hooks,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);}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook);}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);}else if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{elem.setAttribute(name,value+"");return value;}}else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}else{ret=jQuery.find.attr(elem,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(jQuery.expr.match.bool.test(name)){if(getSetInput&&getSetAttribute||!ruseDefault.test(name)){elem[propName]=false;}else{elem[jQuery.camelCase("default-"+name)]=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:{"for":"htmlFor","class":"className"},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){return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem[name]=value);}else{return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name];}},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1;}}}});boolHook={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;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=jQuery.expr.attrHandle[name]||jQuery.find.attr;jQuery.expr.attrHandle[name]=getSetInput&&getSetAttribute||!ruseDefault.test(name)?function(elem,name,isXML){var fn=jQuery.expr.attrHandle[name],ret=isXML?undefined:(jQuery.expr.attrHandle[name]=undefined)!=getter(elem,name,isXML)?name.toLowerCase():null;jQuery.expr.attrHandle[name]=fn;return ret;}:function(elem,name,isXML){return isXML?undefined:elem[jQuery.camelCase("default-"+name)]?name.toLowerCase():null;};});if(!getSetInput||!getSetAttribute){jQuery.attrHooks.value={set:function(elem,value,name){if(jQuery.nodeName(elem,"input")){elem.defaultValue=value;}else{return nodeHook&&nodeHook.set(elem,value,name);}}};}if(!getSetAttribute){nodeHook={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.expr.attrHandle.id=jQuery.expr.attrHandle.name=jQuery.expr.attrHandle.coords=function(elem,name,isXML){var ret;return isXML?undefined:(ret=elem.getAttributeNode(name))&&ret.value!==""?ret.value:null;};jQuery.valHooks.button={get:function(elem,name){var ret=elem.getAttributeNode(name);return ret&&ret.specified?ret.value:undefined;},set:nodeHook.set};jQuery.attrHooks.contenteditable={set:function(elem,value,name){nodeHook.set(elem,value===""?false:value,name);}};jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]={set:function(elem,value){if(value===""){elem.setAttribute(name,"auto");return value;}}};});}if(!jQuery.support.hrefNormalized){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={get:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}return null;}};}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});if(!jQuery.support.enctype){jQuery.propFix.enctype="encoding";}jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0);}}};if(!jQuery.support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true;}function returnFalse(){return false;}function safeActiveElement(){try{return document.activeElement;}catch(err){}}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();if(!type){continue;}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=onlyHandlers?2:3;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(eventPath.pop(),data)===false)&&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(delegateCount1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret;},has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;i-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){cur=ret.push(cur);break;}}}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));}});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(name.slice(-5)!=="Until"){selector=until;}if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);}if(this.length>1){if(!guaranteedUnique[name]){ret=jQuery.unique(ret);}if(rparentsprev.test(name)){ret=ret.reverse();}}return this.pushStack(ret);};});jQuery.extend({filter:function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));},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,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not;});}if(typeof qualifier==="string"){if(isSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier=jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return(jQuery.inArray(elem,qualifier)>=0)!==not;});}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);},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){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);}}}}},_evalUrl:function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true});}});jQuery.fn.extend({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();}});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){if(typeof state==="boolean"){return state?this.show():this.hide();}return this.each(function(){if(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,"order":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;}});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;};}jQuery.curCSS=curCSS;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(" ',_create:function(){if(typeof this.options.width==='number'){this.options.width+=2;}if(typeof this.options.height==='number'){this.options.height+=76;}if(this.options.submit){this.options.buttons={};this.options.buttons[this.options.submitName||'SAVE']=function(e,widget){widget._submit.apply(widget,[e]);};this.options.buttons["CANCEL"]=function(e,widget){widget.close.apply(widget,[e]);};}$.ui.dialog.prototype._create.apply(this,arguments);var wn=$(window).dimensions();if(!$.browser.msie6&&wn.width-this.options.width>80&&wn.height-this.options.height>80){this.uiDialog.css({position:'fixed',left:0,top:0});}else{this.uiDialog.css({position:'absolute'});}this.elements={main:this.uiDialog.find('div.ui-dialog-content'),iframe:this.element.find('iframe')};if(this.options.noscroll){this.elements.iframe.css({overflow:'hidden',overflowY:'hidden',overflowX:'hidden'});}this.uiDialog.captureScroll();if(!$.cms.popup.list){$.cms.popup.list=[];}$.cms.popup.list.addItem(this);},_open:function(){var url=this.options.random?$.getAjaxUrl(this.options.url,{RND:Math.random()}):this.options.url;this.elements.iframe.css({width:this.elements.main.width(),height:this.elements.main.height()}).attr('src',url);},_submit:function(e){if($.isFunction(this.options.onsubmit)){if(this.options.onsubmit.apply(this,[e,this])===false){return false;}}var fn=function(_wz){return function(){_wz.element.loading('done');_wz.close();};}(this);var doc=this.elements.iframe.unbind('load.popup').one('load.popup',fn).contents();doc.find('form').unbind('submit.popup').bind('submit.popup',$.proxy(function(){this.element.loading();},this));var button=doc.find("input:button,input:submit,input:image,a[href*='__doPostBack']:not([onclick]),a[href*='WebForm_DoPostBackWithOptions']");if(button.length){button[0].click();}else{doc.find('form').submit();}},close:function(){if($.isFunction(this.options.onclose)){if(this.options.onclose.apply(this,arguments)===false){return false;}}this.elements.iframe.unbind().attr('src','/Shared/blank.html');if($.cms.popup.list){$.cms.popup.list.removeItem(this);}$.ui.dialog.prototype.close.apply(this,arguments);this.element.remove();},destroy:function(){return $.ui.dialog.prototype.destroy.apply(this,arguments);}});$.popup=function(options){var html=$.cms.popup.prototype._html.replace('{scroll}',options&&options.noscroll?'scrolling=no':'');var el=$(html);var instance=new $.cms.popup(options,el[0]);$.data(el[0],'popup',instance);return instance;};}$.fn.cursorat=function(){if(!this.length){return null;}var input=this[0];if(input.setSelectionRange){return[input.selectionStart,input.selectionEnd];return pos;}else if(input.createTextRange){input.focus();var r1=input.ownerDocument.selection.createRange();var len=r1.text.length;var r2=input.createTextRange();r2.setEndPoint("EndToStart",r1);return[r2.text.length,r2.text.length+len];}else{return null;}};$.fn.selecttext=function(start,end){return this.each(function(i){if(this.focus){this.focus();}var len;if(typeof this.value==='string'){len=this.value.length;}else if(typeof this.innerHTML==='string'){len=this.innerHTML.length;}else{len=0;}if(start===undefined){start=0;}else if(start===-1){start=len;}if(end===undefined){end=len;}if(this.setSelectionRange){this.setSelectionRange(start,end);}else if(this.createTextRange){var range=this.createTextRange();range.collapse(true);range.moveStart("character",start);range.moveEnd("character",end-start);range.select();}else{var doc=this.ownerDocument;var wn=doc.defaultView||doc.parentWindow;if(doc&&doc.body&&doc.body.createTextRange){var range=doc.body.createTextRange();range.moveToElementText(this);range.select();}else if(doc&&doc.createRange&&wn&&wn.getSelection){var range=doc.createRange();range.selectNodeContents(this);var selection=wn.getSelection();selection.removeAllRanges();selection.addRange(range);}}});};$.fn.insertAtCursor=function(text){return this.each(function(i){if(typeof this.value===undefined||!text){return;}if(this.setSelectionRange){var start=this.selectionStart,end=this.selectionEnd,top=this.scrollTop;this.value=this.value.substring(0,start)+text+this.value.substring(end,this.value.length);this.selectionStart=start+text.length;this.selectionEnd=start+text.length;this.scrollTop=top;}else{var doc=this.ownerDocument;var wn=this.defaultView||doc.parentWindow;if(doc&&doc.selection&&doc.selection.createRange){var range=doc.selection.createRange();range.text=text;range.collapse(true);}}});};$.fn.scrollIntoView=function(speed,top){return this.each(function(i){var $el=$(this);var parent=$el.parents().filter(function(){return/auto|scroll|hidden/.test($.css(this,'overflow',1)+$.css(this,'overflow-y',1)+$.css(this,'overflow-x',1));}).eq(0);if(parent.length){if(parent[0].scrollHeight>parent[0].offsetHeight){var t=$el.offset().top-parent.offset().top+parent[0].scrollTop;var h1=$el.outerHeight(true);var h2=parent[0].clientHeight;var scrollTo=null;if(top){scrollTo=Math.max(t-10,0);}else if(t+h1>parent[0].scrollTop+h2-10){scrollTo=t+h1+10-h2;}else if(tparent[0].offsetWidth){var t=$el.offset().left-parent.offset().left+parent[0].scrollLeft;var w1=$el.outerWidth(true);var w2=parent[0].clientWidth;var scrollTo=null;if(top){scrollTo=Math.max(t-10,0);}else if(t+w1>parent[0].scrollLeft+w2-10){scrollTo=t+w1+10-w2;}else if(t=wn.top&&t<=bottomquarter){return;}t=Math.max(0,t-Math.max(quarter,padding+10));if(speed){$('html,body').animate({scrollTop:t});}else{document.documentElement.scrollTop=t;document.body.scrollTop=t;}}});};$.fn.unselectable=function(){if($.browser.webkit){this.css('-webkit-user-select','none');}else if($.browser.mozilla){this.css('-moz-user-select','none');}else{this.css('user-select','none').attr('unselectable','on');}return this.bind('selectstart.ui',function(){return false;});;};$.fn.removeStyle=function(name){if(!name){return this;}else if(name.toLowerCase){name=[name.toLowerCase()];}else if($.isArray(name)){for(var i=0;i=0;i--){var style=$.trim(styles[i].split(':')[0]).toLowerCase();for(var j=0;j0&&this._index<3&&$(this).data('inputs').eq(this._index-1).val()){return false;}break;default:if(e.shiftKey||e.which<48||e.which>105||(e.which>57&&e.which<96)){return false;}break;}}};$.fn.nopaste=function(){return this.bind('keydown contextmenu',function(e){var cancel=false;switch(e.type){case'keydown':if((e.ctrlKey||e.cmdKey)&&e.which===86){cancel=true;}break;case'contextmenu':cancel=true;break;}if(cancel){if(e.preventDefault){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();}return false;}});};$.fn.getRow=function(attr){if(!this.length)return{};var row=this[0].$row;if(!row){try{row=eval('('+this.attr(attr||'_row')+')')}catch(ex){row={};}this[0].$row=row=row||{};}return row;};$.ImagePreloader=function(_img){var cleanArray=function(data){var arr=$.makeArray(data);for(var i=0;i=urls.length){complete();}},preload=function(url,append){var state=$.preload.state[url];if(!state){$.preload.state[url]=1;}else if(state===1){}else{if(!append){loaded++;}return;}if(append){urls.push(url);}var image=new Image(),$image=$(image);$image.data('data-url',url);image.src=url;if(image.complete){load.call(image[0]);}else{$image.on('load error',load);}};this.isResolved=function(){return loaded>=urls.length;};this.done=function(callback){if(this.isResolved()){callback();}else{oncomplete.push(callback);}};this.add=function(img){preload(img,true);};this.clear=function(){complete.length=0;};for(var i=0;i=0){val=val.split('|');}else if(val.indexOf('^')>=0){val=val.split('^');}else{val=val.split(',');}}else if(!$.isArray(val)){val=$.makeArray(val);}for(var i=0;i0){var factor=Math.pow(10,scale*3);sb.push(Math.floor(amount/factor));amount=amount%factor;scale--;}if(digits>0){var factor=Math.pow(10,digits);var number;if(amount<1){number=(''+Math.floor((10+amount)*factor)).substr(1);}else{number=''+Math.floor(amount*factor);}sb.push(number.substr(0,number.length-digits)+'.'+number.substr(number.length-digits));}else{if(amount<100&&sb.length>0){sb.push((''+Math.floor(1000+amount)).substr(1));}else{sb.push(Math.floor(amount));}}return sb.join(',');};$.percentFormat=function(amount,digits){amount=$.toFloat(amount)*100;return $.numberFormat(amount,digits)+'%';};$.kbFormat=function(bytes,upper){bytes=$.toInt(bytes);if(bytes<1024)return bytes+(upper?' B':'b');else if(bytes<(1024*1024))return(Math.round(bytes/ 1024 * 10 ) /10)+(upper?' KB':'kb');else return(Math.round(bytes/ 1024 /1024*10)/10)+(upper?' MB':'mb');};$.datetime={pattern:/(d+)|(h+)|(H+)|(m+)|(M+)|(s+)|(t+)|(T+)|(y+)|(rr)|(RR)/g,leadingZero:function(val){if(val<10)return'0'+val;else return val;},format:function(date,format){if(typeof date==='string'){date=$.datetime.parse(date);}if(!date){return"";}if(!format){format='d-MMM-yyyy';}return format.replace($.datetime.pattern,function(){return $.datetime.process(date,Array.prototype.slice.call(arguments,1));});},process:function(dateTime,args){for(var i=0;i12)hours-=12;return key.length==1?hours||12:$.datetime.leadingZero(hours||12);case 2:return key.length==1?dateTime.getHours():$.datetime.leadingZero(dateTime.getHours());case 3:return key.length==1?dateTime.getMinutes():$.datetime.leadingZero(dateTime.getMinutes());case 4:switch(key.length){case 1:return dateTime.getMonth()+1;case 2:return $.datetime.leadingZero(dateTime.getMonth()+1);case 3:switch(dateTime.getMonth()+1){case 1:return"Jan";case 2:return"Feb";case 3:return"Mar";case 4:return"Apr";case 5:return"May";case 6:return"Jun";case 7:return"Jul";case 8:return"Aug";case 9:return"Sep";case 10:return"Oct";case 11:return"Nov";case 12:return"Dec";default:return'';}default:switch(dateTime.getMonth()+1){case 1:return"January";case 2:return"February";case 3:return"March";case 4:return"April";case 5:return"May";case 6:return"June";case 7:return"July";case 8:return"August";case 9:return"September";case 10:return"October";case 11:return"November";case 12:return"December";default:return'';}}case 5:return key.length==1?dateTime.getSeconds():$.datetime.leadingZero(dateTime.getSeconds());case 6:return(dateTime.getHours()<12?'a':'p')+(key.length==1?'':'m');case 7:return(dateTime.getHours()<12?'A':'P')+(key.length==1?'':'M');case 8:return key.length==2?dateTime.getFullYear().toString().substr(2):dateTime.getFullYear();case 9:var d=dateTime.getDate();switch(date.Day){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}case 10:var d=dateTime.getDate();switch(date.Day){case 1:case 21:case 31:return"ST";case 2:case 22:return"ND";case 3:case 23:return"RD";default:return"TH";}}}},_patterns:[/^(\d\d?)[ -\/\\]+([a-zA-Z]{3,9})[- \/\\]+(\d{2}|\d{4})$/,/^(\d{4})\-?(\d{2})\-?(\d{2})$/,/^(\d\d?)[ -\/\\]+([a-zA-Z]{3,9})[- \/\\]+(\d{2}|\d{4})\s+(\d{1,2}):(\d{2})(A|P)M?$/i,/^(\d{1,2}):(\d{2}):?(A|P)M?$/i],_months:{jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},addmonths:function(date,val){date=date&&$.datetime.parse(date);val=$.toInt(val);if(!date){return null;}else if(!val){return date;}var year=date.getFullYear(),month=date.getMonth(),day=date.getDate(),d=new Date(year,month+val,1),m=d.getMonth();d.setDate(day);while(d.getMonth()>m){d.setDate(d.getDate()-1);}return d;},parse:function(val){if(!val){return null;}else if(val.constructor===Date){return val;}else if(typeof val==='number'){return new Date(val);}else{val=$.trim((""+val)).replace(/(\d)([AP]M)\b/i,'$1:$2');var date=new Date(val);if(isNaN(date)){var p=$.datetime._patterns,r,index=-1,day,month,year,hours,mins,date=null;for(var i=0;i=10){return start+"("+phone.substr(0,3)+") "+phone.substr(3,3)+"-"+phone.substr(6,4)+(phone.length===10?"":" x"+phone.substr(10));}else if(phone.length>=3){return start+phone;}else{return data;}}};$.isDate=function(val){return val&&val.constructor===Date?true:false;};$.escapeCodes={};$.escapeCodes[String.fromCharCode(8364)]='€';$.escapeCodes[String.fromCharCode(162)]='¢';$.escapeCodes[String.fromCharCode(163)]='£';$.escapeCodes[String.fromCharCode(165)]='¥';$.escapeCodes[String.fromCharCode(164)]='¤';$.escapeCodes[String.fromCharCode(169)]='©';$.escapeCodes[String.fromCharCode(174)]='®';$.escapeCodes[String.fromCharCode(8482)]='™';$.escapeCodes[String.fromCharCode(177)]='±';$.escapeCodes[String.fromCharCode(8800)]='≠';$.escapeCodes[String.fromCharCode(8776)]='≈';$.escapeCodes[String.fromCharCode(8804)]='≤';$.escapeCodes[String.fromCharCode(8805)]='≥';$.escapeCodes[String.fromCharCode(247)]='÷';$.escapeCodes[String.fromCharCode(215)]='×';$.escapeCodes[String.fromCharCode(8734)]='∞';$.escapeCodes[String.fromCharCode(189)]='½';$.escapeCodes[String.fromCharCode(188)]='¼';$.escapeCodes[String.fromCharCode(190)]='¾';$.escapeCodes[String.fromCharCode(178)]='²';$.escapeCodes[String.fromCharCode(179)]='³';$.escapeCodes[String.fromCharCode(8240)]='‰';$.escapeCodes[String.fromCharCode(182)]='¶';$.escapeCodes[String.fromCharCode(167)]='§';$.escapeCodes[String.fromCharCode(945)]='α';$.escapeCodes[String.fromCharCode(946)]='β';$.escapeCodes[String.fromCharCode(947)]='γ';$.escapeCodes[String.fromCharCode(916)]='Δ';$.escapeCodes[String.fromCharCode(181)]='µ';$.escapeCodes[String.fromCharCode(937)]='ω';$.escapeCodes[String.fromCharCode(8721)]='∑';$.escapeCodes[String.fromCharCode(216)]='Ø';$.escapeCodes[String.fromCharCode(8736)]='∠';$.escapeCodes[String.fromCharCode(186)]='°';$.escapeCodes[String.fromCharCode(171)]='«';$.escapeCodes[String.fromCharCode(187)]='»';$.escapeCodes[String.fromCharCode(183)]='·';$.escapeCodes[String.fromCharCode(8226)]='•';$.escapeCodes[String.fromCharCode(8224)]='†';$.escapeCodes[String.fromCharCode(8225)]='‡';$.escapeCodes2={};$.escapeCodes2[String.fromCharCode(8216)]='‘';$.escapeCodes2[String.fromCharCode(8217)]='’';$.escapeCodes2[String.fromCharCode(8220)]='“';$.escapeCodes2[String.fromCharCode(8221)]='”';$.cleanHtml=function(html,indent,strict){if(!html)return'';if(!$.escapeRegex){var sb=[];for(var p in $.escapeCodes){sb.push(p);}for(var p in $.escapeCodes2){sb.push(p);}$.escapeRegex=new RegExp("["+sb.join("")+"]",'g');}var rclean1=new RegExp('\\s+(?:jQuery\\d+|sizcache\\d*|sizset\\d*)\\s*=\\s*"[^"]*"','g');var rclean1b=new RegExp('
]*?_firebugConsole\\b[^>]*>[^<]*
','gi');var rclean2=new RegExp(']*?>','g');var rclean3b=new RegExp('([\\w-\\$]+)\\s*=\\s*(?:([\'""])([\\s\\S]*?)\\2|([^\\s\'"">]+))','g');var rclean4=new RegExp('"','g');var rclean5=new RegExp(' style\\s*=\\s*"([^"]*)"','gi');var rclean5a=new RegExp(']+?\\bhref\\b[^>]+>\\s+','i');var rclean5c=new RegExp(']*?\\bscaytid\\b[^>]*>([^<]*)','gi');var rclean5d=new RegExp('(
]*?class="[^>"]*?\\bbuildflash\\b[^>]*>[^<]*?)\\s*','gi');var rclean5e=new RegExp(' class=""','gi');var rclean6=new RegExp('\\b([\\w-]+)\\s*:\\s*([^;]+)','g');var rclean6a=new RegExp('\\burl\\(([^\\)]*)\\)','g');var rclean7=new RegExp('^[^<]*','g');var rclean8=new RegExp('(]*>)([^<]*)','g');var rclean9a=new RegExp('(]*?>)([\\s\\S]+?)()','gi');var rclean9b=new RegExp('\\{Replace\\-Script\\-Code\\d+\\}','g');var rchars=[String.fromCharCode(162),String.fromCharCode(167),String.fromCharCode(169),String.fromCharCode(171),String.fromCharCode(174),String.fromCharCode(176),String.fromCharCode(187)];var rspecial=new RegExp('['+rchars.join("")+']','g');var rspecialfix=["¢","§","©","«","®","°","»"];html=html.replace(rclean1,'').replace(rclean1b,'').replace(rclean2,function(m){return m.toLowerCase();}).replace(rclean3a,function(m){return m.replace(rclean3b,function(m,m1,m2,m3,m4){if(m3&&m1.startsWith('data-')){var whitespace=false;var quoted=m3.contains('"');var unescaped=m3.replace(/&#(9|10|13);/g,function(m,m1){whitespace=true;switch(m1){case'9':return'\t';case'10':return'\n';case'13':return'\r';}}).replace(/"/g,function(m5){quoted=true;return'"';});if(quoted){return m1+"='"+unescaped+"'";}else if(whitespace){return m1+'="'+unescaped+'"';}else{return m;}}var val=(m3||m4||'').replace(rclean4,"'");if($.cms&&$.cms.page){switch(m1){case"src":case"background":case"_overimg":val=$.cms.page.CleanUrl(val);break;case"href":val=$.cms.page.CleanUrl(val)||"/";break;case"p-properties":case"query":val=val.replace(/&#(9|10|13);/g,function(m,m1){switch(m1){case'9':return'\t';case'10':return'\n';case'13':return'\r';}});}}return m1+'="'+val+'"';});}).replace(rclean5,function(m,m1){if($.cms.csseditor){var style=$.cms.csseditor.collapse(m1,true);return style?' style="'+style+'"':"";}return m.replace(rclean6,function(m,m1,m2){if($.cms&&$.cms.page){return m1.toLowerCase()+':'+m2.replace(rclean6a,function(m3,m4){return"url('"+$.cms.page.CleanUrl(m4)+"')";});}else{return m1.toLowerCase()+':'+m2;}});}).replace(rclean5a,'').replace(rclean5c,'$1').replace(rclean5d,'$1').replace(rclean5e,'').replace($.escapeRegex,function(m){return $.escapeCodes[m]||$.escapeCodes2[m]||m;}).replace(rspecial,function(m){for(var i=0;i')){return true;}else{switch(item.tag){case'area':case'base':case'br':case'embed':case'hr':case'img':case'input':case'link':case'meta':case'param':return true;case'!':return item.html&&item.html.startsWith("'));var pop=null;if(close){var p=parent;while(p&&p.tag!==m[2]){p=p.parent;}if(!p){if(!parent.items){parent.items=[];}parent.items.push({text:m[0]});}else{p.closing=m[1]+m[2]+m[3];if(m[4]){p.closingText=m[4];}parent=p.parent;}}else{var item={tag:m[2],html:m[1]+m[2]+m[3],text:m[4]};if(item.tag==='li'){item.closing='';}if(parent.parent&&nochild(item.tag,parent)){parent=item.parent=parent.parent;}if(!parent.items){parent.items=[];}if(parent.items.length){item.prev=parent.items[parent.items.length-1];}item.parent=parent;parent.items.push(item);if(selfclosing(item)){item.self=true;}else{parent=item;}}}var nesting=function(parent){if(!parent||!parent.items||!parent.items.length){return false;}switch(parent.tag){case'html':case'head':case'body':return true;case'i':case'b':case'em':case'u':case'strong':case'sub':case'sup':return false;case'td':case'li':case'a':case'p':case'span':case'font':case'if':case'h1':case'h2':case'h3':case'h4':return parent.items.length>1||parent.items[0].tag==='div';default:return true;}};var inline=function(parent){switch(parent&&parent.tag){case'i':case'b':case'em':case'u':case'strong':case'a':case'span':case'font':case'sub':case'sup':return true;default:return false;}};var renesting=function(parent){if(!parent){return false;}switch(parent.tag){case'td':case'tr':return true;default:return false;}};var cleanstyle=function(text,indent){text=$.trim(text);if(!text)return'';var r_comments=/\/\*[\s\S]*?\*\//g;var r_style=/([\w:\.#,\*\-\\\s]+)\{([^\}]*)\}/g;var r_rgb=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;var r_selector=/(^| |,)(\w+)(\.\w+)?/g;var sheet=text.replace(r_comments,'');var css=[];var m;while(m=r_style.exec(sheet)){var s=$.trim(m[1]).replace(/\s+/,' ');css.push({s:s,v:$.trim(m[2])});}var sb=['\n'];for(var i=0;i0)level-=1;break;case'head':case'body':level-=1;break;}var tabs=[];for(var i=0;i0&&sb[sb.length-1]!=='\n'){sb.push('\n');}render(item,sb,level+1,nest);var end=sb[sb.length-1];end=end&&end[end.length-1];if(item.closing&&nest&&end!=='\n'){if(!next||end===' '||!inline(next)){sb.push('\n');}}}}if(parent.closing){if(nest&&sb[sb.length-1]==='\n'){sb.push(indent);}sb.push(parent.closing);}var text=null;if(parent.closingText){text=trimend(parent.closingText,parent);if(text){if((parent.tag==='p'||parent.tag==='div')&&sb[sb.length-1]!=='\n'&&!/^[\r\n]/.test(text)&&$.trim(text).length){sb.push('\n');if(indent){sb.push(indent);}text=text.replace(/^\s+/,'');}sb.push(text);}}}};var sb=[];render(page,sb,-1,true);html=sb.join('').replace(rclean9b,function(m){return script[m];});}return html;};$.fn.cleanHtml=function(indent,absolute){return $.cleanHtml(this.outerHtml(),indent,absolute);};$.printify=function(html){if(!html){return html;}else{return html.replace(/>([^<]+)'+m1.replace(/(\w\.) +(\w)/g,function(m,m1,m2){return m1+'  '+m2;})+'<';}).replace(/(\w+) +(\S{1,20}<\/p>)/gi,function(m,m1,m2){return m1+' '+m2;}).replace(/ - /g,' — ');}};$.fn.formVal=function(val){if(val===undefined){val=null;var check=false;if(this.is('img')){return undefined;}else if(this.is('table')){val=[];this.find(':input').each(function(i){var input=$(this);if(input.is(':checked')){val.push(input.val());check=true;}else if(input.is(':text')){val.push(input.val());}});if(!val.length){val=null;}else if(check){val=val.join(",");}else{val=val.join("");}}else if(this.is(':checkbox')){val=this.is(':checked')?true:"";}else if(this.is(':radio')){val=this.is(':checked')?this.val():undefined;}else if(this.is('textarea')){var editor=this.parent('div').data('editor');if(editor){var html=editor.getData();if(editor.config.htmlEncodeOutput){html=CKEDITOR.tools.htmlEncode(html);}return html;}else{return this.val();}}else{val=this.val();}return val;}else{if(this.is('img')){}else if(this.is('table')){}else if(this.is(':checkbox')){if($.toBool(val)){this.prop('checked',true).trigger('update');}else{this.prop('checked',false).trigger('update');}}else if(this.is(':radio')){if(val==this.val()){this.prop('checked',true).trigger('update');}else{this.prop('checked',false).trigger('update');}}else if(this.is('textarea')){var editor=this.parent('div').data('editor');if(editor){editor.setData(val||"");}else{this.val(val||"");}}else{if(val&&val.constructor===Date){if(this.is('.date.time')){this.val($.datetime.format(val,'M/d/yyyy h:mmtt'));}else if(this.is('input:text')){this.val($.datetime.format(val,'M/d/yyyy'));}else{this.val(val||"");}}else{this.val(val||"");}}}};$.getQuery=function(){var query={};var items=window.location.href.split('?').pop().split('&');for(var i=0;ibegin){var pivot=begin+Math.floor(Math.random()*(end-begin));pivot=$.sort.partition(array,begin,end,pivot,fn);$.sort.quick(array,begin,pivot,fn);$.sort.quick(array,pivot+1,end,fn);}}};Array.prototype.quickSort=function(fn){$.sort.quick(this,0,this.length,fn);};String.prototype.startsWith=function(data){if(!data){return false;}var data2=(''+data).toLowerCase();return this.toLowerCase().indexOf(data2)==0;};String.prototype.endsWith=function(data){if(!data){return false;}var data2=this.substring(this.length-data.length).toLowerCase();return data2===data.toLowerCase();};String.prototype.contains=function(data){if(!data){return false;}var data2=(''+data).toLowerCase();return this.toLowerCase().indexOf(data2)>=0;};Date.prototype.stdTimezoneOffset=function(){var jan=new Date(this.getFullYear(),0,1);var jul=new Date(this.getFullYear(),6,1);return Math.max(jan.getTimezoneOffset(),jul.getTimezoneOffset());};Date.prototype.dst=function(){return this.getTimezoneOffset()0){this.options.meta=true;}this.element[0]._start=true;this.elements={};if(this.options.mobile){this.elements.panel=this.element.find('div.imenupanel');this.elements.top=this.elements.panel.children(':first');this._mobilePosition(this.elements.top[0]);this._stack=[];}this._createItems(this.element);this.element.bind('mouseover mouseleave',$.proxy(this._fly,this));if(this.options.mobile){this._on=false;$(document).on('click.mflyout',$.proxy(this._handleClick,this));}},_createItems:function(start){var flyout=this;var fn=function(i){this._p=0;var p=this;while(p&&!p._item&&!p._start&&p.parentNode){this._p--;p=p.parentNode;}this._top=p&&p._start;this._item=true;if(this._top){this._my=flyout.options.my||this.getAttribute('_my')||'left top';this._at=flyout.options.at||this.getAttribute('_at')||'left bottom';var offset=this.getAttribute('_offset');if(offset){try{this._offset=eval('('+offset+')');}catch(ex){this._offset={};}}else{this._offset={};}}if(typeof flyout.options.panel==='string'){for(var i=0;i0){this._child='ajax';}}}};if(start.find(this.options.item).each(fn).length===0){this._loadChildren(start[0]);}},_fly:function(e){if(e.type==='mouseleave'){this._killfade=false;if(this.options.mobile){this._over=false;}else{this._flyOut();}return;}else if($.cms.flyout.disabled){return;}var item=e.target;while(item&&!item._item){if(item._start){return;}item=item.parentNode;}if(!item){return;}if(this.options.mobile){this._over=true;this._event=[e,item];}else{this._flyOver(e,item);}},_handleClick:function(e){var link=$.getLinkTarget(e),href=link&&link.attr('href'),m=href&&/^javascript:(\w+)\('([^']+)'/i.exec(href),action=m&&m[2];if((this._on&&!this._over)||(this._on&&action==='Start')){this._killfade=false;this._flyOut();return false;}else if(this._over&&this._on&&(action==='Back'||(e&&e.target&&/\bileft\b/.test(e.target.className)))){if(this._events){this._events.pop();this._event=this._events[this._events.length-1];}if(this._event){this._flyOver.apply(this,this._event);}return false;}else if(href&&action!=='Start'){return;}else if(this._over&&this._event){if(!this._events){this._events=[];}this._events.push(this._event);this._flyOver.apply(this,this._event);return false;}},_getParent:function(item){switch(item._p){case 0:return item;case-1:return item.parentNode;case-2:return item.parentNode.parentNode;case-3:return item.parentNode.parentNode.parentNode;case-4:return item.parentNode.parentNode.parentNode.parentNode;default:return null;}},_getChildNodes:function(parent){var depth=parent._depth,nodes=parent.childNodes,pos;if(depth){while((pos=depth.shift())!==undefined){nodes=nodes[pos].childNodes;}}return nodes;},_getActive:function(parent){if(parent&&parent._active&&$.isArray(parent._active)){var el=parent;for(var i=0;i=0&&distance<50){var fn=function(flyout,item){return function(){var parent=flyout._getParent(item);var active=flyout._getActive(parent);flyout._showItem(null,item,parent,active);item=null;parent=null;};}(this,item);parent._timeout=setTimeout(fn,250);return;}}this._showItem(e,item,parent,active);}}else{this._showItem(e,item,parent);}},_hideChildren:function(e,item){if(item){this._hideChildren(e,this._getActive(item));this._hideItem(e,item);}},_showItem:function(e,item,parent,active){var wn=this.options.mobile?$(window).width():0;if(!parent){parent=this._getParent(item);if(!parent)return;active=this._getActive(parent);}if(parent._timeout){clearTimeout(parent._timeout);parent._timeout=null;}if(active&&active!=item){this._hideChildren(e,active);}if(this.options.hover){$(item).addClass(this.options.hover).children('a').addClass(this.options.hover);}if(this.options.onhover){if(this.options.onhover.apply(this,[{type:'mouseover'},null,item,parent])===false){return false;}}parent._active=this._getChildPosition(item,parent);if(item._child!==undefined){if(item._child==='ajax'){if(item._killajax){item._killajax=null;}else{this._loadChildren(item);}}else{var child;if(this.options.mobile&&item._top){child=$(item.childNodes[item._child].childNodes[0]);}else{child=$(item.childNodes[item._child]);}var fading;if(this.options.mobile){var left=$.toFloat(child.css('left'));fading=left>0||left0.00&&opacity0){var el=$(item);el.addClass(this.options.loading);$.cms.flyout.ajax.load(this,item,pageid);}},_renderChildren:function(item,results){var el=$(item);el.removeClass(this.options.loading);if(results&&results.ChildPages&&results.ChildPages.length){var cls=this.options.panel.split('.').pop();var sb=['
'];cls=this.options.item.split('.').pop();if(this.options.mobile){sb.push('');}for(var i=0;i');if(this.options.meta&&page.MetaTitle){sb.push(page.MetaTitle);}else{sb.push(page.PageName);}sb.push('
');}sb.push('
');var child=$(sb.join("")).appendTo(el);item._child=item.childNodes.length-1;if(this.options.mobile){this._mobilePosition(child[0]);}else{item._opacity=$.toFloat(child.css('opacity'))||1;child.css({opacity:0});}this._createItems(el);if(item._killajax){item._killajax=null;}else{var child=$(item.childNodes[item._child]);this._showChild(item,child);}}},_mobilePosition:function(menu){var wn=$(window).width();var w=wn-$.toInt($.css(menu,'borderLeftWidth',true))-$.toInt($.css(menu,'borderRightWidth',true))-$.toInt($.css(menu,'paddingLeft',true))-$.toInt($.css(menu,'paddingRight',true));menu.style.display='none';menu.style.top='0px';menu.style.left=wn+'px';menu.style.width=w+'px';},_showChild:function(item,child){var w,h,doc,dim,css,wn;if(this.options.mobile){this._on=true;var wn=$(window).width();this.elements.panel[0].style.display='block';this.elements.panel[0].style.visibility='visible';child[0].style.display='block';if(this._stack.length&&this._stack.indexOf(child[0])>=0){return;}dim=this.element.dimensions();doc=$(document.body).dimensions();h=Math.max(doc.height-dim.top-dim.height,child.height(),this._stack.length?$(this._stack[this._stack.length-1]).height():0);w=$(window).width()-$.toInt($(document.body).css('marginRight'));css={top:dim.top+dim.height,left:(w>wn?Math.floor((w-wn)/2):0),height:h};this.elements.panel.css(css);}else{css=$.placement(child.css({display:'block'}),{my:item._my,at:item._at,of:item,offset:item._offset||this.options.offset||{top:-2},collision:item._top?'none none':this.options.collision});}if(css&&child.length){if(!this.options.mobile&&$.browser.msie&&$.browser.version<=7){var w=child[0]._width;if(!w){child[0]._width=w=child.width();}css.width=w;}if(this.options.mobile){this._stack.push(child[0]);var fn=function(_child){return function(){var dim=_child.dimensions(),wn=$(window).dimensions();if(dim.top+dim.height0&&(items=child.children()).length>this.options.maxitems){items.slice(this.options.maxitems,items.length).hide();child[0]._scroll=true;}if(child[0]._scroll){var w=child.width();child.css({width:w}).bind('mousewheel',this._scrollChild);$('
').appendTo(child).bind('mouseover mouseout',this._scrollTimer);}}},_animateChild:function(child,item,css){var opacity=$.toFloat(child.css('opacity'));if(opacity===0.00){css.opacity=0.01;}child.stop().css(css).animate({opacity:item._opacity},150);},_scrollChild:function(e){var items=$(this).children(':not(div.ui-more-items)');var first=items.index(items.filter(':visible:first'));var last=items.index(items.filter(':visible:last'));var delta=e.delta;while(delta<0&&last0&&first>0){items.eq(last--).hide();items.eq(--first).show();delta--;}return false;},_scrollTimer:function(e){if(this._interval){clearInterval(this._interval);this._interval=null;}if(e.type==='mouseout'){return;}var el=$(e.target);var direction;if(el.is('img.more-up')){direction=1;}else if(el.is('img.more-down')){direction=-1;}else{return;}var fn=function(el,delta){return function(){$.cms.flyout.prototype._scrollChild.apply(el,[{delta:delta}]);};}(this.parentNode,direction);this._interval=setInterval(fn,75);fn();},_flyOut:function(speed){if(this._killfade){this._killfade=false;return;}var elem=null,active=this._getActive(this.element[0]);while(active){elem=active;active=this._getActive(elem);}if(elem){var fn=function(flyout){return function(speed){flyout._flyOut(speed);flyout=null;};}(this);this._hideItem(null,elem,true,fn,speed||(this.options.mobile?600:800));}else if(this.options.mobile){this.elements.panel.css({display:'none'});this._on=false;this._stack=[];if(this._events&&this._events.length){this._event=this._events[0];}else{this._event=null;}this._events=null;}},_hideItem:function(e,item,fade,callback,speed){if(item._timeout){clearTimeout(item._timeout);item._timeout=null;}var parent=this._getParent(item);if(parent){parent._active=null;}var fn=function(item,cls,callback){return function(speed){if(cls){$(item).removeClass(cls).children('a').removeClass(cls);}if(callback){callback(speed);callback=null;}item=null;};}(item,this.options.hover,callback);if(this.options.onhover){if(this.options.onhover.apply(this,[{type:'mouseout'},speed,item,parent])===false){return false;}}if(item._ajaxip){item._killajax=true;}else if(typeof item._child!=='number'){fn();return;}var child;if(this.options.mobile&&item._top){child=$(item.childNodes[item._child].childNodes[0]);}else{child=$(item.childNodes[item._child]);}if(this.options.mobile){var wn=$(window).width();if(this._stack.indexOf(child[0])>=0){this._stack.removeItem(child[0]);}else{child[0].style.display='none';}var finished=function(_child){return function(){_child.style.display='none';_child=null;};}(child[0]);this.elements.top.stop().animate({left:(1-this._stack.length)*wn},300,'linear',finished);setTimeout(fn,300);}else{if(fade&&$.toFloat(child.css('opacity'))===item._opacity){var txt=$(item).children('a').text();var opacity=$.toFloat(child.css('opacity'));if(opacity===1.00){child.css({opacity:0.99});}child.stop().animate({opacity:0},speed||150,'linear',function(e){$(this).css({display:'none'});fn(300);});}else{child.stop().css({display:'none',opacity:0});fn();}}},destroy:function(){this.element.unbind('mouseover mouseleave');$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.cms.flyout,{disabled:false,setParent:function(){var el=$(this);if(el.is('a')){var p=el.parent(),direction=el.attr('_direction'),corner=el.attr('_corner'),icobalt=el.attr('icobalt');p.addClass('ifly').attr('icobalt',icobalt||'').attr('_pageid',el.attr('_pageid')||'').attr('_childpages',el.attr('_childpages')||'').attr('_exclude',el.attr('_exclude')||'').attr('_maxpages',el.attr('_maxpages')||'').attr('_offset',el.attr('_offset')||'').attr('_maxlevels',el.attr('_maxlevels')||'');if(direction==='Right'||corner==='{top:true,left:false}'){p.attr('_my','left top');p.attr('_at','right top');}el.removeAttr('icobalt').removeAttr('_pageid').removeAttr('_childpages').removeAttr('_exclude').removeAttr('_corner').removeAttr('_direction').removeAttr('_maxitems').removeAttr('_maxpages').removeAttr('_offset').removeAttr('_maxlevels');}else{el.addClass('ifly');}},ajax:{ip:false,stack:[],load:function(flyout,item,pageid){if(item._ajaxip){return;}else{item._ajaxip=true;}if(!this.ip){this._load(flyout,item,pageid);}else{var fn=function(fo,i,p){return function(){$.cms.flyout.ajax._load(fo,i,p);fo=null;i=null;p=null;};}(flyout,item,pageid);this.stack.push(fn);}},_load:function(flyout,item,pageid){this.ip=true;var url=$.getAjaxUrl(flyout.options.url,{P:pageid});var fn=function(fo,i){return function(results){$.cms.flyout.ajax._render(fo,i,results);fo=null;i=null;};}(flyout,item);$.ajax({url:url,dataType:'json',success:fn,error:fn});},_render:function(flyout,item,results){if(this.stack.length){this.stack.shift()();}item._ajaxip=null;this.ip=false;flyout._renderChildren(item,results);}}});})(jQuery); (function($){$.widget("cms.combobox",{options:{toggleValue:false,ajaxUrl:null,style:{main:'ui-select-style',panel:'ui-select-panel2',option:'ui-select-option',hover:'ui-option-hover'},minchars:3,valueField:'PageID',textField:'PageName',pathField:'Path',place:{my:'left top',at:'left bottom',collision:'none none'},maxHeight:300},_create:function(){this._onClick=function(){return this._handleClick.apply(this,arguments);};this._onKey=function(){return this._handleKey.apply(this,arguments);};this.elements={panel:$('
').attr('class',this.options.style.panel).css({position:'absolute',display:'none'}).bind('mouseover mouseleave',$.proxy(this._hoverPanel,this)).captureScroll()};if(this.element.is('select')){this._type='select';this._initSelect();}else if(this.element.is('input:text')){this._type='input';this._initAjax();}else{this._type=null;}},_initSelect:function(){var padding=$.toInt(this.element.css('paddingLeft'))+$.toInt(this.element.css('paddingRight'));var w=$.toInt($.css(this.element[0],'width',true))-21;var w2=this.element.width()-3;this.element.css({position:'absolute',opacity:0,display:'block',height:1,width:1,overflow:'hidden'}).bind('update',$.proxy(this._buildFromSelect,this)).bind('focus',$.proxy(this._activate,this)).bind('change',$.proxy(this._update,this)).bind('blur',$.proxy(function(e){this._deactivate();},this)).bind('keydown',$.proxy(function(e){if(e.which===$.ui.keyCode.TAB){e.stopPropagation();}else{e.preventDefault();}},this));this.elements.combo=$('
').insertAfter(this.element).attr('class',this.options.style.main).children('span').attr('class',this.options.style.main).end().bind('click',$.proxy(this._onCombo,this));if(w>10){this.elements.combo.css({width:w+padding,display:'inline-block'});}else if($.browser.msie&&$.browser.version<8){this.elements.combo.css({width:Math.max(w2+padding+14,50)});}else{this.elements.combo.css({minWidth:Math.max(w2+padding,50)});}var title=this.element.attr('title');if(title){this.elements.combo.attr('title',title);this.element.removeAttr('title');}this.elements.label=this.elements.combo.children('span');this._buildFromSelect();},_initAjax:function(){this.elements.combo=this.element.parent();this.element.bind('focus.combobox blur.combobox',$.proxy(this._focusInput,this)).bind('keydown.combobox',$.proxy(this._inputKey,this));},_buildFromSelect:function(){var id=this.options.valueField;var txt=this.options.textField;var results=[];this.element.children('option').each(function(i){var option=$(this);var name=option.text();var val=option.attr('value');if(val===undefined){val=name;}var row=[];row[id]=val;row[txt]=name;results.push(row);});this._buildItems(results);},_buildItems:function(results){if($.isFunction(this.options.onbuild)){if(this.options.onbuild.apply(this,[results,this])===false){return false;}}if(!results){return;}this.elements.panel.empty();var id=this.options.valueField;var txt=this.options.textField;var cls=this.options.style.option||'';for(var i=0;i/g,'>');}var val=row[id]||'';$('').appendTo(this.elements.panel)[0].$row=row;}this.elements.items=this.elements.panel.children("."+this.options.style.option);if(this._type==='select'){this._update();}},_update:function(e,select){if(!this.elements.items){return;}var val=this.element.val();var item=this.elements.items.filter("[_value='"+(val||'')+"']");if(!item.length){item=this.elements.items.eq(0);}if(val===null){this.element.val(item.attr('_value'));}if(select){if(this._selected){this._selected.removeClass(this.options.style.hover);}this._selected=item.addClass(this.options.style.hover);}if(this.elements.label){this.elements.label.html($.trim(item.html())||'');}},_hoverPanel:function(e){if(e.type==='mouseleave'){return;}var item=$(e.target).closest('.'+this.options.style.option);if(this._selected&&this._selected.length&&item.length&&this._selected[0]===item[0]){return;}else if(item.length){this._selected&&this._selected.removeClass(this.options.style.hover);this._selected=item.addClass(this.options.style.hover);}},_activate:function(e){if(!this._active){var parent=this.element.offsetParent();if(parent.is('div.ui-dialog-main')){parent=parent.closest('div.ui-dialog');}else if(parent.is('html')){parent=$(document.body);}this.elements.panel.appendTo(parent);if(this._type==='select'){this.elements.combo.addClass('ui-select-active');}this._active=true;$(document).bind('mousedown',$.proxy(this._onClick,this));$(document).bindkey(true,$.proxy(this._onKey,this));}},_onCombo:function(e){if(this.elements.panel.is(':visible')){this.elements.panel.css({display:'none'});}else{this._showPanel(e);}return false;},_showPanel:function(e){if(!this._active){this._activate();}if(e&&e.type==='click'&&this.elements.panel.is(':visible')){this.elements.panel.css({display:'none'});return false;}this._term='';var w=this.options.width;var minWidth=this.options.minWidth;if(!minWidth){minWidth=this.elements.combo.outerWidth()-$.toInt(this.elements.panel.css('paddingLeft'))-$.toInt(this.elements.panel.css('paddingRight'))-$.toInt(this.elements.panel.css('borderLeftWidth'))-$.toInt(this.elements.panel.css('borderRightWidth'));if($.browser.msie&&$.browser.version==8){minWidth-=17;}}var place;if(this._type==='select'){place=$.extend(this.options.place,{of:this.elements.combo});}else{place=$.extend(this.options.place,{of:this.element});}var six=$.browser.msie6;this.elements.panel.css({width:this.options.width||(six?w||minWidth:'auto'),minWidth:six?minWidth:w||minWidth}).place(place);if(this.options.maxHeight&&this.elements.panel.height()>this.options.maxHeight){this._scroll=true;this.elements.panel.css({height:this.options.maxHeight,overflow:'auto',overflowX:'hidden',overflowY:'auto'});}else if(/(auto|scroll)/.test($.css(this.elements.panel[0],'overflow',true)+$.css(this.elements.panel[0],'overflow-y',true)+$.css(this.elements.panel[0],'overflow-x',true))){this._scroll=true;}else{this._scroll=false;}if($.browser.msie&&$.browser.version<8&&this.elements.panel[0].style.width==='auto'){this.elements.panel.css({width:this.elements.panel.width()});}if(this._type==='select'){this._update(e,true);}if(this._selected&&this._scroll){this._selected.scrollIntoView();}return false;},_focusInput:function(e){if(this.options.toggleValue){var action=e.type==='focus'?'clearValue':'restoreValue';$[action].apply(e.target,arguments);}if(e.type==='focus'&&this.elements.panel.children().length){this._showPanel();}},_inputKey:function(e){if(this._searchTimeout){clearTimeout(this._searchTimeout);}this._searchTimeout=setTimeout($.proxy(this._handleSearch,this),500);},_handleSearch:function(e){if(this._searchTimeout){clearTimeout(this._searchTimeout);this._searchTimeout=null;}var text=this.element.val();if(!text){this.elements.panel.css({display:'none'});}else if(text.length>=this.options.minchars&&text!=this._lastText){this._lastText=text;var url=$.getAjaxUrl(this.options.ajaxUrl,{TERMS:text});if(url){this._showPanel();if(!this.options.noloading){this.elements.panel.loading();}$.ajax({url:url,dataType:'json',success:function(combo){return function(results){combo.elements.panel.loading('done');combo._buildItems.apply(combo,arguments);};}(this),error:function(combo){return function(){combo.elements.panel.loading('done');combo.elements.panel.css({display:'none'});$.alert('There was a problem with the system, tech services has been notified.');};}(this)});}}},_handleClick:function(e){var elem=e.target;do{if(elem===this.elements.combo[0]){return;}else if(elem===this.elements.panel[0]){if(elem.scrollHeight>elem.offsetHeight){var doc=elem.ownerDocument;var x=e.clientX+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);var dim=this.elements.panel.dimensions();if(x>dim.left+dim.width-20){return;}}if(this._selected&&this._selected.length){this._selectActive(e);}return;}}while(elem=elem.parentNode);this._deactivate();},_handleKey:function(e){if(e.ctrlKey||e.altKey){return;}if(e.shiftKey){if(e.which===$.ui.keyCode.TAB&&this._type==='select'){if(this._active){this.element.focus().trigger(e);}return;}return;}switch(e.which){case $.ui.keyCode.DOWN:this._move(1);return false;case $.ui.keyCode.UP:this._move(-1);return false;case $.ui.keyCode.PAGE_DOWN:this._move(10);return false;case $.ui.keyCode.PAGE_UP:this._move(-10);return false;case $.ui.keyCode.END:this._move(999);return false;case $.ui.keyCode.HOME:this._move(-999);return false;case $.ui.keyCode.ENTER:this._selectActive(e);return false;case $.ui.keyCode.TAB:if(this._active&&this._type==='select'){this.element.focus().trigger(e);setTimeout($.proxy(this._deactivate,this),1);}return;case $.ui.keyCode.ESCAPE:if(this.elements.panel.is(':visible')){this.elements.panel.css({display:'none'});e.stopImmediatePropagation();return false;}else{this._deactivate();}break;default:if(this._type==='select'){if(this.elements.panel.is(':hidden')){this._showPanel();}if(e.which>=32&&e.which<=160){this._term+=String.fromCharCode(e.which);return this._search();}}break;}},_move:function(amount){if(!this._active){return;}amount=$.toInt(amount);if(!amount){return;}if(!this.elements.panel.is(':visible')){this._showPanel();return;}var items=this.elements.items;if(!this._selected||!this._selected.length){this._selected=items.eq(0);if(!this._selected.length){return;}else if(amount===1){this._setItem(this._selected);return;}}var index=items.index(this._selected)+amount;if(index<0){index=0;}else if(index>=items.length){index=items.length-1;}this._setItem(items.eq(index));this._term='';},_search:function(){if(!this._term||!this.elements.items){return;}var items=this.elements.items;if(!this._selected||!this._selected.length){this._selected=items.eq(0);if(!this._selected.length){return;}}var index=items.index(this._selected);var start=index;var item=this._selected;while(item&&!item.children('span').text().startsWith(this._term)){index++;item=index0&&this._term.length===1){index=0;item=items.eq(0);while(index
Year
<
2010
2011
2012
>
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Day
Sun
Mon
Tue
Wed
Thu
Fri
Sat
 
AM
PM
Min
:00
:05
:10
:15
:20
:25
:30
:35
:40
:45
:50
:55
Hour
12
1
2
3
4
5
6
7
8
9
10
11
',activate:function(options){if(!$.cms.datepicker.active){return this._activate.apply(this,arguments);}else if(options&&options.input&&$.cms.datepicker.active===options.input[0]){return false;}else{$.extend($.cms.datepicker.current.options,options);if($.cms.datepicker.current.isOpen()){$.cms.datepicker.current._start();}else{$.cms.datepicker.current._open();}}},deactivate:function(){var wz=$[this.namespace][this.widgetName];if(wz._single){var instance=$.data(wz._single[0],this.widgetName);if(instance&&instance.isOpen()){instance.close();return true;}}},_activate:function(options){if(options&&options.showdate===false&&options.showtime===false){return false;}var wz=$[this.namespace][this.widgetName];var el=wz._single;if(!el){wz._single=el=$(this._html);}var instance=$.data(el[0],this.widgetName);if(instance){if(instance.isOpen()){return;}else{var options=$.extend({},wz.prototype.options,options);if(instance.options.sizeChildren){options.sizeChildren=instance.options.sizeChildren;}instance.options=options;}instance.open();}else{instance=new wz(options,el[0]);$.data(el[0],this.widgetName,instance);}return el;},_create:function(){$.ui.dialog.prototype._create.apply(this,arguments);this.element.unselectable();this.uiDialog.find('div.ui-dialog-titlebar').children('span').remove().end().css({height:18});this.uiDialog.addClass('cms-datepicker');this.elements={date:this.element.children('div.ui-date'),time:this.element.children('div.ui-time'),years:this.element.find('div.ui-year'),months:this.element.find('div.ui-month'),days:this.element.find('div.ui-days'),hours:this.element.find('div.ui-hour'),minutes:this.element.find('div.ui-minute'),ampm:this.element.find('div.ui-plus'),pop:this.element.find('div.ui-pop')};},_open:function(){$.cms.datepicker.current=this;$.cms.datepicker.active=true;this._start();$(document).bind('mousedown',$.proxy(this._handleClick,this));},_start:function(){this.elements.pop.hide();this.element.removeClass('mask');this._mask=false;this._origvalue=undefined;var width=0;if(this.options.showdate){this.elements.date.show();width=238;}else{this.elements.date.hide();}if(this.options.showtime){this.elements.time.show();if(width>0){width=400;this.elements.date.css({float:'left'});this.elements.time.css({float:'right'});}else{width=165;this.elements.date.css({float:'none'});this.elements.time.css({float:'none'});}}else{this.elements.time.hide();}this.uiDialog.css({width:width});var date=this.options.date;if(this.options.input&&this.options.input.is('input:text,input:hidden')){$.cms.datepicker.active=this.options.input[0];var text=this.options.input.is('input:text');if(text||this.options.at){this.uiDialog.place({my:'left top',at:'left bottom',collision:'fit flip',of:this.options.at||this.options.input,offset:{left:-1,top:2},margin:{top:0,right:10,bottom:10,left:0}});}this._origvalue=date=this.options.input.val();if(text){try{this.options.input[0].focus();}catch(ex){;}}}this._date=$.datetime.parse(date)||new Date();if(this.options.showdate){this._updateYear();}if(this.options.showtime){this._updateTime();}},_handleClick:function(e){var input=this.options.input&&this.options.input.length&&this.options.input[0],el;if(e.target===input){return;}else if($(e.target).closest('.cms-datepicker').length>0){var cls=(e.target.className||"").split(' ')[0];if(this._mask){if(cls==='ui-pop'){return;}this.elements.pop.hide();this.element.removeClass('mask');this._mask=false;}switch(cls){case'ui-year':case'ui-year2':var year=parseInt(e.target.getAttribute('_year'));if(year!==this._date.getFullYear()){var month=this._date.getMonth();this._date.setYear(year);if(month!==this._date.getMonth()){this._setLastDay(year,month);}if(cls==='ui-year2'){this._updateYear();}else{this.elements.years.removeClass('selected');$(e.target).addClass('selected');this._updateMonth(true);}this._save();}break;case'ui-month':var month=parseInt(e.target.getAttribute('_month'));if(month!==this._date.getMonth()){this._date.setMonth(month);if(month!==this._date.getMonth()){this._setLastDay(this._date.getFullYear(),month);}this._updateMonth();this._save();}break;case'ui-day':var date=parseInt(e.target.getAttribute('_day'));if(date!==this._date.getDate()){this._date.setDate(date);this.elements.days.children('.selected').removeClass('selected');this.elements.days.children("[_day='"+date+"']").addClass('selected');this._save();}else if(!this.options.showtime){this._save();}if(!this.options.showtime){this.close();}break;case'ui-hour':case'ui-plus':var hour=$.toInt(e.target.getAttribute('_hour')||this.elements.hours.filter('.selected').attr('_hour'))+$.toInt(e.target.getAttribute('_plus')||this.elements.ampm.filter('.selected').attr('_plus'));if(hour!==this._date.getHours()){this._date.setHours(hour);this._updateTime();this._save();}break;case'ui-minute':var minute=parseInt(e.target.getAttribute('_minute'));if(minute!==this._date.getMinutes()){this._date.setMinutes(minute);this._updateTime();this._save();}break;case'ui-list':$(e.target).children('.ui-pop').show();this.element.addClass('mask');this._mask=true;break;case'ui-today':this._date=new Date();this._updateYear();this._save();break;}}else{this.close();}},_setLastDay:function(year,month){var hours,minutes;if(this.options.showtime){hours=this._date.getHours();minutes=this._date.getMinutes();if(hours>=12){plus=12;hours-=12;}}this._date=new Date(year,month+1,0);if(this.options.showtime){this._date.setHours(hours);this._date.setMinutes(minutes);}},_updateYear:function(){var year=this._date.getFullYear();this.elements.years.removeClass('selected').eq(0).html(year-1).attr('_year',year-1).end().eq(1).html(year).attr('_year',year).addClass('selected').end().eq(2).html(year+1).attr('_year',year+1);var start=year-1,sb=[];while(start-->=1900){sb.push('
');sb.push(start);sb.push('
');}this.elements.pop.eq(0).html(sb.join(""));start=year+1;sb=[];while(start++<=2040){sb.push('
');sb.push(start);sb.push('
');}this.elements.pop.eq(1).html(sb.join(""));this._updateMonth(true);},_updateMonth:function(change){var month=""+this._date.getMonth(),selected=this.elements.months.filter('.selected');if(selected.attr('_month')===month&&!change){return;}else{selected.removeClass('selected');this.elements.months.filter("[_month='"+month+"']").addClass('selected');}this._updateDays();},_updateDays:function(){var day=""+this._date.getDate(),sb=[],year=this._date.getFullYear(),month=this._date.getMonth(),date=this._date.getDate(),firstDay=new Date(year,month,1),lastDay=new Date(year,month+1,0),firstDayOfWeek=firstDay.getDay(),lastDayOfWeek=lastDay.getDay(),daysInMonth=lastDay.getDate(),current,day;if(firstDayOfWeek===0){firstDayOfWeek=7;}for(var i=0;i<42;i++){current=new Date(year,month,1-firstDayOfWeek+i);if(current.getMonth()!==month){sb.push('
 
');}else{day=current.getDate();sb.push('
');sb.push(day);sb.push('
');}}this.elements.days.html(sb.join(""));},_updateTime:function(){var hours=this._date.getHours(),plus=0,minutes=Math.floor(this._date.getMinutes()/5)*5,shours=this.elements.hours.filter('.selected'),sminutes=this.elements.minutes.filter('.selected'),splus=this.elements.ampm.filter('.selected');if(hours>=12){plus=12;hours-=12;}if(shours.attr('_hour')!==(""+hours)){shours.removeClass('selected');this.elements.hours.filter("[_hour='"+hours+"']").addClass('selected');}if(sminutes.attr('_minute')!==(""+minutes)){sminutes.removeClass('selected');this.elements.minutes.filter("[_minute='"+minutes+"']").addClass('selected');}if(splus.attr('_plus')!==(""+hours)){splus.removeClass('selected');this.elements.ampm.filter("[_plus='"+plus+"']").addClass('selected');}if(minutes!==this._date.getMinutes()||this._date.getSeconds()!==0){this._date.setMinutes(minutes);this._date.setSeconds(0);this._date.setMilliseconds(0);}},_save:function(e){var date=$.datetime.format(this._date,this.options.pattern);if(this.options.input&&this.options.input.is('input:text,input:hidden')){this.options.input.blur().val(date);}},_cancel:function(){if(this._origvalue!==undefined){this.options.input.val(this._origvalue||"");}if(this.options.input&&this.options.input.is(':text:visible')){try{this.options.input[0].focus();}catch(ex){;}}$.ui.dialog.prototype._cancel.apply(this,arguments);},close:function(){if(this._origvalue!==undefined&&this._origvalue!==this.options.input.val()){this.options.input.trigger('change');}if($.browser.msie){setTimeout(function(){if($.cms.datepicker.active&&$.cms.datepicker.current&&$.cms.datepicker.current.options&&$.cms.datepicker.current.options.input&&$.cms.datepicker.active===$.cms.datepicker.current.options.input[0]){$.cms.datepicker.active=null;}},1);}else{$.cms.datepicker.active=null;}$(document).unbind('mousedown',this._handleClick);return $.ui.dialog.prototype.close.apply(this,arguments);}});})(jQuery); $(document).ready(InitCobalt);function InitCobalt(){if(window._flyout){$("[icobalt='CobaltControls.Controls.SideMenu'][_flyout='true']").each(function(i){var menu=$(this),maxlevels=$.toInt(menu.attr('_maxlevels')),my=menu.attr('_my')||'left top',at=menu.attr('_at')||'right top',items=$.toInt(menu.attr('_maxitems'))||16;menu.find('[_pageid]').each($.cms.flyout.setParent).end().flyout({my:my,at:at,maxlevels:maxlevels,maxitems:items});});$("[icobalt='CobaltControls.Controls.TopMenu'][_flyout='true']").each(function(i){var menu=$(this),maxlevels=$.toInt(menu.attr('_maxlevels')),my=menu.attr('_my')||'left top',at=menu.attr('_at')||'left bottom',items=$.toInt(menu.attr('_maxitems'))||16;menu.find('[_pageid]').each($.cms.flyout.setParent).end().flyout({my:my,at:at,maxlevels:maxlevels,maxitems:items});});$("[icobalt='CobaltControls.Controls.AdvancedMenu'][_flyout='true']").each(function(i){var menu=$(this),maxlevels=$.toInt(menu.attr('_maxlevels')),my=menu.attr('_my')||'left top',at=menu.attr('_at')||'left bottom',items=$.toInt(menu.attr('_maxitems'))||16;menu.find('[_pageid]').each($.cms.flyout.setParent).end().flyout({my:my,at:at,maxlevels:maxlevels,maxitems:items});});}var m;if(!/TimeZone/.test(document.cookie)){var tz,now=new Date(),offset=now.stdTimezoneOffset()/60,dst=now.candst();switch(offset){case 10:tz="Hawaiian Standard Time";break;case 9:tz="Alaskan Standard Time";break;case 8:tz="Pacific Standard Time";break;case 7:tz="Mountain Standard Time";break;case 6:tz="Central Standard Time";break;case 5:tz="Eastern Standard Time";break;case-8:tz="W. Australia Standard Time";break;case-9.5:if(dst){tz="Cen. Australia Standard Time";}else{tz="AUS Central Standard Time";}break;case-10:if(dst){tz="AUS Eastern Standard Time";}else{tz="E. Australia Standard Time";}break;case-11:tz="Central Pacific Standard Time";break;case-12:tz="New Zealand Standard Time";break;default:tz="0";break;}document.cookie=['Cobalt.TimeZone=',tz,';path=/'].join("");}if(window._fortran){$("input:hidden[id$='_FFD6']").val(new Date().getTime());}setTimeout(SetupFlashMovies,100);}$.cms.urlFriendly=function(name){if(!name){return"";}else{return(""+name).replace(/'+/g,'').replace(/\W+/g,'-');}};function SetupFlashMovies(){if(window._noflash){return;}else{$('.ihover').hoverImage();if(window._spotlight){$("div[icobalt='CobaltControls.Controls.Spotlight']").each(function(i){var div=$(this);var noplay=$.toBool(div.attr('_noplay'));if(!noplay)div.appendTo(document.body).css('display','block').embedswf();});}var swf=$('form div.buildflash');var flyouts=window._flyout&&$("[icobalt='CobaltControls.Controls.Flyout']");if(window._nocontentflash){var nocontent=function(i){return $(this).parent().closest("[icobalt='CobaltControls.Controls.Content']").length===0;};swf.filter(nocontent).embedswf();flyouts=flyouts&&flyouts.filter(nocontent).each($.cms.flyout.setParent).parent();}else{swf.embedswf();flyouts=flyouts&&flyouts.each($.cms.flyout.setParent).parent();}if(!window._nocontentflash){var videos=$('form video').each(function(i){var video=$(this);if(video.data('replace')===false){if(video.data('notrack')||(this.loop&&this.autoplay)){return;}else{video.videoAnalytics();}}else{video.jwplayer();}});}if(flyouts){flyouts.filter('div').parent().flyout();$.unique(flyouts.filter(':not(div)').closest('div,table')).flyout();}if(window._mobilemenu){$("[icobalt='CobaltControls.Controls.MobileMenu']").each($.cms.flyout.setParent).parent().removeClass('ifly').addClass('imenuitem').parent().flyout({item:'.imenuitem',panel:'div.imenu',hover:'iover',right:'iright',loading:'iloading',my:'right top',at:'right bottom',mobile:true,maxitems:0});}if(window._sitesearch){$("[icobalt='CobaltControls.Controls.SiteSearch']").sitesearch();}if(window._lightbox){$('.ilightbox').lightbox();}if(window._scroller&&$.fn.scroller){$("div[icobalt='CobaltControls.Controls.ScrollingList'],div[icobalt='CobaltControls.Controls.PhysicianSpotlight']").scroller();}if(window._quicklinks){$("[icobalt='CobaltControls.Controls.QuickLinks']").each(function(i){var el=$(this);if(!el.is('select')){el=el.find('select');}el.bind('change',function(e){var href=$(this).val();if(href){if(!href.startsWith('http')&&!href.startsWith('/')){href="/"+href;}window.location.href=href;if(e&&e.preventDefault){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();}return false;}});});}if(window._popup){$("a[icobalt='CobaltControls.Controls.Popup']").click(function(e){var link=$(this);$.popup({title:link.attr('_title')||null,url:$.getAjaxUrl(link.attr('href'),{Popup:true}),width:$.toInt(link.attr('_width'))||600,height:$.toInt(link.attr('_height'))||400,noscroll:$.toBool(link.attr('_noscroll'))});e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();return false;});}if(window._videovault&&$.cms.videopopup){$("a[icobalt='CobaltControls.Controls.VideoVault']").click(function(e){var link=$(this),categories=link.attr('_categories'),video=link.attr('_video'),options={categories:$.toIntArray(categories),video:$.toInt(video)},theme=link.attr('_theme'),progressive=$.toBool(link.attr('_progressive'));if(theme){options.theme=theme;}if(progressive){options.streaming=false;}$.cms.videopopup.prototype.activate(options);return false;});}if(window._ajaxupload&&$.cms.ajaxupload){$("div[icobalt='Cobalt.Controls.FileUpload']").ajaxupload();}if(window._hicharts&&$.cms.hichart){$("div[icobalt='CobaltControls.Controls.HighCharts']").hichart();}}}function cleanupFlash(){__flash__removeCallback=function(instance,name){if(instance&&name){instance[name]=null;}};}$.cms.popupvideo=function(file,streamer,autostart,width,height){var id=('Player'+Math.random()).replace('.',''),wn=$(window).width();width=width||423;height=height||245;if(width>wn-40){height=height/width*(wn-40);width=wn-40;}$('
').dialog({modal:true,dialogClass:'simple',width:width?width+20:443,height:height<30?height+10:'auto',close:function(){$(this).remove();}}).append('
').children().css({width:width,height:height,margin:0,padding:0}).embedswf({swf:'/Shared/videovault/lt/player.swf',id:id,width:width||423,height:height||245,params:{flashvars:{streamer:streamer,file:file,autostart:autostart,skin:height<30?null:"glow",'controlbar.position':height<30?'bottom':'over'}}});};$.cms.popupaudio=function(href){$.cms.popupvideo(href,null,true,443,24);};$.fn.cascade=function(){return this.each(function(i){var input=$(this);var cascade=input.attr('_cascade');if(cascade){var child=$("form select[id$='_"+cascade+"']");var items=[];child.children('option').each(function(i){var option=$(this);items.push({parent:option.attr('_parent'),value:option.attr('value'),label:option.html()});});child.data('items',items);input.data('cascade',child).bind('change',function(e){var input=$(this);var child=input.data('cascade');var items=child.data('items');var parent=input.val();var sb=[];for(var i=0;i');sb.push(item.label);sb.push('');}}var val=child.val();child.html(sb.join('')).val(val||'');}).trigger('change');}});};$.googlie=function(url,callback,noloading){if(!noloading&&$.fn.loading){$(document.body).loading();}$.ajax({url:$.getAjaxUrl('/CobaltAjax.ashx?M=Googlie',{long:url}),dataType:'json',success:function(result){if(!noloading&&$.fn.loading){$(document.body).loading('done');}if(result&&result.URL){callback(result.URL);}}});};$.widget("cms.videotutorials",$.ui.dialog,{options:{nobridge:true,modal:true,width:860,height:590,title:'Video Tutorial: ',buttons:{"Close":function(e,widget){widget.close();}},open:function(e,data,widget){widget._open.apply(widget,[e,data]);},videos:[],videoid:0},activate:function(options){if(options&&options.controls&&(!options.videos||!options.videos.length)){options.videos=[];options.controls.each(function(i){options.videos.push($(this).getRow());});options.controls=null;delete options.controls;}if(!options||!options.videos||!options.videos.length){$.alert('There are no video tutorials available here.');return null;}var el=$('
More Videos
  Related Videos:
 
');var wz=$[this.namespace][this.widgetName];var instance=new wz(options,el[0]);return el;},_create:function(){$.ui.dialog.prototype._create.apply(this,arguments);this.elements={main:this.uiDialog.find('div.ui-dialog-main'),titlebar:this.uiDialog.find('div.ui-dialog-titlebar'),player:this.element.find('div.tt-player>div'),data:{title:this.element.find('div.tt-summary>h1'),summary:this.element.find('div.tt-summary>div')},videos:{left:this.element.find('a.tt-left'),panel:this.element.find('div.tt-panel'),scroller:this.element.find('div.tt-scroller'),right:this.element.find('a.tt-right')}};this.element.find('div.tt-videos').click($.proxy(this._handleClick,this));var start=this._getStart();this.elements.titlebar.children('span').html('Video Tutorial: '+start.Title);this._createVideos();},_open:function(){var children=this.elements.videos.scroller.children();var panel=this.elements.videos.panel.width();var scroll=this.elements.videos.scroller.offset();var pos=children.eq(children.length-1).dimensions();this._overflow=pos.left+pos.width-scroll.left>panel;var start=this._getStart();this._select((start&&start.Index)||0);},_getStart:function(){if(this.options.videoid){for(var i=0;i');sb.push(video.Title);sb.push('');}this.elements.videos.scroller.html(sb.join(""));this._vposition=0;},_handleClick:function(e){var link=$.getLinkTarget(e),href=link&&link.attr('href'),m=href&&/^javascript:(\w+)\('([^']+)'/i.exec(href),fn=m&&m[1],action=m&&m[2];switch(action){case'Next':this._advanceVideos(1);break;case'Prev':this._advanceVideos(-1);break;case'Play':var index=link.attr('_index');if(index){this._select($.toInt(index),true);}break;default:return;}return false;},_select:function(index,play){var video=this.options.videos[index];this.elements.data.title.html(video.Title);this.elements.data.summary.html(video.Summary.replace(/\n/g,'
'));this.elements.videos.scroller.children().removeClass('active').eq(index).addClass('active');this.elements.player.embedswf({swf:'/Shared/videovault/lt/player.swf',id:('Player'+Math.random()).replace(".",""),width:800,height:450,params:{flashvars:{file:video.Video,image:video.Thumbnail,skin:"glow","controlbar.position":"over",plugins:'hd',"hd.file":video.HDVideo,"hd.state":false,"hd.fullscreen":true,dock:false,autostart:play&&!video.Thumbnail?true:false}}},true);this._vid=index;this._ensureVideos();},_advanceVideos:function(amount,play){var videos=this.elements.videos.scroller.children();var index=(this._vid||0)+amount;if(index<0){index=videos.length-1;}else if(index>videos.length-1){index=0;}this._select(index,play);},_ensureVideos:function(){if(!this._overflow){return;}var videos=this.elements.videos.scroller.children();var vid=videos.filter('.active');if(!videos.length||!vid.length){return;}var first=videos.eq(this._vposition).offset().left;var index=videos.index(vid);var panel=this.elements.videos.panel.width();var pos=vid.dimensions();var shift=0;while(pos.left+pos.width-first>panel){shift++;first=videos.eq(this._vposition+shift).offset().left;}while(pos.left=videos.length){this._vposition=0;}else if(this._vposition<0){this._vposition=videos.length-1;}var vid=videos.eq(this._vposition);var parent=this.elements.videos.scroller.offset();var pos=vid.offset();var left=parent.left-pos.left;this.elements.videos.scroller.stop().animate({marginLeft:left},400,$.proxy(this._ensureVideos,this));},close:function(){$.ui.dialog.prototype.close.apply(this,arguments);this.element.removeswf().remove();}});function ICON(){if(arguments.length>0){this.Class=arguments[0];this.Character=arguments[1];}}ICON.getStylesheet=function(path){var sheets=document.styleSheets;if(!sheets||!path){return null;}path=path.toLowerCase();for(var i=0;i1){c=c.split("")[1];}ICON._icons[m[1]]=new ICON(m[1],c);}}}}callback(ICON._icons);};ICON.fixCharacter=function(cls){var fix=false;if(typeof this.className!=='undefined'){cls=this.className||"";fix=true;}else if(!cls){return null;}else if(cls.jquery){cls=cls.attr('class')||"";}else if(typeof cls.className!=='undefined'){cls=cls.className||"";}else if(!cls.split){return null;}var icon,c,icons=ICON._icons,classes=cls.split(' ');for(var i=0;i