1var Prototype={Version:"1.7.2",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div"),b=document.createElement("form"),a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script\\s*>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class=(function(){var d=(function(){for(var e in {toString:1}){if(e==="toString"){return false}}return true})();function a(){}function b(){var h=null,g=$A(arguments);if(Object.isFunction(g[0])){h=g.shift()}function e(){this.initialize.apply(this,arguments)}Object.extend(e,Class.Methods);e.superclass=h;e.subclasses=[];if(h){a.prototype=h.prototype;e.prototype=new a;h.subclasses.push(e)}for(var f=0,j=g.length;f<j;f++){e.addMethods(g[f])}if(!e.prototype.initialize){e.prototype.initialize=Prototype.emptyFunction}e.prototype.constructor=e;return e}function c(l){var g=this.superclass&&this.superclass.prototype,f=Object.keys(l);if(d){if(l.toString!=Object.prototype.toString){f.push("toString")}if(l.valueOf!=Object.prototype.valueOf){f.push("valueOf")}}for(var e=0,h=f.length;e<h;e++){var k=f[e],j=l[k];if(g&&Object.isFunction(j)&&j.argumentNames()[0]=="$super"){var m=j;j=(function(i){return function(){return g[i].apply(this,arguments)}})(k).wrap(m);j.valueOf=(function(i){return function(){return i.valueOf.call(i)}})(m);j.toString=(function(i){return function(){return i.toString.call(i)}})(m)}this.prototype[k]=j}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var y=Object.prototype.toString,k=Object.prototype.hasOwnProperty,z="Null",B="Undefined",K="Boolean",w="Number",v="String",I="Object",i="[object Function]",d="[object Boolean]",j="[object Number]",f="[object String]",b="[object Array]",H="[object Date]",e=window.JSON&&typeof JSON.stringify==="function"&&JSON.stringify(0)==="0"&&typeof JSON.stringify(Prototype.K)==="undefined";var q=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var a=(function(){for(var L in {toString:1}){if(L==="toString"){return false}}return true})();function D(M){switch(M){case null:return z;case (void 0):return B}var L=typeof M;switch(L){case"boolean":return K;case"number":return w;case"string":return v}return I}function h(L,N){for(var M in N){L[M]=N[M]}return L}function l(L){try{if(o(L)){return"undefined"}if(L===null){return"null"}return L.inspect?L.inspect():String(L)}
1catch(M){if(M instanceof RangeError){return"..."}throw M}}function A(L){return m("",{"":L},[])}function m(U,R,S){var T=R[U];if(D(T)===I&&typeof T.toJSON==="function"){T=T.toJSON(U)}var N=y.call(T);switch(N){case j:case d:case f:T=T.valueOf()}switch(T){case null:return"null";case true:return"true";case false:return"false"}var Q=typeof T;switch(Q){case"string":return T.inspect(true);case"number":return isFinite(T)?String(T):"null";case"object":for(var M=0,L=S.length;M<L;M++){if(S[M]===T){throw new TypeError("Cyclic reference to '"+T+"' in object")}}S.push(T);var P=[];if(N===b){for(var M=0,L=T.length;M<L;M++){var O=m(M,T,S);P.push(typeof O==="undefined"?"null":O)}P="["+P.join(",")+"]"}else{var V=Object.keys(T);for(var M=0,L=V.length;M<L;M++){var U=V[M],O=m(U,T,S);if(typeof O!=="undefined"){P.push(U.inspect(true)+":"+O)}}P="{"+P.join(",")+"}"}S.pop();return P}}function J(L){return JSON.stringify(L)}function C(L){return $H(L).toQueryString()}function p(L){return L&&L.toHTML?L.toHTML():String.interpret(L)}function x(L){if(D(L)!==I){throw new TypeError()}var N=[];for(var O in L){if(k.call(L,O)){N.push(O)}}if(a){for(var M=0;O=q[M];M++){if(k.call(L,O)){N.push(O)}}}return N}function G(L){var M=[];for(var N in L){M.push(L[N])}return M}function s(L){return h({},L)}function E(L){return !!(L&&L.nodeType==1)}function u(L){return y.call(L)===b}var c=(typeof Array.isArray=="function")&&Array.isArray([])&&!Array.isArray({});if(c){u=Array.isArray}function r(L){return L instanceof Hash}function n(L){return y.call(L)===i}function g(L){return y.call(L)===f}function F(L){return y.call(L)===j}function t(L){return y.call(L)===H}function o(L){return typeof L==="undefined"}h(Object,{extend:h,inspect:l,toJSON:e?J:A,toQueryString:C,toHTML:p,keys:Object.keys||x,values:G,clone:s,isElement:E,isArray:u,isHash:r,isFunction:n,isString:g,isNumber:F,isDate:t,isUndefined:o})})();Object.extend(Function.prototype,(function(){var l=Array.prototype.slice;function d(p,m){var o=p.length,n=m.length;while(n--){p[o+n]=m[n]}return p}function j(n,m){n=l.call(n,0);return d(n,m)}function g(){var m=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return m.length==1&&!m[0]?[]:m}function h(o){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}if(!Object.isFunction(this)){throw new TypeError("The object is not callable.")}var q=function(){};var m=this,n=l.call(arguments,1);var p=function(){var r=j(n,arguments);var s=this instanceof p?this:o;return m.apply(s,r)};q.prototype=this.prototype;p.prototype=new q();return p}function f(o){var m=this,n=l.call(arguments,1);return function(q){var p=d([q||window.event],n);return m.apply(o,p)}}function k(){if(!arguments.length){return this}var m=this,n=l.call(arguments,0);return function(){var o=j(n,arguments);return m.apply(this,o)}}function e(o){var m=this,n=l.call(arguments,1);o=o*1000;return window.setTimeout(function(){return m.apply(m,n)},o)}function a(){var m=d([0.01],arguments);return this.delay.apply(this,m)}function c(n){var m=this;return function(){var o=d([m.bind(this)],arguments);return n.apply(this,o)}}function b(){if(this._methodized){return this._methodized}var m=this;return this._methodized=function(){var n=d([this],arguments);return m.apply(null,n)}}var i={argumentNames:g,bindAsEventListener:f,curry:k,delay:e,defer:a,wrap:c,methodize:b};if(!Function.prototype.bind){i.bind=h}return i})());(function(c){function b(){return this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+"Z"}function a(){return this.toISOString()}if(!c.toISOString){c.toISOString=b}if(!c.toJSON){c.toJSON=a}})(Date.prototype);RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(b,a){this.callback=b;this.frequency=a;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return}clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false}catch(a){this.currentlyExecuting=false;throw a}}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,(function(){var NATIVE_JSON_PARSE_SUPPORT=window.JSON&&typeof JSON.parse==="function"&&JSON.parse('{"test": true}').test;function prepareReplacement(replacement){if(Object.isFunction(replacement)){return replacement}var template=new Template(replacement);return function(match){return template.evaluate(match)}}function isNonEmptyRegExp(regexp){return regexp.source&®exp.source!=="(?:)"}function gsub(pattern,replacement){var result="",source=this,match;replacement=prepareReplacement(replacement);if(Object.isString(pattern)){pattern=RegExp.escape(pattern)}if(!(pattern.length||isNonEmptyRegExp(pattern))){replacement=replacement("");return replacement+source.split("").join(replacement)+replacement}while(source.length>0){match=source.match(pattern);if(match&&match[0].length>0){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length)}else{result+=source,source=""}}return result}function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;
1return this.gsub(pattern,function(match){if(--count<0){return match[0]}return replacement(match)})}function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this)}function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?"...":truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this)}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")}function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")}function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,"img"),matchOne=new RegExp(Prototype.ScriptFragment,"im");return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||["",""])[1]})}function evalScripts(){return this.extractScripts().map(function(script){return eval(script)})}function escapeHTML(){return this.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function unescapeHTML(){return this.stripTags().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match){return{}}return match[1].split(separator||"&").inject({},function(hash,pair){if((pair=pair.split("="))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join("="):pair[0];if(value!=undefined){value=value.gsub("+"," ");value=decodeURIComponent(value)}if(key in hash){if(!Object.isArray(hash[key])){hash[key]=[hash[key]]}hash[key].push(value)}else{hash[key]=value}}return hash})}function toArray(){return this.split("")}function succ(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)}function times(count){return count<1?"":new Array(count+1).join(this)}function camelize(){return this.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():""})}function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}function underscore(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()}function dasherize(){return this.replace(/_/g,"-")}function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character]}return"\\u00"+character.charCodeAt().toPaddedString(2,16)});if(useDoubleQuotes){return'"'+escapedString.replace(/"/g,'\\"')+'"'}return"'"+escapedString.replace(/'/g,"\\'")+"'"}function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,"$1")}function isJSON(){var str=this;if(str.blank()){return false}str=str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@");str=str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");str=str.replace(/(?:^|:|,)(?:\s*\[)+/g,"");return(/^[\],:{}\s]*$/).test(str)}function evalJSON(sanitize){var json=this.unfilterJSON(),cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(cx.test(json)){json=json.replace(cx,function(a){return"\\u"+("0000"+a.charCo
1deAt(0).toString(16)).slice(-4)})}try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())}function parseJSON(){var json=this.unfilterJSON();return JSON.parse(json)}function include(pattern){return this.indexOf(pattern)>-1}function startsWith(pattern,position){position=Object.isNumber(position)?position:0;return this.lastIndexOf(pattern,position)===position}function endsWith(pattern,position){pattern=String(pattern);position=Object.isNumber(position)?position:this.length;if(position<0){position=0}if(position>this.length){position=this.length}var d=position-pattern.length;return d>=0&&this.indexOf(pattern,d)===d}function empty(){return this==""}function blank(){return/^\s*$/.test(this)}function interpolate(object,pattern){return new Template(this,pattern).evaluate(object)}return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim||strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:NATIVE_JSON_PARSE_SUPPORT?parseJSON:evalJSON,include:include,startsWith:String.prototype.startsWith||startsWith,endsWith:String.prototype.endsWith||endsWith,empty:empty,blank:blank,interpolate:interpolate}})());var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(a&&Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements()}return this.template.gsub(this.pattern,function(d){if(a==null){return(d[1]+"")}var f=d[1]||"";if(f=="\\"){return d[2]}var b=a,g=d[3],e=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=e.exec(g);if(d==null){return f}while(d!=null){var c=d[1].startsWith("[")?d[2].replace(/\\\\]/g,"]"):d[1];b=b[c];if(null==b||""==d[3]){break}g=g.substring("["==d[3]?d[1].length:d[0].length);d=e.exec(g)}return f+String.interpret(b)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function c(x,w){try{this._each(x,w)}catch(y){if(y!=$break){throw y}}return this}function r(z,y,x){var w=-z,A=[],B=this.toArray();if(z<1){return B}while((w+=z)<B.length){A.push(B.slice(w,w+z))}return A.collect(y,x)}function b(y,x){y=y||Prototype.K;var w=true;this.each(function(A,z){w=w&&!!y.call(x,A,z,this);if(!w){throw $break}},this);return w}function i(y,x){y=y||Prototype.K;var w=false;this.each(function(A,z){if(w=!!y.call(x,A,z,this)){throw $break}},this);return w}function j(y,x){y=y||Prototype.K;var w=[];this.each(function(A,z){w.push(y.call(x,A,z,this))},this);return w}function t(y,x){var w;this.each(function(A,z){if(y.call(x,A,z,this)){w=A;throw $break}},this);return w}function h(y,x){var w=[];this.each(function(A,z){if(y.call(x,A,z,this)){w.push(A)}},this);return w}function g(z,y,x){y=y||Prototype.K;var w=[];if(Object.isString(z)){z=new RegExp(RegExp.escape(z))}this.each(function(B,A){if(z.match(B)){w.push(y.call(x,B,A,this))}},this);return w}function a(w){if(Object.isFunction(this.indexOf)&&this.indexOf(w)!=-1){return true}var x=false;this.each(function(y){if(y==w){x=true;throw $break}});return x}function q(x,w){w=Object.isUndefined(w)?null:w;return this.eachSlice(x,function(y){while(y.length<x){y.push(w)}return y})}function l(w,y,x){this.each(function(A,z){w=y.call(x,w,A,z,this)},this);return w}function v(x){var w=$A(arguments).slice(1);return this.map(function(y){return y[x].apply(y,w)})}function p(y,x){y=y||Prototype.K;var w;this.each(function(A,z){A=y.call(x,A,z,this);if(w==null||A>=w){w=A}},this);return w}function n(y,x){y=y||Prototype.K;var w;this.each(function(A,z){A=y.call(x,A,z,this);if(w==null||A<w){w=A}},this);return w}function e(z,x){z=z||Prototype.K;var y=[],w=[];this.each(function(B,A){(z.call(x,B,A,this)?y:w).push(B)},this);return[y,w]}function f(x){var w=[];this.each(function(y){w.push(y[x])});return w}function d(y,x){var w=[];this.each(function(A,z){if(!y.call(x,A,z,this)){w.push(A)}},this);return w}function m(x,w){return this.map(function(z,y){return{value:z,criteria:x.call(w,z,y,this)}},this).sort(function(B,A){var z=B.criteria,y=A.criteria;return z<y?-1:z>y?1:0}).pluck("value")}function o(){return this.map()}function s(){var x=Prototype.K,w=$A(arguments);if(Object.isFunction(w.last())){x=w.pop()}var y=[this].concat(w).map($A);return this.map(function(A,z){return x(y.pluck(z))})}function k(){return this.toArray().length}function u(){return"#<Enumerable:"+this.toArray().inspect()+">"}return{each:c,eachSlice:r,all:b,every:b,any:i,some:i,collect:j,map:j,detect:t,findAll:h,select:h,filter:h,grep:g,include:a,member:a,inGroupsOf:q,inject:l,invoke:v,max:p,min:n,partition:e,pluck:f,reject:d,sortBy:m,toArray:o,entries:o,zip:s,size:k,inspect:u,find:t}})();function $A(c){if(!c){return[]}if("toArray" in Object(c)){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}function $w(a){if(!Object.isString(a)){return[]}a=a.strip();return a?a.split(/\s+/):[]}Array.from=$A;
1(function(){var x=Array.prototype,p=x.slice,r=x.forEach;function b(D,C){for(var B=0,E=this.length>>>0;B<E;B++){if(B in this){D.call(C,this[B],B,this)}}}if(!r){r=b}function o(){this.length=0;return this}function d(){return this[0]}function g(){return this[this.length-1]}function k(){return this.select(function(B){return B!=null})}function A(){return this.inject([],function(C,B){if(Object.isArray(B)){return C.concat(B.flatten())}C.push(B);return C})}function j(){var B=p.call(arguments,0);return this.select(function(C){return !B.include(C)})}function f(B){return(B===false?this.toArray():this)._reverse()}function n(B){return this.inject([],function(E,D,C){if(0==C||(B?E.last()!=D:!E.include(D))){E.push(D)}return E})}function s(B){return this.uniq().findAll(function(C){return B.indexOf(C)!==-1})}function v(){return p.call(this,0)}function l(){return this.length}function y(){return"["+this.map(Object.inspect).join(", ")+"]"}function a(E,C){if(this==null){throw new TypeError()}var F=Object(this),D=F.length>>>0;if(D===0){return -1}C=Number(C);if(isNaN(C)){C=0}else{if(C!==0&&isFinite(C)){C=(C>0?1:-1)*Math.floor(Math.abs(C))}}if(C>D){return -1}var B=C>=0?C:Math.max(D-Math.abs(C),0);for(;B<D;B++){if(B in F&&F[B]===E){return B}}return -1}function q(E,C){if(this==null){throw new TypeError()}var F=Object(this),D=F.length>>>0;if(D===0){return -1}if(!Object.isUndefined(C)){C=Number(C);if(isNaN(C)){C=0}else{if(C!==0&&isFinite(C)){C=(C>0?1:-1)*Math.floor(Math.abs(C))}}}else{C=D}var B=C>=0?Math.min(C,D-1):D-Math.abs(C);for(;B>=0;B--){if(B in F&&F[B]===E){return B}}return -1}function c(I){var G=[],H=p.call(arguments,0),J,C=0;H.unshift(this);for(var F=0,B=H.length;F<B;F++){J=H[F];if(Object.isArray(J)&&!("callee" in J)){for(var E=0,D=J.length;E<D;E++){if(E in J){G[C]=J[E]}C++}}else{G[C++]=J}}G.length=C;return G}function u(B){return function(){if(arguments.length===0){return B.call(this,Prototype.K)}else{if(arguments[0]===undefined){var C=p.call(arguments,1);C.unshift(Prototype.K);return B.apply(this,C)}else{return B.apply(this,arguments)}}}}function w(F){if(this==null){throw new TypeError()}F=F||Prototype.K;var B=Object(this);var E=[],D=arguments[1],H=0;for(var C=0,G=B.length>>>0;C<G;C++){if(C in B){E[H]=F.call(D,B[C],C,B)}H++}E.length=H;return E}if(x.map){w=u(Array.prototype.map)}function h(F){if(this==null||!Object.isFunction(F)){throw new TypeError()}var B=Object(this);var E=[],D=arguments[1],H;for(var C=0,G=B.length>>>0;C<G;C++){if(C in B){H=B[C];if(F.call(D,H,C,B)){E.push(H)}}}return E}if(x.filter){h=Array.prototype.filter}function i(E){if(this==null){throw new TypeError()}E=E||Prototype.K;var D=arguments[1];var B=Object(this);for(var C=0,F=B.length>>>0;C<F;C++){if(C in B&&E.call(D,B[C],C,B)){return true}}return false}if(x.some){var i=u(Array.prototype.some)}function z(E){if(this==null){throw new TypeError()}E=E||Prototype.K;var D=arguments[1];var B=Object(this);for(var C=0,F=B.length>>>0;C<F;C++){if(C in B&&!E.call(D,B[C],C,B)){return false}}return true}if(x.every){var z=u(Array.prototype.every)}var t=x.reduce;function m(B,D){D=D||Prototype.K;var C=arguments[2];return t.call(this,D.bind(C),B)}if(!x.reduce){var m=Enumerable.inject}Object.extend(x,Enumerable);if(!x._reverse){x._reverse=x.reverse}Object.extend(x,{_each:r,map:w,collect:w,select:h,filter:h,findAll:h,some:i,any:i,every:z,all:z,inject:m,clear:o,first:d,last:g,compact:k,flatten:A,without:j,reverse:f,uniq:n,intersect:s,clone:v,toArray:v,size:l,inspect:y});var e=(function(){return[].concat(arguments)[0][0]!==1})(1,2);if(e){x.concat=c}if(!x.indexOf){x.indexOf=a}if(!x.lastIndexOf){x.lastIndexOf=q}})();function $H(a){return new Hash(a)}var Hash=Class.create(Enumerable,(function(){function e(p){this._object=Object.isHash(p)?p.toObject():Object.clone(p)}function f(s,r){var q=0;for(var p in this._object){var t=this._object[p],u=[p,t];u.key=p;u.value=t;s.call(r,u,q);q++}}function j(p,q){return this._object[p]=q}function c(p){if(this._object[p]!==Object.prototype[p]){return this._object[p]}}function m(p){var q=this._object[p];delete this._object[p];return q}function o(){return Object.clone(this._object)}function n(){return this.pluck("key")}function l(){return this.pluck("value")}function g(q){var p=this.detect(function(r){return r.value===q});return p&&p.key}function i(p){return this.clone().update(p)}function d(p){return new Hash(p).inject(this,function(q,r){q.set(r.key,r.value);return q})}function b(p,q){if(Object.isUndefined(q)){return p}q=String.interpret(q);q=q.gsub(/(\r)?\n/,"\r\n");q=encodeURIComponent(q);q=q.gsub(/%20/,"+");return p+"="+q}function a(){return this.inject([],function(t,w){var s=encodeURIComponent(w.key),q=w.value;if(q&&typeof q=="object"){if(Object.isArray(q)){var v=[];for(var r=0,p=q.length,u;r<p;r++){u=q[r];v.push(b(s,u))}return t.concat(v)}}else{t.push(b(s,q))}return t}).join("&")}function k(){return"#<Hash:{"+this.map(function(p){return p.map(Object.inspect).join(": ")}).join(", ")+"}>"}function h(){return new Hash(this)}return{initialize:e,_each:f,set:j,get:c,unset:m,toObject:o,toTemplateReplacements:o,keys:n,values:l,index:g,merge:i,update:d,toQueryString:a,inspect:k,toJSON:o,clone:h}})());Hash.from=$H;Object.extend(Number.prototype,(function(){function d(){return this.toPaddedString(2,16)}function b(){return this+1}function h(j,i){$R(0,this,true).each(j,i);return this}function g(k,j){var i=this.toString(j||10);return"0".times(k-i.length)+i}function a(){return Math.abs(this)}function c(){return Math.round(this)}function e(){return Math.ceil(this)}function f(){return Math.floor(this)}return{toColorPart:d,succ:b,times:h,toPaddedString:g,abs:a,round:c,ceil:e,floor:f}})());function $R(c,a,b){return new ObjectRange(c,a,b)}var ObjectRange=Class.create(Enumerable,(function(){function b(f,d,e){this.start=f;this.end=d;this.exclusive=e}function c(f,e){var g=this.start,d;for(d=0;this.include(g);d++){f.call(e,g,d);g=g.succ()}}
1function a(d){if(d<this.start){return false}if(this.exclusive){return d<this.end}return d<=this.end}return{initialize:b,_each:c,include:a}})());var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(b,a){this.responders._each(b,a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(d,b,c,a){this.each(function(f){if(Object.isFunction(f[d])){try{f[d].apply(f,[b,c,a])}catch(g){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,a){$super(a);this.transport=Ajax.getTransport();this.request(b)},request:function(b){this.url=b;this.method=this.options.method;var d=Object.isString(this.options.parameters)?this.options.parameters:Object.toQueryString(this.options.parameters);if(!["get","post"].include(this.method)){d+=(d?"&":"")+"_method="+this.method;this.method="post"}if(d&&this.method==="get"){this.url+=(this.url.include("?")?"&":"?")+d}this.parameters=d.toQueryParams();try{var a=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(a)}Ajax.Responders.dispatch("onCreate",this,a);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||d):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(c){this.dispatchException(c)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var e={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){e["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){e.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders;if(Object.isFunction(c.push)){for(var b=0,d=c.length;b<d;b+=2){e[c[b]]=c[b+1]}}else{$H(c).each(function(f){e[f.key]=f.value})}}for(var a in e){if(e[a]!=null){this.transport.setRequestHeader(a,e[a])}}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300)||a==304},getStatus:function(){try{if(this.transport.status===1223){return 204}return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var c=Ajax.Request.Events[a],b=new Ajax.Response(this);if(c=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(d){this.dispatchException(d)}var f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+c]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+c,this,b,b.headerJSON)}catch(d){this.dispatchException(d)}if(c=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return !a||(a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});
1Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(c){this.request=c;var d=this.transport=c.transport,a=this.readyState=d.readyState;if((a>2&&!Prototype.Browser.IE)||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(d.responseText);this.headerJSON=this._getHeaderJSON()}if(a==4){var b=d.responseXML;this.responseXML=Object.isUndefined(b)?null:b;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a){return null}try{a=decodeURIComponent(escape(a))}catch(b){}try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,c,b){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};b=Object.clone(b);var d=b.onComplete;b.onComplete=(function(e,f){this.updateContent(e.responseText);if(Object.isFunction(d)){d(e,f)}}).bind(this);$super(c,b)},updateContent:function(d){var c=this.container[this.success()?"success":"failure"],a=this.options;if(!a.evalScripts){d=d.stripScripts()}if(c=$(c)){if(a.insertion){if(Object.isString(a.insertion)){var b={};b[a.insertion]=d;c.insert(b)}else{a.insertion(c,d)}}else{c.update(d)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,c,b){$super(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});(function(a8){var aE;var a1=Array.prototype.slice;var av=document.createElement("div");function aZ(bp){if(arguments.length>1){for(var F=0,br=[],bq=arguments.length;F<bq;F++){br.push(aZ(arguments[F]))}return br}if(Object.isString(bp)){bp=document.getElementById(bp)}return aF.extend(bp)}a8.$=aZ;if(!a8.Node){a8.Node={}}if(!a8.Node.ELEMENT_NODE){Object.extend(a8.Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}var r={};function aQ(F,i){if(F==="select"){return false}if("type" in i){return false}return true}var d=(function(){try{var i=document.createElement('<input name="x">');return i.tagName.toLowerCase()==="input"&&i.name==="x"}catch(F){return false}})();var aI=a8.Element;function aF(F,i){i=i||{};F=F.toLowerCase();if(d&&i.name){F="<"+F+' name="'+i.name+'">';delete i.name;return aF.writeAttribute(document.createElement(F),i)}if(!r[F]){r[F]=aF.extend(document.createElement(F))}var bp=aQ(F,i)?r[F].cloneNode(false):document.createElement(F);return aF.writeAttribute(bp,i)}a8.Element=aF;Object.extend(a8.Element,aI||{});if(aI){a8.Element.prototype=aI.prototype}aF.Methods={ByTag:{},Simulated:{}};var a3={};var H={id:"id",className:"class"};function ba(F){F=aZ(F);var i="<"+F.tagName.toLowerCase();var bp,br;for(var bq in H){bp=H[bq];br=(F[bq]||"").toString();if(br){i+=" "+bp+"="+br.inspect(true)}}return i+">"}a3.inspect=ba;function v(i){return aZ(i).style.display!=="none"}function ax(F,i){F=aZ(F);if(Object.isUndefined(i)){i=!aF.visible(F)}aF[i?"show":"hide"](F);return F}function aH(i){i=aZ(i);i.style.display="none";return i}function j(i){i=aZ(i);i.style.display="";return i}Object.extend(a3,{visible:v,toggle:ax,hide:aH,show:j});
1function ad(i){i=aZ(i);i.parentNode.removeChild(i);return i}var aT=(function(){var i=document.createElement("select"),F=true;i.innerHTML='<option value="test">test</option>';if(i.options&&i.options[0]){F=i.options[0].nodeName.toUpperCase()!=="OPTION"}i=null;return F})();var I=(function(){try{var i=document.createElement("table");if(i&&i.tBodies){i.innerHTML="<tbody><tr><td>test</td></tr></tbody>";var bp=typeof i.tBodies[0]=="undefined";i=null;return bp}}catch(F){return true}})();var a2=(function(){try{var i=document.createElement("div");i.innerHTML="<link />";var bp=(i.childNodes.length===0);i=null;return bp}catch(F){return true}})();var x=aT||I||a2;var aq=(function(){var i=document.createElement("script"),bp=false;try{i.appendChild(document.createTextNode(""));bp=!i.firstChild||i.firstChild&&i.firstChild.nodeType!==3}catch(F){bp=true}i=null;return bp})();function O(br,bt){br=aZ(br);var bu=br.getElementsByTagName("*"),bq=bu.length;while(bq--){Z(bu[bq])}if(bt&&bt.toElement){bt=bt.toElement()}if(Object.isElement(bt)){return br.update().insert(bt)}bt=Object.toHTML(bt);var bp=br.tagName.toUpperCase();if(bp==="SCRIPT"&&aq){br.text=bt;return br}if(x){if(bp in L.tags){while(br.firstChild){br.removeChild(br.firstChild)}var F=t(bp,bt.stripScripts());for(var bq=0,bs;bs=F[bq];bq++){br.appendChild(bs)}}else{if(a2&&Object.isString(bt)&&bt.indexOf("<link")>-1){while(br.firstChild){br.removeChild(br.firstChild)}var F=t(bp,bt.stripScripts(),true);for(var bq=0,bs;bs=F[bq];bq++){br.appendChild(bs)}}else{br.innerHTML=bt.stripScripts()}}}else{br.innerHTML=bt.stripScripts()}bt.evalScripts.bind(bt).defer();return br}function ah(F,bp){F=aZ(F);if(bp&&bp.toElement){bp=bp.toElement()}else{if(!Object.isElement(bp)){bp=Object.toHTML(bp);var i=F.ownerDocument.createRange();i.selectNode(F);bp.evalScripts.bind(bp).defer();bp=i.createContextualFragment(bp.stripScripts())}}F.parentNode.replaceChild(bp,F);return F}var L={before:function(i,F){i.parentNode.insertBefore(F,i)},top:function(i,F){i.insertBefore(F,i.firstChild)},bottom:function(i,F){i.appendChild(F)},after:function(i,F){i.parentNode.insertBefore(F,i.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};var aJ=L.tags;Object.extend(aJ,{THEAD:aJ.TBODY,TFOOT:aJ.TBODY,TH:aJ.TD});function ao(bp,bs){bp=aZ(bp);if(bs&&bs.toElement){bs=bs.toElement()}if(Object.isElement(bs)){bp.parentNode.replaceChild(bs,bp);return bp}bs=Object.toHTML(bs);var br=bp.parentNode,F=br.tagName.toUpperCase();if(F in L.tags){var bt=aF.next(bp);var i=t(F,bs.stripScripts());br.removeChild(bp);var bq;if(bt){bq=function(bu){br.insertBefore(bu,bt)}}else{bq=function(bu){br.appendChild(bu)}}i.each(bq)}else{bp.outerHTML=bs.stripScripts()}bs.evalScripts.bind(bs).defer();return bp}if("outerHTML" in document.documentElement){ah=ao}function a7(i){if(Object.isUndefined(i)||i===null){return false}if(Object.isString(i)||Object.isNumber(i)){return true}if(Object.isElement(i)){return true}if(i.toElement||i.toHTML){return true}return false}function bn(br,bt,F){F=F.toLowerCase();var bv=L[F];if(bt&&bt.toElement){bt=bt.toElement()}if(Object.isElement(bt)){bv(br,bt);return br}bt=Object.toHTML(bt);var bq=((F==="before"||F==="after")?br.parentNode:br).tagName.toUpperCase();var bu=t(bq,bt.stripScripts());if(F==="top"||F==="after"){bu.reverse()}for(var bp=0,bs;bs=bu[bp];bp++){bv(br,bs)}bt.evalScripts.bind(bt).defer()}function Q(F,bp){F=aZ(F);if(a7(bp)){bp={bottom:bp}}for(var i in bp){bn(F,bp[i],i)}return F}function u(F,bp,i){F=aZ(F);if(Object.isElement(bp)){aZ(bp).writeAttribute(i||{})}else{if(Object.isString(bp)){bp=new aF(bp,i)}else{bp=new aF("div",bp)}}if(F.parentNode){F.parentNode.replaceChild(bp,F)}bp.appendChild(F);return bp}function w(F){F=aZ(F);var bp=F.firstChild;while(bp){var i=bp.nextSibling;if(bp.nodeType===Node.TEXT_NODE&&!/\S/.test(bp.nodeValue)){F.removeChild(bp)}bp=i}return F}function a4(i){return aZ(i).innerHTML.blank()}function t(bs,br,bt){var bq=L.tags[bs],bu=av;var F=!!bq;if(!F&&bt){F=true;bq=["","",0]}if(F){bu.innerHTML=" "+bq[0]+br+bq[1];bu.removeChild(bu.firstChild);for(var bp=bq[2];bp--;){bu=bu.firstChild}}else{bu.innerHTML=br}return $A(bu.childNodes)}function E(bq,F){if(!(bq=aZ(bq))){return}var bs=bq.cloneNode(F);if(!aY){bs._prototypeUID=aE;if(F){var br=aF.select(bs,"*"),bp=br.length;while(bp--){br[bp]._prototypeUID=aE}}}return aF.extend(bs)}function Z(F){var i=M(F);if(i){aF.stopObserving(F);if(!aY){F._prototypeUID=aE}delete aF.Storage[i]}}function bl(bp){var F=bp.length;while(F--){Z(bp[F])}}function at(br){var bq=br.length,bp,F;while(bq--){bp=br[bq];F=M(bp);delete aF.Storage[F];delete Event.cache[F]}}
1if(aY){bl=at}function m(bp){if(!(bp=aZ(bp))){return}Z(bp);var bq=bp.getElementsByTagName("*"),F=bq.length;while(F--){Z(bq[F])}return null}Object.extend(a3,{remove:ad,update:O,replace:ah,insert:Q,wrap:u,cleanWhitespace:w,empty:a4,clone:E,purge:m});function am(i,bp,bq){i=aZ(i);bq=bq||-1;var F=[];while(i=i[bp]){if(i.nodeType===Node.ELEMENT_NODE){F.push(aF.extend(i))}if(F.length===bq){break}}return F}function aL(i){return am(i,"parentNode")}function bm(i){return aF.select(i,"*")}function X(i){i=aZ(i).firstChild;while(i&&i.nodeType!==Node.ELEMENT_NODE){i=i.nextSibling}return aZ(i)}function bi(F){var i=[],bp=aZ(F).firstChild;while(bp){if(bp.nodeType===Node.ELEMENT_NODE){i.push(aF.extend(bp))}bp=bp.nextSibling}return i}function p(i){return am(i,"previousSibling")}function bh(i){return am(i,"nextSibling")}function aV(i){i=aZ(i);var bp=p(i),F=bh(i);return bp.reverse().concat(F)}function aR(F,i){F=aZ(F);if(Object.isString(i)){return Prototype.Selector.match(F,i)}return i.match(F)}function aW(F,bp,bq,i){F=aZ(F),bq=bq||0,i=i||0;if(Object.isNumber(bq)){i=bq,bq=null}while(F=F[bp]){if(F.nodeType!==1){continue}if(bq&&!Prototype.Selector.match(F,bq)){continue}if(--i>=0){continue}return aF.extend(F)}}function aa(F,bp,i){F=aZ(F);if(arguments.length===1){return aZ(F.parentNode)}return aW(F,"parentNode",bp,i)}function y(F,bq,i){if(arguments.length===1){return X(F)}F=aZ(F),bq=bq||0,i=i||0;if(Object.isNumber(bq)){i=bq,bq="*"}var bp=Prototype.Selector.select(bq,F)[i];return aF.extend(bp)}function h(F,bp,i){return aW(F,"previousSibling",bp,i)}function aB(F,bp,i){return aW(F,"nextSibling",bp,i)}function bb(i){i=aZ(i);var F=a1.call(arguments,1).join(", ");return Prototype.Selector.select(F,i)}function aD(bq){bq=aZ(bq);var bs=a1.call(arguments,1).join(", ");var bt=aF.siblings(bq),bp=[];for(var F=0,br;br=bt[F];F++){if(Prototype.Selector.match(br,bs)){bp.push(br)}}return bp}function D(F,i){F=aZ(F),i=aZ(i);while(F=F.parentNode){if(F===i){return true}}return false}function B(F,i){F=aZ(F),i=aZ(i);if(!i.contains){return D(F,i)}return i.contains(F)&&i!==F}function J(F,i){F=aZ(F),i=aZ(i);return(F.compareDocumentPosition(i)&8)===8}var aM;if(av.compareDocumentPosition){aM=J}else{if(av.contains){aM=B}else{aM=D}}Object.extend(a3,{recursivelyCollect:am,ancestors:aL,descendants:bm,firstDescendant:X,immediateDescendants:bi,previousSiblings:p,nextSiblings:bh,siblings:aV,match:aR,up:aa,down:y,previous:h,next:aB,select:bb,adjacent:aD,descendantOf:aM,getElementsBySelector:bb,childElements:bi});var T=1;function aU(i){i=aZ(i);var F=aF.readAttribute(i,"id");if(F){return F}do{F="anonymous_element_"+T++}while(aZ(F));aF.writeAttribute(i,"id",F);return F}function a9(F,i){return aZ(F).getAttribute(i)}function K(F,i){F=aZ(F);var bp=aG.read;if(bp.values[i]){return bp.values[i](F,i)}if(bp.names[i]){i=bp.names[i]}if(i.include(":")){if(!F.attributes||!F.attributes[i]){return null}return F.attributes[i].value}return F.getAttribute(i)}function e(F,i){if(i==="title"){return F.title}return F.getAttribute(i)}var U=(function(){av.setAttribute("onclick",[]);var i=av.getAttribute("onclick");var F=Object.isArray(i);av.removeAttribute("onclick");return F})();if(U){a9=K}else{if(Prototype.Browser.Opera){a9=e}}function a0(bq,bp,bs){bq=aZ(bq);var F={},br=aG.write;if(typeof bp==="object"){F=bp}else{F[bp]=Object.isUndefined(bs)?true:bs}for(var i in F){bp=br.names[i]||i;bs=F[i];if(br.values[i]){bp=br.values[i](bq,bs)||bp}if(bs===false||bs===null){bq.removeAttribute(bp)}else{if(bs===true){bq.setAttribute(bp,bp)}else{bq.setAttribute(bp,bs)}}}return bq}var a=(function(){if(!d){return false}var F=document.createElement('<input type="checkbox">');F.checked=true;var i=F.getAttributeNode("checked");return !i||!i.specified})();function Y(i,bp){bp=aG.has[bp]||bp;var F=aZ(i).getAttributeNode(bp);return !!(F&&F.specified)}function bg(i,F){if(F==="checked"){return i.checked}return Y(i,F)}a8.Element.Methods.Simulated.hasAttribute=a?bg:Y;function k(i){return new aF.ClassNames(i)}var V={};function f(F){if(V[F]){return V[F]}var i=new RegExp("(^|\\s+)"+F+"(\\s+|$)");V[F]=i;return i}function al(i,F){if(!(i=aZ(i))){return}var bp=i.className;if(bp.length===0){return false}if(bp===F){return true}return f(F).test(bp)}function o(i,F){if(!(i=aZ(i))){return}if(!al(i,F)){i.className+=(i.className?" ":"")+F}return i}function au(i,F){if(!(i=aZ(i))){return}i.className=i.className.replace(f(F)," ").strip();return i}function ae(F,bp,i){if(!(F=aZ(F))){return}if(Object.isUndefined(i)){i=!al(F,bp)}var bq=aF[i?"addClassName":"removeClassName"];return bq(F,bp)}var aG={};var aP="className",ar="for";av.setAttribute(aP,"x");
1if(av.className!=="x"){av.setAttribute("class","x");if(av.className==="x"){aP="class"}}var aK=document.createElement("label");aK.setAttribute(ar,"x");if(aK.htmlFor!=="x"){aK.setAttribute("htmlFor","x");if(aK.htmlFor==="x"){ar="htmlFor"}}aK=null;function ac(i,F){return i.getAttribute(F)}function g(i,F){return i.getAttribute(F,2)}function A(i,bp){var F=i.getAttributeNode(bp);return F?F.value:""}function bj(i,F){return aZ(i).hasAttribute(F)?F:null}av.onclick=Prototype.emptyFunction;var P=av.getAttribute("onclick");var aw;if(String(P).indexOf("{")>-1){aw=function(i,F){var bp=i.getAttribute(F);if(!bp){return null}bp=bp.toString();bp=bp.split("{")[1];bp=bp.split("}")[0];return bp.strip()}}else{if(P===""){aw=function(i,F){var bp=i.getAttribute(F);if(!bp){return null}return bp.strip()}}}aG.read={names:{"class":aP,className:aP,"for":ar,htmlFor:ar},values:{style:function(i){return i.style.cssText.toLowerCase()},title:function(i){return i.title}}};aG.write={names:{className:"class",htmlFor:"for",cellpadding:"cellPadding",cellspacing:"cellSpacing"},values:{checked:function(i,F){i.checked=!!F},style:function(i,F){i.style.cssText=F?F:""}}};aG.has={names:{}};Object.extend(aG.write.names,aG.read.names);var a6=$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder");for(var af=0,ag;ag=a6[af];af++){aG.write.names[ag.toLowerCase()]=ag;aG.has.names[ag.toLowerCase()]=ag}Object.extend(aG.read.values,{href:g,src:g,type:ac,action:A,disabled:bj,checked:bj,readonly:bj,multiple:bj,onload:aw,onunload:aw,onclick:aw,ondblclick:aw,onmousedown:aw,onmouseup:aw,onmouseover:aw,onmousemove:aw,onmouseout:aw,onfocus:aw,onblur:aw,onkeypress:aw,onkeydown:aw,onkeyup:aw,onsubmit:aw,onreset:aw,onselect:aw,onchange:aw});Object.extend(a3,{identify:aU,readAttribute:a9,writeAttribute:a0,classNames:k,hasClassName:al,addClassName:o,removeClassName:au,toggleClassName:ae});function W(i){if(i==="float"||i==="styleFloat"){return"cssFloat"}return i.camelize()}function bo(i){if(i==="float"||i==="cssFloat"){return"styleFloat"}return i.camelize()}function C(bp,bq){bp=aZ(bp);var bt=bp.style,F;if(Object.isString(bq)){bt.cssText+=";"+bq;if(bq.include("opacity")){var i=bq.match(/opacity:\s*(\d?\.?\d*)/)[1];aF.setOpacity(bp,i)}return bp}for(var bs in bq){if(bs==="opacity"){aF.setOpacity(bp,bq[bs])}else{var br=bq[bs];if(bs==="float"||bs==="cssFloat"){bs=Object.isUndefined(bt.styleFloat)?"cssFloat":"styleFloat"}bt[bs]=br}}return bp}function aO(F,bp){F=aZ(F);bp=W(bp);var bq=F.style[bp];if(!bq||bq==="auto"){var i=document.defaultView.getComputedStyle(F,null);bq=i?i[bp]:null}if(bp==="opacity"){return bq?parseFloat(bq):1}return bq==="auto"?null:bq}function s(i,F){switch(F){case"height":case"width":if(!aF.visible(i)){return null}var bp=parseInt(aO(i,F),10);if(bp!==i["offset"+F.capitalize()]){return bp+"px"}return aF.measure(i,F);default:return aO(i,F)}}function aj(i,F){i=aZ(i);F=bo(F);var bp=i.style[F];if(!bp&&i.currentStyle){bp=i.currentStyle[F]}if(F==="opacity"&&!N){return be(i)}if(bp==="auto"){if((F==="width"||F==="height")&&aF.visible(i)){return aF.measure(i,F)+"px"}return null}return bp}function aA(i){return(i||"").replace(/alpha\([^\)]*\)/gi,"")}function ab(i){if(!i.currentStyle||!i.currentStyle.hasLayout){i.style.zoom=1}return i}var N=(function(){av.style.cssText="opacity:.55";return/^0.55/.test(av.style.opacity)})();function z(i,F){i=aZ(i);if(F==1||F===""){F=""}else{if(F<0.00001){F=0}}i.style.opacity=F;return i}function bf(i,bq){if(N){return z(i,bq)}i=ab(aZ(i));var bp=aF.getStyle(i,"filter"),F=i.style;if(bq==1||bq===""){bp=aA(bp);if(bp){F.filter=bp}else{F.removeAttribute("filter")}return i}if(bq<0.00001){bq=0}F.filter=aA(bp)+"alpha(opacity="+(bq*100)+")";return i}function bd(i){return aF.getStyle(i,"opacity")}function be(F){if(N){return bd(F)}var bp=aF.getStyle(F,"filter");if(bp.length===0){return 1}var i=(bp||"").match(/alpha\(opacity=(.*)\)/);if(i&&i[1]){return parseFloat(i[1])/100}return 1}Object.extend(a3,{setStyle:C,getStyle:aO,setOpacity:z,getOpacity:bd});if("styleFloat" in av.style){a3.getStyle=aj;a3.setOpacity=bf;a3.getOpacity=be}var l=0;a8.Element.Storage={UID:1};function M(i){if(i===window){return 0}if(typeof i._prototypeUID==="undefined"){i._prototypeUID=aF.Storage.UID++}return i._prototypeUID}
1function c(i){if(i===window){return 0}if(i==document){return 1}return i.uniqueID}var aY=("uniqueID" in av);if(aY){M=c}function b(F){if(!(F=aZ(F))){return}var i=M(F);if(!aF.Storage[i]){aF.Storage[i]=$H()}return aF.Storage[i]}function a5(F,i,bp){if(!(F=aZ(F))){return}var bq=b(F);if(arguments.length===2){bq.update(i)}else{bq.set(i,bp)}return F}function aN(bp,F,i){if(!(bp=aZ(bp))){return}var br=b(bp),bq=br.get(F);if(Object.isUndefined(bq)){br.set(F,i);bq=i}return bq}Object.extend(a3,{getStorage:b,store:a5,retrieve:aN});var an={},aX=aF.Methods.ByTag,aC=Prototype.BrowserFeatures;if(!aC.ElementExtensions&&("__proto__" in av)){a8.HTMLElement={};a8.HTMLElement.prototype=av.__proto__;aC.ElementExtensions=true}function bc(i){if(typeof window.Element==="undefined"){return false}if(!d){return false}var bp=window.Element.prototype;if(bp){var br="_"+(Math.random()+"").slice(2),F=document.createElement(i);bp[br]="x";var bq=(F[br]!=="x");delete bp[br];F=null;return bq}return false}var ap=bc("object");function ak(F,i){for(var bq in i){var bp=i[bq];if(Object.isFunction(bp)&&!(bq in F)){F[bq]=bp.methodize()}}}var bk={};function ay(F){var i=M(F);return(i in bk)}function az(bp){if(!bp||ay(bp)){return bp}if(bp.nodeType!==Node.ELEMENT_NODE||bp==window){return bp}var i=Object.clone(an),F=bp.tagName.toUpperCase();if(aX[F]){Object.extend(i,aX[F])}ak(bp,i);bk[M(bp)]=true;return bp}function aS(F){if(!F||ay(F)){return F}var i=F.tagName;if(i&&(/^(?:object|applet|embed)$/i.test(i))){ak(F,aF.Methods);ak(F,aF.Methods.Simulated);ak(F,aF.Methods.ByTag[i.toUpperCase()])}return F}if(aC.SpecificElementExtensions){az=ap?aS:Prototype.K}function S(F,i){F=F.toUpperCase();if(!aX[F]){aX[F]={}}Object.extend(aX[F],i)}function q(F,bp,i){if(Object.isUndefined(i)){i=false}for(var br in bp){var bq=bp[br];if(!Object.isFunction(bq)){continue}if(!i||!(br in F)){F[br]=bq.methodize()}}}function ai(bq){var i;var bp={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(bp[bq]){i="HTML"+bp[bq]+"Element"}if(window[i]){return window[i]}i="HTML"+bq+"Element";if(window[i]){return window[i]}i="HTML"+bq.capitalize()+"Element";if(window[i]){return window[i]}var F=document.createElement(bq),br=F.__proto__||F.constructor.prototype;F=null;return br}function R(br){if(arguments.length===0){G()}if(arguments.length===2){var bt=br;br=arguments[1]}if(!bt){Object.extend(aF.Methods,br||{})}else{if(Object.isArray(bt)){for(var bs=0,bq;bq=bt[bs];bs++){S(bq,br)}}else{S(bt,br)}}var bp=window.HTMLElement?HTMLElement.prototype:aF.prototype;if(aC.ElementExtensions){q(bp,aF.Methods);q(bp,aF.Methods.Simulated,true)}if(aC.SpecificElementExtensions){for(var bq in aF.Methods.ByTag){var F=ai(bq);if(Object.isUndefined(F)){continue}q(F.prototype,aX[bq])}}Object.extend(aF,aF.Methods);Object.extend(aF,aF.Methods.Simulated);delete aF.ByTag;delete aF.Simulated;aF.extend.refresh();r={}}Object.extend(a8.Element,{extend:az,addMethods:R});if(az===Prototype.K){a8.Element.extend.refresh=Prototype.emptyFunction}else{a8.Element.extend.refresh=function(){if(Prototype.BrowserFeatures.ElementExtensions){return}Object.extend(an,aF.Methods);Object.extend(an,aF.Methods.Simulated);bk={}}}function G(){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(aF.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods),BUTTON:Object.clone(Form.Element.Methods)})}aF.addMethods(a3);function n(){av=null;r=null}if(window.attachEvent){window.attachEvent("onunload",n)}})(this);(function(){function k(G){var F=G.match(/^(\d+)%?$/i);if(!F){return null}return(Number(F[1])/100)}function y(G,H){G=$(G);var I=G.style[H];if(!I||I==="auto"){var F=document.defaultView.getComputedStyle(G,null);I=F?F[H]:null}if(H==="opacity"){return I?parseFloat(I):1}return I==="auto"?null:I}function B(F,G){var H=F.style[G];if(!H&&F.currentStyle){H=F.currentStyle[G]}return H}function r(H,G){var J=H.offsetWidth;
1var L=u(H,"borderLeftWidth",G)||0;var F=u(H,"borderRightWidth",G)||0;var I=u(H,"paddingLeft",G)||0;var K=u(H,"paddingRight",G)||0;return J-L-F-I-K}if("currentStyle" in document.documentElement){y=B}function u(P,Q,G){var J=null;if(Object.isElement(P)){J=P;P=y(J,Q)}if(P===null||Object.isUndefined(P)){return null}if((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(P)){return window.parseFloat(P)}var K=P.include("%"),H=(G===document.viewport);if(/\d/.test(P)&&J&&J.runtimeStyle&&!(K&&H)){var F=J.style.left,O=J.runtimeStyle.left;J.runtimeStyle.left=J.currentStyle.left;J.style.left=P||0;P=J.style.pixelLeft;J.style.left=F;J.runtimeStyle.left=O;return P}if(J&&K){G=G||J.parentNode;var I=k(P),L=null;var N=Q.include("left")||Q.include("right")||Q.include("width");var M=Q.include("top")||Q.include("bottom")||Q.include("height");if(G===document.viewport){if(N){L=document.viewport.getWidth()}else{if(M){L=document.viewport.getHeight()}}}else{if(N){L=$(G).measure("width")}else{if(M){L=$(G).measure("height")}}}return(L===null)?0:L*I}return 0}function j(F){if(Object.isString(F)&&F.endsWith("px")){return F}return F+"px"}function m(F){while(F&&F.parentNode){var G=F.getStyle("display");if(G==="none"){return false}F=$(F.parentNode)}return true}var g=Prototype.K;if("currentStyle" in document.documentElement){g=function(F){if(!F.currentStyle.hasLayout){F.style.zoom=1}return F}}function i(F){if(F.include("border")){F=F+"-width"}return F.camelize()}Element.Layout=Class.create(Hash,{initialize:function($super,G,F){$super();this.element=$(G);Element.Layout.PROPERTIES.each(function(H){this._set(H,null)},this);if(F){this._preComputing=true;this._begin();Element.Layout.PROPERTIES.each(this._compute,this);this._end();this._preComputing=false}},_set:function(G,F){return Hash.prototype.set.call(this,G,F)},set:function(G,F){throw"Properties of Element.Layout are read-only."},get:function($super,G){var F=$super(G);return F===null?this._compute(G):F},_begin:function(){if(this._isPrepared()){return}var J=this.element;if(m(J)){this._setPrepared(true);return}var L={position:J.style.position||"",width:J.style.width||"",visibility:J.style.visibility||"",dis
1play:J.style.display||""};J.store("prototype_original_styles",L);var M=y(J,"position"),F=J.offsetWidth;if(F===0||F===null){J.style.display="block";F=J.offsetWidth}var G=(M==="fixed")?document.viewport:J.parentNode;var N={visibility:"hidden",display:"block"};if(M!=="fixed"){N.position="absolute"}J.setStyle(N);var H=J.offsetWidth,I;if(F&&(H===F)){I=r(J,G)}else{if(M==="absolute"||M==="fixed"){I=r(J,G)}else{var O=J.parentNode,K=$(O).getLayout();I=K.get("width")-this.get("margin-left")-this.get("border-left")-this.get("padding-left")-this.get("padding-right")-this.get("border-right")-this.get("margin-right")}}J.setStyle({width:I+"px"});this._setPrepared(true)},_end:function(){var G=this.element;var F=G.retrieve("prototype_original_styles");G.store("prototype_original_styles",null);G.setStyle(F);this._setPrepared(false)},_compute:function(G){var F=Element.Layout.COMPUTATIONS;if(!(G in F)){throw"Property not found."}return this._set(G,F[G].call(this,this.element))},_isPrepared:function(){return this.element.retrieve("prototype_element_layout_prepared",false)},_setPrepared:function(F){return this.element.store("prototype_element_layout_prepared",F)},toObject:function(){var F=$A(arguments);var G=(F.length===0)?Element.Layout.PROPERTIES:F.join(" ").split(" ");var H={};G.each(function(I){if(!Element.Layout.PROPERTIES.include(I)){return}var J=this.get(I);if(J!=null){H[I]=J}},this);return H},toHash:function(){var F=this.toObject.apply(this,arguments);return new Hash(F)},toCSS:function(){var F=$A(arguments);var H=(F.length===0)?Element.Layout.PROPERTIES:F.join(" ").split(" ");var G={};H.each(function(I){if(!Element.Layout.PROPERTIES.include(I)){return}if(Element.Layout.COMPOSITE_PROPERTIES.include(I)){return}var J=this.get(I);if(J!=null){G[i(I)]=J+"px"}},this);return G},inspect:function(){return"#<Element.Layout>"}});Object.extend(Element.Layout,{PROPERTIES:$w("height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height"),COMPOSITE_PROPERTIES:$w("padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height"),COMPUTATIONS:{height:function(H){if(!this._preComputing){this._begin()}var F=this.get("border-box-height");if(F<=0){if(!this._preComputing){this._end()}return 0}var I=this.get("border-top"),G=this.get("border-bottom");var K=this.get("padding-top"),J=this.get("padding-bottom");if(!this._preComputing){this._end()}return F-I-G-K-J},width:function(H){if(!this._preComputing){this._begin()}var G=this.get("border-box-width");if(G<=0){if(!this._preComputing){this._end()}return 0}var K=this.get("border-left"),F=this.get("border-right");var I=this.get("padding-left"),J=this.get("padding-right");if(!this._preComputing){this._end()}return G-K-F-I-J},"padding-box-height":function(G){var F=this.get("height"),I=this.get("padding-top"),H=this.get("padding-bottom");return F+I+H},"padding-box-width":function(F){var G=this.get("width"),H=this.get("padding-left"),I=this.get("padding-right");return G+H+I},"border-box-height":function(G){if(!this._preComputing){this._begin()}var F=G.offsetHeight;if(!this._preComputing){this._end()}return F},"border-box-width":function(F){if(!this._preComputing){this._begin()}var G=F.offsetWidth;if(!this._preComputing){this._end()}return G},"margin-box-height":function(G){var F=this.get("border-box-height"),H=this.get("margin-top"),I=this.get("margin-bottom");if(F<=0){return 0}return F+H+I},"margin-box-width":function(H){var G=this.get("border-box-width"),I=this.get("margin-left"),F=this.get("margin-right");if(G<=0){return 0}return G+I+F},top:function(F){var G=F.positionedOffset();return G.top},bottom:function(F){var I=F.positionedOffset(),G=F.getOffsetParent(),H=G.measure("height");var J=this.get("border-box-height");return H-J-I.top},left:function(F){var G=F.positionedOffset();return G.left},right:function(H){var J=H.positionedOffset(),I=H.getOffsetParent(),F=I.measure("width");var G=this.get("border-box-width");return F-G-J.left},"padding-top":function(F){return u(F,"paddingTop")},"padding-bottom":function(F){return u(F,"paddingBottom")},"padding-left":function(F){return u(F,"paddingLeft")},"padding-right":function(F){return u(F,"paddingRight")},"border-top":function(F){return u(F,"borderTopWidth")},"border-bottom":function(F){return u(F,"borderBottomWidth")},"border-left":function(F){return u(F,"borderLeftWidth")},"border-right":function(F){return u(F,"borderRightWidth")},"margin-top":function(F){return u(F,"marginTop")},"margin-bottom":function(F){return u(F,"marginBottom")},"margin-left":function(F){return u(F,"marginLeft")},"margin-right":function(F){return u(F,"marginRight")}}});if("getBoundingClientRect" in document.documentElement){Object.extend(Element.Layout.COMPUTATIONS,{right:function(G){var H=g(G.getOffsetParent());var I=G.getBoundingClientRect(),F=H.getBoundingClientRect();return(F.right-I.right).round()},bottom:function(G){var H=g(G.getOffsetParent());var I=G.getBoundingClientRect(),F=H.getBoundingClientRect();return(F.bottom-I.bottom).round()}})}Element.Offset=Class.create({initialize:function(G,F){this.left=G.round();this.top=F.round();this[0]=this.left;this[1]=this.top},relativeTo:function(F){return new Element.Offset(this.left-F.left,this.top-F.top)},inspect:function(){return"#<Element.Offset left: #{left} top: #{top}>".interpolate(this)},toString:function(){return"[#{left}, #{top}]".interpolate(this)},toArray:function(){return[this.left,this.top]}});function z(G,F){return new Element.Layout(G,F)}function d(F,G){return $(F).getLayout().get(G)}function q(F){return Element.getDimensions(F).height}function c(F){return Element.getDimensions(F).width}function s(G){G=$(G);var K=Element.getStyle(G,"display");if(K&&K!=="none"){return{width:G.offsetWidth,height:G.offsetHeight}}var H=G.style;var F={visibility:H.visibility,position:H.position,display:H.display};var J={visibility:"hidden",display:"block"};if(F.position!=="fixed"){J.position="absolute"}Element.setStyle(G,J);var I={width:G.offsetWidth,height:G.offsetHeight};Element.setStyle(G,F);return I}
1function p(F){F=$(F);if(h(F)||f(F)||o(F)||n(F)){return $(document.body)}var G=(Element.getStyle(F,"display")==="inline");if(!G&&F.offsetParent){return $(F.offsetParent)}while((F=F.parentNode)&&F!==document.body){if(Element.getStyle(F,"position")!=="static"){return n(F)?$(document.body):$(F)}}return $(document.body)}function C(G){G=$(G);var F=0,H=0;if(G.parentNode){do{F+=G.offsetTop||0;H+=G.offsetLeft||0;G=G.offsetParent}while(G)}return new Element.Offset(H,F)}function w(G){G=$(G);var H=G.getLayout();var F=0,J=0;do{F+=G.offsetTop||0;J+=G.offsetLeft||0;G=G.offsetParent;if(G){if(o(G)){break}var I=Element.getStyle(G,"position");if(I!=="static"){break}}}while(G);J-=H.get("margin-top");F-=H.get("margin-left");return new Element.Offset(J,F)}function b(G){var F=0,H=0;do{if(G===document.body){var I=document.documentElement||document.body.parentNode||document.body;F+=!Object.isUndefined(window.pageYOffset)?window.pageYOffset:I.scrollTop||0;H+=!Object.isUndefined(window.pageXOffset)?window.pageXOffset:I.scrollLeft||0;break}else{F+=G.scrollTop||0;H+=G.scrollLeft||0;G=G.parentNode}}while(G);return new Element.Offset(H,F)}function A(J){var F=0,I=0,H=document.body;J=$(J);var G=J;do{F+=G.offsetTop||0;I+=G.offsetLeft||0;if(G.offsetParent==H&&Element.getStyle(G,"position")=="absolute"){break}}while(G=G.offsetParent);G=J;do{if(G!=H){F-=G.scrollTop||0;I-=G.scrollLeft||0}}while(G=G.parentNode);return new Element.Offset(I,F)}function x(F){F=$(F);if(Element.getStyle(F,"position")==="absolute"){return F}var J=p(F);var I=F.viewportOffset(),G=J.viewportOffset();var K=I.relativeTo(G);var H=F.getLayout();F.store("prototype_absolutize_original_styles",{position:F.getStyle("position"),left:F.getStyle("left"),top:F.getStyle("top"),width:F.getStyle("width"),height:F.getStyle("height")});F.setStyle({position:"absolute",top:K.top+"px",left:K.left+"px",width:H.get("width")+"px",height:H.get("height")+"px"});return F}function l(G){G=$(G);if(Element.getStyle(G,"position")==="relative"){return G}var F=G.retrieve("prototype_absolutize_original_styles");if(F){G.setStyle(F)}return G}function a(F){F=$(F);var G=Element.cumulativeOffset(F);window.scrollTo(G.left,G.top);return F}function v(G){G=$(G);var F=Element.getStyle(G,"position"),H={};if(F==="static"||!F){H.position="relative";if(Prototype.Browser.Opera){H.top=0;H.left=0}Element.setStyle(G,H);Element.store(G,"prototype_made_positioned",true)}return G}function t(F){F=$(F);var H=Element.getStorage(F),G=H.get("prototype_made_positioned");if(G){H.unset("prototype_made_positioned");Element.setStyle(F,{position:"",top:"",bottom:"",left:"",right:""})}return F}function e(G){G=$(G);var I=Element.getStorage(G),F=I.get("prototype_made_clipping");if(Object.isUndefined(F)){var H=Element.getStyle(G,"overflow");I.set("prototype_made_clipping",H);if(H!=="hidden"){G.style.overflow="hidden"}}return G}function D(F){F=$(F);var H=Element.getStorage(F),G=H.get("prototype_made_clipping");if(!Object.isUndefined(G)){H.unset("prototype_made_clipping");F.style.overflow=G||""}return F}function E(G,K,F){F=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},F||{});K=$(K);G=$(G);var L,M,J,I={};if(F.setLeft||F.setTop){L=Element.viewportOffset(K);M=[0,0];if(Element.getStyle(G,"position")==="absolute"){var H=Element.getOffsetParent(G);if(H!==document.body){M=Element.viewportOffset(H)}}}if(F.setWidth||F.setHeight){J=Element.getLayout(K)}if(F.setLeft){I.left=(L[0]-M[0]+F.offsetLeft)+"px"}if(F.setTop){I.top=(L[1]-M[1]+F.offsetTop)+"px"}if(F.setWidth){I.width=J.get("border-box-width")+"px"}if(F.setHeight){I.height=J.get("border-box-height")+"px"}return Element.setStyle(G,I)}if(Prototype.Browser.IE){p=p.wrap(function(H,G){G=$(G);if(h(G)||f(G)||o(G)||n(G)){return $(document.body)}var F=G.getStyle("position");if(F!=="static"){return H(G)}G.setStyle({position:"relative"});var I=H(G);G.setStyle({position:F});return I});w=w.wrap(function(I,G){G=$(G);if(!G.parentNode){return new Element.Offset(0,0)}var F=G.getStyle("position");if(F!=="static"){return I(G)}var H=G.getOffsetParent();if(H&&H.getStyle("position")==="fixed"){g(H)}G.setStyle({position:"relative"});var J=I(G);G.setStyle({position:F});return J})}else{if(Prototype.Browser.Webkit){C=function(G){G=$(G);var F=0,H=0;do{F+=G.offsetTop||0;H+=G.offsetLeft||0;if(G.offsetParent==document.body){if(Element.getStyle(G,"position")=="absolute"){break}}G=G.offsetParent}while(G);return new Element.Offset(H,F)}}}Element.addMethods({getLayout:z,measure:d,getWidth:c,getHeight:q,getDimensions:s,getOffsetParent:p,cumulativeOffset:C,positionedOffset:w,cumulativeScrollOffset:b,viewportOffset:A,absolutize:x,relativize:l,scrollTo:a,makePositioned:v,undoPositioned:t,makeClipping:e,undoClipping:D,clonePosition:E});function o(F){return F.nodeName.toUpperCase()==="BODY"}function n(F){return F.nodeName.toUpperCase()==="HTML"}function h(F){return F.nodeType===Node.DOCUMENT_NODE}function f(F){return F!==document.body&&!Element.descendantOf(F,document.body)}if("getBoundingClientRect" in document.documentElement){Element.addMethods({viewportOffset:function(F){F=$(F);if(f(F)){return new Element.Offset(0,0)}var G=F.getBoundingClientRect(),H=document.documentElement;return new Element.Offset(G.left-H.clientLeft,G.top-H.clientTop)}})}})();(function(){var c=Prototype.Browser.Opera&&(window.parseFloat(window.opera.version())<9.5);var f=null;function b(){if(f){return f}f=c?document.body:document.documentElement;return f}function d(){return{width:this.getWidth(),height:this.getHeight()}}function a(){return b().clientWidth}function g(){return b().clientHeight}function e(){var h=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;var i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;return new Element.Offset(h,i)}document.viewport={getDimensions:d,getWidth:a,getHeight:g,getScrollOffsets:e}})();window.$$=function(){var a=$A(arguments).join(", ");return Prototype.Selector.select(a,document)};Prototype.Selector=(function(){function a(){throw new Error('Method "Prototype.Selector.select" must be defined.')}function c(){throw new Error('Method "Prototype.Selector.match" must be defined.')}function d(l,m,h){h=h||0;var g=Prototype.Selector.match,k=l.length,f=0,j;for(j=0;j<k;j++){if(g(l[j],m)&&h==f++){return Element.extend(l[j])}}}function e(h){for(var f=0,g=h.length;f<g;f++){Element.extend(h[f])}return h}var b=Prototype.K;return{select:a,match:c,find:d,extendElements:(Element.extend===b)?b:e,extendElement:Element.extend}})();Prototype._original_property=window.Sizzle; 2/*! 3 * Sizzle CSS Selector Engine v@VERSION 4 * http://sizzlejs.com/ 5 * 6 * Copyright 2013 jQuery Foundation, Inc. and other contributors 7 * Released under the MIT license 8 * http://jquery.org/license 9 * 10 * Date: @DATE 11 */ 12(function(av){var D,ay,t,M,P,ab,ax,aC,N,ac,ae,H,u,an,ai,aw,k,K,ap="sizzle"+-(new Date()),O=av.document,az=0,aj=0,d=F(),ao=F(),L=F(),J=function(i,e){if(i===e){ac=true}return 0},au=typeof undefined,V=1<<31,T=({}).hasOwnProperty,ar=[],at=ar.pop,R=ar.push,b=ar.push,s=ar.slice,j=ar.indexOf||function(aE){var aD=0,e=this.length;for(;aD<e;aD++){if(this[aD]===aE){return aD}}return -1},c="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",v="[\\x20\\t\\r\\n\\f]",a="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Q=a.replace("w","w#"),al="\\["+v+"*("+a+")"+v+"*(?:([*^$|!~]?=)"+v+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+Q+")|)|)"+v+"*\\]",q=":("+a+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+al.replace(3,8)+")*)|.*)\\)|)",x=new RegExp("^"+v+"+|((?:^|[^\\\\])(?:\\\\.)*)"+v+"+$","g"),A=new RegExp("^"+v+"*,"+v+"*"),G=new RegExp("^"+v+"*([>+~]|"+v+")"+v+"*"),z=new RegExp("="+v+"*([^\\]'\"]*?)"+v+"*\\]","g"),X=new RegExp(q),Z=new RegExp("^"+Q+"$"),ah={ID:new RegExp("^#("+a+")"),CLASS:new RegExp("^\\.("+a+")"),TAG:new RegExp("^("+a.replace("w","w*")+")"),ATTR:new RegExp("^"+al),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+v+"*(even|odd|(([+-]|)(\\d*)n|)"+v+"*(?:([+-]|)"+v+"*(\\d+)|))"+v+"*\\)|)","i"),bool:new RegExp("^(?:"+c+")$","i"),needsContext:new RegExp("^"+v+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+v+"*((?:-\\d)?\\d*)"+v+"*\\)|)(?=[^-]|$)","i")},h=/^(?:input|select|textarea|button)$/i,r=/^h\d$/i,U=/^[^{]+\{\s*\[native \w/,W=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ag=/[+~]/,S=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}
12"+v+"?|("+v+")|.)","ig"),ak=function(e,aE,i){var aD="0x"+aE-65536;return aD!==aD||i?aE:aD<0?String.fromCharCode(aD+65536):String.fromCharCode(aD>>10|55296,aD&1023|56320)};try{b.apply((ar=s.call(O.childNodes)),O.childNodes);ar[O.childNodes.length].nodeType}catch(I){b={apply:ar.length?function(i,e){R.apply(i,s.call(e))}:function(aF,aE){var e=aF.length,aD=0;while((aF[e++]=aE[aD++])){}aF.length=e-1}}}function B(aK,aD,aO,aQ){var aP,aH,aI,aM,aN,aG,aF,e,aE,aL;if((aD?aD.ownerDocument||aD:O)!==H){ae(aD)}aD=aD||H;aO=aO||[];if(!aK||typeof aK!=="string"){return aO}if((aM=aD.nodeType)!==1&&aM!==9){return[]}if(an&&!aQ){if((aP=W.exec(aK))){if((aI=aP[1])){if(aM===9){aH=aD.getElementById(aI);if(aH&&aH.parentNode){if(aH.id===aI){aO.push(aH);return aO}}else{return aO}}else{if(aD.ownerDocument&&(aH=aD.ownerDocument.getElementById(aI))&&K(aD,aH)&&aH.id===aI){aO.push(aH);return aO}}}else{if(aP[2]){b.apply(aO,aD.getElementsByTagName(aK));return aO}else{if((aI=aP[3])&&ay.getElementsByClassName&&aD.getElementsByClassName){b.apply(aO,aD.getElementsByClassName(aI));return aO}}}}if(ay.qsa&&(!ai||!ai.test(aK))){e=aF=ap;aE=aD;aL=aM===9&&aK;if(aM===1&&aD.nodeName.toLowerCase()!=="object"){aG=n(aK);if((aF=aD.getAttribute("id"))){e=aF.replace(S,"\\$&")}else{aD.setAttribute("id",e)}e="[id='"+e+"'] ";aN=aG.length;while(aN--){aG[aN]=e+o(aG[aN])}aE=ag.test(aK)&&Y(aD.parentNode)||aD;aL=aG.join(",")}if(aL){try{b.apply(aO,aE.querySelectorAll(aL));return aO}catch(aJ){}finally{if(!aF){aD.removeAttribute("id")}}}}}return ax(aK.replace(x,"$1"),aD,aO,aQ)}function F(){var i=[];function e(aD,aE){if(i.push(aD+" ")>t.cacheLength){delete e[i.shift()]}return(e[aD+" "]=aE)}return e}function p(e){e[ap]=true;return e}function l(i){var aE=H.createElement("div");try{return !!i(aE)}catch(aD){return false}finally{if(aE.parentNode){aE.parentNode.removeChild(aE)}aE=null}}function aA(aD,aF){var e=aD.split("|"),aE=aD.length;while(aE--){t.attrHandle[e[aE]]=aF}}function f(i,e){var aE=e&&i,aD=aE&&i.nodeType===1&&e.nodeType===1&&(~e.sourceIndex||V)-(~i.sourceIndex||V);if(aD){return aD}if(aE){while((aE=aE.nextSibling)){if(aE===e){return -1}}}return i?1:-1}function C(e){return function(aD){var i=aD.nodeName.toLowerCase();return i==="input"&&aD.type===e}}function g(e){return function(aD){var i=aD.nodeName.toLowerCase();return(i==="input"||i==="button")&&aD.type===e}}function am(e){return p(function(i){i=+i;return p(function(aD,aH){var aF,aE=e([],aD.length,i),aG=aE.length;while(aG--){if(aD[(aF=aE[aG])]){aD[aF]=!(aH[aF]=aD[aF])}}})})}function Y(e){return e&&typeof e.getElementsByTagName!==au&&e}ay=B.support={};P=B.isXML=function(e){var i=e&&(e.ownerDocument||e).documentElement;return i?i.nodeName!=="HTML":false};ae=B.setDocument=function(aD){var e,aE=aD?aD.ownerDocument||aD:O,i=aE.defaultView;if(aE===H||aE.nodeType!==9||!aE.documentElement){return H}H=aE;u=aE.documentElement;an=!P(aE);if(i&&i!==i.top){if(i.addEventListener){i.addEventListener("unload",function(){ae()},false)}else{if(i.attachEvent){i.attachEvent("onunload",function(){ae()})}}}ay.attributes=l(function(aF){aF.className="i";return !aF.getAttribute("className")});ay.getElementsByTagName=l(function(aF){aF.appendChild(aE.createComment(""));return !aF.getElementsByTagName("*").length});ay.getElementsByClassName=U.test(aE.getElementsByClassName)&&l(function(aF){aF.innerHTML="<div class='a'></div><div class='a i'></div>";aF.firstChild.className="i";return aF.getElementsByClassName("i").length===2});ay.getById=l(function(aF){u.appendChild(aF).id=ap;return !aE.getElementsByName||!aE.getElementsByName(ap).length});if(ay.getById){t.find.ID=function(aH,aG){if(typeof aG.getElementById!==au&&an){var aF=aG.getElementById(aH);return aF&&aF.parentNode?[aF]:[]}};t.filter.ID=function(aG){var aF=aG.replace(y,ak);return function(aH){return aH.getAttribute("id")===aF}}}else{delete t.find.ID;t.filter.ID=function(aG){var aF=aG.replace(y,ak);return function(aI){var aH=typeof aI.getAttributeNode!==au&&aI.getAttributeNode("id");return aH&&aH.value===aF}}}t.find.TAG=ay.getElementsByTagName?function(aF,aG){if(typeof aG.getElementsByTagName!==au){return aG.getElementsByTagName(aF)}}:function(aF,aJ){var aK,aI=[],aH=0,aG=aJ.getElementsByTagName(aF);if(aF==="*"){while((aK=aG[aH++])){if(aK.nodeType===1){aI.push(aK)}}return aI}return aG};t.find.CLASS=ay.getElementsByClassName&&function(aG,aF){if(typeof aF.getElementsByClassName!==au&&an){return aF.getElementsByClassName(aG)}};aw=[];ai=[];if((ay.qsa=U.test(aE.querySelectorAll))){l(function(aF){aF.innerHTML="<select t=''><option selected=''></option></select>";if(aF.querySelectorAll("[t^='']").length){ai.push("[*^$]="+v+"*(?:''|\"\")")}if(!aF.querySelectorAll("[selected]").length){ai.push("\\["+v+"*(?:value|"+c+")")}if(!aF.querySelectorAll(":checked").length){ai.push(":checked")}});l(function(aG){var aF=aE.createElement("input");aF.setAttribute("type","hidden");aG.appendChild(aF).setAttribute("name","D");if(aG.querySelectorAll("[name=d]").length){ai.push("name"+v+"*[*^$|!~]?=")}if(!aG.querySelectorAll(":enabled").length){ai.push(":enabled",":disabled")}aG.querySelectorAll("*,:x");ai.push(",.*:")})}if((ay.matchesSelector=U.test((k=u.webkitMatchesSelector||u.mozMatchesSelector||u.oMatchesSelector||u.msMatchesSelector)))){l(function(aF){ay.disconnectedMatch=k.call(aF,"div");k.call(aF,"[s!='']:x");aw.push("!=",q)})}ai=ai.length&&new RegExp(ai.join("|"));aw=aw.length&&new RegExp(aw.join("|"));e=U.test(u.compareDocumentPosition);K=e||U.test(u.contains)?function(aG,aF){var aI=aG.nodeType===9?aG.documentElement:aG,aH=aF&&aF.parentNode;return aG===aH||!!(aH&&aH.nodeType===1&&(aI.contains?aI.contains(aH):aG.compareDocumentPosition&&aG.compareDocumentPosition(aH)&16))}:function(aG,aF){if(aF){while((aF=aF.parentNode)){if(aF===aG){return true}}}return false};J=e?function(aG,aF){if(aG===aF){ac=true;return 0}var aH=!aG.compareDocumentPosition-!aF.compareDocumentPosition;if(aH){return aH}aH=(aG.ownerDocument||aG)===(aF.ownerDocument||aF)?aG.compareDocumentPosition(aF):1;if(aH&1||(!ay.sortDetached&&aF.compareDocumentPosition(aG)===aH)){if(aG===aE||aG.ownerDocument===O&&K(O,aG)){return -1}if(aF===aE||aF.ownerDocument===O&&K(O,aF)){return 1}return N?(j.call(N,aG)-j.call(N,aF)):0}return aH&4?-1:1}:function(aG,aF){if(aG===aF){ac=true;return 0}var aM,aJ=0,aL=aG.parentNode,aI=aF.parentNode,aH=[aG],aK=[aF];if(!aL||!aI){return aG===aE?-1:aF===aE?1:aL?-1:aI?1:N?(j.call(N,aG)-j.call(N,aF)):0}else{if(aL===aI){return f(aG,aF)}}aM=aG;while((aM=aM.parentNode)){aH.unshift(aM)}aM=aF;while((aM=aM.parentNode)){aK.unshift(aM)}while(aH[aJ]===aK[aJ]){aJ++}return aJ?f(aH[aJ],aK[aJ]):aH[aJ]===O?-1:aK[aJ]===O?1:0};return aE};B.matches=function(i,e){return B(i,null,null,e)};B.matchesSelector=function(aD,aF){if((aD.ownerDocument||aD)!==H){ae(aD)}aF=aF.replace(z,"='$1']");if(ay.matchesSelector&&an&&(!aw||!aw.test(aF))&&(!ai||!ai.test(aF))){try{var i=k.call(aD,aF);if(i||ay.disconnectedMatch||aD.document&&aD.document.nodeType!==11){return i}}catch(aE){}}return B(aF,H,null,[aD]).length>0};B.contains=function(e,i){if((e.ownerDocument||e)!==H){ae(e)}return K(e,i)};B.attr=function(aD,e){if((aD.ownerDocument||aD)!==H){ae(aD)}var i=t.attrHandle[e.toLowerCase()],aE=i&&T.call(t.attrHandle,e.toLowerCase())?i(aD,e,!an):undefined;return aE!==undefined?aE:ay.attributes||!an?aD.getAttribute(e):(aE=aD.getAttributeNode(e))&&aE.specified?aE.value:null};B.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};B.uniqueSort=function(aE){var aF,aG=[],e=0,aD=0;ac=!ay.detectDuplicates;N=!ay.sortStable&&aE.slice(0);aE.sort(J);
12if(ac){while((aF=aE[aD++])){if(aF===aE[aD]){e=aG.push(aD)}}while(e--){aE.splice(aG[e],1)}}N=null;return aE};M=B.getText=function(aG){var aF,aD="",aE=0,e=aG.nodeType;if(!e){while((aF=aG[aE++])){aD+=M(aF)}}else{if(e===1||e===9||e===11){if(typeof aG.textContent==="string"){return aG.textContent}else{for(aG=aG.firstChild;aG;aG=aG.nextSibling){aD+=M(aG)}}}else{if(e===3||e===4){return aG.nodeValue}}}return aD};t=B.selectors={cacheLength:50,createPseudo:p,match:ah,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(y,ak);e[3]=(e[4]||e[5]||"").replace(y,ak);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){B.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd")}else{if(e[3]){B.error(e[0])}}return e},PSEUDO:function(i){var e,aD=!i[5]&&i[2];if(ah.CHILD.test(i[0])){return null}if(i[3]&&i[4]!==undefined){i[2]=i[4]}else{if(aD&&X.test(aD)&&(e=n(aD,true))&&(e=aD.indexOf(")",aD.length-e)-aD.length)){i[0]=i[0].slice(0,e);i[2]=aD.slice(0,e)}}return i.slice(0,3)}},filter:{TAG:function(i){var e=i.replace(y,ak).toLowerCase();return i==="*"?function(){return true}:function(aD){return aD.nodeName&&aD.nodeName.toLowerCase()===e}},CLASS:function(e){var i=d[e+" "];return i||(i=new RegExp("(^|"+v+")"+e+"("+v+"|$)"))&&d(e,function(aD){return i.test(typeof aD.className==="string"&&aD.className||typeof aD.getAttribute!==au&&aD.getAttribute("class")||"")})},ATTR:function(aD,i,e){return function(aF){var aE=B.attr(aF,aD);if(aE==null){return i==="!="}if(!i){return true}aE+="";return i==="="?aE===e:i==="!="?aE!==e:i==="^="?e&&aE.indexOf(e)===0:i==="*="?e&&aE.indexOf(e)>-1:i==="$="?e&&aE.slice(-e.length)===e:i==="~="?(" "+aE+" ").indexOf(e)>-1:i==="|="?aE===e||aE.slice(0,e.length+1)===e+"-":false}},CHILD:function(i,aF,aE,aG,aD){var aI=i.slice(0,3)!=="nth",e=i.slice(-4)!=="last",aH=aF==="of-type";return aG===1&&aD===0?function(aJ){return !!aJ.parentNode}:function(aP,aN,aS){var aJ,aV,aQ,aU,aR,aM,aO=aI!==e?"nextSibling":"previousSibling",aT=aP.parentNode,aL=aH&&aP.nodeName.toLowerCase(),aK=!aS&&!aH;if(aT){if(aI){while(aO){aQ=aP;while((aQ=aQ[aO])){if(aH?aQ.nodeName.toLowerCase()===aL:aQ.nodeType===1){return false}}aM=aO=i==="only"&&!aM&&"nextSibling"}return true}aM=[e?aT.firstChild:aT.lastChild];if(e&&aK){aV=aT[ap]||(aT[ap]={});aJ=aV[i]||[];aR=aJ[0]===az&&aJ[1];aU=aJ[0]===az&&aJ[2];aQ=aR&&aT.childNodes[aR];while((aQ=++aR&&aQ&&aQ[aO]||(aU=aR=0)||aM.pop())){if(aQ.nodeType===1&&++aU&&aQ===aP){aV[i]=[az,aR,aU];break}}}else{if(aK&&(aJ=(aP[ap]||(aP[ap]={}))[i])&&aJ[0]===az){aU=aJ[1]}else{while((aQ=++aR&&aQ&&aQ[aO]||(aU=aR=0)||aM.pop())){if((aH?aQ.nodeName.toLowerCase()===aL:aQ.nodeType===1)&&++aU){if(aK){(aQ[ap]||(aQ[ap]={}))[i]=[az,aU]}if(aQ===aP){break}}}}}aU-=aD;return aU===aG||(aU%aG===0&&aU/aG>=0)}}},PSEUDO:function(aE,aD){var e,i=t.pseudos[aE]||t.setFilters[aE.toLowerCase()]||B.error("unsupported pseudo: "+aE);if(i[ap]){return i(aD)}if(i.length>1){e=[aE,aE,"",aD];return t.setFilters.hasOwnProperty(aE.toLowerCase())?p(function(aH,aJ){var aG,aF=i(aH,aD),aI=aF.length;while(aI--){aG=j.call(aH,aF[aI]);aH[aG]=!(aJ[aG]=aF[aI])}}):function(aF){return i(aF,0,e)}}return i}},pseudos:{not:p(function(e){var i=[],aD=[],aE=ab(e.replace(x,"$1"));return aE[ap]?p(function(aG,aL,aJ,aH){var aK,aF=aE(aG,null,aH,[]),aI=aG.length;while(aI--){if((aK=aF[aI])){aG[aI]=!(aL[aI]=aK)}}}):function(aH,aG,aF){i[0]=aH;aE(i,null,aF,aD);return !aD.pop()}}),has:p(function(e){return function(i){return B(e,i).length>0}}),contains:p(function(e){return function(i){return(i.textContent||i.innerText||M(i)).indexOf(e)>-1}}),lang:p(function(e){if(!Z.test(e||"")){B.error("unsupported lang: "+e)}e=e.replace(y,ak).toLowerCase();return function(aD){var i;do{if((i=an?aD.lang:aD.getAttribute("xml:lang")||aD.getAttribute("lang"))){i=i.toLowerCase();return i===e||i.indexOf(e+"-")===0}}while((aD=aD.parentNode)&&aD.nodeType===1);return false}}),target:function(e){var i=av.location&&av.location.hash;return i&&i.slice(1)===e.id},root:function(e){return e===u},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var i=e.nodeName.toLowerCase();return(i==="input"&&!!e.checked)||(i==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeType<6){return false}}return true},parent:function(e){return !t.pseudos.empty(e)},header:function(e){return r.test(e.nodeName)}
12,input:function(e){return h.test(e.nodeName)},button:function(i){var e=i.nodeName.toLowerCase();return e==="input"&&i.type==="button"||e==="button"},text:function(i){var e;return i.nodeName.toLowerCase()==="input"&&i.type==="text"&&((e=i.getAttribute("type"))==null||e.toLowerCase()==="text")},first:am(function(){return[0]}),last:am(function(e,i){return[i-1]}),eq:am(function(e,aD,i){return[i<0?i+aD:i]}),even:am(function(e,aE){var aD=0;for(;aD<aE;aD+=2){e.push(aD)}return e}),odd:am(function(e,aE){var aD=1;for(;aD<aE;aD+=2){e.push(aD)}return e}),lt:am(function(e,aF,aE){var aD=aE<0?aE+aF:aE;for(;--aD>=0;){e.push(aD)}return e}),gt:am(function(e,aF,aE){var aD=aE<0?aE+aF:aE;for(;++aD<aF;){e.push(aD)}return e})}};t.pseudos.nth=t.pseudos.eq;for(D in {radio:true,checkbox:true,file:true,password:true,image:true}){t.pseudos[D]=C(D)}for(D in {submit:true,reset:true}){t.pseudos[D]=g(D)}function aa(){}aa.prototype=t.filters=t.pseudos;t.setFilters=new aa();function n(aF,aK){var i,aG,aI,aJ,aH,aD,e,aE=ao[aF+" "];if(aE){return aK?0:aE.slice(0)}aH=aF;aD=[];e=t.preFilter;while(aH){if(!i||(aG=A.exec(aH))){if(aG){aH=aH.slice(aG[0].length)||aH}aD.push((aI=[]))}i=false;if((aG=G.exec(aH))){i=aG.shift();aI.push({value:i,type:aG[0].replace(x," ")});aH=aH.slice(i.length)}for(aJ in t.filter){if((aG=ah[aJ].exec(aH))&&(!e[aJ]||(aG=e[aJ](aG)))){i=aG.shift();aI.push({value:i,type:aJ,matches:aG});aH=aH.slice(i.length)}}if(!i){break}}return aK?aH.length:aH?B.error(aF):ao(aF,aD).slice(0)}function o(aF){var aE=0,aD=aF.length,e="";for(;aE<aD;aE++){e+=aF[aE].value}return e}function w(aF,aD,aE){var e=aD.dir,aG=aE&&e==="parentNode",i=aj++;return aD.first?function(aJ,aI,aH){while((aJ=aJ[e])){if(aJ.nodeType===1||aG){return aF(aJ,aI,aH)}}}:function(aL,aJ,aI){var aM,aK,aH=[az,i];if(aI){while((aL=aL[e])){if(aL.nodeType===1||aG){if(aF(aL,aJ,aI)){return true}}}}else{while((aL=aL[e])){if(aL.nodeType===1||aG){aK=aL[ap]||(aL[ap]={});if((aM=aK[e])&&aM[0]===az&&aM[1]===i){return(aH[2]=aM[2])}else{aK[e]=aH;if((aH[2]=aF(aL,aJ,aI))){return true}}}}}}}function aB(e){return e.length>1?function(aG,aF,aD){var aE=e.length;while(aE--){if(!e[aE](aG,aF,aD)){return false}}return true}:e[0]}function E(aD,aG,aF){var aE=0,e=aG.length;for(;aE<e;aE++){B(aD,aG[aE],aF)}return aF}function af(e,aD,aE,aF,aI){var aG,aL=[],aH=0,aJ=e.length,aK=aD!=null;for(;aH<aJ;aH++){if((aG=e[aH])){if(!aE||aE(aG,aF,aI)){aL.push(aG);if(aK){aD.push(aH)}}}}return aL}function m(aD,i,aF,aE,aG,e){if(aE&&!aE[ap]){aE=m(aE)}if(aG&&!aG[ap]){aG=m(aG,e)}return p(function(aR,aO,aJ,aQ){var aT,aP,aL,aK=[],aS=[],aI=aO.length,aH=aR||E(i||"*",aJ.nodeType?[aJ]:aJ,[]),aM=aD&&(aR||!i)?af(aH,aK,aD,aJ,aQ):aH,aN=aF?aG||(aR?aD:aI||aE)?[]:aO:aM;if(aF){aF(aM,aN,aJ,aQ)}if(aE){aT=af(aN,aS);aE(aT,[],aJ,aQ);aP=aT.length;while(aP--){if((aL=aT[aP])){aN[aS[aP]]=!(aM[aS[aP]]=aL)}}}if(aR){if(aG||aD){if(aG){aT=[];aP=aN.length;while(aP--){if((aL=aN[aP])){aT.push((aM[aP]=aL))}}aG(null,(aN=[]),aT,aQ)}aP=aN.length;while(aP--){if((aL=aN[aP])&&(aT=aG?j.call(aR,aL):aK[aP])>-1){aR[aT]=!(aO[aT]=aL)}}}}else{aN=af(aN===aO?aN.splice(aI,aN.length):aN);if(aG){aG(null,aO,aN,aQ)}else{b.apply(aO,aN)}}})}function aq(aI){var aD,aG,aE,aH=aI.length,aL=t.relative[aI[0].type],aM=aL||t.relative[" "],aF=aL?1:0,aJ=w(function(i){return i===aD},aM,true),aK=w(function(i){return j.call(aD,i)>-1},aM,true),e=[function(aO,aN,i){return(!aL&&(i||aN!==aC))||((aD=aN).nodeType?aJ(aO,aN,i):aK(aO,aN,i))}];for(;aF<aH;aF++){if((aG=t.relative[aI[aF].type])){e=[w(aB(e),aG)]}else{aG=t.filter[aI[aF].type].apply(null,aI[aF].matches);if(aG[ap]){aE=++aF;for(;aE<aH;aE++){if(t.relative[aI[aE].type]){break}}return m(aF>1&&aB(e),aF>1&&o(aI.slice(0,aF-1).concat({value:aI[aF-2].type===" "?"*":""})).replace(x,"$1"),aG,aF<aE&&aq(aI.slice(aF,aE)),aE<aH&&aq((aI=aI.slice(aE))),aE<aH&&o(aI))}e.push(aG)}}return aB(e)}function ad(aE,aD){var e=aD.length>0,aF=aE.length>0,i=function(aP,aJ,aO,aN,aS){var aK,aL,aQ,aU=0,aM="0",aG=aP&&[],aV=[],aT=aC,aI=aP||aF&&t.find.TAG("*",aS),aH=(az+=aT==null?1:Math.random()||0.1),aR=aI.length;if(aS){aC=aJ!==H&&aJ}for(;aM!==aR&&(aK=aI[aM])!=null;aM++){if(aF&&aK){aL=0;while((aQ=aE[aL++])){if(aQ(aK,aJ,aO)){aN.push(aK);break}}if(aS){az=aH}}if(e){if((aK=!aQ&&aK)){aU--}if(aP){aG.push(aK)}}}aU+=aM;if(e&&aM!==aU){aL=0;while((aQ=aD[aL++])){aQ(aG,aV,aJ,aO)}if(aP){if(aU>0){while(aM--){if(!(aG[aM]||aV[aM])){aV[aM]=at.call(aN)}}}aV=af(aV)}b.apply(aN,aV);if(aS&&!aP&&aV.length>0&&(aU+aD.length)>1){B.uniqueSort(aN)}}if(aS){az=aH;aC=aT}return aG};return e?p(i):i}ab=B.compile=function(e,aE){var aF,aD=[],aH=[],aG=L[e+" "];if(!aG){if(!aE){aE=n(e)}aF=aE.length;while(aF--){aG=aq(aE[aF]);if(aG[ap]){aD.push(aG)}else{aH.push(aG)}}aG=L(e,ad(aH,aD));aG.selector=e}return aG};ax=B.select=function(aE,e,aF,aI){var aG,aL,aD,aM,aJ,aK=typeof aE==="function"&&aE,aH=!aI&&n((aE=aK.selector||aE));aF=aF||[];
12if(aH.length===1){aL=aH[0]=aH[0].slice(0);if(aL.length>2&&(aD=aL[0]).type==="ID"&&ay.getById&&e.nodeType===9&&an&&t.relative[aL[1].type]){e=(t.find.ID(aD.matches[0].replace(y,ak),e)||[])[0];if(!e){return aF}else{if(aK){e=e.parentNode}}aE=aE.slice(aL.shift().value.length)}aG=ah.needsContext.test(aE)?0:aL.length;while(aG--){aD=aL[aG];if(t.relative[(aM=aD.type)]){break}if((aJ=t.find[aM])){if((aI=aJ(aD.matches[0].replace(y,ak),ag.test(aL[0].type)&&Y(e.parentNode)||e))){aL.splice(aG,1);aE=aI.length&&o(aL);if(!aE){b.apply(aF,aI);return aF}break}}}}(aK||ab(aE,aH))(aI,e,!an,aF,ag.test(aE)&&Y(e.parentNode)||e);return aF};ay.sortStable=ap.split("").sort(J).join("")===ap;ay.detectDuplicates=!!ac;ae();ay.sortDetached=l(function(e){return e.compareDocumentPosition(H.createElement("div"))&1});if(!l(function(e){e.innerHTML="<a href='#'></a>";return e.firstChild.getAttribute("href")==="#"})){aA("type|href|height|width",function(i,e,aD){if(!aD){return i.getAttribute(e,e.toLowerCase()==="type"?1:2)}})}if(!ay.attributes||!l(function(e){e.innerHTML="<input/>";e.firstChild.setAttribute("value","");return e.firstChild.getAttribute("value")===""})){aA("value",function(i,e,aD){if(!aD&&i.nodeName.toLowerCase()==="input"){return i.defaultValue}})}if(!l(function(e){return e.getAttribute("disabled")==null})){aA(c,function(i,e,aE){var aD;if(!aE){return i[e]===true?e.toLowerCase():(aD=i.getAttributeNode(e))&&aD.specified?aD.value:null}})}if(typeof define==="function"&&define.amd){define(function(){return B})}else{if(typeof module!=="undefined"&&module.exports){module.exports=B}else{av.Sizzle=B}}})(window);(function(c){var d=Prototype.Selector.extendElements;function a(e,f){return d(c(e,f||document))}function b(f,e){return c.matches(e,[f]).length==1}Prototype.Selector.engine=c;Prototype.Selector.select=a;Prototype.Selector.match=b})(Sizzle);window.Sizzle=Prototype._original_property;delete Prototype._original_property;var Form={reset:function(a){a=$(a);a.reset();return a},serializeElements:function(h,d){if(typeof d!="object"){d={hash:!!d}}else{if(Object.isUndefined(d.hash)){d.hash=true}}var e,g,a=false,f=d.submit,b,c;if(d.hash){c={};b=function(i,j,k){if(j in i){if(!Object.isArray(i[j])){i[j]=[i[j]]}i[j]=i[j].concat(k)}else{i[j]=k}return i}}else{c="";b=function(i,k,j){if(!Object.isArray(j)){j=[j]}if(!j.length){return i}var l=encodeURIComponent(k).gsub(/%20/,"+");return i+(i?"&":"")+j.map(function(m){m=m.gsub(/(\r)?\n/,"\r\n");m=encodeURIComponent(m);m=m.gsub(/%20/,"+");return l+"="+m}).join("&")}}return h.inject(c,function(i,j){if(!j.disabled&&j.name){e=j.name;g=$(j).getValue();if(g!=null&&j.type!="file"&&(j.type!="submit"||(!a&&f!==false&&(!f||e==f)&&(a=true)))){i=b(i,e,g)}}return i})}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a)},getElements:function(e){var f=$(e).getElementsByTagName("*");var d,c=[],b=Form.Element.Serializers;for(var a=0;d=f[a];a++){if(b[d.tagName.toLowerCase()]){c.push(Element.extend(d))}}return c},getInputs:function(g,c,d){g=$(g);var a=g.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var e=0,h=[],f=a.length;e<f;e++){var b=a[e];if((c&&b.type!=c)||(d&&b.name!=d)){continue}h.push(Element.extend(b))}return h},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(b){var c=$(b).getElements().findAll(function(d){return"hidden"!=d.type&&!d.disabled});var a=c.findAll(function(d){return d.hasAttribute("tabIndex")&&d.tabIndex>=0}).sortBy(function(d){return d.tabIndex}).first();return a?a:c.find(function(d){return/^(?:input|select|textarea)$/i.test(d.tagName)})},focusFirstElement:function(b){b=$(b);var a=b.findFirstElement();if(a){a.activate()}return b},request:function(b,a){b=$(b),a=Object.clone(a||{});var d=a.parameters,c=b.readAttribute("action")||"";if(c.blank()){c=window.location.href}a.parameters=b.serialize(true);if(d){if(Object.isString(d)){d=d.toQueryParams()}Object.extend(a.parameters,d)}if(b.hasAttribute("method")&&!a.method){a.method=b.method}return new Ajax.Request(c,a)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!(/^(?:button|reset|submit)$/i.test(a.type)))){a.select()}}catch(b){}return a},disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers=(function(){function b(h,i){switch(h.type.toLowerCase()){case"checkbox":case"radio":return f(h,i);default:return e(h,i)}}function f(h,i){if(Object.isUndefined(i)){return h.checked?h.value:null}else{h.checked=!!i}}function e(h,i){if(Object.isUndefined(i)){return h.value}else{h.value=i}}
12function a(k,n){if(Object.isUndefined(n)){return(k.type==="select-one"?c:d)(k)}var j,l,o=!Object.isArray(n);for(var h=0,m=k.length;h<m;h++){j=k.options[h];l=this.optionValue(j);if(o){if(l==n){j.selected=true;return}}else{j.selected=n.include(l)}}}function c(i){var h=i.selectedIndex;return h>=0?g(i.options[h]):null}function d(l){var h,m=l.length;if(!m){return null}for(var k=0,h=[];k<m;k++){var j=l.options[k];if(j.selected){h.push(g(j))}}return h}function g(h){return Element.hasAttribute(h,"value")?h.value:h.text}return{input:b,inputSelector:f,textarea:e,select:a,selectOne:c,selectMany:d,optionValue:g,button:e}})();Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,a,b,c){$super(c,b);this.element=$(a);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});(function(D){var u=document.createElement("div");var d=document.documentElement;var k="onmouseenter" in d&&"onmouseleave" in d;var L={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45};var z=function(X){return false};if(window.attachEvent){if(window.addEventListener){z=function(X){return !(X instanceof window.Event)}}else{z=function(X){return true}}}var O;function M(Y,X){return Y.which?(Y.which===X+1):(Y.button===X)}var W={0:1,1:4,2:2};function S(Y,X){return Y.button===W[X]}function P(Y,X){switch(X){case 0:return Y.which==1&&!Y.metaKey;case 1:return Y.which==2||(Y.which==1&&Y.metaKey);case 2:return Y.which==3;default:return false}}if(window.attachEvent){if(!window.addEventListener){O=S}else{O=function(Y,X){return z(Y)?S(Y,X):M(Y,X)}}}else{if(Prototype.Browser.WebKit){O=P}else{O=M}}function B(X){return O(X,0)}function i(X){return O(X,1)}function e(X){return O(X,2)}function o(X){return Element.extend(K(X))}function K(Z){Z=L.extend(Z);var Y=Z.target,X=Z.type,aa=Z.currentTarget;if(aa&&aa.tagName){if(X==="load"||X==="error"||(X==="click"&&aa.tagName.toLowerCase()==="input"&&aa.type==="radio")){Y=aa}}return Y.nodeType==Node.TEXT_NODE?Y.parentNode:Y}function j(Z,aa){var Y=K(Z),X=Prototype.Selector;if(!aa){return Element.extend(Y)}while(Y){if(Object.isElement(Y)&&X.match(Y,aa)){return Element.extend(Y)}Y=Y.parentNode}}function t(X){return{x:U(X),y:T(X)}}function U(Z){var Y=document.documentElement,X=document.body||{scrollLeft:0};return Z.pageX||(Z.clientX+(Y.scrollLeft||X.scrollLeft)-(Y.clientLeft||0))}function T(Z){var Y=document.documentElement,X=document.body||{scrollTop:0};return Z.pageY||(Z.clientY+(Y.scrollTop||X.scrollTop)-(Y.clientTop||0))}function r(X){L.extend(X);X.preventDefault();X.stopPropagation();X.stopped=true}L.Methods={isLeftClick:B,isMiddleClick:i,isRightClick:e,element:o,findElement:j,pointer:t,pointerX:U,pointerY:T,stop:r};var H=Object.keys(L.Methods).inject({},function(X,Y){X[Y]=L.Methods[Y].methodize();return X});if(window.attachEvent){function V(Y){var X;switch(Y.type){case"mouseover":case"mouseenter":X=Y.fromElement;break;case"mouseout":case"mouseleave":X=Y.toElement;break;default:return null}return Element.extend(X)}var Q={stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}};L.extend=function(Y,X){if(!Y){return false}if(!z(Y)){return Y}if(Y._extendedByPrototype){return Y}Y._extendedByPrototype=Prototype.emptyFunction;var Z=L.pointer(Y);Object.extend(Y,{target:Y.srcElement||X,relatedTarget:V(Y),pageX:Z.x,pageY:Z.y});Object.extend(Y,H);Object.extend(Y,Q);return Y}}else{L.extend=Prototype.K}if(window.addEventListener){L.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(L.prototype,H)}
12var v={mouseenter:"mouseover",mouseleave:"mouseout"};function f(X){return v[X]||X}if(k){f=Prototype.K}function R(X){if(X===window){return 0}if(typeof X._prototypeUID==="undefined"){X._prototypeUID=Element.Storage.UID++}return X._prototypeUID}function I(X){if(X===window){return 0}if(X==document){return 1}return X.uniqueID}if("uniqueID" in u){R=I}function x(X){return X.include(":")}L._isCustomEvent=x;function A(Z,Y){var X=D.Event.cache;if(Object.isUndefined(Y)){Y=R(Z)}if(!X[Y]){X[Y]={element:Z}}return X[Y]}function E(Y,X){if(Object.isUndefined(X)){X=R(Y)}delete D.Event.cache[X]}function h(Z,ac,af){var X=A(Z);if(!X[ac]){X[ac]=[]}var ab=X[ac];var aa=ab.length;while(aa--){if(ab[aa].handler===af){return null}}var ad=R(Z);var Y=D.Event._createResponder(ad,ac,af);var ae={responder:Y,handler:af};ab.push(ae);return ae}function s(ac,Z,ad){var Y=A(ac);var X=Y[Z];if(!X){return}var ab=X.length,ae;while(ab--){if(X[ab].handler===ad){ae=X[ab];break}}if(!ae){return}var aa=X.indexOf(ae);X.splice(aa,1);return ae}function c(Z,Y,aa){Z=$(Z);var ab=h(Z,Y,aa);if(ab===null){return Z}var X=ab.responder;if(x(Y)){p(Z,Y,X)}else{m(Z,Y,X)}return Z}function m(aa,Z,Y){var X=f(Z);if(aa.addEventListener){aa.addEventListener(X,Y,false)}else{aa.attachEvent("on"+X,Y)}}function p(Z,Y,X){if(Z.addEventListener){Z.addEventListener("dataavailable",X,false)}else{Z.attachEvent("ondataavailable",X);Z.attachEvent("onlosecapture",X)}}function J(Y,X,Z){Y=$(Y);var ab=!Object.isUndefined(Z),ac=!Object.isUndefined(X);if(!ac&&!ab){y(Y);return Y}if(!ab){G(Y,X);return Y}var aa=s(Y,X,Z);if(!aa){return Y}a(Y,X,aa.responder);return Y}function C(aa,Z,Y){var X=f(Z);if(aa.removeEventListener){aa.removeEventListener(X,Y,false)}else{aa.detachEvent("on"+X,Y)}}function b(Z,Y,X){if(Z.removeEventListener){Z.removeEventListener("dataavailable",X,false)}else{Z.detachEvent("ondataavailable",X);Z.detachEvent("onlosecapture",X)}}function y(ac){var ab=R(ac),Z=D.Event.cache[ab];if(!Z){return}E(ac,ab);var X,aa;for(var Y in Z){if(Y==="element"){continue}X=Z[Y];aa=X.length;while(aa--){a(ac,Y,X[aa].responder)}}}function G(ab,Z){var Y=A(ab);var X=Y[Z];if(!X){return}delete Y[Z];var aa=X.length;while(aa--){a(ab,Z,X[aa].responder)}}function a(Y,X,Z){if(x(X)){b(Y,X,Z)}else{C(Y,X,Z)}}function g(X){if(X!==document){return X}if(document.createEvent&&!X.dispatchEvent){return document.documentElement}return X}function w(aa,Z,Y,X){aa=g($(aa));if(Object.isUndefined(X)){X=true}Y=Y||{};var ab=N(aa,Z,Y,X);return L.extend(ab)}function l(aa,Z,Y,X){var ab=document.createEvent("HTMLEvents");ab.initEvent("dataavailable",X,true);ab.eventName=Z;ab.memo=Y;aa.dispatchEvent(ab);return ab}function n(aa,Z,Y,X){var ab=document.createEventObject();ab.eventType=X?"ondataavailable":"onlosecapture";ab.eventName=Z;ab.memo=Y;aa.fireEvent(ab.eventType,ab);return ab}var N=document.createEvent?l:n;L.Handler=Class.create({initialize:function(Z,Y,X,aa){this.element=$(Z);this.eventName=Y;this.selector=X;this.callback=aa;this.handler=this.handleEvent.bind(this)},start:function(){L.observe(this.element,this.eventName,this.handler);return this},stop:function(){L.stopObserving(this.element,this.eventName,this.handler);return this},handleEvent:function(Y){var X=L.findElement(Y,this.selector);if(X){this.callback.call(this.element,Y,X)}}});function F(Z,Y,X,aa){Z=$(Z);if(Object.isFunction(X)&&Object.isUndefined(aa)){aa=X,X=null}return new L.Handler(Z,Y,X,aa).start()}Object.extend(L,L.Methods);Object.extend(L,{fire:w,observe:c,stopObserving:J,on:F});Element.addMethods({fire:w,observe:c,stopObserving:J,on:F});Object.extend(document,{fire:w.methodize(),observe:c.methodize(),stopObserving:J.methodize(),on:F.methodize(),loaded:false});if(D.Event){Object.extend(window.Event,L)}else{D.Event=L}D.Event.cache={};function q(){D.Event.cache=null}if(window.attachEvent){window.attachEvent("onunload",q)}u=null;d=null})(this);(function(c){var g=document.documentElement;var b="onmouseenter" in g&&"onmouseleave" in g;function f(h){return !b&&(h==="mouseenter"||h==="mouseleave")}function d(i,h,j){if(Event._isCustomEvent(h)){return e(i,h,j)}if(f(h)){return a(i,h,j)}return function(l){if(!Event.cache){return}var k=Event.cache[i].element;Event.extend(l,k);j.call(k,l)}}function e(i,h,j){return function(l){var k=Event.cache[i].element;if(Object.isUndefined(l.eventName)){return false}if(l.eventName!==h){return false}Event.extend(l,k);j.call(k,l)}}function a(i,h,j){return function(m){var k=Event.cache[i].element;Event.extend(m,k);var l=m.relatedTarget;while(l&&l!==k){try{l=l.parentNode}catch(n){l=k}}if(l===k){return}j.call(k,m)}}c.Event._createResponder=d;g=null})(this);(function(a){var e;function b(){if(document.loaded){return}if(e){window.clearTimeout(e)}document.loaded=true;document.fire("dom:loaded")}function d(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",d);b()}}function c(){try{document.documentElement.doScroll("left")}catch(f){e=c.defer();return}b()}if(document.readyState==="complete"){b();return}if(document.addEventListener){document.addEventListener("DOMContentLoaded",b,false)}else{document.attachEvent("onreadystatechange",d);if(window==top){e=c.defer()}}Event.observe(window,"load",b)})(this);Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(b,a,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,c)}this.xcomp=a;this.ycomp=c;this.offset=Element.cumulativeOffset(b);return(c>=this.offset[1]&&c<this.offset[1]+b.offsetHeight&&a>=this.offset[0]&&a<this.offset[0]+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,d){var c=Element.cumulativeScrollOffset(b);this.xcomp=a+c[0]-this.deltaX;this.ycomp=d+c[1]-this.deltaY;this.offset=Element.cumulativeOffset(b);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+b.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b=="vertical"){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b=="horizontal"){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(b,c,a){a=a||{};return Element.clonePosition(c,b,a)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(b){function a(c){return c.blank()?null:"[contains(concat(' ', @class, ' '), ' "+c+" ')]"}b.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(c,e){e=e.toString().str
12ip();var d=/\s/.test(e)?$w(e).map(a).join(""):a(e);return d?document._getElementsByXPath(".//*"+d,c):[]}:function(e,f){f=f.toString().strip();var g=[],h=(/\s/.test(f)?$w(f):null);if(!h&&!f){return g}var c=$(e).getElementsByTagName("*");f=" "+f+" ";for(var d=0,k,j;k=c[d];d++){if(k.className&&(j=" "+k.className+" ")&&(j.include(f)||(h&&h.all(function(i){return !i.toString().blank()&&j.include(" "+i+" ")})))){g.push(Element.extend(k))}}return g};return function(d,c){return $(c||document.body).getElementsByClassName(d)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(b,a){this.element.className.split(/\s+/).select(function(c){return c.length>0})._each(b,a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)){return}this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);(function(){window.Selector=Class.create({initialize:function(a){this.expression=a.strip()},findElements:function(a){return Prototype.Selector.select(this.expression,a)},match:function(a){return Prototype.Selector.match(a,this.expression)},toString:function(){return this.expression},inspect:function(){return"#<Selector: "+this.expression+">"}});Object.extend(Selector,{matchElements:function(f,g){var a=Prototype.Selector.match,d=[];for(var c=0,e=f.length;c<e;c++){var b=f[c];if(a(b,g)){d.push(Element.extend(b))}}return d},findElement:function(f,g,b){b=b||0;var a=0,d;for(var c=0,e=f.length;c<e;c++){d=f[c];if(Prototype.Selector.match(d,g)&&b===a++){return Element.extend(d)}}},findChildElements:function(b,c){var a=c.toArray().join(", ");return Prototype.Selector.select(a,b||document)}})})();/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */�
vendor: 32,013 bytes, lines 12-13
12 13!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
13
vendor: 9,806 bytes, line 14
14},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}}
vendor: 17,252 bytes, line 14
14,n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;
vendor: 7,746 bytes, lines 14-15
14for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b)) 15},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];
vendor: 17,345 bytes, line 15
15while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
15 16/*! 17 * jQuery Migrate - v1.2.1 - 2013-05-08 18 * https://github.com/jquery/jquery-migrate 19 * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT 20 */ 21(function(s,p,i){var D={};s.migrateWarnings=[];if(!s.migrateMute&&p.console&&p.console.log){p.console.log("JQMIGRATE: Logging is active")}if(s.migrateTrace===i){s.migrateTrace=true}s.migrateReset=function(){D={};s.migrateWarnings.length=0};function h(H){var G=p.console;if(!D[H]){D[H]=true;s.migrateWarnings.push(H);if(G&&G.warn&&!s.migrateMute){G.warn("JQMIGRATE: "+H);if(s.migrateTrace&&G.trace){G.trace()}}}}function a(I,K,H,J){if(Object.defineProperty){try{Object.defineProperty(I,K,{configurable:true,enumerable:true,get:function(){h(J);return H},set:function(L){h(J);H=L}});return}catch(G){}}s._definePropertyBroken=true;I[K]=H}if(document.compatMode==="BackCompat"){h("jQuery is not compatible with Quirks Mode")}var f=s("<input/>",{size:1}).attr("size")&&s.attrFn,x=s.attr,w=s.attrHooks.value&&s.attrHooks.value.get||function(){return null},j=s.attrHooks.value&&s.attrHooks.value.set||function(){return i},t=/^(?:input|button)$/i,y=/^[238]$/,B=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,k=/^(?:checked|selected)$/i;a(s,"attrFn",f||{},"jQuery.attrFn is deprecated");s.attr=function(K,I,L,J){var H=I.toLowerCase(),G=K&&K.nodeType;if(J){if(x.length<4){h("jQuery.fn.attr( props, pass ) is deprecated")}if(K&&!y.test(G)&&(f?I in f:s.isFunction(s.fn[I]))){return s(K)[I](L)}}if(I==="type"&&L!==i&&t.test(K.nodeName)&&K.parentNode){h("Can't change the 'type' of an input or button in IE 6/7/8")}if(!s.attrHooks[H]&&B.test(H)){s.attrHooks[H]={get:function(N,M){var P,O=s.prop(N,M);return O===true||typeof O!=="boolean"&&(P=N.getAttributeNode(M))&&P.nodeValue!==false?M.toLowerCase():i}
21,set:function(N,P,M){var O;if(P===false){s.removeAttr(N,M)}else{O=s.propFix[M]||M;if(O in N){N[O]=true}N.setAttribute(M,M.toLowerCase())}return M}};if(k.test(H)){h("jQuery.fn.attr('"+H+"') may use property instead of attribute")}}return x.call(s,K,I,L)};s.attrHooks.value={get:function(H,G){var I=(H.nodeName||"").toLowerCase();if(I==="button"){return w.apply(this,arguments)}if(I!=="input"&&I!=="option"){h("jQuery.fn.attr('value') no longer gets properties")}return G in H?H.value:null},set:function(G,H){var I=(G.nodeName||"").toLowerCase();if(I==="button"){return j.apply(this,arguments)}if(I!=="input"&&I!=="option"){h("jQuery.fn.attr('value', val) no longer sets properties")}G.value=H}};var q,E,z=s.fn.init,A=s.parseJSON,v=/^([^<]*)(<[\w\W]+>)([^>]*)$/;s.fn.init=function(G,J,I){var H;if(G&&typeof G==="string"&&!s.isPlainObject(J)&&(H=v.exec(s.trim(G)))&&H[0]){if(G.charAt(0)!=="<"){h("$(html) HTML strings must start with '<' character")}if(H[3]){h("$(html) HTML text after last tag is ignored")}if(H[0].charAt(0)==="#"){h("HTML string cannot start with a '#' character");s.error("JQMIGRATE: Invalid selector string (XSS)")}if(J&&J.context){J=J.context}if(s.parseHTML){return z.call(this,s.parseHTML(H[2],J,true),J,I)}}return z.apply(this,arguments)};s.fn.init.prototype=s.fn;s.parseJSON=function(G){if(!G&&G!==null){h("jQuery.parseJSON requires a valid JSON string");return null}return A.apply(this,arguments)};s.uaMatch=function(H){H=H.toLowerCase();var G=/(chrome)[ \/]([\w.]+)/.exec(H)||/(webkit)[ \/]([\w.]+)/.exec(H)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(H)||/(msie) ([\w.]+)/.exec(H)||H.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(H)||[];return{browser:G[1]||"",version:G[2]||"0"}};if(!s.browser){q=s.uaMatch(navigator.userAgent);E={};if(q.browser){E[q.browser]=true;E.version=q.version}if(E.chrome){E.webkit=true}else{if(E.webkit){E.safari=true}}s.browser=E}a(s,"browser",s.browser,"jQuery.browser is deprecated");s.sub=function(){function G(J,K){return new G.fn.init(J,K)}s.extend(true,G,this);G.superclass=this;G.fn=G.prototype=this();G.fn.constructor=G;G.sub=this.sub;G.fn.init=function I(J,K){if(K&&K instanceof s&&!(K instanceof G)){K=G(K)}return s.fn.init.call(this,J,K,H)};G.fn.init.prototype=G.fn;var H=G(document);h("jQuery.sub() is deprecated");return G};s.ajaxSetup({converters:{"text json":s.parseJSON}});var n=s.fn.data;s.fn.data=function(I){var H,G,J=this[0];if(J&&I==="events"&&arguments.length===1){H=s.data(J,I);G=s._data(J,I);if((H===i||H===G)&&G!==i){h("Use of jQuery.fn.data('events') is deprecated");return G}}return n.apply(this,arguments)};var o=/\/(java|ecma)script/i,u=s.fn.andSelf||s.fn.addBack;s.fn.andSelf=function(){h("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");return u.apply(this,arguments)};if(!s.clean){s.clean=function(G,H,N,J){H=H||document;H=!H.nodeType&&H[0]||H;H=H.ownerDocument||H;h("jQuery.clean() is deprecated");var K,I,L,O,M=[];s.merge(M,s.buildFragment(G,H).childNodes);if(N){L=function(P){if(!P.type||o.test(P.type)){return J?J.push(P.parentNode?P.parentNode.removeChild(P):P):N.appendChild(P)}};for(K=0;(I=M[K])!=null;K++){if(!(s.nodeName(I,"script")&&L(I))){N.appendChild(I);if(typeof I.getElementsByTagName!=="undefined"){O=s.grep(s.merge([],I.getElementsByTagName("script")),L);M.splice.apply(M,[K+1,0].concat(O));K+=O.length}}}}return M}}var c=s.event.add,b=s.event.remove,g=s.event.trigger,r=s.fn.toggle,d=s.fn.live,m=s.fn.die,C="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",e=new RegExp("\\b(?:"+C+")\\b"),F=/(?:^|\s)hover(\.\S+|)\b/,l=function(G){if(typeof(G)!=="string"||s.event.special.hover){return G}if(F.test(G)){h("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'")}return G&&G.replace(F,"mouseenter$1 mouseleave$1")};if(s.event.props&&s.event.props[0]!=="attrChange"){s.event.props.unshift("attrChange","attrName","relatedNode","srcElement")}if(s.event.dispatch){a(s.event,"handle",s.event.dispatch,"jQuery.event.handle is undocumented and deprecated")}s.event.add=function(J,H,I,K,G){if(J!==document&&e.test(H)){h("AJAX events should be attached to document: "+H)}c.call(this,J,l(H||""),I,K,G)};s.event.remove=function(K,I,J,G,H){b.call(this,K,l(I)||"",J,G,H)};s.fn.error=function(){var G=Array.prototype.slice.call(arguments,0);h("jQuery.fn.error() is deprecated");G.splice(0,0,"error");
21if(arguments.length){return this.bind.apply(this,G)}this.triggerHandler.apply(this,G);return this};s.fn.toggle=function(K,I){if(!s.isFunction(K)||!s.isFunction(I)){return r.apply(this,arguments)}h("jQuery.fn.toggle(handler, handler...) is deprecated");var H=arguments,G=K.guid||s.guid++,J=0,L=function(M){var N=(s._data(this,"lastToggle"+K.guid)||0)%J;s._data(this,"lastToggle"+K.guid,N+1);M.preventDefault();return H[N].apply(this,arguments)||false};L.guid=G;while(J<H.length){H[J++].guid=G}return this.click(L)};s.fn.live=function(G,I,H){h("jQuery.fn.live() is deprecated");if(d){return d.apply(this,arguments)}s(this.context).on(G,this.selector,I,H);return this};s.fn.die=function(G,H){h("jQuery.fn.die() is deprecated");if(m){return m.apply(this,arguments)}s(this.context).off(G,this.selector||"**",H);return this};s.event.trigger=function(I,J,H,G){if(!H&&!e.test(I)){h("Global events are undocumented and deprecated")}return g.call(this,I,J,H||document,G)};s.each(C.split("|"),function(H,G){s.event.special[G]={setup:function(){var I=this;if(I!==document){s.event.add(document,G+"."+s.guid,function(){s.event.trigger(G,null,I,true)});s._data(this,G,s.guid++)}return false},teardown:function(){if(this!==document){s.event.remove(document,G+"."+s._data(this,G))}return false}}})})(jQuery,window);var $j = jQuery.noConflict(); 22/*! jQuery UI - v1.10.3 - 2013-05-03 23* http://jqueryui.com 24* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js 25* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 26(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id
vendor: 9,059 bytes, line 26
26)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):u
vendor: 29,242 bytes, lines 26-27
26ndefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i) 27},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n
vendor: 19,822 bytes, line 27
27/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):u
vendor: 4,285 bytes, line 27
27ndefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if
vendor: 4,061 bytes, lines 27-28
27(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break; 28this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;
vendor: 2,144 bytes, line 28
28return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);
vendor: 1,124 bytes, line 28
28if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td> </td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHe
vendor: 25,436 bytes, lines 28-29
28ight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons")) 29},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id
vendor: 16,543 bytes, line 29
29)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}
vendor: 5,447 bytes, line 29
29).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,a.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
vendor: 6,173 bytes, line 29
29ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,a="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("
29keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1; 30case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0}
vendor: 12,119 bytes, line 30
30,_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null}
vendor: 8,396 bytes, line 30
30,_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,E,N,W,O,F,R,L=new Date,j=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:j,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?this.maxRows:A:A,this.maxRows=H,E=this._daylightSavingAdjust(new Date(te,Z,1-z)),N=0;H>N;N++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[E]):[!0,""],F=E.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>E||J&&E>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(E.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===E.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(E.getTime()===$.getTime()?" "+this._currentClass:"")+(E.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"'")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(F&&!v?" ":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===j.getTime()?" ui-state-highlight":"")+(E.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)}
vendor: 32,992 bytes, lines 30-31
30,_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html(" "),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size} 31}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
31se").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>
vendor: 15,024 bytes, lines 31-32
31o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove() 32},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3
vendor: 6,529 bytes, line 32
32",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}
vendor: 16,188 bytes, lines 32-34
32(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})} 33(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position); 34if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery);var Scriptaculous={Version:"1.8.3",require:function(b){try{document.write('
34<script type="text/javascript" src="'+b+'"><\/script>')}catch(c){var a=document.createElement("script");a.type="text/javascript";a.src=b;document.getElementsByTagName("head")[0].appendChild(a)}},REQUIRED_PROTOTYPE:"1.6.0.3",load:function(){function a(b){var c=b.replace(/_.*|\./g,"");c=parseInt(c+"0".times(4-c.length));return b.indexOf("_")>-1?c-1:c}if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(a(Prototype.Version)<a(Scriptaculous.REQUIRED_PROTOTYPE))){throw ("script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE)}}};Scriptaculous.load();var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(a){a=a.toUpperCase();var g=this.NODEMAP[a]||"div";var b=document.createElement(g);try{b.innerHTML="<"+a+"></"+a+">"}catch(f){}var d=b.firstChild||null;if(d&&(d.tagName.toUpperCase()!=a)){d=d.getElementsByTagName(a)[0]}if(!d){d=document.createElement(a)}if(!d){return}if(arguments[1]){if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)||arguments[1].tagName){this._children(d,arguments[1])}else{var c=this._attributes(arguments[1]);if(c.length){try{b.innerHTML="<"+a+" "+c+"></"+a+">"}catch(f){}d=b.firstChild||null;if(!d){d=document.createElement(a);for(attr in arguments[1]){d[attr=="class"?"className":attr]=arguments[1][attr]}}if(d.tagName.toUpperCase()!=a){d=b.getElementsByTagName(a)[0]}}}}if(arguments[2]){this._children(d,arguments[2])}return $(d)},_text:function(a){return document.createTextNode(a)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(a){var b=[];for(attribute in a){b.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+a[attribute].toString().escapeHTML().gsub(/"/,""")+'"')}return b.join(" ")},_children:function(b,a){if(a.tagName){b.appendChild(a);return}if(typeof a=="object"){a.flatten().each(function(c){if(typeof c=="object"){b.appendChild(c)}else{if(Builder._isStringOrNumber(c)){b.appendChild(Builder._text(c))}}})}else{if(Builder._isStringOrNumber(a)){b.appendChild(Builder._text(a))}}},_isStringOrNumber:function(a){return(typeof a=="string"||typeof a=="number")},build:function(b){var a=this.node("div");$(a).update(b.strip());return a.down()},dump:function(b){if(typeof b!="object"&&typeof b!="function"){b=window}var a=("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);a.each(function(c){b[c]=function(){return Builder.node.apply(Builder,[c].concat($A(arguments)))}})}};String.prototype.parseColor=function(){var a="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(",");var b=0;do{a+=parseInt(c[b]).toColorPart()}while(++b<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var b=1;b<4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,b))?Element.collectTextNodesIgnoreClass(c,b):""))}).flatten().join("")};Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:(b/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(b){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return(-Math.cos(a*Math.PI)/2)+0.5},reverse:function(a){return 1-a},flicker:function(a){var a=((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4;return a>1?1:a},wobble:function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5},pulse:function(b,a){return(-Math.cos((b*((a||5)-0.5)*2)*Math.PI)/2)+0.5},spring:function(a){return 1-(Math.cos(a*4.5*Math.PI)*Math.exp(-a*6))},none:function(a){return 0},full:function(a){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";if(Prototype.Browser.IE){b+=";zoom:1"}a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore(new Element("span",{style:b}
34).update(d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(b,c){var e;if(((typeof b=="object")||Object.isFunction(b))&&(b.length)){e=b}else{e=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(e).each(function(g,f){new c(g,Object.extend(a,{delay:f*a.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c,a){b=$(b);c=(c||"appear").toLowerCase();return Effect[Effect.PAIRS[c][b.visible()?1:0]](b,Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},a||{}))}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var c=new Date().getTime();var a=Object.isString(b.options.queue)?b.options.queue:b.options.queue.position;switch(a){case"front":this.effects.findAll(function(d){return d.state=="idle"}).each(function(d){d.startOn+=b.finishOn;d.finishOn+=b.finishOn});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break}b.startOn+=c;b.finishOn+=c;if(!b.options.queue.limit||(this.effects.length<b.options.queue.limit)){this.effects.push(b)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var c=new Date().getTime();for(var b=0,a=this.effects.length;b<a;b++){this.effects[b]&&this.effects[b].loop(c)}}});Effect.Queues={instances:$H(),get:function(a){if(!Object.isString(a)){return a}return this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(a){if(a&&a.transition===false){a.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;this.render=(function(){function b(d,c){if(d.options[c+"Internal"]){d.options[c+"Internal"](d)}if(d.options[c]){d.options[c](d)}}return function(c){if(this.state==="idle"){this.state="running";b(this,"beforeSetup");if(this.setup){this.setup()}b(this,"afterSetup")}if(this.state==="running"){c=(this.options.transition(c)*this.fromToDelta)+this.options.from;this.position=c;b(this,"beforeUpdate");if(this.update){this.update(c)}b(this,"afterUpdate")}}})();this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return}var b=(c-this.startOn)/this.totalTime,a=(b*this.totalFrames).round();if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){var a=$H();for(property in this){if(!Object.isFunction(this[property])){a.set(property,this[property])}}return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");if(b.finish){b.finish(a)}b.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(c,f,e){c=Object.isString(c)?$(c):c;var b=$A(arguments),d=b.last(),a=b.length==5?b[3]:null;this.method=Object.isFunction(d)?d.bind(c):Object.isFunction(c[d])?c[d].bind(c):function(g){c[d]=g};this.start(Object.extend({from:f,to:e},a||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var a=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(a)},update:function(a){this.element.setOpacity(a)}});Effect.Move=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(a)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){this.element.setStyle({left:(this.options.x*a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(b,a,c){return new Effect.Move(b,Object.extend({x:c,y:a},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(b,c){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)}
34,finish:function(a){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(a,e){var f={};if(this.options.scaleX){f.width=e.round()+"px"}if(this.options.scaleY){f.height=a.round()+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(e-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){f.top=this.originalTop-c+"px"}if(this.options.scaleX){f.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){f.top=-c+"px"}if(this.options.scaleX){f.left=-b+"px"}}}this.element.setStyle(f)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(a)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return}this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+((this._base[d]+(this._delta[d]*a)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(c){var b=arguments[1]||{},a=document.viewport.getScrollOffsets(),d=$(c).cumulativeOffset();if(b.offset){d[1]+=b.offset}return new Effect.Tween(null,a.top,d[1],b,function(e){scrollTo(a.left,e.round())})};Effect.Fade=function(c){c=$(c);var a=c.getInlineOpacity();var b=Object.extend({from:c.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return}d.element.hide().setStyle({opacity:a})}},arguments[1]||{});return new Effect.Opacity(c,b)};Effect.Appear=function(b){b=$(b);var a=Object.extend({from:(b.getStyle("display")=="none"?0:b.getOpacity()||0),to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},arguments[1]||{});return new Effect.Opacity(b,a)};Effect.Puff=function(b){b=$(b);var a={opacity:b.getInlineOpacity(),position:b.getStyle("position"),top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};return new Effect.Parallel([new Effect.Scale(b,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(c){Position.absolutize(c.effects[0].element)},afterFinishInternal:function(c){c.effects[0].element.hide().setStyle(a)}},arguments[1]||{}))};Effect.BlindUp=function(a){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(b){b.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(b){b=$(b);var a=b.getDimensions();return new Effect.Scale(b,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:a.height,originalWidth:a.width},restoreAfterFinish:true,afterSetup:function(c){c.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(c){c.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(b){b=$(b);var a=b.getInlineOpacity();return new Effect.Appear(b,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(c){new Effect.Scale(c.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(d){d.element.makePositioned().makeClipping()},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned().setStyle({opacity:a})}})}},arguments[1]||{}))};Effect.DropOut=function(b){b=$(b);var a={top:b.getStyle("top"),left:b.getStyle("left"),opacity:b.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(b,{x:0,y:100,sync:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(c){c.effects[0].element.makePositioned()},afterFinishInternal:function(c){c.effects[0].element.hide().undoPositioned().setStyle(a)}},arguments[1]||{}))};Effect.Shake=function(d){d=$(d);var b=Object.extend({distance:20,duration:0.5},arguments[1]||{});var e=parseFloat(b.distance);var c=parseFloat(b.duration)/10;var a={top:d.getStyle("top"),left:d.getStyle("left")};return new Effect.Move(d,{x:e,y:0,duration:c,afterFinishInternal:function(f){new Effect.Move(f.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(g){new Effect.Move(g.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(k){new Effect.Move(k.element,{x:-e,y:0,duration:c,afterFinishInternal:function(l){l.element.undoPositioned().setStyle(a)}})}})}})}})}})}})};Effect.SlideDown=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.SlideUp=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};Effect.Grow=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});
34var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var g=c.getDimensions();var h,f;var e,d;switch(b.direction){case"top-left":h=f=e=d=0;break;case"top-right":h=g.width;f=d=0;e=-g.width;break;case"bottom-left":h=e=0;f=g.height;d=-g.height;break;case"bottom-right":h=g.width;f=g.height;e=-g.width;d=-g.height;break;case"center":h=g.width/2;f=g.height/2;e=-g.width/2;d=-g.height/2;break}return new Effect.Move(c,{x:h,y:f,duration:0.01,beforeSetup:function(j){j.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(j){new Effect.Parallel([new Effect.Opacity(j.element,{sync:true,to:1,from:0,transition:b.opacityTransition}),new Effect.Move(j.element,{x:e,y:d,sync:true,transition:b.moveTransition}),new Effect.Scale(j.element,100,{scaleMode:{originalHeight:g.height,originalWidth:g.width},sync:true,scaleFrom:window.opera?1:0,transition:b.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(k){k.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(k){k.effects[0].element.undoClipping().undoPositioned().setStyle(a)}},b))}})};Effect.Shrink=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var f=c.getDimensions();var e,d;switch(b.direction){case"top-left":e=d=0;break;case"top-right":e=f.width;d=0;break;case"bottom-left":e=0;d=f.height;break;case"bottom-right":e=f.width;d=f.height;break;case"center":e=f.width/2;d=f.height/2;break}return new Effect.Parallel([new Effect.Opacity(c,{sync:true,to:0,from:1,transition:b.opacityTransition}),new Effect.Scale(c,window.opera?1:0,{sync:true,transition:b.scaleTransition,restoreAfterFinish:true}),new Effect.Move(c,{x:e,y:d,sync:true,transition:b.moveTransition})],Object.extend({beforeStartInternal:function(g){g.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(g){g.effects[0].element.hide().undoClipping().undoPositioned().setStyle(a)}},b))};Effect.Pulsate=function(c){c=$(c);var b=arguments[1]||{},a=c.getInlineOpacity(),e=b.transition||Effect.Transitions.linear,d=function(f){return 1-e((-Math.cos((f*(b.pulses||5)*2)*Math.PI)/2)+0.5)};return new Effect.Opacity(c,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(f){f.element.setStyle({opacity:a})}},b),{transition:d}))};Effect.Fold=function(b){b=$(b);var a={top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};b.makeClipping();return new Effect.Scale(b,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(c){new Effect.Scale(b,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(d){d.element.hide().undoClipping().setStyle(a)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(c){this.element=$(c);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(a.style)){this.style=$H(a.style)}else{if(a.style.include(":")){this.style=a.style.parseStyle()}else{this.element.addClassName(a.style);this.style=$H(this.element.getStyles());this.element.removeClassName(a.style);var b=this.element.getStyles();this.style=this.style.reject(function(d){return d.value==b[d.key]});a.afterFinishInternal=function(d){d.element.addClassName(d.options.style);d.transforms.each(function(e){d.element.style[e.style]=""})}}}this.start(a)},setup:function(){function a(b){if(!b||["rgba(0, 0, 0, 0)","transparent"].include(b)){b="#ffffff"}b=b.parseColor();return $R(0,2).map(function(c){return parseInt(b.slice(c*2+1,c*2+3),16)})}this.transforms=this.style.map(function(g){var f=g[0],e=g[1],d=null;if(e.parseColor("#zzzzzz")!="#zzzzzz"){e=e.parseColor();d="color"}else{if(f=="opacity"){e=parseFloat(e);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(e)){var c=e.match(/^([\+\-]?[0-9\.]+)(.*)$/);e=parseFloat(c[1]);d=(c.length==3)?c[2]:null}}}var b=this.element.getStyle(f);return{style:f.camelize(),originalValue:d=="color"?a(b):parseFloat(b||0),targetValue:d=="color"?a(e):e,unit:d}}.bind(this)).reject(function(b){return((b.originalValue==b.targetValue)||(b.unit!="color"&&(isNaN(b.originalValue)||isNaN(b.targetValue))))})},update:function(a){var d={},b,c=this.transforms.length;while(c--){d[(b=this.transforms[c]).style]=b.unit=="color"?"#"+(Math.round(b.originalValue[0]+(b.targetValue[0]-b.originalValue[0])*a)).toColorPart()+(Math.round(b.originalValue[1]+(b.targetValue[1]-b.originalValue[1])*a)).toColorPart()+(Math.round(b.originalValue[2]+(b.targetValue[2]-b.originalValue[2])*a)).toColorPart():(b.originalValue+(b.targetValue-b.originalValue)*a).toFixed(3)+(b.unit===null?"":b.unit)}this.element.setStyle(d,true)}});Effect.Transform=Class.create({initialize:function(a){this.tracks=[];this.options=arguments[1]||{};this.addTracks(a)},addTracks:function(a){a.each(function(b){b=$H(b);var c=b.values().first();this.tracks.push($H({ids:b.keys().first(),effect:Effect.Morph,options:{style:c}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var d=a.get("ids"),c=a.get("effect"),b=a.get("options");var e=[$(d)||$$(d)].flatten();return e.map(function(f){return new c(f,Object.extend({sync:true},b))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var b,a=$H();if(Prototype.Browser.WebKit){b=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';b=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(c){if(b[c]){a.set(c,b[c])}});if(Prototype.Browser.IE&&this.include("opacity")){a.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return a};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(b){var a=document.defaultView.getComputedStyle($(b),null);return Element.CSS_PROPERTIES.inject({},function(c,d){c[d]=a[d];return c})}}else{Element.getStyles=function(b){b=$(b);var a=b.currentStyle,c;c=Element.CSS_PROPERTIES.inject({},function(d,e){d[e]=a[e];return d});if(!c.opacity){c.opacity=b.getOpacity()}return c}}Effect.Methods={morph:function(a,b){a=$(a);
34new Effect.Morph(a,Object.extend({style:b},arguments[2]||{}));return a},visualEffect:function(c,e,b){c=$(c);var d=e.dasherize().camelize(),a=d.charAt(0).toUpperCase()+d.substring(1);new Effect[a](c,b);return c},highlight:function(b,a){b=$(b);new Effect.Highlight(b,a);return b}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(c,b){c=$(c);Effect[a.charAt(0).toUpperCase()+a.substring(1)](c,b);return c}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);if(Object.isUndefined(Effect)){throw ("dragdrop.js requires including script.aculo.us' effects.js library")}var Droppables={drops:[],remove:function(a){this.drops=this.drops.reject(function(b){return b.element==$(a)})},add:function(b){b=$(b);var a=Object.extend({greedy:true,hoverclass:null,tree:false},arguments[1]||{});if(a.containment){a._containers=[];var c=a.containment;if(Object.isArray(c)){c.each(function(d){a._containers.push($(d))})}else{a._containers.push($(c))}}if(a.accept){a.accept=[a.accept].flatten()}Element.makePositioned(b);a.element=b;this.drops.push(a)},findDeepestChild:function(a){deepest=a[0];for(i=1;i<a.length;++i){if(Element.isParent(a[i].element,deepest.element)){deepest=a[i]}}return deepest},isContained:function(b,a){var c;if(a.tree){c=b.treeNode}else{c=b.parentNode}return a._containers.detect(function(d){return c==d})},isAffected:function(a,c,b){return((b.element!=c)&&((!b._containers)||this.isContained(c,b))&&((!b.accept)||(Element.classNames(c).detect(function(d){return b.accept.include(d)})))&&Position.within(b.element,a[0],a[1]))},deactivate:function(a){if(a.hoverclass){Element.removeClassName(a.element,a.hoverclass)}this.last_active=null},activate:function(a){if(a.hoverclass){Element.addClassName(a.element,a.hoverclass)}this.last_active=a},show:function(a,c){if(!this.drops.length){return}var b,d=[];this.drops.each(function(e){if(Droppables.isAffected(a,c,e)){d.push(e)}});if(d.length>0){b=Droppables.findDeepestChild(d)}if(this.last_active&&this.last_active!=b){this.deactivate(this.last_active)}if(b){Position.within(b.element,a[0],a[1]);if(b.onHover){b.onHover(c,b.element,Position.overlap(b.overlap,b.element))}if(b!=this.last_active){Droppables.activate(b)}}},fire:function(b,a){if(!this.last_active){return}Position.prepare();if(this.isAffected([Event.pointerX(b),Event.pointerY(b)],a,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(a,this.last_active.element,b);return true}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(a){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress)}this.drags.push(a)},unregister:function(a){this.drags=this.drags.reject(function(b){return b==a});if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);Event.stopObserving(document,"keypress",this.eventKeypress)}},activate:function(a){if(a.options.delay){this._timeout=setTimeout(function(){Draggables._timeout=null;window.focus();Draggables.activeDraggable=a}.bind(this),a.options.delay)}else{window.focus();this.activeDraggable=a}},deactivate:function(){this.activeDraggable=null},updateDrag:function(a){if(!this.activeDraggable){return}var b=[Event.pointerX(a),Event.pointerY(a)];if(this._lastPointer&&(this._lastPointer.inspect()==b.inspect())){return}this._lastPointer=b;this.activeDraggable.updateDrag(a,b)},endDrag:function(a){if(this._timeout){clearTimeout(this._timeout);this._timeout=null}if(!this.activeDraggable){return}this._lastPointer=null;this.activeDraggable.endDrag(a);this.activeDraggable=null}
34,keyPress:function(a){if(this.activeDraggable){this.activeDraggable.keyPress(a)}},addObserver:function(a){this.observers.push(a);this._cacheObserverCallbacks()},removeObserver:function(a){this.observers=this.observers.reject(function(b){return b.element==a});this._cacheObserverCallbacks()},notify:function(b,a,c){if(this[b+"Count"]>0){this.observers.each(function(d){if(d[b]){d[b](b,a,c)}})}if(a.options[b]){a.options[b](a,c)}},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(a){Draggables[a+"Count"]=Draggables.observers.select(function(b){return b[a]}).length})}};var Draggable=Class.create({initialize:function(b){var c={handle:false,reverteffect:function(f,e,d){var g=Math.sqrt(Math.abs(e^2)+Math.abs(d^2))*0.02;new Effect.Move(f,{x:-d,y:-e,duration:g,queue:{scope:"_draggable",position:"end"}})},endeffect:function(e){var d=Object.isNumber(e._opacity)?e._opacity:1;new Effect.Opacity(e,{duration:0.2,from:0.7,to:d,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[e]=false}})},zindex:1000,revert:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false,delay:0};if(!arguments[1]||Object.isUndefined(arguments[1].endeffect)){Object.extend(c,{starteffect:function(d){d._opacity=Element.getOpacity(d);Draggable._dragging[d]=true;new Effect.Opacity(d,{duration:0.2,from:d._opacity,to:0.7})}})}var a=Object.extend(c,arguments[1]||{});this.element=$(b);if(a.handle&&Object.isString(a.handle)){this.handle=this.element.down("."+a.handle,0)}if(!this.handle){this.handle=$(a.handle)}if(!this.handle){this.handle=this.element}if(a.scroll&&!a.scroll.scrollTo&&!a.scroll.outerHTML){a.scroll=$(a.scroll);this._isScrollChild=Element.childOf(this.element,a.scroll)}Element.makePositioned(this.element);this.options=a;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")])},initDrag:function(a){if(!Object.isUndefined(Draggable._dragging[this.element])&&Draggable._dragging[this.element]){return}if(Event.isLeftClick(a)){var c=Event.element(a);if((tag_name=c.tagName.toUpperCase())&&(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA")){return}var b=[Event.pointerX(a),Event.pointerY(a)];var d=this.element.cumulativeOffset();this.offset=[0,1].map(function(e){return(b[e]-d[e])});Draggables.activate(this);Event.stop(a)}},startDrag:function(b){this.dragging=true;if(!this.delta){this.delta=this.currentDelta()}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);this._originallyAbsolute=(this.element.getStyle("position")=="absolute");if(!this._originallyAbsolute){Position.absolutize(this.element)}this.element.parentNode.insertBefore(this._clone,this.element)}if(this.options.scroll){if(this.options.scroll==window){var a=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=a.left;this.originalScrollTop=a.top}else{this.originalScrollLeft=this.options.scroll.scrollLeft;this.originalScrollTop=this.options.scroll.scrollTop}}Draggables.notify("onStart",this,b);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(event,pointer){if(!this.dragging){this.startDrag(event)}if(!this.options.quiet){Position.prepare();Droppables.show(pointer,this.element)}Draggables.notify("onDrag",this,event);this.draw(pointer);if(this.options.change){this.options.change(this)}if(this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height]}}else{p=Position.page(this.options.scroll);p[0]+=this.options.scroll.scrollLeft+Position.deltaX;
34p[1]+=this.options.scroll.scrollTop+Position.deltaY;p.push(p[0]+this.options.scroll.offsetWidth);p.push(p[1]+this.options.scroll.offsetHeight)}var speed=[0,0];if(pointer[0]<(p[0]+this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)}if(pointer[1]<(p[1]+this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)}if(pointer[0]>(p[2]-this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)}if(pointer[1]>(p[3]-this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)}this.startScrolling(speed)}if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(event)},finishDrag:function(b,f){this.dragging=false;if(this.options.quiet){Position.prepare();var e=[Event.pointerX(b),Event.pointerY(b)];Droppables.show(e,this.element)}if(this.options.ghosting){if(!this._originallyAbsolute){Position.relativize(this.element)}delete this._originallyAbsolute;Element.remove(this._clone);this._clone=null}var g=false;if(f){g=Droppables.fire(b,this.element);if(!g){g=false}}if(g&&this.options.onDropped){this.options.onDropped(this.element)}Draggables.notify("onEnd",this,b);var a=this.options.revert;if(a&&Object.isFunction(a)){a=a(this.element)}var c=this.currentDelta();if(a&&this.options.reverteffect){if(g==0||a!="failure"){this.options.reverteffect(this.element,c[1]-this.delta[1],c[0]-this.delta[0])}}else{this.delta=c}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(a){if(a.keyCode!=Event.KEY_ESC){return}this.finishDrag(a,false);Event.stop(a)},endDrag:function(a){if(!this.dragging){return}this.stopScrolling();this.finishDrag(a,true);Event.stop(a)},draw:function(a){var g=this.element.cumulativeOffset();if(this.options.ghosting){var c=Position.realOffset(this.element);g[0]+=c[0]-Position.deltaX;g[1]+=c[1]-Position.deltaY}var f=this.currentDelta();g[0]-=f[0];g[1]-=f[1];if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){g[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;g[1]-=this.options.scroll.scrollTop-this.originalScrollTop}var e=[0,1].map(function(d){return(a[d]-g[d]-this.offset[d])}.bind(this));if(this.options.snap){if(Object.isFunction(this.options.snap)){e=this.options.snap(e[0],e[1],this)}else{if(Object.isArray(this.options.snap)){e=e.map(function(d,h){return(d/this.options.snap[h]).round()*this.options.snap[h]}.bind(this))}else{e=e.map(function(d){return(d/this.options.snap).round()*this.options.snap}.bind(this))}}}var b=this.element.style;if((!this.options.constraint)||(this.options.constraint=="horizontal")){b.left=e[0]+"px"}if((!this.options.constraint)||(this.options.constraint=="vertical")){b.top=e[1]+"px"}if(b.visibility=="hidden"){b.visibility=""}},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null;Draggables._lastScrollPointer=null}},startScrolling:function(a){if(!(a[0]||a[1])){return}this.scrollSpeed=[a[0]*this.options.scrollSpeed,a[1]*this.options.scrollSpeed];this.lastScrolled=new Date();this.scrollInterval=setInterval(this.scroll.bind(this),10)},scroll:function(){var current=new Date();var delta=current-this.lastScrolled;this.lastScrolled=current;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000}Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);if(this._isScrollChild){Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;if(Draggables._lastScrollPointer[0]<0){Draggables._lastScrollPointer[0]=0}if(Draggables._lastScrollPointer[1]<0){Draggables._lastScrollPointer[1]=0}this.draw(Draggables._lastScrollPointer)}if(this.options.change){this.options.change(this)}},_getWindowScroll:function(w){var T,L,W,H;with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft}else{if(w.document.body){T=body.scrollTop;L=body.scrollLeft}}if(w.innerWidth){W=w.innerWidth;H=w.innerHeight}else{if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight}else{W=body.offsetWidth;H=body.offsetHeight}}}return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(b,a){this.element=$(b);this.observer=a;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}});var Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(a){while(a.tagName.toUpperCase()!="BODY"){if(a.id&&Sortable.sortables[a.id]){return a}
34a=a.parentNode}},options:function(a){a=Sortable._findRootElement($(a));if(!a){return}return Sortable.sortables[a.id]},destroy:function(a){a=$(a);var b=Sortable.sortables[a.id];if(b){Draggables.removeObserver(b.element);b.droppables.each(function(c){Droppables.remove(c)});b.draggables.invoke("destroy");delete Sortable.sortables[b.element.id]}},create:function(c){c=$(c);var b=Object.extend({element:c,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:c,handle:false,only:false,delay:0,hoverclass:null,ghosting:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:false,handles:false,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(c);var a={revert:true,quiet:b.quiet,scroll:b.scroll,scrollSpeed:b.scrollSpeed,scrollSensitivity:b.scrollSensitivity,delay:b.delay,ghosting:b.ghosting,constraint:b.constraint,handle:b.handle};if(b.starteffect){a.starteffect=b.starteffect}if(b.reverteffect){a.reverteffect=b.reverteffect}else{if(b.ghosting){a.reverteffect=function(f){f.style.top=0;f.style.left=0}}}if(b.endeffect){a.endeffect=b.endeffect}if(b.zindex){a.zindex=b.zindex}var d={overlap:b.overlap,containment:b.containment,tree:b.tree,hoverclass:b.hoverclass,onHover:Sortable.onHover};var e={onHover:Sortable.onEmptyHover,overlap:b.overlap,containment:b.containment,hoverclass:b.hoverclass};Element.cleanWhitespace(c);b.draggables=[];b.droppables=[];if(b.dropOnEmpty||b.tree){Droppables.add(c,e);b.droppables.push(c)}(b.elements||this.findElements(c,b)||[]).each(function(h,f){var g=b.handles?$(b.handles[f]):(b.handle?$(h).select("."+b.handle)[0]:h);b.draggables.push(new Draggable(h,Object.extend(a,{handle:g})));Droppables.add(h,d);if(b.tree){h.treeNode=c}b.droppables.push(h)});if(b.tree){(Sortable.findTreeElements(c,b)||[]).each(function(f){Droppables.add(f,e);f.treeNode=c;b.droppables.push(f)})}this.sortables[c.identify()]=b;Draggables.addObserver(new SortableObserver(c,b.onUpdate))},findElements:function(b,a){return Element.findChildren(b,a.only,a.tree?true:false,a.tag)},findTreeElements:function(b,a){return Element.findChildren(b,a.only,a.tree?true:false,a.treeTag)},onHover:function(e,d,a){if(Element.isParent(d,e)){return}if(a>0.33&&a<0.66&&Sortable.options(d).tree){return}else{if(a>0.5){Sortable.mark(d,"before");if(d.previousSibling!=e){var b=e.parentNode;e.style.visibility="hidden";d.parentNode.insertBefore(e,d);if(d.parentNode!=b){Sortable.options(b).onChange(e)}Sortable.options(d.parentNode).onChange(e)}}else{Sortable.mark(d,"after");var c=d.nextSibling||null;if(c!=e){var b=e.parentNode;e.style.visibility="hidden";d.parentNode.insertBefore(e,c);if(d.parentNode!=b){Sortable.options(b).onChange(e)}Sortable.options(d.parentNode).onChange(e)}}}},onEmptyHover:function(e,g,h){var j=e.parentNode;var a=Sortable.options(g);if(!Element.isParent(g,e)){var f;var c=Sortable.findElements(g,{tag:a.tag,only:a.only});var b=null;if(c){var d=Element.offsetSize(g,a.overlap)*(1-h);for(f=0;f<c.length;f+=1){if(d-Element.offsetSize(c[f],a.overlap)>=0){d-=Element.offsetSize(c[f],a.overlap)}else{if(d-(Element.offsetSize(c[f],a.overlap)/2)>=0){b=f+1<c.length?c[f+1]:null;break}else{b=c[f];break}}}}g.insertBefore(e,b);Sortable.options(j).onChange(e);a.onChange(e)}},unmark:function(){if(Sortable._marker){Sortable._marker.hide()}},mark:function(b,a){var d=Sortable.options(b.parentNode);if(d&&!d.ghosting){return}if(!Sortable._marker){Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"});document.getElementsByTagName("body").item(0).appendChild(Sortable._marker)}var c=b.cumulativeOffset();Sortable._marker.setStyle({left:c[0]+"px",top:c[1]+"px"});if(a=="after"){if(d.overlap=="horizontal"){Sortable._marker.setStyle({left:(c[0]+b.clientWidth)+"px"})}else{Sortable._marker.setStyle({top:(c[1]+b.clientHeight)+"px"})}}Sortable._marker.show()},_tree:function(e,b,f){var d=Sortable.findElements(e,b)||[];for(var c=0;c<d.length;++c){var a=d[c].id.match(b.format);if(!a){continue}var g={id:encodeURIComponent(a?a[1]:null),element:e,parent:f,children:[],position:f.children.length,container:$(d[c]).down(b.treeTag)};if(g.container){this._tree(g.container,b,g)}f.children.push(g)}return f},tree:function(d){d=$(d);var c=this.options(d);var b=Object.extend({tag:c.tag,treeTag:c.treeTag,only:c.only,name:d.id,format:c.format},arguments[1]||{});var a={id:null,parent:null,children:[],container:d,position:0};return Sortable._tree(d,b,a)},_constructIndex:function(b){var a="";do{if(b.id){a="["+b.position+"]"+a}}while((b=b.parent)!=null);return a},sequence:function(b){b=$(b);var a=Object.extend(this.options(b),arguments[1]||{});return $(this.findElements(b,a)||[]).map(function(c){return c.id.match(a.format)?c.id.match(a.format)[1]:""})}
34,setSequence:function(b,c){b=$(b);var a=Object.extend(this.options(b),arguments[2]||{});var d={};this.findElements(b,a).each(function(e){if(e.id.match(a.format)){d[e.id.match(a.format)[1]]=[e,e.parentNode]}e.parentNode.removeChild(e)});c.each(function(e){var f=d[e];if(f){f[1].appendChild(f[0]);delete d[e]}})},serialize:function(c){c=$(c);var b=Object.extend(Sortable.options(c),arguments[1]||{});var a=encodeURIComponent((arguments[1]&&arguments[1].name)?arguments[1].name:c.id);if(b.tree){return Sortable.tree(c,arguments[1]).children.map(function(d){return[a+Sortable._constructIndex(d)+"[id]="+encodeURIComponent(d.id)].concat(d.children.map(arguments.callee))}).flatten().join("&")}else{return Sortable.sequence(c,arguments[1]).map(function(d){return a+"[]="+encodeURIComponent(d)}).join("&")}}};Element.isParent=function(b,a){if(!b.parentNode||b==a){return false}if(b.parentNode==a){return true}return Element.isParent(b.parentNode,a)};Element.findChildren=function(d,b,a,c){if(!d.hasChildNodes()){return null}c=c.toUpperCase();if(b){b=[b].flatten()}var e=[];$A(d.childNodes).each(function(g){if(g.tagName&&g.tagName.toUpperCase()==c&&(!b||(Element.classNames(g).detect(function(h){return b.include(h)})))){e.push(g)}if(a){var f=Element.findChildren(g,b,a,c);if(f){e.push(f)}}});return(e.length>0?e.flatten():[])};Element.offsetSize=function(a,b){return a["offset"+((b=="vertical"||b=="height")?"Height":"Width")]};if(typeof Effect=="undefined"){throw ("controls.js requires including script.aculo.us' effects.js library")}var Autocompleter={};Autocompleter.Base=Class.create({baseInitialize:function(b,c,a){b=$(b);this.element=b;this.update=$(c);this.hasFocus=false;this.changed=false;this.active=false;this.index=0;this.entryCount=0;this.oldElementValue=this.element.value;if(this.setOptions){this.setOptions(a)}else{this.options=a||{}}this.options.paramName=this.options.paramName||this.element.name;this.options.tokens=this.options.tokens||[];this.options.frequency=this.options.frequency||0.4;this.options.minChars=this.options.minChars||1;this.options.onShow=this.options.onShow||function(d,e){if(!e.style.position||e.style.position=="absolute"){e.style.position="absolute";Position.clone(d,e,{setHeight:false,offsetTop:d.offsetHeight})}Effect.Appear(e,{duration:0.15})};this.options.onHide=this.options.onHide||function(d,e){new Effect.Fade(e,{duration:0.15})};if(typeof(this.options.tokens)=="string"){this.options.tokens=new Array(this.options.tokens)}if(!this.options.tokens.include("\n")){this.options.tokens.push("\n")}this.observer=null;this.element.setAttribute("autocomplete","off");Element.hide(this.update);Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this));Event.observe(this.element,"keydown",this.onKeyPress.bindAsEventListener(this))},show:function(){if(Element.getStyle(this.update,"display")=="none"){this.options.onShow(this.element,this.update)}if(!this.iefix&&(Prototype.Browser.IE)&&(Element.getStyle(this.update,"position")=="absolute")){new Insertion.After(this.update,'<iframe id="'+this.update.id+'_iefix" style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');this.iefix=$(this.update.id+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)}},fixIEOverlapping:function(){Position.clone(this.update,this.iefix,{setTop:(!this.update.style.height)});this.iefix.style.zIndex=1;this.update.style.zIndex=2;Element.show(this.iefix)},hide:function(){this.stopIndicator();if(Element.getStyle(this.update,"display")!="none"){this.options.onHide(this.element,this.update)}if(this.iefix){Element.hide(this.iefix)}},startIndicator:function(){if(this.options.indicator){Element.show(this.options.indicator)}},stopIndicator:function(){if(this.options.indicator){Element.hide(this.options.indicator)}},onKeyPress:function(a){if(this.active){switch(a.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry();Event.stop(a);case Event.KEY_ESC:this.hide();this.active=false;Event.stop(a);return;case Event.KEY_LEFT:case Event.KEY_RIGHT:return;case Event.KEY_UP:this.markPrevious();this.render();Event.stop(a);return;case Event.KEY_DOWN:this.markNext();this.render();Event.stop(a);return}}else{if(a.keyCode==Event.KEY_TAB||a.keyCode==Event.KEY_RETURN||(Prototype.Browser.WebKit>0&&a.keyCode==0)){return}}this.changed=true;this.hasFocus=true;if(this.observer){clearTimeout(this.observer)}this.observer=setTimeout(this.onObserverEvent.bind(this),this.options.frequency*1000)},activate:function(){this.changed=false;this.hasFocus=true;this.getUpdatedChoices()},onHover:function(b){var a=Event.findElement(b,"LI");if(this.index!=a.autocompleteIndex){this.index=a.autocompleteIndex;this.render()}Event.stop(b)},onClick:function(b){var a=Event.findElement(b,"LI");this.index=a.autocompleteIndex;this.selectEntry();this.hide()},onBlur:function(a){setTimeout(this.hide.bind(this),250);this.hasFocus=false;this.active=false},render:function(){if(this.entryCount>0){for(var a=0;a<this.entryCount;a++){this.index==a?Element.addClassName(this.getEntry(a),"selected"):Element.removeClassName(this.getEntry(a),"selected")}if(this.hasFocus){this.show();this.active=true}}else{this.active=false;this.hide()}},markPrevious:function(){if(this.index>0){this.index--}else{this.index=this.entryCount-1}this.getEntry(this.index).scrollIntoView(true)},markNext:function(){if(this.index<this.entryCount-1){this.index++}else{this.index=0}this.getEntry(this.index).scrollIntoView(false)},getEntry:function(a){return this.update.firstChild.childNodes[a]},getCurrentEntry:function(){return this.getEntry(this.index)},selectEntry:function(){this.active=false;this.updateElement(this.getCurrentEntry())},updateElement:function(f){if(this.options.updateElement){this.options.updateElement(f);return}var d="";if(this.options.select){var a=$(f).select("."+this.options.select)||[];if(a.length>0){d=Element.collectTextNodes(a[0],this.options.select)}
34}else{d=Element.collectTextNodesIgnoreClass(f,"informal")}var c=this.getTokenBounds();if(c[0]!=-1){var e=this.element.value.substr(0,c[0]);var b=this.element.value.substr(c[0]).match(/^\s+/);if(b){e+=b[0]}this.element.value=e+d+this.element.value.substr(c[1])}else{this.element.value=d}this.oldElementValue=this.element.value;this.element.focus();if(this.options.afterUpdateElement){this.options.afterUpdateElement(this.element,f)}},updateChoices:function(c){if(!this.changed&&this.hasFocus){this.update.innerHTML=c;Element.cleanWhitespace(this.update);Element.cleanWhitespace(this.update.down());if(this.update.firstChild&&this.update.down().childNodes){this.entryCount=this.update.down().childNodes.length;for(var a=0;a<this.entryCount;a++){var b=this.getEntry(a);b.autocompleteIndex=a;this.addObservers(b)}}else{this.entryCount=0}this.stopIndicator();this.index=0;if(this.entryCount==1&&this.options.autoSelect){this.selectEntry();this.hide()}else{this.render()}}},addObservers:function(a){Event.observe(a,"mouseover",this.onHover.bindAsEventListener(this));Event.observe(a,"click",this.onClick.bindAsEventListener(this))},onObserverEvent:function(){this.changed=false;this.tokenBounds=null;if(this.getToken().length>=this.options.minChars){this.getUpdatedChoices()}else{this.active=false;this.hide()}this.oldElementValue=this.element.value},getToken:function(){var a=this.getTokenBounds();return this.element.value.substring(a[0],a[1]).strip()},getTokenBounds:function(){if(null!=this.tokenBounds){return this.tokenBounds}var e=this.element.value;if(e.strip().empty()){return[-1,0]}var f=arguments.callee.getFirstDifferencePos(e,this.oldElementValue);var h=(f==this.oldElementValue.length?1:0);var d=-1,c=e.length;var g;for(var b=0,a=this.options.tokens.length;b<a;++b){g=e.lastIndexOf(this.options.tokens[b],f+h-1);if(g>d){d=g}g=e.indexOf(this.options.tokens[b],f+h);if(-1!=g&&g<c){c=g}}return(this.tokenBounds=[d+1,c])}});Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos=function(c,a){var d=Math.min(c.length,a.length);for(var b=0;b<d;++b){if(c[b]!=a[b]){return b}}return d};Ajax.Autocompleter=Class.create(Autocompleter.Base,{initialize:function(c,d,b,a){this.baseInitialize(c,d,a);this.options.asynchronous=true;this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;this.url=b},getUpdatedChoices:function(){this.startIndicator();var a=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,a):a;if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams}new Ajax.Request(this.url,this.options)},onComplete:function(a){this.updateChoices(a.responseText)}});Autocompleter.Local=Class.create(Autocompleter.Base,{initialize:function(b,d,c,a){this.baseInitialize(b,d,a);this.options.array=c},getUpdatedChoices:function(){this.updateChoices(this.options.selector(this))},setOptions:function(a){this.options=Object.extend({choices:10,partialSearch:true,partialChars:2,ignoreCase:true,fullSearch:false,selector:function(b){var d=[];var c=[];var h=b.getToken();var g=0;for(var e=0;e<b.options.array.length&&d.length<b.options.choices;e++){var f=b.options.array[e];var j=b.options.ignoreCase?f.toLowerCase().indexOf(h.toLowerCase()):f.indexOf(h);while(j!=-1){if(j==0&&f.length!=h.length){d.push("<li><strong>"+f.substr(0,h.length)+"</strong>"+f.substr(h.length)+"</li>");break}else{if(h.length>=b.options.partialChars&&b.options.partialSearch&&j!=-1){if(b.options.fullSearch||/\s/.test(f.substr(j-1,
341))){c.push("<li>"+f.substr(0,j)+"<strong>"+f.substr(j,h.length)+"</strong>"+f.substr(j+h.length)+"</li>");break}}}j=b.options.ignoreCase?f.toLowerCase().indexOf(h.toLowerCase(),j+1):f.indexOf(h,j+1)}}if(c.length){d=d.concat(c.slice(0,b.options.choices-d.length))}return"<ul>"+d.join("")+"</ul>"}},a||{})}});Field.scrollFreeActivate=function(a){setTimeout(function(){Field.activate(a)},1)};Ajax.InPlaceEditor=Class.create({initialize:function(c,b,a){this.url=b;this.element=c=$(c);this.prepareOptions();this._controls={};arguments.callee.dealWithDeprecatedOptions(a);Object.extend(this.options,a||{});if(!this.options.formId&&this.element.id){this.options.formId=this.element.id+"-inplaceeditor";if($(this.options.formId)){this.options.formId=""}}if(this.options.externalControl){this.options.externalControl=$(this.options.externalControl)}if(!this.options.externalControl){this.options.externalControlOnly=false}this._originalBackground=this.element.getStyle("background-color")||"transparent";this.element.title=this.options.clickToEditText;this._boundCancelHandler=this.handleFormCancellation.bind(this);this._boundComplete=(this.options.onComplete||Prototype.emptyFunction).bind(this);this._boundFailureHandler=this.handleAJAXFailure.bind(this);this._boundSubmitHandler=this.handleFormSubmission.bind(this);this._boundWrapperHandler=this.wrapUp.bind(this);this.registerListeners()},checkForEscapeOrReturn:function(a){if(!this._editing||a.ctrlKey||a.altKey||a.shiftKey){return}if(Event.KEY_ESC==a.keyCode){this.handleFormCancellation(a)}else{if(Event.KEY_RETURN==a.keyCode){this.handleFormSubmission(a)}}},createControl:function(g,c,b){var e=this.options[g+"Control"];var f=this.options[g+"Text"];if("button"==e){var a=document.createElement("input");a.type="submit";a.value=f;a.className="editor_"+g+"_button";if("cancel"==g){a.onclick=this._boundCancelHandler}this._form.appendChild(a);this._controls[g]=a}else{if("link"==e){var d=document.createElement("a");d.href="#";d.appendChild(document.createTextNode(f));d.onclick="cancel"==g?this._boundCancelHandler:this._boundSubmitHandler;d.className="editor_"+g+"_link";if(b){d.className+=" "+b}this._form.appendChild(d);this._controls[g]=d}}},createEditField:function(){var c=(this.options.loadTextURL?this.options.loadingText:this.getText());var b;if(1>=this.options.rows&&!/\r|\n/.test(this.getText())){b=document.createElement("input");b.type="text";var a=this.options.size||this.options.cols||0;if(0<a){b.size=a}}else{b=document.createElement("textarea");b.rows=(1>=this.options.rows?this.options.autoRows:this.options.rows);b.cols=this.options.cols||40}b.name=this.options.paramName;b.value=c;b.className="editor_field";if(this.options.submitOnBlur){b.onblur=this._boundSubmitHandler}this._controls.editor=b;if(this.options.loadTextURL){this.loadExternalText()}this._form.appendChild(this._controls.editor)},createForm:function(){var b=this;function a(d,e){var c=b.options["text"+d+"Controls"];if(!c||e===false){return}b._form.appendChild(document.createTextNode(c))}this._form=$(document.createElement("form"));this._form.id=this.options.formId;this._form.addClassName(this.options.formClassName);this._form.onsubmit=this._boundSubmitHandler;this.createEditField();if("textarea"==this._controls.editor.tagName.toLowerCase()){this._form.appendChild(document.createElement("br"))}if(this.options.onFormCustomization){this.options.onFormCustomization(this,this._form)}a("Before",this.options.okControl||this.options.cancelControl);this.createControl("ok",this._boundSubmitHandler);a("Between",this.options.okControl&&this.options.cancelControl);this.createControl("cancel",this._boundCancelHandler,"editor_cancel");a("After",this.options.okControl||this.options.cancelControl)},destroy:function(){if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML}this.leaveEditMode();this.unregisterListeners()},enterEditMode:function(a){if(this._saving||this._editing){return}this._editing=true;this.triggerCallback("onEnterEditMode");if(this.options.externalControl){this.options.externalControl.hide()}this.element.hide();this.createForm();this.element.parentNode.insertBefore(this._form,this.element);if(!this.options.loadTextURL){this.postProcessEditField()}
34if(a){Event.stop(a)}},enterHover:function(a){if(this.options.hoverClassName){this.element.addClassName(this.options.hoverClassName)}if(this._saving){return}this.triggerCallback("onEnterHover")},getText:function(){return this.element.innerHTML.unescapeHTML()},handleAJAXFailure:function(a){this.triggerCallback("onFailure",a);if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML;this._oldInnerHTML=null}},handleFormCancellation:function(a){this.wrapUp();if(a){Event.stop(a)}},handleFormSubmission:function(d){var b=this._form;var c=$F(this._controls.editor);this.prepareSubmission();var f=this.options.callback(b,c)||"";if(Object.isString(f)){f=f.toQueryParams()}f.editorId=this.element.id;if(this.options.htmlResponse){var a=Object.extend({evalScripts:true},this.options.ajaxOptions);Object.extend(a,{parameters:f,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});new Ajax.Updater({success:this.element},this.url,a)}else{var a=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(a,{parameters:f,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});new Ajax.Request(this.url,a)}if(d){Event.stop(d)}},leaveEditMode:function(){this.element.removeClassName(this.options.savingClassName);this.removeForm();this.leaveHover();this.element.style.backgroundColor=this._originalBackground;this.element.show();if(this.options.externalControl){this.options.externalControl.show()}this._saving=false;this._editing=false;this._oldInnerHTML=null;this.triggerCallback("onLeaveEditMode")},leaveHover:function(a){if(this.options.hoverClassName){this.element.removeClassName(this.options.hoverClassName)}if(this._saving){return}this.triggerCallback("onLeaveHover")},loadExternalText:function(){this._form.addClassName(this.options.loadingClassName);this._controls.editor.disabled=true;var a=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(a,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(c){this._form.removeClassName(this.options.loadingClassName);var b=c.responseText;if(this.options.stripLoadedTextTags){b=b.stripTags()}this._controls.editor.value=b;this._controls.editor.disabled=false;this.postProcessEditField()}.bind(this),onFailure:this._boundFailureHandler});new Ajax.Request(this.options.loadTextURL,a)},postProcessEditField:function(){var a=this.options.fieldPostCreation;if(a){$(this._controls.editor)["focus"==a?"focus":"activate"]()}},prepareOptions:function(){this.options=Object.clone(Ajax.InPlaceEditor.DefaultOptions);Object.extend(this.options,Ajax.InPlaceEditor.DefaultCallbacks);[this._extraDefaultOptions].flatten().compact().each(function(a){Object.extend(this.options,a)}.bind(this))},prepareSubmission:function(){this._saving=true;this.removeForm();this.leaveHover();this.showSaving()},registerListeners:function(){this._listeners={};var a;$H(Ajax.InPlaceEditor.Listeners).each(function(b){a=this[b.value].bind(this);this._listeners[b.key]=a;if(!this.options.externalControlOnly){this.element.observe(b.key,a)}if(this.options.externalControl){this.options.externalControl.observe(b.key,a)}}.bind(this))},removeForm:function(){if(!this._form){return}this._form.remove();this._form=null;this._controls={}},showSaving:function(){this._oldInnerHTML=this.element.innerHTML;this.element.innerHTML=this.options.savingText;this.element.addClassName(this.options.savingClassName);this.element.style.backgroundColor=this._originalBackground;this.element.show()},triggerCallback:function(b,a){if("function"==typeof this.options[b]){this.options[b](this,a)}},unregisterListeners:function(){$H(this._listeners).each(function(a){if(!this.options.externalControlOnly){this.element.stopObserving(a.key,a.value)}if(this.options.externalControl){this.options.externalControl.stopObserving(a.key,a.value)}}.bind(this))},wrapUp:function(a){this.leaveEditMode();this._boundComplete(a,this.element)}});Object.extend(Ajax.InPlaceEditor.prototype,{dispose:Ajax.InPlaceEditor.prototype.destroy});Ajax.InPlaceCollectionEditor=Class.create(Ajax.InPlaceEditor,{initialize:function($super,c,b,a){this._extraDefaultOptions=Ajax.InPlaceCollectionEditor.DefaultOptions;$super(c,b,a)},createEditField:function(){var a=document.createElement("select");a.name=this.options.paramName;a.size=1;this._controls.editor=a;this._collection=this.options.collection||[];if(this.options.loadCollectionURL){this.loadCollection()}
34else{this.checkForExternalText()}this._form.appendChild(this._controls.editor)},loadCollection:function(){this._form.addClassName(this.options.loadingClassName);this.showLoadingText(this.options.loadingCollectionText);var options=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(options,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(transport){var js=transport.responseText.strip();if(!/^\[.*\]$/.test(js)){throw ("Server returned an invalid collection representation.")}this._collection=eval(js);this.checkForExternalText()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadCollectionURL,options)},showLoadingText:function(b){this._controls.editor.disabled=true;var a=this._controls.editor.firstChild;if(!a){a=document.createElement("option");a.value="";this._controls.editor.appendChild(a);a.selected=true}a.update((b||"").stripScripts().stripTags())},checkForExternalText:function(){this._text=this.getText();if(this.options.loadTextURL){this.loadExternalText()}else{this.buildOptionList()}},loadExternalText:function(){this.showLoadingText(this.options.loadingText);var a=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(a,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(b){this._text=b.responseText.strip();this.buildOptionList()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadTextURL,a)},buildOptionList:function(){this._form.removeClassName(this.options.loadingClassName);this._collection=this._collection.map(function(d){return 2===d.length?d:[d,d].flatten()});var b=("value" in this.options)?this.options.value:this._text;var a=this._collection.any(function(d){return d[0]==b}.bind(this));this._controls.editor.update("");var c;this._collection.each(function(e,d){c=document.createElement("option");c.value=e[0];c.selected=a?e[0]==b:0==d;c.appendChild(document.createTextNode(e[1]));this._controls.editor.appendChild(c)}.bind(this));this._controls.editor.disabled=false;Field.scrollFreeActivate(this._controls.editor)}});Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions=function(a){if(!a){return}function b(c,d){if(c in a||d===undefined){return}a[c]=d}b("cancelControl",(a.cancelLink?"link":(a.cancelButton?"button":a.cancelLink==a.cancelButton==false?false:undefined)));b("okControl",(a.okLink?"link":(a.okButton?"button":a.okLink==a.okButton==false?false:undefined)));b("highlightColor",a.highlightcolor);b("highlightEndColor",a.highlightendcolor)};Object.extend(Ajax.InPlaceEditor,{DefaultOptions:{ajaxOptions:{},autoRows:3,cancelControl:"link",cancelText:"cancel",clickToEditText:"Click to edit",externalControl:null,externalControlOnly:false,fieldPostCreation:"activate",formClassName:"inplaceeditor-form",formId:null,highlightColor:"#ffff99",highlightEndColor:"#ffffff",hoverClassName:"",htmlResponse:true,loadingClassName:"inplaceeditor-loading",loadingText:"Loading...",okControl:"button",okText:"ok",paramName:"value",rows:1,savingClassName:"inplaceeditor-saving",savingText:"Saving...",size:0,stripLoadedTextTags:false,submitOnBlur:false,textAfterControls:"",textBeforeControls:"",textBetweenControls:""},DefaultCallbacks:{callback:function(a){return Form.serialize(a)},onComplete:function(b,a){new Effect.Highlight(a,{startcolor:this.options.highlightColor,keepBackgroundImage:true})},onEnterEditMode:null,onEnterHover:function(a){a.element.style.backgroundColor=a.options.highlightColor;if(a._effect){a._effect.cancel()}},onFailure:function(b,a){alert("Error communication with the server: "+b.responseText.stripTags())},onFormCustomization:null,onLeaveEditMode:null,onLeaveHover:function(a){a._effect=new Effect.Highlight(a.element,{startcolor:a.options.highlightColor,endcolor:a.options.highlightEndColor,restorecolor:a._originalBackground,keepBackgroundImage:true})}},Listeners:{click:"enterEditMode",keydown:"checkForEscapeOrReturn",mouseover:"enterHover",mouseout:"leaveHover"}});Ajax.InPlaceCollectionEditor.DefaultOptions={loadingCollectionText:"Loading options..."};Form.Element.DelayedObserver=Class.create({initialize:function(b,a,c){this.delay=a||0.5;this.element=$(b);this.callback=c;this.timer=null;this.lastValue=$F(this.element);Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))}
34,delayedListener:function(a){if(this.lastValue==$F(this.element)){return}if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(this.onTimerEvent.bind(this),this.delay*1000);this.lastValue=$F(this.element)},onTimerEvent:function(){this.timer=null;this.callback(this.element,$F(this.element))}});if(!Control){var Control={}}Control.Slider=Class.create({initialize:function(d,a,b){var c=this;if(Object.isArray(d)){this.handles=d.collect(function(f){return $(f)})}else{this.handles=[$(d)]}this.track=$(a);this.options=b||{};this.axis=this.options.axis||"horizontal";this.increment=this.options.increment||1;this.step=parseInt(this.options.step||"1");this.range=this.options.range||$R(0,1);this.value=0;this.values=this.handles.map(function(){return 0});this.spans=this.options.spans?this.options.spans.map(function(e){return $(e)}):false;this.options.startSpan=$(this.options.startSpan||null);this.options.endSpan=$(this.options.endSpan||null);this.restricted=this.options.restricted||false;this.maximum=this.options.maximum||this.range.end;this.minimum=this.options.minimum||this.range.start;this.alignX=parseInt(this.options.alignX||"0");this.alignY=parseInt(this.options.alignY||"0");this.trackLength=this.maximumOffset()-this.minimumOffset();this.handleLength=this.isVertical()?(this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,"")):(this.handles[0].offsetWidth!=0?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,""));this.active=false;this.dragging=false;this.disabled=false;if(this.options.disabled){this.setDisabled()}this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):false;if(this.allowedValues){this.minimum=this.allowedValues.min();this.maximum=this.allowedValues.max()}this.eventMouseDown=this.startDrag.bindAsEventListener(this);this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);this.handles.each(function(f,e){e=c.handles.length-1-e;c.setValue(parseFloat((Object.isArray(c.options.sliderValue)?c.options.sliderValue[e]:c.options.sliderValue)||c.range.start),e);f.makePositioned().observe("mousedown",c.eventMouseDown)});this.track.observe("mousedown",this.eventMouseDown);document.observe("mouseup",this.eventMouseUp);document.observe("mousemove",this.eventMouseMove);this.initialized=true},dispose:function(){var a=this;Event.stopObserving(this.track,"mousedown",this.eventMouseDown);Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);this.handles.each(function(b){Event.stopObserving(b,"mousedown",a.eventMouseDown)})},setDisabled:function(){this.disabled=true},setEnabled:function(){this.disabled=false},getNearestValue:function(a){if(this.allowedValues){if(a>=this.allowedValues.max()){return(this.allowedValues.max())}if(a<=this.allowedValues.min()){return(this.allowedValues.min())}var c=Math.abs(this.allowedValues[0]-a);var b=this.allowedValues[0];this.allowedValues.each(function(d){var e=Math.abs(d-a);if(e<=c){b=d;c=e}});return b}if(a>this.range.end){return this.range.end}if(a<this.range.start){return this.range.start}return a},setValue:function(b,a){if(!this.active){this.activeHandleIdx=a||0;this.activeHandle=this.handles[this.activeHandleIdx];this.updateStyles()}a=a||this.activeHandleIdx||0;if(this.initialized&&this.restricted){if((a>0)&&(b<this.values[a-1])){b=this.values[a-1]}if((a<(this.handles.length-1))&&(b>this.values[a+1])){b=this.values[a+1]}}b=this.getNearestValue(b);this.values[a]=b;this.value=this.values[0];this.handles[a].style[this.isVertical()?"top":"left"]=this.translateToPx(b);this.drawSpans();if(!this.dragging||!this.event){this.updateFinished()}},setValueBy:function(b,a){this.setValue(this.values[a||this.activeHandleIdx||0]+b,a||this.activeHandleIdx||0)},translateToPx:function(a){return Math.round(((this.trackLength-this.handleLength)/(this.range.end-this.range.start))*(a-this.range.start))+"px"},translateToValue:function(a){return((a/(this.trackLength-this.handleLength)*(this.range.end-this.range.start))+this.range.start)},getRange:function(b){var a=this.values.sortBy(Prototype.K);b=b||0;return $R(a[b],a[b+1])},minimumOffset:function(){return(this.isVertical()?this.alignY:this.alignX)},maximumOffset:function(){return(this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignX)},isVertical:function(){return(this.axis=="vertical")},drawSpans:function(){var a=this;if(this.spans){$R(0,this.spans.length-1).each(function(b){a.setSpan(a.spans[b],a.getRange(b))})}if(this.options.startSpan){this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value))}if(this.options.endSpan){this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))}},setSpan:function(b,a){if(this.isVertical()){b.style.top=this.translateToPx(a.start);b.style.height=this.translateToPx(a.end-a.start+this.range.start)}else{b.style.left=this.translateToPx(a.start);b.style.width=this.translateToPx(a.end-a.start+this.range.start)}},updateStyles:function(){this.handles.each(function(a){Element.removeClassName(a,"selected")});Element.addClassName(this.activeHandle,"selected")}
34,startDrag:function(c){if(Event.isLeftClick(c)){if(!this.disabled){this.active=true;var d=Event.element(c);var e=[Event.pointerX(c),Event.pointerY(c)];var a=d;if(a==this.track){var b=this.track.cumulativeOffset();this.event=c;this.setValue(this.translateToValue((this.isVertical()?e[1]-b[1]:e[0]-b[0])-(this.handleLength/2)));var b=this.activeHandle.cumulativeOffset();this.offsetX=(e[0]-b[0]);this.offsetY=(e[1]-b[1])}else{while((this.handles.indexOf(d)==-1)&&d.parentNode){d=d.parentNode}if(this.handles.indexOf(d)!=-1){this.activeHandle=d;this.activeHandleIdx=this.handles.indexOf(this.activeHandle);this.updateStyles();var b=this.activeHandle.cumulativeOffset();this.offsetX=(e[0]-b[0]);this.offsetY=(e[1]-b[1])}}}Event.stop(c)}},update:function(a){if(this.active){if(!this.dragging){this.dragging=true}this.draw(a);if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(a)}},draw:function(b){var c=[Event.pointerX(b),Event.pointerY(b)];var a=this.track.cumulativeOffset();c[0]-=this.offsetX+a[0];c[1]-=this.offsetY+a[1];this.event=b;this.setValue(this.translateToValue(this.isVertical()?c[1]:c[0]));if(this.initialized&&this.options.onSlide){this.options.onSlide(this.values.length>1?this.values:this.value,this)}},endDrag:function(a){if(this.active&&this.dragging){this.finishDrag(a,true);Event.stop(a)}this.active=false;this.dragging=false},finishDrag:function(a,b){this.active=false;this.dragging=false;this.updateFinished()},updateFinished:function(){if(this.initialized&&this.options.onChange){this.options.onChange(this.values.length>1?this.values:this.value,this)}this.event=null}});Sound={tracks:{},_enabled:true,template:new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),enable:function(){Sound._enabled=true},disable:function(){Sound._enabled=false},play:function(b){if(!Sound._enabled){return}var a=Object.extend({track:"global",url:b,replace:false},arguments[1]||{});if(a.replace&&this.tracks[a.track]){$R(0,this.tracks[a.track].id).each(function(d){var c=$("sound_"+a.track+"_"+d);c.Stop&&c.Stop();c.remove()});this.tracks[a.track]=null}if(!this.tracks[a.track]){this.tracks[a.track]={id:0}}else{this.tracks[a.track].id++}a.id=this.tracks[a.track].id;
34$$("body")[0].insert(Prototype.Browser.IE?new Element("bgsound",{id:"sound_"+a.track+"_"+a.id,src:a.url,loop:1,autostart:true}):Sound.template.evaluate(a))}};if(Prototype.Browser.Gecko&&navigator.userAgent.indexOf("Win")>0){if(navigator.plugins&&$A(navigator.plugins).detect(function(a){return a.name.indexOf("QuickTime")!=-1})){Sound.template=new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')}else{if(navigator.plugins&&$A(navigator.plugins).detect(function(a){return a.name.indexOf("Windows Media")!=-1})){Sound.template=new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>')}else{if(navigator.plugins&&$A(navigator.plugins).detect(function(a){return a.name.indexOf("RealPlayer")!=-1})){Sound.template=new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>')}else{Sound.play=function(){}}}}};/* 35 * Window Page Load Event 36 */ 37var $j = jQuery.noConflict();// 38jQuery(function(){ 39 initCheckout(); 40 initCarousel(); 41}); 42 43$j(document).ready(function(){ 44 45 // ====== limit length of qty input ========= 46 $j(".quantity-input").limit({ limit: 4 }); 47 48 // ====== Disable spellcheck and autocorrect ========== 49 $j("textarea, input").attr('autocorrect','off'); 50 $j("textarea, input").attr('spellcheck','false'); 51 52 // Added by Cheli for Solr autocomplete search on header 53 $j("#search_frm .auto_complete").autocomplete({ 54 source: "/solr/autocomplete.php", 55 open: function(event, ui){ 56 var autocomplete = $j(".ui-autocomplete"); 57 var position = $j(".ui-autocomplete").position(), 58 left = position.left, top = position.top; 59 autocomplete.css({left: left-13 + "px", 60 top: top + 8 + "px" }); 61 62 }, 63 open: function() { 64 $j(".ui-autocomplete .ui-menu-item a").each(function (i) { 65 var row = $j(this).html(); 66 row=row.replace(/</g,"<"); 67 row=row.replace(/>/g,">"); 68 $j(this).html(row); 69 if(row.search("autocomplete_sub_header")!==-1){ 70 //$j(this).parent().removeClass('ui-menu-item').addClass("autocomplete_sub_header_li presentation"); 71 //$j(this).parent().addClass("autocomplete_sub_header_li presentation"); 72 //$j(this).replaceWith( $j(this).html() ); 73 $j(this).parent().replaceWith("<div class='ui-menu-item autocomplete_sub_header_li presentation'>"+ $j(this).html() +"</div>"); 74 }else{ 75 //$j(this).parent().removeClass('ui-menu-item').addClass("autocomplete_result_item_li"); 76 $j(this).parent().addClass("autocomplete_result_item_li"); 77 } 78 }); 79 $j(this).autocomplete("widget") 80 .appendTo(".top_right1_sub2"); 81 }, 82 83 select: function(event, ui) { 84 var regex = /id='(solr-([a-z]*)-(\w*))'/; 85 m = regex.exec(ui.item.label); 86 87 var element = $j('#' + m[1]); 88 window.location.href = element.data('url'); 89 return false; 90 91 92 /*// searchterm_clean() is defined on js/solr_search.js 93 var temp= searchterm_clean(ui.item.value); 94 $j("#search_frm .auto_complete").each(function() { 95 $j(this).val(temp); 96 }); 97 $j(this).parents("form").submit(); // this will submit the form.*/ 98 } 99 100 }); 101 102}); 103 104 105$j(document).ready(function(){ 106 // Added by Cheli for Solr autocomplete search on header 107 $j("#search_frm2 .auto_complete").autocomplete({ 108 source: "/solr/autocomplete.php", 109 open: function(event, ui){ 110 var autocomplete = $j(".ui-autocomplete2"); 111 var position = $j(".ui-autocomplete2").position(), 112 left = position.left, top = position.top; 113 autocomplete.css({left: left-13 + "px", 114 top: top + 8 + "px" }); 115 116 }, 117 open: function() { 118 $j(this).autocomplete("widget") 119 .appendTo(".middle_sub2"); 120 }, 121 select: function(event, ui) { 122 123 // searchterm_clean() is defined on js/solr_search.js 124 var temp= searchterm_clean(ui.item.value); 125 $j("#search_frm2 .auto_complete").each(function() { 126 $j(this).val(temp); 127 }); 128 $j(this).parents("form").submit(); // this will submit the form. 129 } 130 131 });
132 133}); 134 135 136 137Event.observe(window,'load',function(){ 138 139 // Pulsate any error box that might exist 140 $$('.errorBox').each(function(el){ 141 //Effect.Pulsate(el,{pulses:2,duration:1}); 142 }); 143 144 // handle enter key on quantity box, shopping cart page 145 $$('.quantity_text .input_box').each(function(el){ 146 el.observe('keydown',function(evnt){ 147 var ch = evnt.keyCode || evnt.which; 148 if(ch == Event.KEY_RETURN){ 149 update_cart(); 150 evnt.stop(); 151 } 152 }); 153 }); 154 155 if($j('.blogwrap.blogsingle').length > 0){ 156 // Blog Javascript 157 setInterval(function(){ 158 // Fix Disqus CSS 159 $j('ul.dsq-login-buttons li:last').css({clear:'left'}); 160 },1000); 161 } 162 163 $j('.catering_supply_inner li').click(function(){ 164 var hfer = $j(this).find("a").attr('href'); 165 if(hfer){ 166 window.location.href = hfer; 167 return false; 168 } 169 170 }); 171 172 if($j('#big_thumb').length && $j('.accessories').length){ 173 $j('.accessories label').mousemove(function(ev){ 174 var s = $j(this).attr("alt"); 175 $j('#big_thumb img').attr('src',s); 176 $j('#big_thumb').css({opacity:0.8, top:ev.pageY+10, left:ev.pageX+10}).show(); 177 178 }).mouseout(function(ev){ 179 $j('#big_thumb').hide(); 180 }); 181 } 182 183 if($j('#gift_card_message').length){ 184 $j("#gift_card_message").limit({ 185 limit: 500, 186 id_result: "gift_message_counter", 187 alertClass: "gift_card_message_alert" 188 }); 189 } 190 191 //var url = '/ajax/ajax.search.php'; 192 193 // Karen Kerr: removed to enable Google Merchant Search 194 //$j('#search_box').autocomplete( url, {minChars: 3, selectFirst: false, max: 50} ); 195 196 197}); 198 199$j(document).ajaxError(function( event, jqXHR, request, settings ) { 200 201 if( (request.url.indexOf('error_handling.php') > -1) 202 || (request.url.indexOf('solr/autocomplete.php') > -1 && settings == 'abort') 203 || jqXHR.status == '499' 204 205 ){ 206 //don't send 207 } 208 else{ 209 210 //console.log(event); 211 //console.log(jqXHR); 212 //console.log(request); 213 //console.log(settings); 214 215 $j.ajax("../error_handling.php", { 216 data: { 217 action : 'AjaxFail', 218 jquery_event : JSON.stringify('event: ' + event.type + ', page: ' + event.target.URL), 219 jquery_jqXHR : JSON.stringify(jqXHR), 220 jquery_status : jqXHR.status, 221 jquery_request : JSON.stringify(request), 222 jquery_settings : JSON.stringify(settings), 223 jquery_URL : JSON.stringify(request.url), 224 jquery_target_page : event.target.URL 225 }, 226 dataType: "json", 227 type: "POST", 228 success: function(returnObject) { 229 }, 230 error: function(event, jqXHR, request, settings) { 231 } 232 }); 233 } 234}); 235 236 // bind change event to select 237 $j('.search_sort_box').live('change', function () { 238 var url = $j(this).val(); // get selected value 239 if (url) { // require a URL 240 window.location = url; // redirect 241 } 242 return false; 243 }); 244 245/* 246***************************************************************** 247** global functions 248***************************************************************** 249*/ 250 251 252function clear_zip_field(fld, e) 253{ 254 /* put the text back if we lose focus and the field value is blank */ 255 if (e.type == 'blur' && (fld.value == null || fld.value == '')) 256 { 257 fld.value = "Enter Zip Code"; 258 } 259 /* on focus we want to clear out the field */ 260 else if (e.type == 'focus' && fld.value == "Enter Zip Code") 261 { 262 fld.value = ""; 263 } 264 265 return true; 266} 267 268function change_shipping_billing_address(frm_id) 269{ 270 /* set up the action */ 271 jQuery("#"+frm_id).attr('action',"/cart2.php"); 272 jQuery('#pageAction').val("change_address"); 273 /* submit the form now */ 274 jQuery("#"+frm_id).submit(); 275 276 return false; 277} 278 279//counts/changes how many charachters are in a textarea 280(function($){ 281 $.fn.limit = function(options) { 282 var defaults = { 283 limit: 200, 284 id_result: false, 285 alertClass: false 286 }; 287 var options = $.extend(defaults, options); 288 return this.each(function() { 289 var characters = options.limit; 290 if(options.id_result != false) 291 { 292 $("#"+options.id_result).append("You have <strong>"+ characters+"</strong> characters remaining"); 293 } 294 $(this).keyup(function(){ 295 if($(this).val().length > characters){ 296 $(this).val($(this).val().substr(0, characters)); 297 } 298 if(options.id_result != false) 299 { 300 var remaining = characters - $(this).val().length; 301 $("#"+options.id_result).html("You have <strong>"+ remaining+"</strong> characters remaining"); 302 if(remaining <= 10) 303 { 304 $("#"+options.id_result).addClass(options.alertClass); 305 } 306 else 307 { 308 $("#"+options.id_result).removeClass(options.alertClass); 309 } 310 } 311 }); 312 }); 313 }; 314})(jQuery); 315 316/* 317***************************************************************** 318** search.php functions 319***************************************************************** 320*/ 321 322function search_add_to_cart(that, product_id, sku, price, img_path) { 323 removeCartPopup(); 324 325 var remaining = 0; 326 var option = 0; 327 328 var container = $j(that).closest("div.featured_items_box"); 329 330 var quantity = $j('input.quantity', container).val(); 331 332 var case_amt = 0; 333 var quantity_case = 0; 334 if ( $j("input[name='quantity_case[" + product_id + "]']").length > 0 ) { 335 var quantity_case = $j("input[name='quantity_case[" + product_id + "]']").val(); 336 337 var case_amt = $j('#' + product_id + '_case_amount').val(); 338 } 339 quantity = parseInt( quantity ); 340 quantity_case = parseInt( quantity_case ); 341 case_amt = parseInt( case_amt ); 342 quantity = quantity + (quantity_case * case_amt); 343 344 345 if (isNaN(quantity)) { 346 return false; 347 } 348 349 var intQuantity = parseInt(quantity); 350 if (intQuantity < 1) { 351 return false; 352 } 353 354 $j('div.iner', container).removeClass('hover'); 355 356 if($j('span.remaining', container).length > 0) { 357 remaining = $j('span.remaining', container).val(); 358 var intRemaining = parseInt(remaining); 359 360 if(quantity > intRemaining && intRemaining > 0){ 361 cat_highlight_product(product_id); 362 alert('Currently you may only order ' + remaining + ' of this product.'); 363 return false; 364 } 365 } 366 367 if( $j('#option_' + product_id).length ) { 368 369 var options = $j('select.opts', container); 370 if (options.length > 0) { 371 if (options[0].selectedIndex == 0) { 372 var txt = new String(options[0][0].text); 373 var pos = txt.indexOf("Size") 374 375 cat_highlight_product(product_id); 376 if (pos >=0) alert ("Please select a size.") 377 else alert("Please select a color."); 378 379 options.focus(); 380 return false; 381 } 382 383 option = options.val(); 384 } 385 else { 386 387 388 389 } 390 } 391 392 var option = $j("#option_" + product_id).val(); 393 394 if( $j('#product_' + product_id ).length && option == "" ) { 395 alert('Please select a color.'); 396 return false; 397 } 398 399 var cartStats = {}; 400 if (storeCartItem(product_id, quantity, option, cartStats, '')) { 401 var name = ""; 402 if ( $j('span.description > a > b', container).length > 0 ) { 403 name = $j('#product_' + product_id + ' span.description > a > b').text(); 404 } 405 406 //window.scrollTo(0, 0); 407 showCartPopup(name, sku, price, quantity, img_path, cartStats); 408 } 409 410 return false; 411} 412 413 414/* 415***************************************************************** 416** cat_info.php functions 417***************************************************************** 418*/ 419function cat_add_one_to_cart(product_id, sku, price, img_path) { 420 removeCartPopup(); 421 422 var quantity = 0; 423 var remaining = 0; 424 var quantity_case = 0; 425 var case_amt = 0; 426 if ( $j("input[name='quantity[" + product_id + "]']").length > 0 ) { 427 quantity = $j("input[name='quantity[" + product_id + "]']").val(); 428 } 429 430 if ( $j("input[name='quantity_case[" + product_id + "]']").length > 0 ) { 431 quantity_case = $j("input[name='quantity_case[" + product_id + "]']").val(); 432 433 var case_amt = $j('#' + product_id + '_case_amount').val(); 434 } 435 quantity = parseInt( quantity ); 436 quantity_case = parseInt( quantity_case ); 437 case_amt = parseInt( case_amt ); 438 quantity = quantity + (quantity_case * case_amt); 439 440 441 if (isNaN(quantity) || quantity < 1) { 442 alert('Please enter a quantity'); 443 return false; 444 } 445 446 if ( $j('#product_' + product_id + ' div.iner').length > 0 ) { 447 $j('#product_' + product_id + ' div.iner').removeClass('hover'); 448 } 449 450 if ($j('#product_' + product_id + ' span.remaining').length > 0) { 451 remaining = $j('#product_' + product_id + ' span.remaining').val(); 452 453 if(quantity > remaining && remaining > 0){ 454 cat_highlight_product(product_id); 455 alert('Currently you may only order ' + remaining + ' of this product.'); 456 return false; 457 } 458 } 459 460 if ($j('#product_' + product_id + ' select.opts').length > 0) { 461 if ($j('#product_' + product_id + ' select.opts')[0].selectedIndex == 0) { 462 var txt = new String($j('#product_' + product_id + ' select.opts')[0][0].text); 463 var pos = txt.indexOf("Size") 464 465 cat_highlight_product(product_id); 466 467 if (pos >=0) alert ("Please select a size.") 468 else alert("Please select a color."); 469 470 471 $j('#product_' + product_id + ' select.opts').focus(); 472 return false; 473 } 474 } 475 476 var option = $j("#option_" + product_id).val(); 477 478 if( $j('#product_' + product_id ).length && option == "" ) { 479 alert('Please select a color.'); 480 return false; 481 } 482 483 var cartStats = {}; 484 if (storeCartItem(product_id, quantity, option, cartStats, '')) { 485 var name = ""; 486 if ( $j('#product_' + product_id + ' span.description > a > b').length > 0 ) { 487 name = $j('#product_' + product_id + ' span.description > a > b').text(); 488 } 489 490 //window.scrollTo(0, 0); 491 // showCartPopup(name, sku, price, quantity, img_path, cartStats); 492 window.location.href="/cart.php"; 493 } 494 495 return false; 496} 497 498function cat_add_to_cart() { 499 var products = $j(".products_list"); 500 var none = 0; 501 502 for(var i = 0; i < products.length; ++i) { 503 504 var remaining = 0; 505 var option = 0; 506 var product_id = products[i].id; 507 508 509 if( $j('#' + product_id + ' .quantity')[0] ) 510 var qty = $j('#' + product_id + ' .quantity')[0].value;
511 /* someone made the below change on the dev server but don't know who */ 512 /*if( $j('#' + product_id + ' .case_quantity')[0] ) 513 var qty = $j('#' + product_id + ' .case_quantity')[0].value;*/ 514 else continue; 515 516 if(isNaN(qty) || qty < 1){ 517 ++none; 518 continue; 519 } 520 521 if( $j('#' + product_id + ' .iner')[0] ) 522 $j('#' + product_id + ' .iner')[0].removeClassName('hover'); 523 524 if($j('#' + product_id + ' .remaining').length > 0){ 525 remaining = $j('#' + product_id + ' .remaining')[0].value; 526 527 if(qty > remaining && remaining > 0){ 528 cat_highlight_product(product_id); 529 alert('Currently you may only order ' + remaining + ' of this product.'); 530 return false; 531 } 532 } 533 534 if($j('#' + product_id + ' .opts').length > 0){ 535 if($j('#' + product_id + ' .opts')[0].selectedIndex == 0){ 536 var txt = new String($j('#' + product_id + ' .opts')[0][0].text); 537 var pos = txt.indexOf("Size") 538 539 cat_highlight_product(product_id); 540 541 if (pos >=0) alert ("Please select a size.") 542 else alert("Please select a color."); 543 544 $j('#' + product_id + ' .opts')[0].focus(); 545 return false; 546 } 547 option = $j('#' + product_id + ' .opts')[0].value; 548 } 549 550 } 551 552 if(none==products.length){ 553 alert("No products were added to the cart. Please enter the quantities for the products desired."); 554 return false; 555 } 556 557 $('add_to_cart_form').submit(); 558 559 return false; 560} 561 562function cat_highlight_product(product_id) { 563 $j('#product_' + product_id + ' div.iner').addClass('hover'); 564 window.scrollTo(0, $j("#product_" + product_id).offset().top - 300); 565} 566 567/* 568***************************************************************** 569** product_info.php functions 570***************************************************************** 571*/ 572function add_to_cart(id, option, limit, sku, price, img_path) 573{ 574 removeCartPopup(); 575 576 var quantity = $j('#quantity').val(); 577 var case_amt = 0; 578 var quantity_case = 0; 579 if ( $j("input[name='quantity_case']").length > 0 ) { 580 var quantity_case = $j("input[name='quantity_case']").val(); 581 582 var case_amt = $j('#' + id + '_case_amount').val(); 583 } 584 585 quantity = parseInt( quantity ); 586 quantity_case = parseInt( quantity_case ); 587 case_amt = parseInt( case_amt ); 588 quantity = quantity + (quantity_case * case_amt); 589 590 var post_option = ""; 591 592 if( quantity > limit && limit > 0) { 593 alert('Currently you may only order ' + limit + ' of this product.'); 594 return false; 595 } 596 597 if ( $j('option_' + id) ) { 598 if( $j('option_' + id).value == '') { 599 var pos = -1; 600 if ($j('option_' + id)[0]) 601 { 602 var txt = new String($j('option_' + id)[0].text); 603 pos = txt.indexOf("Size") 604 } 605 if (pos >=0) alert ("Please select a size.") 606 else alert("Please select a color."); 607 608 return false; 609 } 610 611 post_option = $j('option_' + id).value; 612 } 613 614 if (option) { 615 post_option = option; 616 } 617 618 var accessories = jQuery.map( jQuery('.accessories input[type=checkbox]:checked'), function(e,i){ 619 return e.value; 620 }); 621 622 if (accessories.length > 0) { 623 $j('accessories').value = accessories.join(','); 624 } else { 625 $j('accessories').value = ''; 626 } 627 628 var cartStats = {}; 629 if (storeCartItem(id, quantity, post_option, cartStats,$j('accessories').value)) { 630 // alert(cartStats.ret_str); 631 var name = ""; 632 if ($j("div.maincontent_title > h1")) { 633 name = $j("div.maincontent_title > h1").text(); 634 } 635// alert(JSON.stringify(cartStats)); 636 //window.scrollTo(0, 0); 637 // showCartPopup(name, sku, price, quantity, img_path, cartStats); 638 window.location.href="/cart.php"; 639 } 640 return false; 641} 642 643function update_qty(qty){ 644 $j('#quantity').val(qty); 645 646} 647 648function add_gift_card_to_cart(product_id,sku,img_path){ 649 var errors = false; 650 651 removeCartPopup(); 652 $j('.gift_card_message_alert').text(''); //clear errors 653 654 var price = "0.00" ; 655 var card_delivery_date = $('text_id_card_delivery_date').value; 656 var option = $j('#amount_selector option:selected').attr('id'); 657 658 if( $('amount_selector').value == 'custom') { 659 price = parseFloat($('custom_amount').value).toFixed(2); 660 }else{ 661 price = parseFloat($('amount_selector').value).toFixed(2); 662 } 663 664 if($('recipient_email').value == ''){ 665 $j('#recipient_email_error').text('Recipient Email is Required'); 666 errors = true; 667 } else if( !validateEmail( $('recipient_email').value ) ){ 668 $j('#recipient_email_error').text("The e-mail address entered is not val
668id."); 669 errors = true; 670 } 671 if(price > 500){ 672 $j('#custom_amount_error').text('Gift card amount must be $500.00 or less'); 673 errors = true; 674 } 675 if(price < 10){ 676 $j('#custom_amount_error').text('Gift card amount must be $10.00 or more'); 677 errors = true; 678 } 679 //make sure the card is between today and the next 6 month. (format yyyy-MM-dd) 680 if(card_delivery_date){ 681 var user_date = new Date(card_delivery_date); 682 var today = new Date(); 683 today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); 684 var endDate = new Date(today); 685 endDate.setMonth(6); 686 if(user_date < today || user_date > endDate) { 687 $j('#delivery_date_error').text('Delivery date must be within the next six month'); 688 errors = true; 689 } 690 } 691 692 var info = new Object(); 693 info['message'] = $j('gift_card_message').value; 694 info['recipient_email'] = $j('recipient_email').value; 695 info['sender_name'] = $j('sender_name').value; 696 info['card_delivery_date'] = card_delivery_date; 697 info['price'] = price; 698 699 if(!errors){ 700 var cartStats = {}; 701 if (storeGiftCardItem(product_id, option, cartStats, info)) { 702 //alert(cartStats.return_string); 703 var name = ""; 704 if ($j("div.maincontent_title > h1")) { 705 name = $j("div.maincontent_title > h1").text(); 706 } 707 708 //window.scrollTo(0, 0); 709 showCartPopup(name, sku, price, quantity, img_path, cartStats); 710 } 711 } 712 713 return false; 714} 715 716function updateGiftCardAmtDropdown(product_id){ 717 718 var price = "0.00" ; 719 $j('#custom_amount_error').text(''); 720 721 if($j('amount_selector').value == 'custom'){ 722 $j('custom_amount_div').show(); 723 price = parseFloat ( $j('custom_amount').value ); 724 if(!price){ price = 0; } 725 price = price.toFixed(2); 726 $j('custom_amount').value = price; 727 if(price > 500){ 728 $j('#custom_amount_error').text('Gift card amount must be $500.00 or less'); 729 return false; 730 } 731 if(price < 10){ 732 $j('#custom_amount_error').text('Gift card amount must be $10.00 or more'); 733 return false; 734 } 735 }else{ 736 $j('custom_amount_div').hide(); 737 price = parseFloat ( $('amount_selector').value ); 738 price = price.toFixed(2); 739 } 740 741 $j('#one_pc_price_' + product_id).text("Our Price: $ " + price); 742 743 return false; 744} 745 746function image_box(imageBox){ 747 748 var img = ($j('current_image')); 749 750 if(img){ 751 img_src = img.src.slice(0, img.src.lastIndexOf("_")); 752 } 753 ( function($) { 754 755 //If a Popup is showing, remove it 756 if($j('#mask').css("display") == 'block'){ 757 $j('.image_popup').fadeOut(300); 758 } 759 760 // Create image 761 var theImage = new Image(); 762 theImage.src = img_src + "_xlarge.jpg"; 763 theImage.alt = img.alt ; 764 765 $j(big_image_popup_img).html(theImage); 766 767 $j(theImage).load(function() { 768 769 //Fade in the Popup 770 $j(imageBox).fadeIn(300); 771 772 //resize the image 773 if($j(theImage).width()>$j('#big_image_popup').width() || $j(theImage).height()>$j('#big_image_popup').height()){ 774 if($j(theImage).width()>$j(theImage).height()){ 775 $j(theImage).css({ 776 'width' : $j('#big_image_popup').width() -30, 777 'max-height' : '100%' 778 }); 779 } else { 780 $j(theImage).css({ 781 'height' : $j('#big_image_popup').height() -30, 782 'max-width' : '100%' 783 }); 784 } 785 } 786 787 //Set the center alignment padding + border see css style 788 var popMargTop = ($j(imageBox).height() + 24) / 2; 789 var popMargLeft = ($j(imageBox).width() + 24) / 2; 790 791 $j(imageBox).css({ 792 'margin-top' : -popMargTop, 793 'margin-left' : -popMargLeft 794 }); 795 796 // Add the mask to body 797 $j('body').append('<div id="mask"></div>'); 798 $j('#mask').fadeIn(300); 799 800 // When clicking on the button close the popup closed 801 $j('a.close').live('click', function() { 802 803 $j('#mask , .image_popup').fadeOut(300 , function() { 804 $j('#mask').remove(); 805 }); 806 return false; 807 }); 808 }); 809 } ) ( jQuery ); 810} 811 812function change_image(img,new_img){ 813 814 //If a border is showing, remove it 815 ( function($) { 816 $j('.additional_img_li').removeClass("selected"); 817 } ) ( jQuery ); 818 819 //add border to current image 820 $j(img).parent().parent().addClass("selected"); 821 822 img_src = new_img.slice(0, new_img.lastIndexOf("_")); 823 824 ( function($) { 825 //change popup image 826 if($j('#mask').css("display") == 'block'){ 827 828 var theImage = new Image(); 829 theImage.src = img_src + "_xlarge.jpg"; 830 theImage.alt = img.alt ; 831 832 $j(theImage).load(function() { 833 834 $j(big_image_popup_img).html(theImage); 835 836 //resize the image 837 if($j(theImage).width()>$j('#big_image_popup').width() || $(theImage).height()>$j('#big_image_popup').height()){ 838 if($j(theImage).width()>$j(theImage).height()){ 839 $j(theImage).css({ 840 'width' : $('#big_image_popup').width() -30, 841 'max-height' : '100%' 842 });
843 } else { 844 $j(theImage).css({ 845 'height' : $('#big_image_popup').height() -30, 846 'max-width' : '100%' 847 }); 848 } 849 } 850 }); 851 } else //main img 852 { 853 $j(big_image).html('<img id="current_image" src="' + img_src + "_large.jpg" + '" alt="' + '' + '" />'); 854 } 855 } ) ( jQuery ); 856} 857 858function centerImage(theImage,newWidth,newHeight){ 859 860 if(theImage.width>theImage.height){ 861 $j(theImage).css({ 862 'width' : newWidth, 863 'max-height' : '100%' 864 }); 865 $j(theImage).css({ 866 'margin-top' : (newHeight - $j(theImage).height())/2 867 }); 868 } else{ 869 $j(theImage).css({ 870 'height' : newHeight, 871 'max-width' : '100%' 872 }); 873 } 874} 875 876function video_box(box,embed_url){ 877 878 ( function($) { 879 880 //If a Popup is showing, remove it 881 if($('#mask').css("display") == 'block'){ 882 $('.image_popup').fadeOut(300); 883 } 884 885 var embed_code = '<iframe id="popup_iframe" width="560" height="315" src="' + embed_url +'&autoplay=1" frameborder="0"></iframe>'; 886 887 $(big_video_popup_img).html(embed_code); 888 889 //Fade in the Popup 890 $(box).fadeIn(300); 891 892 //Set the center alignment padding + border see css style 893 var popMargTop = ($(box).height() + 24) / 2; 894 var popMargLeft = ($(box).width() + 24) / 2; 895 896 $(box).css({ 897 'margin-top' : -popMargTop, 898 'margin-left' : -popMargLeft 899 }); 900 901 // Add the mask to body 902 $('body').append('<div id="mask"></div>'); 903 $('#mask').fadeIn(300); 904 905 // When clicking on the button close the popup closed and stop the video 906 $('a.close').live('click', function() { 907 908 // assign the src to null, this then stops the video been playing 909 $('#popup_iframe').attr('src', ''); 910 911 // Finally you reasign the URL back to your iframe, so when you hide and load it again you still have the link 912 $('#popup_iframe').attr('src', embed_url); 913 914 $('#mask , .video_popup').fadeOut(300 , function() { 915 $('#mask').remove(); 916 }); 917 return false; 918 }); 919 920 } ) ( jQuery ); 921 922} 923 924function change_video(video,embed_url){ 925 926 //If a border is showing, remove it 927 ( function($) { 928 $('.additional_videos_li').removeClass("selected"); 929 } ) ( jQuery ); 930 931 //add border to current video 932 $j(video).parent().parent().addClass("selected"); 933 934 ( function($) { 935 936 // assign the src to null to stop the previous video playing 937 $('#popup_iframe').attr('src', ''); 938 939 //change popup video 940 var embed_code = '<iframe id="popup_iframe" width="560" height="315" src="' + embed_url +'" frameborder="0"></iframe>'; 941 942 $(big_video_popup_img).html(embed_code); 943 944 } ) ( jQuery ); 945} 946 947/* 948***************************************************************** 949** accout.php functions 950***************************************************************** 951*/ 952 953function validate_account_frm(){ 954 955 var succeeded = false; 956 957 var location_type = ""; 958 if($j("info[location_type_residential]").checked){ 959 location_type = "Residential"; 960 } else if($j("info[location_type_commercial]").checked) { 961 location_type = "Commercial"; 962 } 963 964 var location_type2 = ""; 965 if($j("info2[location_type_residential]").checked){ 966 location_type2 = "Residential"; 967 } else if($j("info2[location_type_commercial]").checked) { 968 location_type2 = "Commercial"; 969 } 970 971 $j.ajax("/ajax/ajax.validate_account_frm.php", { 972 async: false, 973 data: { 974 action : 'new_account', 975 first_name : $j("info[first_name]").value, 976 last_name : $j("info[last_name]").value, 977 address1 : $j("info[address1]").value, 978 city : $j("info[city]").value, 979 state : $j("info[state]").value, 980 zip : $j("info[zip]").value, 981 phone : $j("info[phone]").value, 982 location_type: location_type, 983 email : $j("info[email]").value, 984 password : $j("info[password]").value, 985 password_conf: $j("info[password_conf]").value, 986 role_id : $j("info[role_id]").value, 987 institution_type_id: $j("info[institution_type_id]").value, 988 989 same_as_billing : ($j("same_as_billing").checked ? "Y" : "N"), 990 991 info2_address1 : $j("info2[address1]").value, 992 info2_city : $j("info2[city]").value, 993 info2_state : $j("info2[state]").value, 994 info2_zip : $j("info2[zip]").value, 995 info2_phone : $j("info2[phone]").value, 996 info2_location_type: location_type2 997 }, 998 dataType: "json", 999 type: "POST", 1000 success: function(returnObject) { 1001 1002 //var errors = JSON.stringify(returnObject) 1003 var result = eval(returnObject); 1004 //console.log(result); 1005 $j('signup_errors').hide(); 1006 1007 if(result.errors){ 1008 ( function($) {
1009 $j('#signup_errors').html(result.errors); 1010 } ) ( jQuery ); 1011 1012 $j('signup_errors').show(); 1013 } 1014 if(result.error_fields.length){ 1015 1016 //restore default 1017 var all_ids =['info[first_name]', 1018 'info[last_name]', 1019 'info[address1]', 1020 'info[city]', 1021 'info[state]', 1022 'info[zip]', 1023 'info[phone]', 1024 'info[location_type]', 1025 'info2[address1]', 1026 'info2[city]', 1027 'info2[state]', 1028 'info2[zip]', 1029 'info2[phone]', 1030 'info2[location_type]', 1031 'info[email]', 1032 'info[password]', 1033 'info[password_conf]', 1034 'info[role_id]', 1035 'info[institution_type_id]', 1036 'location_residential', 1037 'location_commercial', 1038 'location_residential2', 1039 'location_commercial2', 1040 ]; 1041 for(var i=0, len=all_ids.length; i<len; i++){ 1042 $j($(all_ids[i])).css("background-color","white"); 1043 } 1044 1045 //change background for fields with errors 1046 for(var i=0, len=result.error_fields.length; i<len; i++){ 1047 1048 var id = result.error_fields[i]; 1049 $j($(id)).css("border","1px solid red"); 1050 1051 } 1052 } 1053 else { 1054 succeeded = true; 1055 jQuery('#frm_new_account').submit(); 1056 } 1057 } 1058 }); 1059 1060 return succeeded; 1061} 1062 1063/* 1064***************************************************************** 1065** my_account.php functions 1066***************************************************************** 1067*/ 1068 1069function email_pending_rewards_chioce(){ 1070 1071 //console.log($('notify_rewards').checked); 1072 var checked; 1073 if($j('notify_rewards').checked){ 1074 checked = 'Y'; 1075 }else{ 1076 checked = 'N'; 1077 } 1078 1079 //console.log(checked); 1080 1081 $j.ajax("ajax/ajax.email_pending_rewards_chioce.php", { 1082 async: false, 1083 data: { 1084 isChecked: checked 1085 }, 1086 dataType: "json", 1087 type: "POST", 1088 success: function(returnObject) { } 1089 }); 1090} 1091 1092 1093/* 1094***************************************************************** 1095my_account.php 1096unsubscirbe to a product 1097***************************************************************** 1098*/ 1099 1100 1101function productUnsubscirbe(pid) { 1102 1103var url = '/ajax/ajax.productunsubscribe.php?product_id='+pid; 1104var divname='unsubscribe'+pid; 1105 1106 new Ajax.Request(url, 1107 { 1108 method:'get', 1109 onSuccess: function(response) 1110 { 1111 $j(divname).innerHTML = response.responseText; 1112 }, 1113 1114 onFailure: function() 1115 { 1116 $j(divname).innerHTML = 'something went wrong ...'; 1117 } 1118 }); 1119 1120 1121} 1122 1123 1124/* 1125***************************************************************** 1126my_account.php 1127remove image from profile 1128***************************************************************** 1129*/ 1130 1131function removeimage(imgUrl) { 1132 1133 var url = '/ajax/ajax.removeimage.php?image='+imgUrl; 1134 var divname='imageremoved'; 1135 new Ajax.Request(url, 1136 { 1137 method:'get', 1138 onSuccess: function(response) 1139 { 1140 $j(divname).innerHTML = response.responseText; 1141 document.getElementById('accountimag').style.display='none'; 1142 setTimeout(function(){$(divname).innerHTML =''},3000); 1143 1144 }, 1145 1146 onFailure: function() 1147 { 1148 $j(divname).innerHTML = 'something went wrong ...'; 1149 } 1150 }); 1151 1152 1153 1154} 1155 1156 1157/* 1158***************************************************************** 1159** cart.php functions 1160***************************************************************** 1161*/ 1162 1163function valid_cart_quantities(frm) 1164{ 1165 var regex = /cart\[\d+\]\[qty\]/i; 1166 var result = true; 1167 /* want to make sure we have a valid number in the input fields */ 1168 $j('#cart_form input').filter(function () { return regex.test(this.name); }).each(function(){ 1169 if (!/^\+?(0|[1-9]\d*)$/.test(this.value)){ 1170 result = false; 1171 return false; 1172 } 1173 }); 1174 1175 return result; 1176} 1177 1178function valid_zip_code(zip_code) 1179{ 1180 var zcode_re = /^\d{5}([\-]\d{4})?$/; 1181 1182 if (!zcode_re.test(zip_code)) 1183 { 1184 return false; 1185 } 1186 1187 return true; 1188} 1189function set_zip(){ 1190 $j.get('ajax/ajax.cart.php', 1191 {'action': 'get_zip'}, 1192 function(data){ 1193 data = JSON.parse(data); 1194 zip = data.zip; 1195 1196 $j('input[name="zip_code"]').val(zip); 1197 } 1198 ); 1199} 1200 1201function secure_checkout_submit() 1202{ 1203 1204 1205 var frm = jQuery('#cart_form'); 1206 var zip_code = jQuery('#zip_code').val(); 1207 var logged_in = jQuery('#logged_in').val(); 1208 //var liftgate = $('#liftgate_amt'); 1209 1210 /* make sure we have valid quantities in the cart */ 1211 if (!valid_cart_quantities(frm)) 1212 { 1213 alert("Quantity must be 0 or greater!"); 1214 return false; 1215 } 1216 1217 /* now make sure we have a valid zip code */ 1218/* if (!valid_zip_code(zip_code)) 1219 { 1220 alert("Please enter a valid zip code.");
1221 Effect.Pulsate('zip_code',{pulses:3,duration:1}); 1222 return false; 1223 }*/ 1224 1225 /*if (liftgate){ 1226 if(!$(liftgate_rdbtn_Y).checked && !$(liftgate_rdbtn_N).checked){ 1227 alert("Please select whether a liftgate should be provided for delivery."); 1228 return false; 1229 } 1230 }*/ 1231 jQuery('#cart_action').val('secure_checkout'); 1232 //if(logged_in>0){ 1233 frm.submit(); 1234 return true; 1235 //} 1236 1237 //login_box("#login-box"); 1238 1239 //frm.submit(); 1240 //return false; 1241 // return true; 1242} 1243function checkout_paypal_submit(type) 1244{ 1245 $j('.error_msg').remove(); 1246 1247 $j('#paypal_checkout_button').attr('disabled', true).append('<div class="loader-small"></div>'); 1248 1249 if(type == 'cart'){ 1250 var frm = $('cart_form'); 1251 var zip_code = $('zip_code').value; 1252 1253 /* make sure we have valid quantities in the cart */ 1254 if (!valid_cart_quantities(frm)) 1255 { 1256 alert("Quantity must be 0 or greater!"); 1257 return false; 1258 } 1259 1260 } 1261 1262 //set up paypal call 1263 $j.ajax("/ajax/ajax.checkout_functions.php", { 1264 data: { 1265 action : 'setup_paypal_express_checkout', 1266 type : type, 1267 shipping_email : $j('#shipping_email').val() 1268 }, 1269 dataType: "json", 1270 type: "POST", 1271 success: function(returnObject) { 1272 1273 if(returnObject.errors){ 1274 $j('.loader-small').remove(); 1275 1276 $j('#paypalErrors').html(returnObject.errors).removeClass('hidden'); 1277 $j('#checkout_paypal_button').attr('disabled', false); 1278 } else { 1279 window.location = returnObject.redirect; 1280 } 1281 }, 1282 error: function() { 1283 $j('.loader-small').remove(); 1284 $j('#paypalErrors').html('something went wrong'); 1285 } 1286 }); 1287 1288 return false; 1289} 1290function place_order_submit_open_steps(){ 1291 1292 var info = $j('#checkout_form').serialize(); 1293 1294 var paypal_checkout = 'N'; 1295 var paypal_token = ''; 1296 var payer_id =''; 1297 1298 1299 if($j(".paypal-express-checkout").length > 0){ 1300 paypal_checkout = 'Y'; 1301 paypal_token = $j("#paypal_token").val(); 1302 payer_id = $j("#payer_id").val(); 1303 } 1304 1305 1306 1307 // this is where we append a loading image 1308 $j('body').addClass('loading'); 1309 $j('#place_order_button').attr('disabled', true); 1310 1311 1312 getTokens( 1313 function() { 1314 info += '&cc_ccv=' + $j('#xCVV').val(); 1315 info += '&Xcc_number=' + $j('#xCardNum').val(); 1316 send_order(); 1317 }, 1318 function() { //onError 1319 alert("We couldn't process the order. Please contact customer support."); 1320 1321 $j('body').removeClass('loading'); 1322 $j('#place_order_button').attr('disabled', false); 1323 }, 1324 30000 //30 second timeout 1325 ); 1326 1327 1328 function send_order() { 1329 if($j(".paypal-express-checkout").length > 0 && $j(".amazon-pay-checkout").length == 0){ 1330 paypal_checkout = 'Y'; 1331 amazon_pay_checkout = 'N'; 1332 paypal_token = $j("#paypal_token").val(); 1333 payer_id = $j("#payer_id").val(); 1334 } 1335 else if($j(".paypal-express-checkout").length > 0 && $j(".amazon-pay-checkout").length > 0){ 1336 amazon_pay_checkout = 'Y'; 1337 } 1338 else amazon_pay_checkout = 'N'; 1339 1340 $j.ajax("/ajax/ajax.checkout_functions.php", { 1341 data: { 1342 action : 'place_order_open', 1343 paypal_checkout : paypal_checkout, 1344 token : paypal_token, 1345 PayerID : payer_id, 1346 form_info : info, 1347 cc_num : $j('#cc_number').data('the-number') 1348 }, 1349 dataType: "json", 1350 type: "POST", 1351 beforeSend:function(){ 1352 // this is where we append a loading image 1353 $j('#place_order_button').attr('disabled', true).append('<div class="step-holder-loader"></div>'); 1354 }, 1355 success: function(returnObject) { 1356 //restore default 1357 $j('.invalid').removeClass('invalid'); 1358 $j('.error_msg').remove(); 1359 $j('#place_order_button').attr('disabled', false); 1360 $j('.step-holder-loader').remove(); 1361 console.log(returnObject); 1362 var result = eval(returnObject); 1363 if(result.errors.length > 0 || result.top_errors.length > 0 ){ 1364 $j('.step-holder-loader').remove(); 1365 1366 if(result.top_errors.length>0){ 1367 $j('#confirm_order_errors').html(result.top_errors.join('<br>')); 1368 $j('#confirm_order_errors').show(); 1369 } 1370 1371 for(var i=0, len=result.errors.length; i<len; i++){ 1372 var id = result.errors[i].field; 1373 if(id == 'cc_expiration_month'||id == 'cc_expiration_year'){ 1374 $j($(id)).parent().addClass('invalid').parent().prepend(result.errors[i].msg); 1375 }else{ 1376 $j($(id)).addClass('invalid').parent().prepend(result.errors[i].msg); 1377 } 1378 } 1379 /*jQuery('.account-row').sameHeight({ 1380 elements: '.label-box', 1381 flexible: true 1382 });*/ 1383 1384 if(result.sign_in_checkout){ 1385 $j('.sign-up-holder').html('<div class="successful-sign-in">You successfully signed in!</div>'); 1386 $j('.user-nav').html(result.sign_in_checkout.regular); 1387 $j('.btn-user').parent().replaceWith(result.sign_in_checkout.mobile); 1388 } 1389 $j('html,body').animate({scrollTop: $j('#confirm_order_errors ,.error_msg').offset().top - 50}, 0 ); 1390 1391 } 1392 1393 if(result.redirect){ 1394 window.location = result.redirect; 1395 } 1396 }, 1397 error: function (xhr, status, thrownError) { 1398 console.log(xhr.statusText);
1399 console.log(xhr.responseText); 1400 console.log(xhr.status); 1401 console.log(thrownError); 1402 $j('.step-holder-loader').remove(); 1403 alert('something went wrong'); 1404 } 1405 }); 1406 } 1407} 1408function initCheckout(){ 1409 if($j('#main.checkout')){ 1410 var timer; 1411 var delay = 0; // 0.6 seconds delay after last input 1412 1413 //calculate shipping when zipcode chages 1414 $j('#shipping_zip, input[name=shipping_location]').on('change', function(event){ 1415 window.clearTimeout(timer); 1416 timer = window.setTimeout(function(){ 1417 //insert delayed input change action/event here 1418 calculate_shipping($j('#shipping_zip').val(),'checkout',''); 1419 }, delay); 1420 }); 1421 } 1422 $j('#payment_tabs ul a').click(function() { 1423 if (this.id == 'paypal_tab'){ 1424 $j('#payments_body').hide(); 1425 $j('#paypal_ceckout_note').show(); 1426 $j('input[name="cc_type"]').val('PAYPAL'); 1427 } 1428 else { 1429 $j('#payments_body').show(); 1430 $j('#paypal_ceckout_note').hide(); 1431 } 1432 }); 1433} 1434function initCarousel(){ 1435 1436 $j("#hp_slides").slidesjs({width:962,height:347,navigation: { 1437 active: false, 1438 // [boolean] Generates next and previous buttons. 1439 // You can set to false and use your own buttons. 1440 // User defined buttons must have the following: 1441 // previous button: class="slidesjs-previous slidesjs-navigation" 1442 // next button: class="slidesjs-next slidesjs-navigation" 1443 effect: "slide" 1444 // [string] Can be either "slide" or "fade". 1445 }, 1446 effect: { 1447 slide: { 1448 // Slide effect settings. 1449 speed: 1500 1450 // [number] Speed in milliseconds of the slide animation. 1451 } 1452 }, 1453 }); 1454} 1455function login_box(loginBox){ 1456 ( function($) { 1457 1458 //If a Popup is showing, remove it 1459 if($('#mask').css("display") == 'block'){ 1460 $('.login-popup').fadeOut(300); 1461 } 1462 1463 //Fade in the Popup 1464 $(loginBox).fadeIn(300); 1465 1466 //Set the center alignment padding + border see css style 1467 var popMargTop = ($(loginBox).height() + 24) / 2; 1468 var popMargLeft = ($(loginBox).width() + 24) / 2; 1469 1470 $(loginBox).css({ 1471 'margin-top' : -popMargTop, 1472 'margin-left' : -popMargLeft 1473 }); 1474 1475 // Add the mask to body 1476 $('body').append('<div id="mask"></div>'); 1477 $('#mask').fadeIn(300); 1478 1479 //return false; 1480 1481 //// When clicking on the button close or the mask layer the popup closed 1482 //$('a.close, #mask').live('click', function() { 1483 // $('#mask , .login-popup').fadeOut(300 , function() { 1484 // $('#mask').remove(); 1485 // }); 1486 // return false; 1487 //}); 1488 1489 // When clicking on the button close the popup closed 1490 $('a.close').live('click', function() { 1491 $('#mask , .login-popup').fadeOut(300 , function() { 1492 $('#mask').remove(); 1493 }); 1494 return false; 1495 }); 1496 } ) ( jQuery ); 1497} 1498 1499 1500function account_login_popup(){ 1501 1502 var succeeded = false; 1503 1504 $j.ajax("/ajax/ajax.validate_account_frm.php", { 1505 async: false, 1506 data: { 1507 action : 'validate_password', 1508 log : $('log').value, 1509 pwd : $('pwd').value 1510 }, 1511 dataType: "json", 1512 type: "POST", 1513 success: function(returnObject) { 1514 1515 var result = eval(returnObject); 1516 1517 //console.log((result)); 1518 1519 if(result.errors){ 1520 ( function($) { 1521 $('#password_errors').html(result.errors); 1522 } ) ( jQuery ); 1523 1524 $('password_errors').show(); 1525 1526 } else { 1527 succeeded = true; 1528 $('account_login_form').submit(); 1529 } 1530 } 1531 }); 1532 //console.log(succeeded); 1533 return succeeded; 1534} 1535 1536// this functions no longer used? 1537function update_zip() 1538{ 1539 var frm = $j('#cart_form'); 1540 var zip_code = $j('#zip_code').val(); 1541 1542 if (!valid_zip_code(zip_code)) 1543 { 1544 alert("Please enter a valid zip code."); 1545 return false; 1546 } 1547 1548 /* set the action */ 1549 frm.action.value = "show_radios"; 1550 1551 /* submit the form */ 1552 frm.submit(); 1553 1554 return true; 1555} 1556function update_shipmethod() 1557{ 1558 var frm = $j('#cart_form'); 1559 var ship_method = ''; 1560 /* set the action */ 1561 var regex = /ship_method/i; 1562 1563 /* want to make sure we have a valid number in the input fields */ 1564 for(i = 0; i < frm.elements.length; i++) 1565 { 1566 elem = frm.elements[i]; 1567 1568 if (elem.name.search(regex) != -1) 1569 { 1570 if (elem.checked) ship_method = elem.value; 1571 } 1572 } 1573
1574 frm.action.value = "calc_zip"; 1575 1576 /* submit the form */ 1577 frm.submit(); 1578 1579 return true; 1580} 1581 1582function update_cart() 1583{ 1584 var frm = jQuery('#cart_form'); 1585 1586 /* make sure we have valid quantities in the cart */ 1587 if (!valid_cart_quantities(frm)) 1588 { 1589 alert("Quantity must be 0 or greater!"); 1590 return false; 1591 } 1592 1593 $j('#cart_action').val('update'); 1594 $j('#cart_form').submit(); 1595 return false; 1596} 1597 1598function remove_cart_line_item(cart_line_id) 1599{ 1600 var response = confirm("Are you sure you want to delete this from the cart?"); 1601 if (response) 1602 { 1603 $j('#cart_action').val('remove'); 1604 $j('#cart_item').val(cart_line_id); 1605 1606 $j('#cart_form').submit(); 1607 } 1608 1609 return false; 1610} 1611 1612function checkCouponCode(){ 1613 var frm = $j('#cart_form'); 1614 var val = $j("#id_coupon_code").val(); 1615 1616 if(val == ''){ 1617 //alert('Invalid coupon code.'); 1618 return false; 1619 } 1620 $j("#cart_action").val('apply_coupon_code'); 1621 1622 return true; 1623} 1624 1625function applyRewards(type) 1626{ 1627 var frm = $jj('#cart_form'); 1628 var max_rewards = parseFloat($('max_rewards').value); 1629 1630 var rewards_using = parseFloat($j('rewards_using').value); 1631 1632 var sub_total = parseFloat(jQuery('#sub_total').html().replace(/[$,]/g, '')); 1633 var cur_total = parseFloat(jQuery('#cur_total').html().replace(/[$,]/g, '')); 1634 var discount = parseFloat(jQuery('#coupon_gift').html().replace(/[$,]/g, '')); 1635 var rewards_applied = parseFloat($('rewards_applied').value); 1636 1637 var grand_total = (cur_total + rewards_applied) * 100 ; 1638 1639 if(rewards_using % 1 !== 0){ 1640 alert('Please enter whole numer'); 1641 $j('rewards_using').value = 'Enter Points'; 1642 return false; 1643 } 1644 1645 //alert($j('#cur_total').value); 1646 // console.log('sub total: ' + sub_total); 1647 // console.log('discount: ' + discount); 1648 // console.log('subtotal-discount: ' + (sub_total - discount)); 1649 // console.log('rewards using: ' +rewards_using); 1650 //alert("rewards using" + rewards_using + " grand total " + grand_total); 1651 1652 if(type == "undo"){ 1653 rewards_using = 0; 1654 //console.log(rewards_using); 1655 }else{ 1656 if(rewards_using > max_rewards){ 1657 alert("You do not have " + rewards_using + " points to apply. Your available point balance is " 1658 + max_rewards + " points."); 1659 return false; 1660 } 1661 1662 if(rewards_using > ((sub_total - discount) *100)){ 1663 alert("You can not apply more points than the (subtotal - discounts)."); 1664 return false; 1665 } 1666 } 1667 1668 $j("cart_action").value = 'apply_rewards'; 1669 frm.submit(); 1670 1671 return true; 1672} 1673 1674function clear_rewards_field(fld, e) 1675{ 1676 var max_rewards = $j("max_rewards").value; 1677 /* put the text back if we lose focus and the field value is blank */ 1678 if (e.type == 'blur' && (fld.value == null || fld.value == '')) 1679 { 1680 fld.value = 'Enter Points'; 1681 } 1682 /* on focus we want to clear out the field */ 1683 else if (e.type == 'focus' && (fld.value == max_rewards || fld.value == 'Enter Points')) 1684 { 1685 fld.value = ""; 1686 } 1687 1688 return true; 1689} 1690 1691 1692// used to get user's timezone 1693function maketimus() 1694{ 1695 var linktime = new Date(); 1696 var linkday = linktime.getDate(); 1697 var linkmonthnum = linktime.getMonth(); 1698 var linkyear = linktime.getFullYear(); 1699 var linkhour = linktime.getHours(); 1700 var linkminute = linktime.getMinutes(); 1701 var linksecond = linktime.getSeconds(); 1702 var phpMonths=new Array(); 1703 phpMonths[0]="1"; 1704 phpMonths[1]="2"; 1705 phpMonths[2]="3"; 1706 phpMonths[3]="4"; 1707 phpMonths[4]="5"; 1708 phpMonths[5]="6"; 1709 phpMonths[6]="7"; 1710 phpMonths[7]="8"; 1711 phpMonths[8]="9"; 1712 phpMonths[9]="10"; 1713 phpMonths[10]="11"; 1714 phpMonths[11]="12"; 1715 var linkmonth = phpMonths[linkmonthnum]; 1716 1717 if (linkday < 10) linkday = "0" + linkday; 1718 if (linkmonth < 10) linkmonth = "0" + linkmonth; 1719 if (linkhour < 10) linkhour = "0" + linkhour; 1720 if (linkminute < 10) linkminute = "0" + linkminute; 1721 if (linksecond < 10) linksecond = "0" + linksecond; 1722 1723 var formattedtime = linkyear + "-" +linkmonth + "-" + linkday + " " + linkh
1723our + ":" + linkminute + ":" + linksecond; 1724 return formattedtime; 1725} 1726 1727/* 1728***************************************************************** 1729** cart2.php functions 1730***************************************************************** 1731*/ 1732function toggle_giftwrap() 1733{ 1734 gft_chkbox = $('gift_wrap'); 1735 1736 if (gft_chkbox.checked == true) 1737 { 1738 $j('gift_wrap_opt1').checked=true; 1739 //$('gift_wrap_items_div').style.display = "block"; 1740 //$('gift_wrapping_paper_div').style.display = "block"; 1741 } 1742 else 1743 { 1744 $j('gift_wrap_opt1').checked=false; 1745 //$('gift_wrap_items_div').style.display = "none"; 1746 //$('gift_wrapping_paper_div').style.display = "none"; 1747 1748 var prods_to_wrap = $j('input[type="checkbox"][name="prods_to_wrap[]"]'); 1749 prods_to_wrap.attr('checked', false); 1750 } 1751 1752 return true; 1753} 1754 1755function copy_billing_info_to_shipping() 1756{ 1757 var check_box_element = $('shipping-same-as-billing'); 1758 var check_box_value = null; 1759 1760 /* make sure we are dealing with a valid element */ 1761 if (check_box_element != undefined && check_box_element != null) 1762 { 1763 check_box_value = check_box_element.checked; 1764 } 1765 1766 /* if the checkbox was checked then we want to copy over all the info */ 1767 if (check_box_value == true) 1768 { 1769 $('billing_fname').value = $('shipping_fname').value; 1770 //$('billing_lname').value = $('shipping_lname').value; 1771 $('billing_company').value = $('shipping_company').value; 1772 $('billing_address').value = $('shipping_address').value; 1773 $('billing_address2').value = $('shipping_address2').value; 1774 $('billing_city').value = $('shipping_city').value; 1775 $('billing_state').value = $('shipping_state').value; 1776 $('billing_zip').value = $('shipping_zip').value; 1777 $('billing_home_phone').value = $('shipping_home_phone').value; 1778 } 1779 else 1780 { 1781 $j('#billing_fname').val(""); 1782 $j('#billing_lname').val(""); 1783 $j('#billing_company').val(""); 1784 $j('#billing_address').val(""); 1785 $j('#billing_address2').val(""); 1786 $j('#billing_city').val(""); 1787 $j('#billing_state').val(""); 1788 $j('#billing_zip').val(""); 1789 $j('#billing_home_phone').val(""); 1790 } 1791 1792 return true; 1793} 1794function shipping_billing_submit() 1795{ 1796 /* set the action */ 1797 $j('#pageAction').val("shipping_billing"); 1798 1799 /* submit the form */ 1800 $j('#shipping_billing_form').submit(); 1801 1802 return false; 1803} 1804 1805function toggle_prods_to_wrap() { 1806 var prods_to_wrap = $j('input[type="checkbox"][name="prods_to_wrap[]"]:checked'); 1807 var charge_for_gift_wrapping = (prods_to_wrap.length > 0) ? true : false; 1808 $j('#gift_wrap').attr('checked', charge_for_gift_wrapping); 1809} 1810 1811function change_city_state_to_match_zip (address_type, suggested_city, suggested_state) 1812{ 1813 var city_var, state_var; 1814 if (address_type == "shipping") 1815 { 1816 var city_var = $j('#shipping_city'); 1817 var state_var = $j('#shipping_state'); 1818 var zip_var = $j('#shipping_zip'); 1819 } 1820 else if (address_type == "billing") 1821 { 1822 var city_var = $j('#billing_city'); 1823 var state_var = $j('#billing_state'); 1824 var zip_var = $j('#billing_zip'); 1825 } 1826 1827 if(suggested_city){ 1828 city_var.val(suggested_city); 1829 city_var.removeClass('invalid').parent().find('.error_msg').remove(); 1830 } 1831 if(suggested_state){ 1832 state_var.val(suggested_state); 1833 state_var.removeClass('invalid').parent().find('.error_msg').remove(); 1834 } 1835 zip_var.removeClass('invalid').parent().find('.error_msg').remove(); 1836 1837 return false; 1838} 1839function valid_shipping(type){ 1840 1841 $j('#stop_for_no_match_' + type).val('no'); 1842 1843 $j('#' +type+'_city').removeClass('invalid').parent().find('.error_msg').remove(); 1844 $j('#' +type+'_state').removeClass('invalid').parent().find('.error_msg').remove(); 1845 $j('#' +type+'_zip').removeClass('invalid').parent().find('.error_msg').remove(); 1846 1847 //validateShippingBilling(type); 1848 1849 return false; 1850 } 1851/* 1852***************************************************************** 1853** cart3.php functions 1854***************************************************************** 1855*/ 1856function review_order_submit() 1857{ 1858 var frm = $j('review_order_form'); 1859 1860 /* set the action */ 1861 frm.pageAction.value = "review_order"; 1862 1863 /* submit the form */ 1864 frm.submit(); 1865 1866 return false; 1867} 1868 1869function validate_cc_number(e) 1870{ 1871 var keynum = (e.which) ? e.which : e.keyCode; 1872 1873 // only allow numbers and backspaces and arrow keys 1874 // and tab key
1875 if (keynum == 9 || keynum == 8 || (keynum == 37 || keynum == 39) || (keynum <= 57 && keynum >= 48)) 1876 { 1877 return true; 1878 } 1879 else 1880 { 1881 return false; 1882 } 1883} 1884 1885function hide_cc_number(input) 1886{ 1887 var x_ed_out = ''; 1888 var cc = input.value; 1889 $j('#cc_number').removeClass('checkout_error_field').parent().find('.error_msg').remove(); 1890 1891 if(cc){ 1892 //preg_replace('/(?:[\d]+)([\d]{4})$/', str_repeat("XXXX-", 3) . '${1}', format_cc_number()); 1893 var match = cc.replace(/[^\d]+/g, '').match(/(?:[\d]+)([\d]{4})$/); 1894 if(match && cc.length >0){ 1895 $j('#cc_number').data('the-number',match[0]); 1896 var x_ed_out = new Array( match[0].length - 3 ).join( 'X' ) + '-' + match[1]; 1897 $(input).value = x_ed_out; 1898 }else{ 1899 //error msg here 1900 $j('#cc_number').addClass('checkout_error_field').parent().append('<div class=error_msg>Enter a valid card number</div>'); 1901 } 1902 } 1903 return false; 1904} 1905 1906/* 1907***************************************************************** 1908** cart4.php functions 1909***************************************************************** 1910*/ 1911function place_order_submit() 1912{ 1913 var frm = $j('#place_order_form'); 1914 1915 /* set the action */ 1916 $j('#pageAction').val("place_order"); 1917 1918 /* disable the submit button */ 1919 $j('#place_order_button').attr( "disabled", true ); 1920 1921 /* submit the form */ 1922 frm.submit(); 1923 1924 return false; 1925} 1926 1927function change_cc_info(frm_id) 1928{ 1929 var frm = $(frm_id); 1930 1931 /* set up the action */ 1932 frm.action = "/cart3.php"; 1933 frm.pageAction.value = "change_cc_info"; 1934 1935 /* submit the form now */ 1936 frm.submit(); 1937 1938 return false; 1939} 1940 1941 1942/* 1943***************************************************************** 1944** view more and close review list 1945***************************************************************** 1946*/ 1947function close_more_reviews() 1948{ 1949 $j('more_reviews').style.visibility = "hidden"; 1950} 1951 1952function open_more_reviews() 1953{ 1954 $j('more_reviews').style.visibility = "visible"; 1955} 1956 1957 1958/* 1959***************************************************************** 1960** product info page - calculate shipping 1961***************************************************************** 1962*/ 1963function calculate_another_shipping_value() 1964{ 1965 $j('#shipping_info').style.display = "block"; 1966 $j('#shipping_cost').style.display = "none"; 1967 return ; 1968} 1969 1970function calculate_shipping(zip_code, action, product_id) 1971{ 1972 $j('.error_msg').remove(); 1973 if (valid_zip_code(zip_code)) 1974 { 1975 var shipping_location = $j('input[name=shipping_location]:checked'); 1976 if(shipping_location != 'undefined'){ 1977 shipping_location = shipping_location.val(); 1978 }else{ 1979 shipping_location = ''; 1980 } 1981 1982 var quantity = $j('#quantity').val(); 1983 if(product_id){ 1984 $j('#quantity').removeClass('error_field'); 1985 var intRegex = /^\d+$/; 1986 if(!intRegex.test(quantity) || quantity < 1) { 1987 $j('#quantity').addClass('error_field').parent().append('<div class="error_msg">Please enter a quantity.</div>'); 1988 return false; 1989 } 1990 } 1991 1992 var method; 1993 var button_type; 1994 //radio buttons 1995 if($j('input[name=shipping_method]:checked').length > 0){ 1996 method = $j('input[name=shipping_method]:checked').val(); 1997 button_type = 'radio'; 1998 }else{ 1999 // buttons 2000 method = $j('.shipping-button.active').data('shipping-method'); 2001 button_type = 'buttons'; 2002 } 2003 2004 var as_radio_buttons; 2005 //if($j('#version-2').length>0){ 2006 as_radio_buttons = 0; 2007 as_dropdown = true; 2008 //}else{ 2009 //as_radio_buttons = 1; 2010 //} 2011 2012 var shipping_address = {address1:$j('#shipping_address').val(), address2:$j('#shipping_address2').val(), city:$j('#shipping_city').val(), state:$j('#shipping_state').val(), zip:zip_code}; 2013 2014 $j.ajax("/ajax.calculate_shipping.php", { 2015 data: { 2016 action : action, 2017 zip : zip_code, 2018 product_id : product_id, 2019 qty : quantity, 2020 method : method, 2021 shipping_location : shipping_location, 2022 as_radio_buttons : as_radio_buttons, 2023 as_dropdown : as_dropdown, 2024 shipping_address :shipping_address 2025 }, 2026 dataType: "json", 2027 type: "POST", 2028 beforeSend: function(){ 2029 // this is where we append a loading image
2030 $j('#shipping_cost').html('<div class="loader"></div>').show(); 2031 $j('.shipping_cost').show(); 2032 }, 2033 success: function(returnObject) { 2034// console.log(returnObject); 2035 var result = eval(returnObject); 2036 $j('#shipping_cost').html(result.shipping_options).show(); 2037 $j('.shipping_cost').show(); 2038 $j('#shipping-method-options:visible').html(result.shipping_options).parent().removeClass('hidden'); 2039 2040 if(action == 'cart' || action == 'checkout'){ 2041 for(var index in result.cost_info) 2042 $j('#' + index).html(result.cost_info[index]); 2043 //$j('#shipping_amt').html(result.cost_info.shipping_amt); 2044 $j('#sales_tax').attr('data-rate',result.cost_info.tax_rate); 2045 $j('#cur_total').html(result.cost_info.grand_total); 2046 } 2047 }, 2048 error: function(returnObject) { 2049 //console.log(returnObject); 2050 $j('#shipping_cost').html('something went wrong'); 2051 } 2052 }); 2053 2054 } 2055 else 2056 { 2057 if(zip_code !== ''){ 2058 if(action=='checkout'){alert("Zip code entered, "+zip_code+", is not a valid US zipcode.");} 2059 else $j('#zip_code').parent().append("<div class='error_msg'>Zip code entered, "+zip_code+", is not a valid US zipcode.</div>"); 2060 }else{ 2061 if(action=='checkout'){alert("No zip code entered.");} 2062 else $j('#zip_code').parent().append("<div class='error_msg'>No zip code entered.</div>"); 2063 } 2064 return false; 2065 } 2066 2067 2068 return true; 2069} 2070 2071 2072/* 2073***************************************************************** 2074** Cart Step 3 - calculate shipping 2075***************************************************************** 2076*/ 2077function calcShippingStep3(oSelect, shipping_discount, tax_rate){ 2078 2079 var method; 2080 //radio buttons 2081 if($j('input[name=shipping_method]:checked').length > 0){ 2082 method = $j('input[name=shipping_method]:checked').val(); 2083 } 2084 else if(typeof oSelect == 'string'){ 2085 // buttons 2086 method = $j(oSelect).data('shipping-method'); 2087 $j('.shipping-button').removeClass('active'); 2088 $j(oSelect).addClass('active'); 2089 } 2090 else{ method = jQuery(oSelect).val();} 2091 2092 // give shipping discount only for ground shipping 2093 if(method !== 'GND'){ 2094 shipping_discount = 0; 2095 } 2096 2097 //var cur_total = jQuery('#cur_total').html(); 2098 2099 var sub_total = jQuery('#sub_total').html(); 2100 var coupon_gift = jQuery('#coupon_gift').html(); 2101 var rewards_redeemed = jQuery('#rewards_redeemed').html(); 2102 var min_charge = jQuery('#min_charge').html(); 2103 var sales_tax = jQuery('#sales_tax').html(); 2104 var liftgate_amt = jQuery('#liftgate_amt').html(); 2105 if (sub_total == null) sub_total = "0.00"; 2106 if (coupon_gift == null) coupon_gift = "0.00"; 2107 if (rewards_redeemed == null) rewards_redeemed = "0.00"; 2108 if (min_charge == null) min_charge = "0.00"; 2109 if (sales_tax == null) sales_tax = "0.00"; 2110 if (liftgate_amt == null) liftgate_amt = "0.00"; 2111 sales_tax = parseFloat(sales_tax.replace(/[$,]/g, '')); 2112 sub_total = parseFloat(sub_total.replace(/[$,]/g, '')); 2113 rewards_redeemed = parseFloat(rewards_redeemed.replace(/[$,-]/g, '')); 2114 coupon_gift = coupon_gift.replace(/[$,]/g, ''); 2115 coupon_gift = coupon_gift.replace(' ', ''); 2116 coupon_gift = parseFloat(coupon_gift.replace('-', '')); 2117 min_charge = parseFloat(min_charge.replace(/[$,]/g, '')); 2118 liftgate_amt = parseFloat(liftgate_amt.replace(/[$,]/g, '')); 2119 2120 //alert (sub_total + " " + coupon_gift + " " + min_charge + " " + sales_tax); 2121 2122 //$j('.error_msg').remove(); 2123 2124 // show the data 2125 if($j(oSelect).is("select")){ 2126 var extra_data = (typeof $j(oSelect).find(':selected').data('extra') == "string")? $j(oSelect).find(':selected').data('extra').replace(/,/g, ''): $j(oSelect).find(':selected').data('extra'); 2127 var standard_shipping = parseFloat(extra_data); 2128 } 2129 else{ 2130 var extra_data = (typeof $j(oSelect).data('extra') == "string")? $j(oSelect).data('extra').replace(/,/g, ''): $j(oSelect).data('extra'); 2131 var standard_shipping = parseFloat($j(oSelect).data('extra')); 2132 } 2133 var freight = parseFloat($j('.freight_amt').html()); 2134 2135 if(isNaN(freight)){freight = 0;} 2136 if(isNaN(standard_shipping)){standard_shipping = 0;} 2137 2138 var new_shipping = standard_shipping + freight; 2139 2140 new_shipping = new_shipping - shipping_discount; 2141 if (new_shipping == 0){ 2142 new_shipping = "0.00"; 2143 }else{ 2144 new_shipping = new_shipping.toFixed(2); 2145 } 2146 2147 2148 $j('#shipping_cost_text').html(new_shipping); 2149 //$j('.standard_shipping_amt').html(standard_shipping.toFixed(2)); 2150 2151 new_shipping = parseFloat(new_shipping); 2152 if (tax_rate == "") tax_rate = 0; 2153 2154 new_sales_tax = (sub_total - coupon_gift - rewards_redeemed + min_charge + new_shipping + liftgate_amt) * (tax_rate * .01); 2155 new_sales_tax = Math.round(new_sales_tax*100)/100; 2156 var new_total = sub_total - coupon_gift - rewards_redeemed + min_charge + new_sales_tax + new_shipping + liftgate_amt; 2157 new_total = Math.round(new_total*100)/100; 2158 new_total = new_total.toFixed(2); 2159 new_sales_tax = new_sales_tax.toFixed(2); 2160 $j('#sales_tax').html(new_sales_tax); 2161 //$('cur_total').update(new_total); 2162 $j('#cur_total').html(new_total);
2163 $j.post("/ajax.calculate_shipping.php",{ method: method }); 2164} 2165 2166 function hidecharges(){ 2167 jQuery('#shippingprice').hide(); 2168 jQuery('#shippingnoprice').show(); 2169 jQuery('#target_tax_row').hide(); 2170 jQuery('#target_shipping_row').hide(); 2171 jQuery('#target_total').hide(); 2172 jQuery('#target_price').hide(); 2173 2174 } 2175 2176 2177function toggle_liftgate(radio_btn, tax_rate){ 2178 //console.log(radio_btn); 2179 var charge_liftgate = false; 2180 if(radio_btn.value == 'liftgate_Y') charge_liftgate = true; 2181 2182 //console.log(charge_liftgate); 2183 2184 var url = '/ajax.calculate_shipping.php?action=cart3liftgate&charge_liftgate=' + charge_liftgate; 2185 //var cur_total = jQuery('#cur_total').html(); 2186 var sub_total = jQuery('#sub_total').html(); 2187 var coupon_gift = jQuery('#coupon_gift').html(); 2188 var rewards_redeemed = jQuery('#rewards_redeemed').html(); 2189 var min_charge = jQuery('#min_charge').html(); 2190 var sales_tax = jQuery('#sales_tax').html(); 2191 var shipping_amt = jQuery('#shipping_amt').html(); 2192 if (sub_total == null) sub_total = "0.00"; 2193 if (coupon_gift == null) coupon_gift = "0.00"; 2194 if (min_charge == null) min_charge = "0.00"; 2195 if (sales_tax == null) sales_tax = "0.00"; 2196 if (shipping_amt == null) shipping_amt = "0.00"; 2197 if (rewards_redeemed == null) rewards_redeemed = "0.00"; 2198 sales_tax = parseFloat(sales_tax.replace(/[$,]/g, '')); 2199 sub_total = parseFloat(sub_total.replace(/[$,]/g, '')); 2200 rewards_redeemed = parseFloat(rewards_redeemed.replace(/[$,]/g, '')); 2201 coupon_gift = coupon_gift.replace(/[$,]/g, ''); 2202 coupon_gift = coupon_gift.replace(' ', ''); 2203 coupon_gift = parseFloat(coupon_gift.replace('-', '')); 2204 min_charge = parseFloat(min_charge.replace(/[$,]/g, '')); 2205 shipping_amt = parseFloat(shipping_amt.replace(/[$,]/g, '')); 2206 2207 //alert (sub_total + " " + coupon_gift + " " + min_charge + " " + sales_tax); 2208 2209 new Ajax.Request(url, 2210 { 2211 method:'get', 2212 2213 onSuccess: function(transport) 2214 { 2215 switch (transport.responseText) 2216 { 2217 case "-1" :response = "missing required data."; 2218 break; 2219 2220 default :response = ''; 2221 /* show the data */ 2222 var new_liftgate = parseFloat(transport.responseText); 2223 2224 if (new_liftgate == 0){ 2225 new_liftgate = "0.00"; 2226 } else { 2227 new_liftgate = new_liftgate.toFixed(2); 2228 } 2229 2230 $('liftgate_amt').update(new_liftgate); 2231 2232 new_liftgate = parseFloat(new_liftgate); 2233 if (tax_rate == "") tax_rate = 0; 2234 2235 //console.log(sub_total +" "+ coupon_gift +" "+ rewards_redeemed +" "+ min_charge +" "+ shipping_amt +" "+ new_liftgate +" "+tax_rate); 2236 2237 new_sales_tax = (sub_total - coupon_gift - rewards_redeemed + min_charge + shipping_amt + new_liftgate) * (tax_rate * .01); 2238 2239 new_sales_tax = Math.round(new_sales_tax*100)/100; 2240 var new_total = sub_total - coupon_gift - rewards_redeemed + min_charge + new_sales_tax + shipping_amt + new_liftgate; 2241 new_total = Math.round(new_total*100)/100; 2242 new_total = new_total.toFixed(2); 2243 new_sales_tax = '$' + new_sales_tax.toFixed(2); 2244 $j('sales_tax').update(new_sales_tax); 2245 $j('cur_total').update(new_total); 2246 break; 2247 } 2248 //window.location.href = "/cart3.php"; 2249 }, 2250 2251 onFailure: function(transport) 2252 { 2253 alert("Something went wrong."); 2254 window.location.href = "/cart3.php"; 2255 } 2256 }); 2257 2258} 2259 2260/* 2261***************************************************************** 2262** star rating functions 2263***************************************************************** 2264*/ 2265function vote(baseurl, value, product_id, customer_id) 2266{ 2267 var url = baseurl + '/ajax.product_rating.php?value=' + value + '&product_id=' + product_id + '&customer_id=' + customer_id; 2268 2269 new Ajax.Request(url, 2270 { 2271 method:'get', 2272 2273 onSuccess: function(transport) 2274 { 2275 var response = ''; 2276 2277 switch (transport.responseText) 2278 { 2279 case "-1" :response = "missing required data."; 2280 break; 2281 2282 case "-2" :response = "you have rated this product before."; 2283 break; 2284 2285 case "-3" :response = "failed to insert rating."; 2286 break; 2287 2288 default :response = ''; 2289 2290 /* now resize the width of the star rating container */ 2291 $j('current-rating').style.width = (20 * value) + "px"; // transport.responseText + "px";; 2292 2293 break; 2294 } 2295 2296 $j('current-rating-result').innerHTML = response; 2297 }, 2298 2299 onFailure: function() 2300 { 2301 $j('current-rating-result').innerHTML = 'something went wrong ...'; 2302 } 2303 }); 2304 2305} 2306 2307/* 2308***************************************************************** 2309product_review.php - change chef hat color on click 2310***************************************************************** 2311*/ 2312function changehat(e,n){ 2313 document.getElementById("1star").className = "star"; 2314 document.getElementById("2star").className = "star"; 2315 document.getElementById("3star").className = "star"; 2316 document.getElementById("4star").className = "star"; 2317 document.getElementById("5star").className = "star"; 2318 switch(n) 2319 { 2320 case 5: 2321 document.getElementById("1star").className = "star activestar"; 2322 document.getElementById("2star").className = "star activestar"; 2323 document.getElementById("3star").className = "star activestar"; 2324 document.getElementById("4star").className = "star activestar"; 2325 document.getElementById("5star").className = "star activestar"; 2326 break; 2327 case 4: 2328 document.getElementById("1star").className = "star activestar"; 2329 document.getElementById("2star").className = "star activestar"; 2330 document.getElementById("3star").className = "star activestar"; 2331 document.getElementById("4star").className = "star activestar"; 2332 break; 2333 case 3: 2334 document.getElementById("1star").className = "star activestar"; 2335 document.getElementById("2star").className = "star activestar"; 2336 document.getElementById("3star").className = "star activestar"; 2337 break; 2338 case 2: 2339 document.getElementById("1star").className = "star activestar"; 2340 document.getElementById("2star").className = "star activestar"; 2341 break; 2342 default: 2343 document.getElementById(e).className = "star activestar"; 2344 } 2345 } 2346 2347/* 2348***************************************************************** 2349product_review.php - helpful review 2350***************************************************************** 2351*/ 2352 2353 2354function helpful(id,bool) 2355{ 2356
2357var url = '/ajax/ajax.helpful_review.php?review_id=' +id + "&helpful=" + bool; 2358var divname='helpfulthanks'+id; 2359 2360 new Ajax.Request(url, 2361 { 2362 method:'get', 2363 2364 onSuccess: function(response) 2365 { 2366 $j(divname).innerHTML = response.responseText; 2367 setTimeout(function(){$('feedback'+id).innerHTML =''},3000); 2368 2369 2370 }, 2371 2372 onFailure: function() 2373 { 2374 $(divname).innerHTML = 'something went wrong ...'; 2375 } 2376 }); 2377 2378 2379} 2380 2381 2382/* 2383***************************************************************** 2384product_review.php - show reviews 2385***************************************************************** 2386*/ 2387 2388 2389function showreviews(product_id,procon,page) 2390{ 2391 2392var url = '/ajax/ajax.procon_review.php?review_type=' +procon + "&product=" + product_id+"&page=" + page; 2393var divname='reviewsectionwrap'; 2394 2395 new Ajax.Request(url, 2396 { 2397 method:'get', 2398 2399 onSuccess: function(response) 2400 { 2401 //$('#reviewsectionwrap').innerHTML = response.responseText; 2402 $j('#reviewsectionwrap').html(response.responseText); 2403 2404 }, 2405 2406 onFailure: function() 2407 { 2408 $j(divname).innerHTML = 'something went wrong ...'; 2409 } 2410 }); 2411 2412} 2413 2414function nextreview(num,total,reviews,pid,type) 2415{ 2416 //view 5 next reviews 2417 var array=reviews.split(","); 2418 var divname='reviewsection'; 2419 for (i=0;i<total;i++) 2420 { 2421 if (x=document.getElementById('page'+i)) 2422 x.style.color ='#666'; 2423 2424 if (x=document.getElementById('bpage'+i)) 2425 x.style.color ='#666'; 2426 } 2427 // $('page'+num).style.color = '#fea503'; 2428 // $('bpage'+num).style.color = '#fea503'; 2429 $j('#page'+num).css({"color": '#fea503'}); 2430 $j('#bpage'+num).css({"color": '#fea503'}); 2431 2432 var url = '/ajax/ajax.show5reviews.php?num='+num+'&reviews='+array+'&total='+total+'&product_id='+pid+'&sort='+type; 2433 new Ajax.Request(url, 2434 { 2435 method: 'get', 2436 2437 onSuccess: function(response) 2438 { 2439 //$(divname).innerHTML = response.responseText; 2440 $j('#reviewsection').html(response.responseText); 2441 2442 }, 2443 2444 onFailure: function() 2445 { 2446 //$(divname).innerHTML = 'something went wrong ...'; 2447 $j('#reviewsection').html('something went wrong ...'); 2448 } 2449 }); 2450 2451} 2452 2453/* 2454***************************************************************** 2455my_account.php - delete review 2456***************************************************************** 2457*/ 2458 2459function deletereview(review_id){ 2460 2461var url = '/ajax/ajax.delete_review.php?id=' +review_id; 2462 2463 new Ajax.Request(url, 2464 { 2465 method:'get', 2466 2467 onSuccess: function(response) 2468 { 2469 location.reload(); 2470 2471 }, 2472 2473 onFailure: function() 2474 { 2475 alert ('something went wrong ...'); 2476 } 2477 }); 2478 2479} 2480/* 2481***************************************************************** 2482product_review.php - add terms by user 2483***************************************************************** 2484*/ 2485 2486 2487function useraddterm(product_id,term,procon,customerid) 2488{ 2489 2490var divname='newterm'; 2491var newterm = term.value; 2492var url = '/ajax/ajax.new_term.php?review_type=' +procon + "&product=" + product_id + "&term=" + newterm+ "&customerid=" + customerid; 2493 switch (procon) 2494 { 2495 case 1 :var x=document.getElementById("probox"); 2496 var y=document.getElementById("proterm"); 2497 break; 2498 2499 case 2 :var x=document.getElementById("conbox"); 2500 var y=document.getElementById("con"); 2501 break; 2502 2503 case 3 :var x=document.getElementById("bestbox"); 2504 var y=document.getElementById("best"); 2505 break; 2506 } 2507 2508 if ((newterm!=null)&&(newterm!='')&&(newterm!=' ')) 2509 { 2510 var option=document.createElement("option"); 2511 option.text=newterm; 2512 option.selected=true; 2513 2514 new Ajax.Request(url, 2515 { 2516 method:'get', 2517 2518 onSuccess: function(response) 2519 { 2520 var content=response.responseText; 2521 var mylen=x.length; 2522 content=parseInt(content); 2523 var flag=0; 2524 for (var i = 0; i < mylen; i++) { 2525 if (x.options[i].value == content) { 2526 x.options[i].selected = true; 2527 flag=1; 2528 } 2529 } 2530 if (flag==0){ 2531 option.value=response.responseText; 2532 // x[0].selected=false; 2533 try 2534 { 2535 // for IE earlier than version 8 2536 x.add(option,x.options[null]); 2537 } 2538 catch (e) 2539 { 2540 x.add(option,null); 2541 } 2542 } 2543 y.value=''; 2544 }, 2545 2546 onFailure: function() 2547 { 2548 $j(divname).innerHTML = 'something went wrong ...'; 2549 } 2550 }); 2551 } 2552} 2553 2554 2555/* 2556***************************************************************** 2557ajax/ajax.procon_review.php 2558Add a comment to a review 2559***************************************************************** 2560*/ 2561 2562 2563function processComment(i) { 2564 2565var url = '/ajax/ajax.sharecomment.php?'+$('sharecomment'+i).serialize(); 2566var divname='thanksforcomment'+i; 2567 2568 new Ajax.Request(url, 2569 { 2570 method:'get', 2571 onSuccess: function(response) 2572 { 2573 $j(divname).innerHTML = response.responseText; 2574 e=document.getElementById('comment'+i); 2575 if (e){ 2576 e.value = ''; 2577 } 2578 $j('sharecomment'+i).style.display = "none"; 2579 $j('commentdiv'+i).style.display = "none"; 2580 2581 }, 2582 2583 onFailure: function() 2584 { 2585 $j(divname).innerHTML = 'something went wrong ...'; 2586 } 2587 }); 2588 2589 2590} 2591 2592 2593/* 2594***************************************************************** 2595product_info.php 2596Subscirbe to a product 2597***************************************************************** 2598*/ 2599 2600 2601function productSubscirbe(pid) { 2602 2603var url = '/ajax/ajax.productsubscribe.php?product_id='+pid; 2604var divname='thanksforsubscribe'; 2605 2606 new Ajax.Request(url, 2607 { 2608 method:'get', 2609 onSuccess: function(response) 2610 { 2611 $j(divname).innerHTML = response.responseText; 2612 }, 2613 2614 onFailure: function() 2615 { 2616 $j(divname).innerHTML = 'something went wrong ...'; 2617 } 2618 }); 2619 2620 2621} 2622 2623 2624 2625 2626/* 2627***************************************************************** 2628product_review.php 2629remove image from review 2630***************************************************************** 2631*/ 2632 2633function removeReviewImage(imgUrl,id) { 2634 2635 var url = '/ajax/ajax.removeReviewimage.php?image='+imgUrl+'&id='+id; 2636 var divname='imageremoved'; 2637 new Ajax.Request(url, 2638 { 2639 method:'get', 2640 onSuccess: function(response) 2641 { 2642 $j(divname).innerHTML = response.responseText; 2643 document.getElementById('reviewimag').style.display='none'; 2644 }, 2645 2646 onFailure: function() 2647 { 2648 $j(divname).innerHTML = 'something went wrong ...'; 2649 } 2650 }); 2651 2652 2653 2654} 2655 2656 2657/* 2658***************************************************************** 2659compare.php 2660***************************************************************** 2661*/ 2662function compare_products(cat_id) 2663{ 2664 var compare_list = document.getElementsByName('compare[]'); 2665 var to_compare = []; 2666 var params = "?cat_id=" + cat_id; 2667 var x = 0; 2668 2669 //alert(compare_list.length); 2670 2671 for (var i = 0; i < compare_list.length; i++) 2672 { 2673 if (compare_list[i].checked) 2674 { 2675 to_compare[i] = compare_list[i].value; 2676 x++; 2677 params = params + "&compare[]=" + compare_list[i].value; 2678 } 2679 } 2680 2681 if( x < 2 ) 2682 { 2683 alert('Please choose at least 2 products to compare.'); 2684 return false; 2685 } 2686 2687 //alert( params ); 2688 2689 window.location = '/compare.php' + params; 2690} 2691 2692/* 2693***************************************************************** 2694wishlist functionality 2695***************************************************************** 2696*/ 2697function wishlist() 2698{ 2699 var product_id = parseInt($j('wishlist_product_id').value); 2700 var customer_id = parseInt($j('wishlist_customer_id').value); 2701 var wishlist_id = parseInt($j('wishlist_wishlist_id').value); 2702 var wishlist_name = $('wishlist_link').name; 2703 var ret = false; 2704 2705 switch (wishlist_name) 2706 { 2707 case 'wishlist_add' :return add_to_wishlist(product_id, customer_id); 2708 break; 2709 2710 case 'wishlist_delete' :return remove_from_wishlist(wishlist_id, product_id, customer_id); 2711 break; 2712 2713 default :return false; 2714 break; 2715 } 2716 2717 2718 return false; 2719} 2720 2721 2722function add_to_wishlist(product_id, customer_id) 2723{ 2724 var url = '/ajax.wishlist.php?action=add&product_id=' + product_id + '&customer_id=' + customer_id; 2725 2726 /* do a little validation */ 2727 if (!customer_id) 2728 { 2729 alert("You must be logged in to do this."); 2730 return false; 2731 } 2732 2733 if (!product_id) 2734 { 2735 alert("Invalid product id!"); 2736 return false; 2737 } 2738 2739 /* we have the data we need now, so insert it. */ 2740 new Ajax.Request(url, 2741 { 2742 method:'get', 2743 2744 onSuccess: function(transport) 2745 { 2746 var response = ''; 2747 2748 switch (transport.responseText) 2749 { 2750 case "-1" :alert("Failed To Insert Item."); 2751 break; 2752 2753 case "-2" :alert("Already In Your WishList"); 2754 break; 2755 2756 default :$j('wishlist_wishlist_id').value = transport.responseText; 2757 $j('wishlist_customer_id').value = customer_id; 2758 $j('wishlist_product_id').value = product_id; 2759 $j('wishlist_link').innerHTML = 'Remove From My List'; 2760 $j('wishlist_link').name = 'wishlist_delete'; 2761 2762 alert("Item Added Successfully"); 2763 2764 break; 2765 } 2766 }, 2767 2768 onFailure: function() 2769 { 2770 alert('Something went wrong.'); 2771 } 2772 });
2773 2774 2775 return false; 2776} 2777 2778function remove_from_wishlist(wishlist_id, product_id, customer_id, coming_from_my_account) 2779{ 2780 var url = '/ajax.wishlist.php?action=delete&wishlist_id=' + wishlist_id; 2781 2782 /* do a little validation */ 2783 if (!wishlist_id) 2784 { 2785 alert("Invalid WishList Item."); 2786 return false; 2787 } 2788 2789 /* we have the data we need now, so insert it. */ 2790 new Ajax.Request(url, 2791 { 2792 method:'get', 2793 2794 onSuccess: function(transport) 2795 { 2796 var response = ''; 2797 2798 switch (transport.responseText) 2799 { 2800 case "-1" :alert("Failed To Delete Item From WishList."); 2801 break; 2802 2803 default : 2804 if (coming_from_my_account == 'undefined' || coming_from_my_account == null) 2805 { 2806 $j('wishlist_wishlist_id').value = "0"; 2807 $j('wishlist_customer_id').value = customer_id; 2808 $j('wishlist_product_id').value = product_id; 2809 $j('wishlist_link').innerHTML = 'Save to My List'; 2810 $j('wishlist_link').name = 'wishlist_add'; 2811 2812 alert("Item Removed From WishList."); 2813 } 2814 else 2815 { 2816 location.href = "/accout.php"; 2817 exit(0); 2818 } 2819 2820 break; 2821 } 2822 }, 2823 2824 onFailure: function() 2825 { 2826 alert('Something went wrong.'); 2827 } 2828 }); 2829 2830 2831 return false; 2832} 2833 2834/* 2835***************************************************************** 2836functionality for the email portion on the product info page 2837***************************************************************** 2838*/ 2839function email_form_toggle(display) 2840{ 2841 $j('email_form').style.display = (display == 'close') ? 'none' : 'block'; 2842 return true; 2843} 2844 2845function email_form_cancel() 2846{ 2847 $j('email_to').value = ''; 2848 $j('email_from').value = ''; 2849 $j('email_subject').value = ''; 2850 $j('email_body').value = ''; 2851 2852 email_form_toggle('close'); 2853 2854 return true; 2855} 2856 2857function email_form_send_mail() 2858{ 2859 var url = '/ajax.email.php'; 2860 var email_to = $j('email_to'); 2861 var email_from = $j('email_from'); 2862 var email_subject = $j('email_subject'); 2863 var email_body = $j('email_body'); 2864 var product_url = $j('email_product_url'); 2865 2866 /* we have the data we need now, so insert it. */ 2867 new Ajax.Request(url, 2868 { 2869 method:'post', 2870 parameters: {to: email_to.value, from: email_from.value, subject: email_subject.value, body: email_body.value, product_url: product_url.value}, 2871 2872 onSuccess: function(transport) 2873 { 2874 var response = transport.responseText; 2875 2876 switch (response) 2877 { 2878 case "-1" :alert('Invalid Recipient Email Address.'); 2879 break; 2880 2881 case "-2" :alert("Invalid Sender Email Address."); 2882 break; 2883 2884 case "-3" :alert("Error sending email. Please try again later."); 2885 break; 2886 2887 default :alert("Email Sent Successfully!"); 2888 email_form_cancel(); 2889 2890 break; 2891 } 2892 }, 2893 2894 onFailure: function() 2895 { 2896 alert('Something went wrong.'); 2897 } 2898 }); 2899 2900 return false; 2901} 2902 2903function validateEmail(str){ 2904 return str.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i); 2905} 2906 2907/* For Newsletter Sign Up Box */ 2908function promptNewsletterSignup(){ 2909 jQuery('#global_popup .inner').load('/ajax/ajax.newsletter.php?action=prompt',function(){ 2910 jQuery('#global_popup').fadeIn('fast'); 2911 }); 2912 2913 return false; 2914} 2915 2916function submitNewsletterForm(eForm){ 2917 var jForm = jQuery("#newsletter_form"); 2918 if(eForm){ 2919 jForm = jQuery(eForm); 2920 } 2921 2922 if( !validateEmail( jForm.find("input[name=email]").val() ) ){
2923 alert("The e-mail address entered is not valid."); 2924 return false; 2925 } 2926 2927 $j.ajax({ 2928 url: '/ajax/ajax.newsletter.php?action=submit', 2929 data: jForm.serialize(), 2930 type: 'POST', 2931 success:function(obj){ 2932 if(obj.error){ 2933 alert(obj.error); 2934 } else if(obj.message) { 2935 jForm.hide().html(obj.message).fadeIn("fast"); 2936 } 2937 } 2938 2939 }); 2940 2941 return false; 2942 2943} 2944 2945function blogChangeCat(selBox){ 2946 window.location.href = $j(selBox).val(); 2947} 2948 2949// The input parameter <type> must equal either "google" or "amazon". 2950function promptZipCode(type) { 2951 var zipcode = prompt("Enter your zip code to continue:"); 2952 2953 if (!zipcode) { 2954 return; 2955 } 2956 2957 $j.ajax({ 2958 url: '/ajax/ajax.cartbutton.php', 2959 data: "type=" + type + "&zip=" + zipcode, 2960 type: 'POST', 2961 success: function(obj) { 2962 if (obj.error) { 2963 alert(obj.error); 2964 } else if (type == "google") { 2965 $j('#google-checkout-button').html(obj.html); 2966 $j("#google-checkout-button form").submit(); 2967 } 2968 else { // (type == "amazon" 2969 $j('#amazon-checkout-button').html(obj.html); 2970 $j("#amazon-checkout-button form").submit(); 2971 } 2972 } 2973 }); 2974} 2975 2976function borderButton( box ) 2977{ 2978 jQuery("#"+box+'_button').addClass("more_info_btn bordered"); 2979} 2980 2981function clearButton( box ) 2982{ 2983 jQuery("#"+box+'_button').removeClass("bordered"); 2984} 2985 2986function swapProductTab(div){ 2987 jQuery(".bottom_product_tabs_list li").removeClass("active"); 2988 jQuery(".bottom_product_tabs .bottom_tabbed_data").hide(); 2989 jQuery("#"+div+"_details_tab").addClass("active"); 2990 jQuery("#"+div+"_details_data").fadeIn(350); 2991} 2992 2993function storeCartItem(product_id, quantity, option, cartStats, accessories) { 2994 var succeeded = false; 2995 $j.ajax("/ajax/ajax.add_one_to_cart.php", { 2996 async: false, 2997 data: { 2998 product_id: product_id, 2999 quantity: quantity, 3000 option: (typeof option == undefined) ? "": option, 3001 accessories: (typeof accessories == undefined) ? "": accessories 3002 }, 3003 dataType: "json", 3004 type: "POST", 3005 success: function(returnObject) { 3006 cartStats.item_count = returnObject.count; 3007 cartStats.subtotal = returnObject.subtotal; 3008 cartStats.ret_str = returnObject.ret_str; 3009 if (typeof(returnObject.errors) === 'undefined' || returnObject.errors === null){ 3010 succeeded = true; 3011 var name = product_id; 3012 if(cartStats.qty != undefined && cartStats.qty != quantity){ 3013 quantity = cartStats.qty; 3014 } 3015 3016 var the_label = 'From: '+', Product: ' +name; 3017 window.dataLayer = window.dataLayer || [];dataLayer.push({'event': 'addToCart','gaEventLabel': the_label,'ecommerce': {'add': {'actionField': {'list': ''}, 'products': [{'name': name,'id': product_id, 'price': '','quantity':quantity,'variant': option}]}}}); 3018 3019 } 3020 else{ 3021 alert(returnObject.errors); 3022 } 3023 } 3024 }); 3025 3026 return succeeded; 3027} 3028 3029 function updateResultsNew( filter_name, filter_value, filter_name_2, filter_value_2) 3030 { 3031 $j('#refine').append("<input type='hidden' name='"+filter_name+"' value='"+filter_value+"'>"); 3032 if(typeof filter_name_2 != 'undefined' && typeof filter_value_2 != 'undefined') 3033 { 3034 $j('#refine').append("<input type='hidden' name='"+filter_name_2+"' value='"+filter_value_2+"'>"); 3035 } 3036 //$('refine').action = page_link + "?" + new_action; 3037// $('refine').action = '<?=$page_link?>?' + Form.serialize( $('refine') ); 3038 var data=($j('#refine').serialize()); 3039 $j('#refine').action = '<?=$page_link?>?'+data; 3040 $j('#refine').submit(); 3041 } 3042 function undoFilterSelection(filter_name) 3043 { 3044 $j("#"+filter_name).val(""); 3045 if (filter_name == "min_price") $j("#max_price").val(""); 3046// $('refine').action = '<?=$page_link?>?' + Form.serialize( $('refine') ); 3047// $('refine').submit(); 3048 var data=($j('#refine').serialize()); 3049 $j('#refine').action = '<?=$page_link?>?'+data; 3050 $j('#refine').submit(); 3051 } 3052 function checkUpdate( id, filter_id ) 3053 { 3054 updateResults( $j(id), filter_id ); 3055 } 3056 3057function update_filters (facets,filter,facets2,filter2){
3058 var url=document.URL; 3059 var query = window.location.search.substring(1); 3060 var vars = query.split("&"); 3061 for (var i=0;i<vars.length;i++) { 3062 var pair = vars[i].split("="); 3063 if (pair[0]==filter){ 3064 var oldvalue=pair[1]; 3065 } 3066 if (pair[0]==filter2){ 3067 var oldvalue2=pair[1]; 3068 } 3069 if (pair[0]=='entrant') 3070 var page=pair[1]; 3071 } 3072 url=url.replace('#products',''); 3073 url=url.replace('#',''); 3074 url=url.replace('&'+filter+'='+oldvalue,''); 3075 url=url+'&'+filter+'='+facets; 3076 if (filter2){ 3077 url=url.replace('&'+filter2+'='+oldvalue2,''); 3078 url=url+'&'+filter2+'='+facets2; 3079 if (facets2=='') url=url.replace("&"+filter2+"=",""); 3080 } 3081 if (facets=='') //if removing filter 3082 { 3083 url=url.replace("&"+filter+"=",""); 3084 } 3085 if (page !='') 3086 url=url.replace('&entrant='+page,'&entrant=1'); 3087 3088 if (url.indexOf("?")==-1){ 3089 url=url.replace('&','?form_values=&'); 3090 } 3091 document.location.href = url; 3092 return false; 3093 } 3094 3095function remove_filters (facets,filter,facets2,filter2){ 3096 3097 if ((filter!='manufacturer')&&(filter!='min_price')) 3098 facets=facets.replace(/ /g, '%20'); 3099 console.log("facets: "+facets); 3100 var url=document.URL; 3101 var query = window.location.search.substring(1); 3102 var vars = query.split("&"); 3103 for (var i=0;i<vars.length;i++) { 3104 var pair = vars[i].split("="); 3105 if (pair[0]==filter){ 3106 var oldvalue=pair[1]; 3107 } 3108 if (pair[0]==filter2){ 3109 var oldvalue2=pair[1]; 3110 } 3111 if (pair[0]=='entrant') 3112 var page=pair[1]; 3113 } 3114 3115 //facets=(encodeURIComponent(facets.trim())); 3116 //oldvalue=(encodeURIComponent(oldvalue.trim())); 3117 console.log("old value: "+oldvalue); 3118 3119 var newvalue1=oldvalue.replace(facets,''); 3120 if (oldvalue2) var newvalue2=oldvalue2.replace(facets2,''); 3121 url=url.replace('#products',''); 3122 url=url.replace('#',''); 3123 if (!newvalue1) 3124 url=url.replace('&'+filter+'='+oldvalue,''); 3125 else { 3126 url=url.replace('|'+facets,''); 3127 url=url.replace(facets+'|',''); 3128 url=url.replace('||','|'); 3129 } 3130 if (filter2){ 3131 if (!newvalue2) 3132 url=url.replace('&'+filter2+'='+oldvalue2,''); 3133 else 3134 { 3135 url=url.replace('|'+facets2,''); 3136 url=url.replace(facets2+'|',''); 3137 url=url.replace('||','|'); 3138 } 3139 if (facets2=='') url=url.replace("&"+filter2+"=",""); 3140 } 3141 if (facets=='') //if removing filter 3142 { 3143 url=url.replace("&"+filter+"=",""); 3144 } 3145 if (url.indexOf("?")==-1){ 3146 url=url.replace('&','?form_values=&'); 3147 } 3148 if (url.indexOf("|")==-1){ 3149 url.slice(0,-1); 3150 } 3151 if (page !='') 3152 url=url.replace('&entrant='+page,'&entrant=1'); 3153 3154 document.location.href = url; 3155 return false; 3156 } 3157 3158 function compareProducts( ) 3159 { 3160 compare_list = document.getElementsByName('compare[]'); 3161 var to_compare = []; 3162 var params = "?cat_id=<?=$_GET['cat_id']?>"; 3163 var x = 0; 3164 for( var i = 0; i < compare_list.length; i++ ) 3165 if( compare_list[i].checked ) 3166 { 3167 to_compare[i] = compare_list[i].value; 3168 x++; 3169 params = params + "&compare[]=" + compare_list[i].value; 3170 } 3171 if( to_compare.length < 2 ) 3172 alert('Please choose at least 2 products to compare.'); 3173 3174 window.location = '/compare.php' + params; 3175 } 3176 3177 3178function storeGiftCardItem(product_id, option, cartStats, info) { 3179 3180 var succeeded = false; 3181 $j.ajax("/ajax/ajax.add_one_to_cart.php", { 3182 async: false, 3183 data: { 3184 product_id: product_id, 3185 quantity: '1', 3186 option: (typeof option == undefined) ? "": option, 3187 action: 'store_gift_card', 3188 info: info 3189 }, 3190 dataType: "json", 3191 type: "POST", 3192 success: function(returnObject) { 3193 3194 cartStats.item_count = returnObject.count; 3195 cartStats.subtotal = returnObject.subtotal; 3196 cartStats.ret_str = returnObject.ret_str; 3197 3198 if (returnObject.errors.length > 0) { 3199 alert(returnObject.errors); 3200 } 3201 else { 3202 succeeded = true; 3203 } 3204 } 3205 });
3206 3207 return succeeded; 3208} 3209 3210function removeCartPopup() { 3211 if ($j("#cart_popup").length > 0) { 3212 $j("#cart_popup").remove(); 3213 $j("div.links_box").css("display", "block"); 3214 } 3215} 3216 3217function showCartPopup(name, sku, price, quantity, img_path, cartStats) { 3218 // $j("div.links_box").css("display", "none"); // Hide search form to avoid IE6 problems. 3219// alert(JSON.stringify(cartStats)); 3220 var header_box = $j("div.header_box"); 3221// var dlg_top = header_box.offset().top + header_box.outerHeight(true); 3222 //var dlg_top = 300; 3223 3224 var dlg_top = jQuery(window).scrollTop() + 100; 3225 3226 var cart_header = $j("div#header span.shopping_cart"); 3227 3228 $j("span#cart_count, #cart_count_mobile", cart_header).html(cartStats.item_count); 3229 3230 var dlg_left = cart_header.offset().left; 3231 //var dlg_width = cart_header.outerWidth(); 3232 var dlg_width = 570; 3233 //dlg_left -= Math.round(dlg_width * .125); 3234 var width_of_screen = jQuery(window).width(); 3235 var midpoint = width_of_screen / 2; 3236 dlg_left = midpoint - (dlg_width / 2); 3237 //dlg_left = 500; 3238 // 3239 dlg_height= 310; 3240 var dlgStyle = "top:" + dlg_top + "px;left:" + dlg_left + "px;width:" + dlg_width + "px;"+ "height:" + dlg_height + "px;"; 3241 3242 var bandTop = cartPopupTopBand(dlg_width); 3243 //var bandMid = cartPopupMiddleBand(name, sku, price, quantity, img_path); 3244 var bandMid = cartPopupMiddleBand2(cartStats.ret_str); 3245 var bandBot1 = cartPopupBottom1Band(cartStats); 3246 var bandBot2 = "<div id='band_bot2'></div>"; 3247 var bandBot3 = cartPopupBottom3Band(); 3248 3249 var popupHtml = "<div id='cart_popup' style='" + dlgStyle + "'>" + 3250 bandTop + bandMid + bandBot1 + bandBot2 + bandBot3 + 3251 "</div>"; 3252 3253 $j("body").append(popupHtml); 3254 3255 $j("#cart_popup_x").click(function() { 3256 $j("#cart_popup").hide(); 3257 $j("div.links_box").css("display", "block"); 3258 }); 3259 3260 $j("#cart_popup_checkout").click(function() { 3261 window.location.href = "/cart.php"; 3262 }); 3263 $j("#cart_popup_continue_shopping").click(function() { 3264 $j("#cart_popup").hide(); 3265 $j("div.links_box").css("display", "block"); 3266 }); 3267} 3268 3269function cartPopupTopBand(dlg_width) { 3270 return "<div id='band_top' style='width:" + dlg_width + "px;'>" + 3271 "Your Shopping Cart<span id='cart_popup_x' class='cart_popup_right'></span>" + 3272 "</div>"; 3273} 3274 3275function cartPopupMiddleBand(name, sku, price, quantity, img_path) { 3276 return "<div id='band_mid'>" + 3277 "<div id='prod_details'>" + 3278 "<div id='prod_name'>" + name + "</div>" + 3279 "<div>SKU " + sku + "</div>" + 3280 "<div>PRICE: $" + price + "</div>" + 3281 "<div>QTY: <strong>" + quantity + "</strong></div>" + 3282 "</div>" + 3283 "<img id='prod_thumbnail' src='" + img_path + "' />" + 3284 "</div>"; 3285} 3286function cartPopupMiddleBand2(item_string) { 3287 return "<div id='band_mid'>" + item_string+"</div>"; 3288} 3289 3290function cartPopupBottom1Band(cartStats) { 3291 var subTotal = new Number(cartStats.subtotal); 3292 return "<div id='band_bot1'>" + 3293 "<span class='cart_popup_left'>" + cartStats.item_count + " Items in bag</span>" + 3294 "<span class='cart_popup_right'>Subtotal <strong>$" + subTotal.toLocaleString() + "</strong></span>" + 3295 "</div>"; 3296} 3297 3298function cartPopupBottom3Band() { 3299 return "<div id='band_bot3'>" + 3300 "<span class='cart_popup_left'><a href='/cart.php'>View Your Bag</a></span>" + 3301 "<span id='cart_popup_checkout' class='cart_popup_right'>Checkout</span>" + 3302 "<span id='cart_popup_continue_shopping' class='cart_popup_right'>Continue Shopping</span>" + 3303 "</div>"; 3304} 3305 3306function updateOptionValue( product_id, option_id ,option_price, color_id) 3307{ 3308 $j('#option_' + product_id).val(option_id); 3309 $j('.' + product_id + '_options').removeClass('selected'); 3310 $j('img.no_reg.selected').removeClass('selected'); 3311 $j('#' + option_id).addClass( 'selected' ); 3312 3313 if($j('.additional_img_li').length){ 3314 if($j('.option_color_' + color_id).length){ 3315 change_image($j('.option_color_' + color_id).first(),$j('.option_color_' + color_id).first().attr('src')); 3316 }else{ 3317 change_image($j('.main_image').first(),$j('.main_image').first().attr('src')); 3318 } 3319 } 3320 option_price = $j.trim(option_price); 3321 if(option_price.charAt(0) == '$') option_price = "Our Price: " + option_price; 3322 $j('#one_pc_price_' + product_id).html(option_price.replace("Sale", "Sale Price")); 3323} 3324 3325function updateOptionValueDropdown(product_id, product_price) 3326{ 3327 var selected_option_text = $j('#option_' + product_id + ' option:selected').text(); 3328 var selected_option_class = $j('#option_' + product_id + ' option:selected').attr('class'); 3329 var selected_option_text_array = selected_option_text.split("-"); 3330 var option_price = $j.trim(selected_option_text_array[selected_option_text_array.length - 1]); 3331 3332 if(option_price.charAt(0) == '$') option_price = "Our Price: " + option_price; 3333 if (selected_option_class != '') option_price = selected_option_class + option_price; 3334 if ($j('#option_' + product_id).attr("selectedIndex") != 0) $j('#one_pc_price_' + product_id).html(option_price.replace("Sale", "Sale Price")); 3335 else $j('#one_pc_price_' + product_id).text("Our Price: $ " + product_price); 3336} 3337function check_min_quantity(min_q,qbox){ 3338 if (min_q > qbox.value){ 3339 alert ("The required minimum quantity to purchase this item is: "+min_q); 3340 qbox.value=min_q; 3341 } 3342 3343 } 3344 3345 3346function sidebar_nav_toggle() 3347{ 3348 3349 var org_val = $j('#sidebar_display_switch').text(); 3350 if (org_val=='[show]') 3351 $j('#sidebar_display_switch').text('[hide]'); 3352 else
3353 $j('#sidebar_display_switch').text('[show]'); 3354 3355 //alert(org_val); 3356 $j("#sidebar_ul").toggle(); 3357 3358 //alert('fire in the hole'); 3359 3360} 3361 3362function toggleShippingAddrDiv(is_it_checked) 3363{ 3364 if (is_it_checked == true) 3365 { 3366 $j('#shipping_addr_section').css({display: "none"}); 3367 } 3368 else 3369 { 3370 $j('#shipping_addr_section').css({display: "block"}); 3371 } 3372 3373 return true; 3374} 3375/* Mailchimp email signup form javascript */ 3376function validateMailchimpForm() 3377{ 3378 var have_errors = false; 3379 $j(".req").each(function(){ 3380 if ($j(this).children('input').val() == '') 3381 { 3382 have_errors = true; 3383 $j(this).children('.feedback.error').show(); 3384 } 3385 else $j(this).children('.feedback.error').hide(); 3386 }); 3387 if (have_errors) 3388 { 3389 $j('.formstatus').show(); 3390 return false; 3391 } 3392 else return true; 3393 3394} 3395 3396function closeIFrame(){ 3397 jQuery('#p_review').remove(); 3398} 3399 3400/* for mobile site */ 3401function toggleMobileCats() 3402{ 3403 $j(".main_cats").slideToggle(); 3404 $j(".shop_category").toggleClass("shop_category_expanded"); 3405} 3406 3407function toggleMobileStoreTypes() 3408{ 3409 $j(".main_store_types").slideToggle(); 3410 $j(".shop_store_type").toggleClass("shop_store_type_expanded"); 3411} 3412function generic_show_hide(text_div) 3413{ 3414 $j("#"+text_div).slideToggle(); 3415} 3416/* 3417 SlidesJS 3.0.4 http://slidesjs.com 3418 (c) 2013 by Nathan Searles http://nathansearles.com 3419 Updated: June 26th, 2013 3420 Apache License: http://www.apache.org/licenses/LICENSE-2.0 */ 3421//(function(){(function(e,t,n){var r,i,s;s="slidesjs";i={width:940,height:528,start:1,navigation:{active:!0,effect:"slide"},pagination:{active:!0,effect:"slide"},play:{active:!1,effect:"slide",interval:5e3,auto:!1,swap:!0,pauseOnHover:!1,restartDelay:2500},effect:{slide:{speed:500},fade:{speed:300,crossfade:!0}},callback:{loaded:function(){},start:function(){},complete:function(){}}};r=function(){function t(t,n){this.element=t;this.options=e.extend(!0,{},i,n);this._defaults=i;this._name=s;this.init()}return t}();r.prototype.init=function(){var n,r,i,s,o,u,a=this;n=e(this.element);this.data=e.data(this);e.data(this,"animating",!1);e.data(this,"total",n.children().not(".slidesjs-navigation",n).length);e.data(this,"current",this.options.start-1);e.data(this,"vendorPrefix",this._getVendorPrefix());if(typeof TouchEvent!="undefined"){e.data(this,"touch",!0);this.options.effect.slide.speed=this.options.effect.slide.speed/2}n.css({overflow:"hidden"});n.slidesContainer=n.children().not(".slidesjs-navigation",n).wrapAll("<div class='slidesjs-container'>",n).parent().css({overflow:"hidden",position:"relative"});e(".slidesjs-container",n).wrapInner("<div class='slidesjs-control'>",n).children();e(".slidesjs-control",n).css({position:"relative",left:0});e(".slidesjs-control",n).children().addClass("slidesjs-slide").css({position:"absolute",top:0,left:0,width:"100%",zIndex:0,display:"none",webkitBackfaceVisibility:"visible"});e.each(e(".slidesjs-control",n).children(),function(t){var n;n=e(this);return n.attr("slidesjs-index",t)});if(this.data.touch){e(".slidesjs-control",n).on("touchstart",function(e){return a._touchstart(e)});e(".slidesjs-control",n).on("touchmove",function(e){return a._touchmove(e)});e(".slidesjs-control",n).on("touchend",function(e){return a._touchend(e)})}n.fadeIn(0);this.update();this.data.touch&&this._setuptouch();e(".slidesjs-control",n).children(":eq("+this.data.current+")").eq(0).fadeIn(0,function(){return e(this).css({zIndex:10})});if(this.options.navigation.active){o=e("<a>",{"class":"slidesjs-previous slidesjs-navigation",href:"#",title:"Previous",text:"Previous"}).appendTo(n);r=e("<a>",{"class":"slidesjs-next slidesjs-navigation",href:"#",title:"Next",text:"Next"}).appendTo(n)}e(".slidesjs-next",n).click(function(e){e.preventDefault();a.stop(!0);return a.next(a.options.navigation.effect)});e(".slidesjs-previous",n).click(function(e){e.preventDefault();a.stop(!0);return a.previous(a.options.navigation.effect)});if(this.options.play.active){s=e("<a>",{"class":"slidesjs-play slidesjs-navigation",href:"#",title:"Play",text:"Play"}).appendTo(n);u=e("<a>",{"class":"slidesjs-stop slidesjs-navigation",href:"#",title:"Stop",text:"Stop"}).appendTo(n);s.click(function(e){e.preventDefault();return a.play(!0)});u.click(function(e){e.preventDefault();return a.stop(!0)});this.options.play.swap&&u.css({display:"none"})}if(this.options.pagination.active){i=e("<ul>",{"class":"slidesjs-pagination"}).appendTo(n);e.each(new Array(this.data.total),function(t){var n,r;n=e("<li>",{"class":"slidesjs-pagination-item"}).appendTo(i);r=e("<a>
3421",{href:"#","data-slidesjs-item":t,html:t+1}).appendTo(n);return r.click(function(t){t.preventDefault();a.stop(!0);return a.goto(e(t.currentTarget).attr("data-slidesjs-item")*1+1)})})}e(t).bind("resize",function(){return a.update()});this._setActive();this.options.play.auto&&this.play();return this.options.callback.loaded(this.options.start)};r.prototype._setActive=function(t){var n,r;n=e(this.element);this.data=e.data(this);r=t>-1?t:this.data.current;e(".active",n).removeClass("active");return e(".slidesjs-pagination li:eq("+r+") a",n).addClass("active")};r.prototype.update=function(){var t,n,r;t=e(this.element);this.data=e.data(this);e(".slidesjs-control",t).children(":not(:eq("+this.data.current+"))").css({display:"none",left:0,zIndex:0});r=t.width();n=this.options.height/this.options.width*r;this.options.width=r;this.options.height=n;return e(".slidesjs-control, .slidesjs-container",t).css({width:r,height:n})};r.prototype.next=function(t){var n;n=e(this.element);this.data=e.data(this);e.data(this,"direction","next");t===void 0&&(t=this.options.navigation.effect);return t==="fade"?this._fade():this._slide()};r.prototype.previous=function(t){var n;n=e(this.element);this.data=e.data(this);e.data(this,"direction","previous");t===void 0&&(t=this.options.navigation.effect);return t==="fade"?this._fade():this._slide()};r.prototype.goto=function(t){var n,r;n=e(this.element);this.data=e.data(this);r===void 0&&(r=this.options.pagination.effect);t>this.data.total?t=this.data.total:t<1&&(t=1);if(typeof t=="number")return r==="fade"?this._fade(t):this._slide(t);if(typeof t=="string"){if(t==="first")return r==="fade"?this._fade(0):this._slide(0);if(t==="last")return r==="fade"?this._fade(this.data.total):this._slide(this.data.total)}};r.prototype._setuptouch=function(){var t,n,r,i;t=e(this.element);this.data=e.data(this);i=e(".slidesjs-control",t);n=this.data.current+1;r=this.data.current-1;r<0&&(r=this.data.total-1);n>this.data.total-1&&(n=0);i.children(":eq("+n+")").css({display:"block",left:this.options.width});return i.children(":eq("+r+")").css({display:"block",left:-this.options.width})};r.prototype._touchstart=function(t){var n,r;n=e(this.element);this.data=e.data(this);r=t.originalEvent.touches[0];this._setuptouch();e.data(this,"touchtimer",Number(new Date));e.data(this,"touchstartx",r.pageX);e.data(this,"touchstarty",r.pageY);return t.stopPropagation()};r.prototype._touchend=function(t){var n,r,i,s,o,u,a,f=this;n=e(this.element);this.data=e.data(this);u=t.originalEvent.touches[0];s=e(".slidesjs-control",n);if(s.position().left>this.options.width*.5||s.position().left>this.options.width*.1&&Number(new Date)-this.data.touchtimer<250){e.data(this,"direction","previous");this._slide()}else if(s.position().left<-(this.options.width*.5)||s.position().left<-(this.options.width*.1)&&Number(new Date)-this.data.touchtimer<250){e.data(this,"direction","next");this._slide()}else{i=this.data.vendorPrefix;a=i+"Transform";r=i+"TransitionDuration";o=i+"TransitionTimingFunction";s[0].style[a]="translateX(0px)";s[0].style[r]=this.options.effect.slide.speed*.85+"ms"}s.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){i=f.data.vendorPrefix;a=i+"Transform";r=i+"TransitionDuration";o=i+"TransitionTimingFunction";s[0].style[a]="";s[0].style[r]="";return s[0].style[o]=""});return t.stopPropagation()};r.prototype._touchmove=function(t){var n,r,i,s,o;n=e(this.element);this.data=e.data(this);s=t.originalEvent.touches[0];r=this.data.vendorPrefix;i=e(".slidesjs-control",n);o=r+"Transform";e.data(this,"scrolling",Math.abs(s.pageX-this.data.touchstartx)<Math.abs(s.pageY-this.data.touchstarty));if(!this.data.animating&&!this.data.scrolling){t.preventDefault();this._setuptouch();i[0].style[o]="translateX("+(s.pageX-this.data.touchstartx)+"px)"}return t.stopPropagation()};r.prototype.play=function(t){var n,r,i,s=this;n=e(this.element);this.data=e.data(this);if(!this.data.playInterval){if(t){r=this.data.current;this.data.direction="next";this.options.play.effect==="fade"?this._fade():this._slide()}e.data(this,"playInterval",setInterval(function(){r=s.data.current;s.data.direction="next";return s.options.play.effect==="fade"?s._fade():s._slide()},this.options.play.interval));i=e(".slidesjs-container",n);if(this.options.play.pauseOnHover){i.unbind();i.bind("mouseenter",function(){return s.stop()});i.bind("mouseleave",function(){return s.options.play.restartDelay?e.data(s,"restartDelay",setTimeout(function(){return s.play(!0)},s.options.play.restartDelay)):s.play()})}e.data(this,"playing",!0);e(".slidesjs-play",n).addClass("slidesjs-playing");if(this.options.play.swap){e(".slidesjs-play",n).hide();return e(".slidesjs-stop",n).show()}}};r.prototype.stop=function(t){var n;n=e(this.element);this.data=e.data(this);clearInterval(this.data.playInterval);this.options.play.pauseOnHover&&t&&e(".slidesjs-container",n).unbind();e.data(this,"playInterval",null);e.data(this,"playing",!1);e(".slidesjs-play",n).removeClass("slidesjs-playing");if(this.options.play.swap){e(".slidesjs-stop",n).hide();return e(".slidesjs-play",n).show()}};r.prototype._slide=function(t){var n,r,i,s,o,u,a,f,l,c,h=this;
3421n=e(this.element);this.data=e.data(this);if(!this.data.animating&&t!==this.data.current+1){e.data(this,"animating",!0);r=this.data.current;if(t>-1){t-=1;c=t>r?1:-1;i=t>r?-this.options.width:this.options.width;o=t}else{c=this.data.direction==="next"?1:-1;i=this.data.direction==="next"?-this.options.width:this.options.width;o=r+c}o===-1&&(o=this.data.total-1);o===this.data.total&&(o=0);this._setActive(o);a=e(".slidesjs-control",n);t>-1&&a.children(":not(:eq("+r+"))").css({display:"none",left:0,zIndex:0});a.children(":eq("+o+")").css({display:"block",left:c*this.options.width,zIndex:10});this.options.callback.start(r+1);if(this.data.vendorPrefix){u=this.data.vendorPrefix;l=u+"Transform";s=u+"TransitionDuration";f=u+"TransitionTimingFunction";a[0].style[l]="translateX("+i+"px)";a[0].style[s]=this.options.effect.slide.speed+"ms";return a.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){a[0].style[l]="";a[0].style[s]="";a.children(":eq("+o+")").css({left:0});a.children(":eq("+r+")").css({display:"none",left:0,zIndex:0});e.data(h,"current",o);e.data(h,"animating",!1);a.unbind("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd");a.children(":not(:eq("+o+"))").css({display:"none",left:0,zIndex:0});h.data.touch&&h._setuptouch();return h.options.callback.complete(o+1)})}return a.stop().animate({left:i},this.options.effect.slide.speed,function(){a.css({left:0});a.children(":eq("+o+")").css({left:0});return a.children(":eq("+r+")").css({display:"none",left:0,zIndex:0},e.data(h,"current",o),e.data(h,"animating",!1),h.options.callback.complete(o+1))})}};r.prototype._fade=function(t){var n,r,i,s,o,u=this;n=e(this.element);this.data=e.data(this);if(!this.data.animating&&t!==this.data.current+1){e.data(this,"animating",!0);r=this.data.current;if(t){t-=1;o=t>r?1:-1;i=t}else{o=this.data.direction==="next"?1:-1;i=r+o}i===-1&&(i=this.data.total-1);i===this.data.total&&(i=0);this._setActive(i);s=e(".slidesjs-control",n);s.children(":eq("+i+")").css({display:"none",left:0,zIndex:10});this.options.callback.start(r+1);if(this.options.effect.fade.crossfade){s.children(":eq("+this.data.current+")").stop().fadeOut(this.options.effect.fade.speed);return s.children(":eq("+i+")").stop().fadeIn(this.options.effect.fade.speed,function(){s.children(":eq("+i+")").css({zIndex:0});e.data(u,"animating",!1);e.data(u,"current",i);return u.options.callback.complete(i+1)})}return s.children(":eq("+r+")").stop().fadeOut(this.options.effect.fade.speed,function(){s.children(":eq("+i+")").stop().fadeIn(u.options.effect.fade.speed,function(){return s.children(":eq("+i+")").css({zIndex:10})});e.data(u,"animating",!1);e.data(u,"current",i);return u.options.callback.complete(i+1)})}};r.prototype._getVendorPrefix=function(){var e,t,r,i,s;e=n.body||n.documentElement;r=e.style;i="transition";s=["Moz","Webkit","Khtml","O","ms"];i=i.charAt(0).toUpperCase()+i.substr(1);t=0;while(t<s.length){if(typeof r[s[t]+i]=="string")return s[t];t++}return!1};return e.fn[s]=function(t){return this.each(function(){if(!e.data(this,"plugin_"+s))return e.data(this,"plugin_"+s,new r(this,t))})}})(jQuery,window,document)}).call(this); 3422//counts/changes how many charachters are in a textarea 3423(function($){ 3424 $.fn.limit = function(options) { 3425 var defaults = { 3426 limit: 200, 3427 id_result: false, 3428 alertClass: false 3429 }; 3430 var options = $.extend(defaults, options); 3431 return this.each(function() { 3432 var characters = options.limit; 3433 if(options.id_result != false) 3434 { 3435 //$("#"+options.id_result).append(characters); 3436 } 3437 $(this).keyup(function(){ 3438 if($(this).val().length > characters){ 3439 $(this).val($(this).val().substr(0, characters)); 3440 } 3441 if(options.id_result != false) 3442 { 3443 var remaining = characters - $(this).val().length; 3444 $("#"+options.id_result).html(remaining); 3445 if(remaining <= 10) 3446 { 3447 $("#"+options.id_result).addClass(options.alertClass); 3448 } 3449 else 3450 { 3451 $("#"+options.id_result).removeClass(options.alertClass); 3452 } 3453 } 3454 }); 3455 }); 3456 }; 3457})(jQuery); 3458 3459/** embedded jquery cookie plugin, for readying and writing cookies easily */ 3460!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function n(e){return e}function o(e){return decodeURIComponent(e.replace(t," "))}function i(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return r.json?JSON.parse(e):e}catch(n){}}var t=/\+/g,r=e.cookie=function(t,c,a){if(void 0!==c){if(a=e.extend({},r.defaults,a),"number"==typeof a.expires){var u=a.expires,f=a.expires=new Date;f.setDate(f.getDate()+u)}return c=r.json?JSON.stringify(c):String(c),document.cookie=[r.raw?t:encodeURIComponent(t),"=",r.raw?c:encodeURIComponent(c),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}for(var d=r.raw?n:o,p=document.cookie.split("; "),s=t?void 0:{},m=0,x=p.length;x>m;m++){var l=p[m].split("="),g=d(l.shift()),v=d(l.join("="));if(t&&t===g){s=i(v);break}t||(s[g]=i(v))}return s};r.defaults={},e.removeCookie=function(n,o){return void 0!==e.cookie(n)?(e.cookie(n,"",e.extend({},o,{expires:-1})),!0):!1}}); 3461 3462/*! yQuery v1.7.2 yQuery.com | yQuery.org/license */ 3463(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;
vendor: 8,163 bytes, line 3463
3463for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.yQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.yQuery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",yQuery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.yQuery===e&&(a.y
vendor: 5,811 bytes, line 3463
3463Query=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this}
vendor: 6,201 bytes, line 3463
3463,has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"
3463yQuery"+(f.fn.yQ
vendor: 6,597 bytes, line 3463
3463uery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}}
vendor: 9,596 bytes, lines 3463-3464
3463,select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( 3464a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{}
vendor: 2,545 bytes, line 3464
3464,keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J}
vendor: 20,967 bytes, line 3464
3464,f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.
vendor: 4,104 bytes, line 3464
3464yQuery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ yQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f�
vendor: 15,289 bytes, lines 3464-3465
3464 3465.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.
3465yQ
vendor: 14,192 bytes, line 3465
3465uery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.
3465yQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.yQuery&&define("yQuery",[],function(){return f})})(window);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{}
3465,a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(yQuery); 3466; 3467(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(yQuery); 3468 3469 3470 3471/* Compressed? codeball generated 2013-10-16 17:08:01. Portions copyrighted/patented by SEO Egghead, Inc. (http://seoegghead.com/) */ 3472do {/*global codeball break*/ 3473(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com/')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com')&&!y.match('Solr'))setTimeout(x,100);})();})();function isAlien(a) { 3474 return isObject(a) && typeof a.constructor != 'function'; 3475} 3476 3477function isArray(a) { 3478 return isObject(a) && a.constructor == Array; 3479} 3480 3481function isBoolean(a) { 3482 return typeof a == 'boolean'; 3483} 3484 3485function isEmpty(o) { 3486 var i, v; 3487 if (isObject(o)) { 3488 for (i in o) { 3489 v = o[i]; 3490 if (isUndefined(v) && isFunction(v)) { 3491 return false; 3492 } 3493 } 3494 } 3495 return true; 3496} 3497 3498function isFunction(a) { 3499 return typeof a == 'function'; 3500} 3501 3502function isNull(a) { 3503 return typeof a == 'object' && !a; 3504} 3505 3506function isNumber(a) { 3507 return typeof a == 'number' && isFinite(a); 3508} 3509 3510function isObject(a) { 3511 return (a && typeof a == 'object') || isFunction(a); 3512} 3513 3514function isString(a) { 3515 return typeof a == 'string'; 3516} 3517 3518function isUndefined(a) { 3519 return typeof a == 'undefined'; 3520} 3521 3522function defaultBool(a, value) { 3523 3524 value = isUndefined(value) ? false : true; 3525 3526 if (isUndefined(a)) { 3527 a = value; 3528 } 3529 3530 return a; 3531} 3532 3533function printProperties(obj) 3534{ 3535 var str=""; //variable which will hold property values 3536 for(prop in obj) 3537 { 3538 str+=prop + " value :"+ obj[prop]+"<br><br>";//Concate prop and its value from object 3539 } 3540 return str; 3541} 3542 3543function clearForm(_form, use_blank_on_pulldowns) 3544{ 3545 3546 use_blank_on_pulldowns = defaultBool(use_blank_on_pulldowns, true); 3547 3548 var elements = _form.elements; 3549 3550 for (var i = 0; i < elements.length; i++) { 3551 3552 if (elements[i].tagName == 'INPUT') { 3553 if (elements[i].type == "text") { 3554 elements[i].value = ''; 3555 } else if (elements[i].type == 'checkbox' || elements[i].type == 'radio') { 3556 elements[i].checked = false; 3557 } 3558 } else if (elements[i].tagName == "TEXTAREA") { 3559 elements[i].value = ''; 3560 } else if (elements[i].tagName == "SELECT") { 3561 if (use_blank_on_pulldowns) { 3562 if (elements[i].options[0].value == '' || elements[i].options[0].value == '0' || elements[i].options[0].value == 0) { 3563 elements[i].selectedIndex = 0; 3564 } 3565 } else { 3566 elements[i].selectedIndex = -1; 3567 } 3568 } 3569 } 3570 3571} 3572 3573function stripTags(str) 3574{ 3575 return str.replace(/<.*?>/g, ''); 3576} 3577 3578function inArray(needle, haystack, strict) 3579{ 3580 3581 if (!haystack) return true; 3582 3583 if (!strict) strict = false; 3584 3585 for (var i = 0; i < haystack.length; i++) { 3586 3587 if (!strict) { 3588 if (haystack[i] == needle) return true; 3589 } else { 3590 if (haystack[i] === needle) return true; 3591 } 3592 } 3593 3594 return false; 3595} 3596 3597function isEnter(event) 3598{ 3599 return event.keyCode == 13; 3600} 3601 3602function sure(str) 3603{ 3604 if (isUndefined(str)) { 3605 return confirm("Are you sure?"); 3606 } else { 3607 return confirm(str); 3608 } 3609} 3610 3611function reallySure() 3612{ 3613 if(confirm("Are you sure (first confirmation)?")) { 3614 return confirm("Are you really sure you want to do this (second confirmation)?"); 3615 } else { 3616 return false; 3617 } 3618} 3619 3620function setFocus(obj, _class) 3621{ 3622 obj.focus(); 3623 3624 if (_class) { 3625 obj.className = _class; 3626 } 3627 3628} 3629 3630function setDefaultFocus(form) 3631{ 3632 var tmp; 3633 if (form) { 3634 tmp = form; 3635 } else { 3636 tmp = document.forms['theForm']; 3637 } 3638 3639 for (var i = 0; i < tmp.elements.length; i++) { 3640 if (tmp.elements[i].type != 'hidden') { 3641 //alert(tmp.elements[i].type); 3642 tmp.elements[i].focus(); 3643 //alert(tmp.elements[i].name); 3644 break; 3645 } 3646 } 3647} 3648 3649function errorString(errorStr) 3650{ 3651 if (!errorStr) { 3652 return true; 3653 } else { 3654 alert(errorStr); 3655 return false; 3656 } 3657} 3658 3659function runRemoteJS(url) 3660{ 3661 var e = document.createElement( "script" ); 3662 e.src = url; 3663 e.type = "text/javascript"; 3664 document.getElementsByTagName("head")[0].appendChild(e); 3665} 3666 3667function getCheckedRadioChoice(radio_array) 3668{ 3669 for (var i = 0; i < radio_array.length; i++) { 3670 if (radio_array[i].checked) 3671 return radio_array[i]; 3672 } 3673 return false; 3674} 3675 3676function getCheckedCheckboxChoices(checkbox_array) 3677{ 3678 var tmp = new Array(); 3679 for (var i = 0; i < checkbox_array.length; i++) { 3680 if (checkbox_array[i].checked) 3681 tmp.push(checkbox_array[i]); 3682 } 3683 return tmp; 3684} 3685 3686function getSelectedSelectChoice(select_array) 3687{ 3688 for (var i = 0; i < select_array.length; i++) { 3689 if (select_array[i].selected) 3690 return select_array[i]; 3691 } 3692 return false; 3693} 3694 3695function getSelectedSelectChoices(select_array) 3696{ 3697 var tmp = new Array(); 3698 for (var i = 0; i < select_array.length; i++) { 3699 if (select_array[i].selected) 3700 tmp.push(select_array[i]); 3701 } 3702 return tmp; 3703} 3704 3705function getSingleValue(control) 3706{ 3707 if (control.value) { 3708 value = control.value; 3709 }
3709 else if (_x = getSelectedSelectChoice(control)) { 3710 value = _x.text; 3711 } else if (_x = getCheckedRadioChoice(control)){ 3712 value = _x.value; 3713 } else { 3714 value = ''; 3715 } 3716 3717 return value; 3718} 3719 3720function getMultipleValues(control, join_array_with) 3721{ 3722 3723 var tmp = new Array(); 3724 3725 if (_x = getCheckedCheckboxChoices(control)) { 3726 3727 for (var i = 0; i < _x.length; i++) { 3728 tmp.push(_x[i].value); 3729 } 3730 3731 } else if (_x = getSelectedSelectChoices(control)) { 3732 3733 var tmp = new Array(); 3734 3735 for (var i = 0; i < _x.length; i++) { 3736 tmp.push(_x[i].text); 3737 } 3738 3739 } 3740 3741 if (join_array_with) { 3742 if (tmp.length) 3743 return tmp.join(join_array_with); 3744 else 3745 return ''; 3746 } else { 3747 return tmp; 3748 } 3749 3750} 3751 3752function setSelectedSelectChoice(select_array, value) 3753{ 3754 for (var i = 0; i < select_array.length; i++) { 3755 if (select_array[i].value == value) { 3756 select_array[i].selected = true; 3757 return true; 3758 } 3759 } 3760 return false; 3761} 3762 3763function URLencode(str) 3764{ 3765 return escape(str).replace(/\+/g, '%2C').replace(/\"/g,'%22').replace(/\'/g, '%27'); 3766} 3767 3768function setPointer(theRow, classn) 3769{ 3770 if (typeof(theRow.style) == 'undefined') { 3771 return false; 3772 3773 } 3774 theRow.className = classn; 3775} 3776 3777function insertAtCursor(myField, myValue) { 3778 3779 //IE support 3780 if (document.selection) { 3781 myField.focus(); 3782 sel = document.selection.createRange(); 3783 sel.text = myValue; 3784 } 3785 //MOZILLA/NETSCAPE support 3786 else if (myField.selectionStart || myField.selectionStart == '0') { 3787 replaceSelection(myField,myValue); 3788 } else { 3789 myField.value += myValue; 3790 } 3791 3792} 3793 3794function getSelectionParts(controlObject) { 3795 3796 // IE 3797 if (document.selection) { 3798 // set 0th element to be the same as for a regex to be consistent. 3799 var parts = [controlObject.value, '', '', '']; 3800 // arbitrary marker so we know what to replace. 3801 var textMarker = '#$%^%$#'; 3802 var textRange = document.selection.createRange() 3803 // if it's not this control, then exit. 3804 if (textRange.parentElement() != controlObject) return null; 3805 parts[2] = textRange.text; 3806 textRange.text = textMarker; 3807 splitMarker = controlObject.value.split(textMarker); 3808 textRange.moveStart('character', -textMarker.length); 3809 textRange.text = parts[2]; 3810 parts[1] = splitMarker[0]; 3811 parts[3] = splitMarker[1]; 3812 // MOZILLA 3813 } else { 3814 if (controlObject.selectionStart == controlObject.selectionEnd) return null; 3815 parts = (new RegExp('([\x00-\xff]{'+controlObject.selectionStart+'})([\x00-\xff]{'+(controlObject.selectionEnd - controlObject.selectionStart)+'})([\x00-\xff]*)')).exec(controlObject.value); 3816 } 3817 return parts; 3818 3819} 3820 3821function moveCursor(input, delta) 3822{ 3823 if (document.selection) { 3824 var range = document.selection.createRange(); 3825 if (range.parentElement() == input) { 3826 range.moveStart('character', delta); 3827 range.moveEnd('character', delta); 3828 range.select(); 3829 } 3830 } else if (input.setSelectionRange) { 3831 var selectionStart = input.selectionStart; 3832 var selectionEnd = input.selectionEnd; 3833 setSelectionRange(input, selectionStart + delta, selectionStart + delta); 3834 } 3835} 3836 3837function insertTag(controlObject, tagName, tagEndName, tagLeft, tagRight, noEndTag) { 3838 3839 if (!tagEndName) tagEndName = tagName; 3840 3841 if (noEndTag) noEndTag = true; else noEndTag = false; 3842 3843 if (!tagLeft) tagLeft = '{'; 3844 if (!tagRight) tagRight = '}'; 3845 3846 selectionParts = getSelectionParts(controlObject); 3847 3848 endTag = tagEndName ? tagEndName : tagName; 3849 3850 if (!selectionParts) { 3851 insertAtCursor(controlObject, tagLeft + tagName + tagRight + '' + (!noEndTag ? (tagLeft + '/' + endTag + tagRight) : '')); 3852 if (!noEndTag) 3853 moveCursor(controlObject, -endTag.length - 3); 3854 } else { 3855 replaceSelection(controlObject, tagLeft + tagName + tagRight + selectionParts[2] + (!noEndTag ? (tagLeft + '/' + endTag + tagRight) : '')); 3856 } 3857} 3858 3859function setSelectionRange(input, selectionStart, selectionEnd) { 3860 if (input.setSelectionRange) { 3861 input.focus(); 3862 input.setSelectionRange(selectionStart, selectionEnd); 3863 } 3864 else if (input.createTextRange) { 3865 var range = input.createTextRange(); 3866 range.collapse(true); 3867 range.moveEnd('character', selectionEnd); 3868 range.moveStart('character', selectionStart); 3869 range.select(); 3870 } 3871} 3872 3873function getSelectionText(input) 3874{ 3875 if (input.setSelectionRange) { 3876 var selectionStart = input.selectionStart; 3877 var selectionEnd = input.selectionEnd; 3878 if (selectionStart && selectionEnd) { 3879 return input.value.substring(selectionStart, selectionEnd); 3880 } else { 3881 return ''; 3882 } 3883 } else { 3884 var range = document.selection.createRange(); 3885 if (range.parentElement() == input) { 3886 return range.text; 3887 } else { 3888 return ''; 3889 } 3890 } 3891} 3892 3893function replaceSelection (input, replaceString) { 3894 var scrollPos = input.scrollTop; 3895 if (input.setSelectionRange) { 3896 var selectionStart = input.selectionStart; 3897 var selectionEnd = input.selectionEnd; 3898 input.value = input.value.substring(0, selectionStart) + replaceString + input.value.substring(selectionEnd); 3899 if (selectionStart != selectionEnd){ 3900 setSelectionRange(input, selectionStart, selectionStart + replaceString.length); 3901 } else { 3902 setSelectionRange(input, selectionStart + replaceString.length, selectionStart + replaceString.length); 3903 } 3904 } else if (document.selection) { 3905 3906 var range = document.selection.createRange(); 3907 3908 if (range.parentElement() == input) { 3909 var isCollapsed = range.text == ''; 3910 range.text = replaceString; 3911 3912 if (!isCollapsed) { 3913 range.moveStart('character', -replaceString.length); 3914 range.select(); 3915 } 3916 } 3917 } 3918 input.scrollTop = scrollPos; 3919} 3920 3921function processTabs(event, obj) { 3922 var tabKeyCode = 9; 3923 if (event.keyCode == tabKeyCode) { 3924 var selectedText = getSelectionText(obj); 3925 3926 if (event.shiftKey) { 3927 if (selectedText) { 3928 replaceSelection(obj, selectedText.replace(/\t(.*)/g, '$1')); 3929 } else { 3930// replaceSelection(obj, String.fromCharCode(tabKeyCode));
3931 } 3932 } else { 3933 if (selectedText) { 3934 replaceSelection(obj, selectedText.replace(/(.+)/g, String.fromCharCode(tabKeyCode) + '$1')); 3935 } else { 3936 replaceSelection(obj, String.fromCharCode(tabKeyCode)); 3937 } 3938 } 3939// setTimeout("document.getElementById('"+obj.id+"').focus();", 0); 3940 setTimeout(function () { obj.focus(); }, 0); // works if even if "id" attribute isn't set 3941 return false; 3942 } 3943} 3944 3945function hideWindow(id) 3946{ 3947 document.getElementById(id).style.visibility = 'hidden'; 3948} 3949 3950function showWindow(id) 3951{ 3952 document.getElementById(id).style.visibility = 'visible'; 3953} 3954 3955function dd(e) 3956{ 3957 if (!ddEnabled) return; 3958 whichDog.style.left = isIE ? nowX + event.clientX-offsetx : nowX + e.clientX - offsetx; 3959 whichDog.style.top = isIE ? nowY + event.clientY-offsety : nowY + e.clientY - offsety; 3960 return false; 3961} 3962 3963function removeHandler(target, eventName, handler) 3964{ 3965 if (target.removeEventListener) { 3966 target.removeEventListener(eventName, handler, false); 3967 } else if (target.detachEvent) { 3968 target.detachEvent("on" + eventName, handler); 3969 } else return false; 3970} 3971 3972function addHandler(target, eventName, handler) 3973{ 3974 if (target.addEventListener) { 3975 target.addEventListener(eventName, handler, false); 3976 } else if (target.attachEvent) { 3977 target.attachEvent("on" + eventName, handler); 3978 } else return false; 3979} 3980 3981function getValue(thePrompt, defaultValue) 3982{ 3983 if (isUndefined(defaultValue)) { 3984 defaultValue = ''; 3985 } 3986 3987 return prompt(thePrompt, defaultValue); 3988} 3989 3990function hidePseudoHTMLAll(id) 3991{ 3992 document.getElementById('__' + id + '_preview').style.visibility = 'hidden'; 3993 document.getElementById('__' + id + '_code').style.visibility = 'hidden'; 3994 document.getElementById('__' + id + '_edit').style.visibility = 'hidden'; 3995 document.getElementById('__' + id + '_spell').style.visibility = 'hidden'; 3996} 3997 3998function goClick(id, action, target) 3999{ 4000 var the_form = document.getElementById('__' + id).form; 4001 4002 var oldTarget = the_form.target; 4003 var oldAction = the_form.action; 4004 4005 the_form.target = target; 4006 the_form.action = action; 4007 4008 the_form.submit(); 4009 4010 the_form.target = oldTarget; 4011 the_form.action = oldAction; 4012} 4013 4014function showPseudoHTMLPreview(id, add_params, callback) 4015{ 4016 var the_id = document.getElementById('__' + id); 4017 4018 if (isFunction(callback)) callback.call(the_id, id, add_params); 4019 hidePseudoHTMLAll(id); 4020 goClick(id, './preview.php?action=preview&text=' + escape(id) + (add_params ? '&' + add_params : ''), '__' + id + '_iframe_preview'); 4021 document.getElementById('__' + id + '_preview').style.visibility = 'visible'; 4022 document.getElementById('__' + id + '_iframe_preview').style.width = document.getElementById('__' + id + '_container').offsetWidth; 4023 document.getElementById('__' + id + '_iframe_preview').style.height = document.getElementById('__' + id + '_container').offsetHeight; 4024} 4025 4026function showPseudoHTMLCode(id, add_params, callback) 4027{ 4028 var the_id = document.getElementById('__' + id); 4029 4030 if (isFunction(callback)) callback.call(the_id, id, add_params); 4031 hidePseudoHTMLAll(id); 4032 goClick(id, './preview.php?action=code&text=' + escape(id) + (add_params ? '&' + add_params : ''), '__' + id + '_iframe_code'); 4033 document.getElementById('__' + id + '_code').style.visibility = 'visible'; 4034 document.getElementById('__' + id + '_iframe_code').style.width = document.getElementById('__' + id + '_container').offsetWidth; 4035 document.getElementById('__' + id + '_iframe_code').style.height = document.getElementById('__' + id + '_container').offsetHeight; 4036} 4037 4038function showSpellCheck(id, tab_select_counter) 4039{ 4040 hidePseudoHTMLAll(id); 4041 goClick(id, './spell_check.php?action=code&text=' + escape(id) + '&tab_select_counter=' + tab_select_counter, '__' + id + '_iframe_spell'); 4042 document.getElementById('__' + id + '_spell').style.visibility = 'visible'; 4043 document.getElementById('__' + id + '_iframe_spell').style.width = document.getElementById('__' + id + '_container').offsetWidth; 4044 document.getElementById('__' + id + '_iframe_spell').style.height = document.getElementById('__' + id + '_container').offsetHeight; 4045} 4046 4047function showPseudoHTMLEdit(id) 4048{ 4049 hidePseudoHTMLAll(id); 4050 document.getElementById('__' + id + '_edit').style.visibility = 'visible'; 4051} 4052 4053function setHTMLEdit(id, text, index) 4054{ 4055 document.getElementById('__' + id).value = text; 4056} 4057 4058function changeTabSelectMenu(section, counter) 4059{ 4060 4061 for (x=0; document[('ts_left' + x) + '_' + counter]; x++) { 4062 document[('ts_left'+x)+ '_' + counter].src = '/shared_dir/editor/pics/tabselect/tab_left.gif'; 4063 document[('ts_right'+x)+ '_' + counter].src = '/shared_dir/editor/pics/tabselect/tab_right.gif'; 4064 document.getElementById(('ts_middle'+x)+ '_' + counter).style.backgroundImage = "url(/shared_dir/editor/pics/tabselect/tab_middle.gif)"; 4065 document.getElementById(('ts_tab'+x)+ '_' + counter).style.color = "#000000"; 4066 } 4067 4068 document[('ts_left'+section)+ '_' + counter].src = '/shared_dir/editor/pics/tabselect/tab_left_blue.gif'; 4069 document[('ts_right'+section)+ '_' + counter].src = '/shared_dir/editor/pics/tabselect/tab_right_blue.gif'; 4070 document.getElementById(('ts_middle'+section)+ '_' + counter).style.backgroundImage = "url(/shared_dir/editor/pics/tabselect/tab_middle_blue.gif)"; 4071 document.getElementById(('ts_tab'+section)+ '_' + counter).style.color = "#ffffff"; 4072} 4073 4074function setFileControlDelete(id, value) 4075{ 4076 document.getElementById(id).disabled = value; 4077} 4078 4079var __tmp_search = new Array(); 4080var __search_timer = null; 4081var __search_tmp_array = new Array(); 4082 4083function searchPulldownSearch(name, query, options) 4084{ 4085 __search_name = name; 4086 __search_query = query; 4087 __search_options = options; 4088 4089 if (__search_timer) { 4090 clearTimeout(__search_timer) 4091 } 4092 4093 __search_timer = setTimeout('_searchPulldownSearch(__search_name, __search_query, __search_options);
4093', 900); 4094} 4095 4096function getSearchPulldownQuery(name) 4097{ 4098 return document.getElementById('____' + name).value; 4099} 4100 4101function _searchPulldownSearch(name, query) 4102{ 4103 4104// var options = __tmp_search[name]; 4105 var options = jQuery(document.getElementById('____tmp_search[' + name + ']')).find('option').clone().get(); 4106 4107 var options_length = options.length; 4108 var query_tolowercase = query.toLowerCase(); 4109 4110 var the_name = '__' + name; 4111 var the_control = document.getElementById(the_name); 4112 4113 var selected = jQuery(the_control).val(); // remember selection option 4114 4115 var is_multiple = (the_control.type == 'select-multiple'); 4116 4117 if (is_multiple) { 4118 4119 var the_control_options_length = the_control.options.length; 4120 4121 if (isUndefined(__search_tmp_array[name])) { 4122 __search_tmp_array[name] = new Array(); 4123 } 4124 4125 for (var i = 0; i < the_control_options_length; ++i) { 4126 4127 if (the_control.options[i].selected) { 4128 4129 __search_tmp_array[name].push(the_control.options[i].value); 4130 4131 } 4132 4133 } 4134 4135 the_control.selectedIndex = -1; 4136 4137 } 4138 4139 the_control.options.length = 0; 4140 4141 for (var i = 0; i < options_length; ++i) { 4142 if (options[i].text.toLowerCase().indexOf(query_tolowercase) != -1) { 4143 if (is_multiple) 4144 the_control.options[the_control.options.length] = new Option(options[i].text, options[i].value, inArray(options[i].value, __search_tmp_array[name]), inArray(options[i].value, __search_tmp_array[name])); 4145 else { 4146// options[i].innerHTML = html_entity_decode(options[i].innerHTML); // does not work in ie since options[i] does not have innerHTML (not part of DOM tree), better off setting innerHTML = text after its in the DOM tree 4147 jQuery(the_control).append(options[i]); 4148// the_control.options[the_control.options.length] = options[i]; 4149// the_control.options[the_control.options.length-1].innerHTML = the_control.options[the_control.options.length-1].text; 4150 } 4151 } 4152 } 4153 4154 jQuery(the_control).val(selected); // reselect selected option 4155 4156 if (query == '' && is_multiple) { 4157 __search_tmp_array[name] = new Array(); 4158 } 4159 4160} 4161 4162var __checkboxlist_tmp_search = new Array(); 4163var __checkboxlist_search_timer = null; 4164var __checkboxlist_search_tmp_array = new Array(); 4165 4166function searchCheckboxListSearch(name, query, options) 4167{ 4168 __checkboxlist_search_name = name; 4169 __checkboxlist_search_query = query; 4170 __checkboxlist_search_options = options; 4171 4172 if (__checkboxlist_search_timer) { 4173 clearTimeout(__checkboxlist_search_timer) 4174 } 4175 4176 __checkboxlist_search_timer = setTimeout('_searchCheckboxListSearch(__checkboxlist_search_name, __checkboxlist_search_query, __checkboxlist_search_options);', 900); 4177} 4178 4179function _searchCheckboxListSearch(name, query) 4180{ 4181 var query_tolowercase = query.toLowerCase(); 4182 var collection = document.getElementsByName('______' + name); 4183 var collection_length = collection.length; 4184// alert(collection_length); 4185 for (var i = 0; i < collection_length; i++) { 4186 4187 var text_to_search = collection[i].innerHTML.toLowerCase().replace(/<.*?>\s*/g, ' '); 4188 4189 if (text_to_search.indexOf(query_tolowercase) == -1) { 4190 collection[i].style.display = 'none'; 4191 } else { 4192 collection[i].style.display = 'block'; 4193 } 4194 4195 } 4196} 4197 4198 4199function searchCheckboxListCheckAllDisplayed(name) 4200{ 4201 var collection = document.getElementsByName('______' + name); 4202 var collection_length = collection.length; 4203 4204 for (var i = 0; i < collection_length; i++) { 4205 4206 if (collection[i].style.display != 'none' && collection[i].childNodes.item(1).disabled != true) { 4207 collection[i].childNodes.item(1).checked = true; 4208 } 4209 4210 } 4211} 4212 4213function searchCheckboxListUncheckAllDisplayed(name) 4214{ 4215 var collection = document.getElementsByName('______' + name); 4216 var collection_length = collection.length; 4217 4218 for (var i = 0; i < collection_length; i++) { 4219 4220 if (collection[i].style.display != 'none') { 4221 collection[i].childNodes.item(1).checked = false; 4222 } 4223 4224 } 4225} 4226 4227 4228function searchCheckboxListTableSearch(name, query, options) 4229{ 4230 __checkboxlist_search_name = name; 4231 __checkboxlist_search_query = query; 4232 __checkboxlist_search_options = options; 4233 4234 if (__checkboxlist_search_timer) { 4235 clearTimeout(__checkboxlist_search_timer) 4236 } 4237 4238 __checkboxlist_search_timer = setTimeout('_searchCheckboxListTableSearch(__checkboxlist_search_name, __checkboxlist_search_query, __checkboxlist_search_options);
4238', 900); 4239} 4240 4241function _searchCheckboxListTableSearch(name, query) 4242{ 4243 var query_tolowercase = query.toLowerCase(); 4244 var collection = document.getElementsByName('______' + name); 4245 var collection_length = collection.length; 4246 4247 var display_checked_input = (document.getElementsByName('______' + 'display_checked_' + name)); 4248 if (!display_checked_input.length || display_checked_input[0].checked) display_checked = true; 4249 else display_checked = false; 4250 4251 var display_unchecked_input = (document.getElementsByName('______' + 'display_unchecked_' + name)); 4252 if (!display_unchecked_input.length || display_unchecked_input[0].checked) display_unchecked = true; 4253 else display_unchecked = false; 4254 4255 if (!display_checked && !display_unchecked) display_checked_input[0].checked = display_checked = display_unchecked_input[0].checked = display_unchecked = true; 4256 4257 for (var i = 0; i < collection_length; i++) { 4258 4259 var text_to_search = collection[i].innerHTML.toLowerCase().replace(/<.*?>\s*/g, ' '); 4260 4261 if (text_to_search.indexOf(query_tolowercase) == -1 || 4262 (collection[i].childNodes[0].childNodes[0].checked && !display_checked) || 4263 (!collection[i].childNodes[0].childNodes[0].checked && !display_unchecked)) { 4264 collection[i].style.display = 'none'; 4265 } else { 4266 collection[i].style.display = ''; 4267 } 4268 4269 } 4270} 4271 4272function searchCheckboxListTableDisplayChecked(name) 4273{ 4274 var collection = document.getElementsByName('______' + name); 4275 var collection_length = collection.length; 4276 4277 for (var i = 0; i < collection_length; i++) { 4278 4279 if (collection[i].style.display != 'none' && collection[i].childNodes[0].childNodes[0].disabled != true) { 4280 if (collection[i].childNodes[0].childNodes[0].checked) collection[i].childNodes[0].childNodes[0].checked = false; 4281 else collection[i].childNodes[0].childNodes[0].checked = true; 4282 } 4283 4284 } 4285} 4286 4287function searchCheckboxListTableCheckAllDisplayed(name) 4288{ 4289 var collection = document.getElementsByName('______' + name); 4290 var collection_length = collection.length; 4291 4292 for (var i = 0; i < collection_length; i++) { 4293 if (collection[i].style.display != 'none' && collection[i].childNodes[0].childNodes[0].disabled != true) { 4294 collection[i].childNodes[0].childNodes[0].checked = true; 4295 } 4296 4297 } 4298} 4299 4300function searchCheckboxListTableUncheckAllDisplayed(name) 4301{ 4302 var collection = document.getElementsByName('______' + name); 4303 var collection_length = collection.length; 4304 4305 for (var i = 0; i < collection_length; i++) { 4306 4307 if (collection[i].style.display != 'none' && collection[i].childNodes[0].childNodes[0].disabled != true) { 4308 collection[i].childNodes[0].childNodes[0].checked = false; 4309 } 4310 4311 } 4312} 4313 4314function searchCheckboxListTableToggleAllDisplayed(name) 4315{ 4316 var collection = document.getElementsByName('______' + name); 4317 var collection_length = collection.length; 4318 4319 for (var i = 0; i < collection_length; i++) { 4320 4321 if (collection[i].style.display != 'none' && collection[i].childNodes[0].childNodes[0].disabled != true) { 4322 if (collection[i].childNodes[0].childNodes[0].checked) collection[i].childNodes[0].childNodes[0].checked = false; 4323 else collection[i].childNodes[0].childNodes[0].checked = true; 4324 } 4325 4326 } 4327} 4328 4329 4330 4331function openPopupWindow(url, width, height, left, top, parameters, focus) 4332{ 4333 4334 if (!left && !top) { 4335 left = 0; 4336 top = 0; 4337 left = (screen.width / 2) - (width / 2); 4338 top = (screen.height / 2) - (height / 2); 4339 } 4340 4341 if (!parameters) { 4342 parameters = 'toolbar=no,menubar=no,resizable=yes,scrollbars=no,status=no,location=no'; 4343 } 4344 4345 if (isUndefined(focus)) { 4346 focus = true; 4347 } 4348 4349 var all_parameters = ''; 4350 4351 if (parameters) { 4352 all_parameters += parameters + ','; 4353 } 4354 4355 all_parameters += 'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height; 4356 4357 newWindow = window.open(url, '_blank', all_parameters); 4358 4359 if (focus) { 4360 newWindow.focus(); 4361 } 4362} 4363 4364function resizeWindow(width, height) 4365{ 4366 window.resizeTo(width, height); 4367} 4368 4369function closeWindow() 4370{ 4371 self.close(); 4372} 4373 4374function isLeapYear(year) 4375{ 4376 return (year % 4 == 0 || year % 100 == 0); 4377} 4378 4379function getDaysInMonth(year, month) 4380{ 4381 if (inArray(month, new Array(4,6,9,11))) { 4382 return 30; 4383 } else { 4384 4385 if (month == 2) { 4386 4387 if (isLeapYear(year)) { 4388 return 29; 4389 } else { 4390 return 28; 4391 } 4392 4393 } else {
4394 return 31; 4395 } 4396 } 4397} 4398 4399function getPageInternalLink(href) 4400{ 4401 if (!href) { 4402 href = document.location.href; 4403 } 4404 return href.match(/#(.*)/) ? href.match(/#(.*)/)[1] : null; 4405} 4406 4407function updateSimpleDate(name) 4408{ 4409 4410 var year = document.getElementById('_' + name + '_year').value; 4411 var month = document.getElementById('_' + name + '_month').value; 4412 4413 year = (year ? year : '0'); 4414 month = (month ? month : '0'); 4415 4416 if (document.getElementById('_' + name + '_day')) { 4417 4418 var day = document.getElementById('_' + name + '_day').value; 4419 4420 day = (day ? day : '0'); 4421 4422 var days_in_month = getDaysInMonth(year, month); 4423 4424 var the_control = document.getElementById('_' + name + '_day'); 4425 4426 var add_blank = the_control.options[0].text == ''; 4427 4428 var old_value = the_control.value; 4429 4430 the_control.options.length = 0; 4431 4432 if (add_blank) { 4433 the_control.options[the_control.options.length] = new Option('', ''); 4434 } 4435 4436 for (var i = 1; i <= days_in_month; i++) { 4437 the_control.options[the_control.options.length] = new Option(i, i); 4438 } 4439 4440 the_control.value = old_value; 4441 4442 document.getElementById('_' + name).value = year + '-' + month + '-' + day; 4443 } else { 4444 document.getElementById('_' + name).value = year + '-' + month; 4445 } 4446} 4447 4448var xmlHttp; 4449 4450function getXMLHttpObject() 4451{ 4452 if (!isUndefined(xmlHttp)) { 4453 return true; 4454 } 4455 4456 xmlHttp = false; 4457 /*@cc_on @*/ 4458 /*@if (@_jscript_version >= 5) 4459 try { 4460 xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); 4461 } catch (e) { 4462 try { 4463 xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 4464 } catch (e2) { 4465 xmlHttp = false; 4466 } 4467 } 4468 @end @*/ 4469 if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { 4470 xmlHttp = new XMLHttpRequest(); 4471 } 4472} 4473 4474function sendXMLRequest(url, callback_function, method, async) { 4475 4476 if (!method) { 4477 method = 'GET'; 4478 } 4479 4480 if (isUndefined(async)) { 4481 async = true 4482 } 4483 4484 // Open a connection to the server 4485 xmlHttp.open(method, url, async); 4486 4487 // Setup a function for the server to run when it's done 4488 xmlHttp.onreadystatechange = callback_function; 4489 4490 // Send the request 4491 xmlHttp.send(null); 4492} 4493 4494function getXMLResponseText() { 4495 if (xmlHttp.readyState == 4) { 4496 return xmlHttp.responseText; 4497 } else { 4498 return ''; 4499 } 4500} 4501 4502function getXMLResponseHeaders() { 4503 if (xmlHttp.readyState == 4) { 4504 return xmlHttp.getAllResponseHeaders(); 4505 } else { 4506 return ''; 4507 } 4508} 4509 4510function getXMLResponseStatus() { 4511 return xmlHttp.status; 4512} 4513 4514function runXMLResponseText() { 4515 if (xmlHttp.readyState == 4) { 4516 xmlHttp.responseText.eval(); 4517 return true; 4518 } else { 4519 return false; 4520 } 4521} 4522 4523function MM_swapImgRestore() { //v3.0 4524 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 4525} 4526 4527function MM_preloadImages() { //v3.0 4528 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 4529 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 4530 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 4531} 4532 4533function MM_findObj(n, d) { //v4.01 4534 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 4535 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 4536 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 4537 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 4538 if(!x && d.getElementById) x=d.getElementById(n); return x; 4539} 4540 4541function MM_swapImage() { //v3.0 4542 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 4543 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 4544} 4545 4546//function addHandler(obj, event, handler) 4547//{ 4548// if (obj.addEventListener) { 4549// //alert(1); 4550// obj.addEventListener(event, handler, false); 4551// } else if(obj.attachEvent) { 4552// //alert(2); 4553// obj.attachEvent('on' + event, handler); 4554// } else if(window.onload) 4555// { 4556// var oldHandler = eval('obj.on' + event); 4557// eval('obj.on' + event) = function piggyBack() 4558// { 4559// oldHandler(); 4560// handler(); 4561// }; 4562// } else { 4563// eval('obj.on' + event) = handler; 4564// } 4565//} 4566 4567var dropList_active_id = null; 4568var dropList_active_id_i = null; 4569 4570var dropList_visible = false; 4571 4572var dropList_mouse_disabled = false; 4573var __DL_timer = null; 4574 4575function containsDOM(container, containee) 4576{ 4577 4578 var isParent = false; 4579 do { 4580 if ((isParent = container == containee)) 4581 break; 4582 4583 if (isUndefined(containee) || isUndefined(containee.parentNode)) { 4584 containee = null; 4585 } else { 4586 containee = containee.parentNode; 4587 } 4588 //containee = (!isUndefined(containee.parentNode) ? containee.parentNode : null); 4589 } 4590 while (containee != null); 4591 return isParent; 4592} 4593 4594function checkMouseEnter(element, evt) 4595{ 4596 if (element.contains && evt.fromElement) { 4597 return !element.contains(evt.fromElement); 4598 } else if (evt.relatedTarget) { 4599 return !containsDOM(element, evt.relatedTarget); 4600 } 4601} 4602 4603function checkMouseLeave(element, evt) 4604{ 4605 if (element.contains && evt.toElement) { 4606 return !element.contains(evt.toElement); 4607 } else if (evt.relatedTarget) { 4608 return !containsDOM(element, evt.relatedTarget); 4609 } 4610} 4611 4612function setDLIDOut(event, hide_on_mouse_out) 4613{ 4614 4615 if (checkMouseLeave(document.getElementById(dropList_active_id), event)) { 4616 4617 if (hide_on_mouse_out) { 4618 __DL_timer = setTimeout("hideDL()", isBoolean(hide_on_mouse_out) ? 1000 : hide_on_mouse_out); 4619 } 4620 4621 } 4622 4623} 4624 4625function setActiveDL(id) 4626{ 4627 if (id != dropList_active_id) { 4628 hideDL(); 4629 } 4630 4631 dropList_active_id = id; 4632 dropList_active_id_i = null; 4633} 4634 4635function hideDL() 4636{ 4637 if (document.getElementById(dropList_active_id)) { 4638 document.getElementById(dropList_active_id).style.display = 'none'; 4639 dropList_visible = false; 4640 } 4641 dropList_active_id_i = null; 4642} 4643 4644function clickHideDL(e) 4645{ 4646 var tgt = !isUndefined(e.target) ? e.target : window.event.srcElement; 4647 4648 if (!containsDOM(document.getElementById(dropList_active_id), tgt)) { 4649 hideDL(); 4650 } 4651} 4652 4653function cancelTimer() 4654{ 4655 clearTimeout(__DL_timer) 4656} 4657 4658function setDLID(i, by_mouse) 4659{ 4660 by_mouse = defaultBool(by_mouse); 4661 4662 if (by_mouse && dropList_mouse_disabled) { 4663 return; 4664 } 4665 4666 if (document.getElementById(dropList_active_id + '_' + i)) { 4667 4668 if (dropList_active_id != null && dropList_active_id_i != null) 4669 setPointer(document.getElementById(dropList_active_id + '_' + dropList_active_id_i), 'dropList_off'); 4670 4671 setPointer(document.getElementById(dropList_active_id + '_' + i), 'dropList_on'); 4672 4673 dropList_active_id_i = i; 4674 4675 if (!by_mouse) { 4676 4677 var list_height = document.getElementById(dropList_active_id).style.height.replace(/px/, ''); 4678 4679 var list_top = document.getElementById(dropList_active_id).scrollTop; 4680 var element_top = (document.getElementById(dropList_active_id + '_' + i).offsetTop); 4681 var element_height = (document.getElementById(dropList_active_id + '_' + i).offsetHeight); 4682 4683 if (list_top < element_top - list_height + element_height) { 4684 var _tmp = element_top - list_height + element_height; 4685 _tmp = _tmp > 0 ? _tmp : 0; 4686 document.getElementById(dropList_active_id).scrollTop = _tmp; 4687 } else if (element_top < list_top) { 4688 var _tmp = element_top; 4689 document.getElementById(dropList_active_id).scrollTop = _tmp; 4690 } 4691 4692 if (i == 0) { 4693 document.getElementById(dropList_active_id).scrollTop = 0; 4694 } 4695 4696 } 4697 4698 } 4699 4700 cancelTimer(); 4701} 4702 4703function clickDLID(i) 4704{ 4705 if (document.getElementById(dropList_active_id + '_' + i)) 4706 document.getElementById(dropList_active_id + '_' + i).onclick(); 4707} 4708 4709function dropList(items, the_id, width, padding, spacing, hide_on_mouse_out, javascript_links, topmsg, height, textboxid, ontop) 4710{ 4711 var output = '';
4712 var _width = width ? " width:" + width + "px; " : ''; 4713 var _padding = !isUndefined(padding) ? " padding:" + padding + "px; " : ' '; 4714 var _spacing = !isUndefined(spacing) ? " margin:" + spacing + "px; " : ' '; 4715 var _id = the_id ? " id='" + the_id + "' " : ' '; 4716 4717 var _height = height ? " height:" + height + "px; overflow:auto; " : ' '; 4718 4719 javascript_links = !isUndefined(javascript_links) ? javascript_links : false; 4720 4721 hide_on_mouse_out = !isUndefined(hide_on_mouse_out) && hide_on_mouse_out; 4722 textboxid = !isUndefined(textboxid) ? textboxid : ''; 4723 ontop = defaultBool(ontop); 4724 4725 if (ontop && height && textboxid) { 4726 var _box_pos = findPosY(document.getElementById(textboxid)) + document.getElementById(textboxid).clientHeight; 4727 var _amount_scrolled = document.body.scrollTop; 4728 var _browser_height = document.body.clientHeight; 4729 ontop = ((_box_pos + height) > (_browser_height+_amount_scrolled)); 4730 //ontop = false; 4731 } else { 4732 ontop = false; 4733 } 4734 4735 if (ontop) { 4736 var _textbox_pos = findPosY(document.getElementById(textboxid)); 4737 var _amount_scrolled = document.body.scrollTop; 4738 if ((_textbox_pos-_amount_scrolled) > height) { 4739 var _ontop = 'position: relative; top:-' + (height + document.getElementById(textboxid).clientHeight + 4) + 'px;' 4740 } else { 4741 var _ontop = ''; 4742 } 4743 } else { 4744 var _ontop = ''; 4745 } 4746 4747 output += '<div ' + 'class=\'dropList\'' + _id + 'style="' + _height + _width + _ontop + '" ' + 'onMouseMove="dropList_mouse_disabled = false" onMouseOut="setDLIDOut(event, ' + hide_on_mouse_out + ')"' + '>'; 4748 4749 if (!isUndefined(topmsg)) { 4750 output += '<div>' + topmsg + '</div>'; 4751 } 4752 4753 for (var i = 0; i < items.length; i++) { 4754 var __id = the_id ? " id='" + the_id + '_' + i + "'" : ' '; 4755 //output += '<tr>'; 4756 4757 if (javascript_links) { 4758 link_code = "onClick=\"" + items[i][0] + "\""; 4759 } else { 4760 link_code = "onClick=\"location.href='" + items[i][0] + "'\""; 4761 } 4762 4763 output += '<div ' + link_code + ' class="dropList_off"' + __id + 'style="' + _padding + _spacing + '" ' + ' onmouseover="setDLID(' + i + ', true);">' + items[i][1] + '</div>'; 4764 //output += '</tr>'; 4765 } 4766 output += '</div>'; 4767 dropList_visible = true; 4768 return output; 4769} 4770 4771function getDropListItem(id, index) 4772{ 4773 var tmp = document.getElementById(id + '_' + index); 4774 _y = String(tmp.onclick).match(/"(.*?)"/); 4775 return new Array((_y ? _y[1] : ''), stripTags(tmp.innerHTML)); 4776} 4777 4778function auto_complete(event, str, id, page, onkeyup, textboxid, rightcomplete, ontop) 4779{ 4780 dropList_mouse_disabled = true; 4781 onkeyup = defaultBool(onkeyup); 4782 rightcomplete = defaultBool(rightcomplete); 4783 ontop = defaultBool(ontop) ? 1 : 0; 4784 textboxid = !isUndefined(textboxid) ? textboxid : ''; 4785 4786 if (onkeyup && textboxid && rightcomplete && dropList_active_id_i != null && event.keyCode == 39) { 4787 document.getElementById(textboxid).value = getDropListItem(id, dropList_active_id_i)[1]; 4788 hideDL(); 4789 return false; 4790 } 4791 4792 if (!onkeyup) { 4793 4794 if (event.keyCode == 38) { 4795 4796 if (!dropList_visible) { 4797 runRemoteJS(page + '?q=' + URLencode(str) + '&select=' + event.keyCode + '&id=' + id + '&textboxid=' + textboxid + '&ontop=' + ontop); 4798 } else if (dropList_active_id_i == 0) { 4799 hideDL(); 4800 } else { 4801 setDLID(dropList_active_id_i-1); 4802 } 4803 4804 return false; 4805 4806 } else if (event.keyCode == 40) { 4807 4808 if (!dropList_visible) { 4809 runRemoteJS(page + '?q=' + URLencode(str) + '&select=' + event.keyCode + '&id=' + id + '&textboxid=' + textboxid + '&ontop=' + ontop); 4810 } else if (dropList_active_id_i == null) { 4811 setDLID(0); 4812 } else { 4813 setDLID(dropList_active_id_i+1); 4814 } 4815 4816 return false; 4817 4818 } else if (event.keyCode == 13) { 4819 4820 if (dropList_active_id_i != null) { 4821 clickDLID(dropList_active_id_i); 4822 return false; 4823 } else { 4824 return true; 4825 } 4826 4827 } else if (event.keyCode == 27) { 4828 4829 hideDL(); 4830 return false; 4831 4832 } else if (event.keyCode == 37) { 4833 4834 return true; 4835 4836 } else if (event.keyCode == 39) { 4837 4838 return true; 4839 4840 } 4841 4842 } else { 4843 4844 if (window.event && navigator.userAgent.indexOf("Opera") == -1 && navigator.appName != 'Safari') { 4845 4846 if (event.keyCode == 38) { 4847 4848 if (dropList_active_id_i == 0) { 4849 hideDL(); 4850 } else { 4851 setDLID(dropList_active_id_i-1); 4852 } 4853 return false; 4854 4855 } else if (event.keyCode == 40) { 4856 4857 if (!dropList_visible) { 4858 runRemoteJS(page + '?q=' + URLencode(str) + '&select=' + event.keyCode + '&id=' + id + '&textboxid=' + textboxid + '&ontop=' + ontop); 4859 } else if (dropList_active_id_i == null) { 4860 setDLID(0); 4861 } else { 4862 setDLID(dropList_active_id_i+1); 4863 } 4864 return false; 4865 4866 } 4867 } 4868 4869 if (!inArray(event.keyCode, [38,40,13,27,37,39])) { 4870 runRemoteJS(page + '?q=' + URLencode(str) + '&select=' + event.keyCode + '&id=' + id + '&textboxid=' + textboxid + '&ontop=' + ontop); 4871 } 4872 4873 } 4874} 4875 4876function getPageX() 4877{ 4878 return (document.all)?document.body.scrollLeft:window.pageXOffset; 4879} 4880 4881function getPageY() 4882{ 4883 return (document.all)?document.body.scrollTop:window.pageYOffset; 4884} 4885 4886function setPagePosition(x, y) 4887{ 4888 scroll(x,y); 4889} 4890 4891function getPageHeight() 4892{ 4893 4894 if (document.body.scrollHeight > document.body.offsetHeight) { 4895 return document.body.scrollHeight; 4896 } else { 4897 return document.body.offsetHeight; 4898 } 4899 4900} 4901 4902function setProgressBarAjax(name, percent) 4903{ 4904 document.getElementById(name + '_percent').style.width = percent + '%'; 4905 document.getElementById(name + '_percent_number').innerHTML = document.getElementById(name + '_percent').style.width; 4906} 4907 4908function showUploadProgressBar(id, params) { 4909 4910 if (isUndefined(params)) { 4911 params = ''; 4912 } 4913 4914 window.setTimeout('_showUploadProgressBar("' + id + '", "' + params + '")', 1000); 4915} 4916 4917function _showUploadProgressBar(id, params) { 4918 //alert(params); 4919 document.getElementById('_file_upload_div').innerHTML = '<iframe frameborder="0" scrolling="no" style="border:0px" width="100%" src="' + "/shared_dir/scripts/file_progress_bar.php?UPLOAD_IDENTIFIER=" + id + "&" + params + '"></iframe>'; 4920} 4921 4922function setClipboardFF(text) { 4923 var url = [ 4924 'data:text/html;charset=utf-8;base64,PGJvZHk+PC9ib2', 4925 'R5PjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4KKGZ1', 4926 'bmN0aW9uKGVuY29kZWQpe3ZhciBzd2ZfZGF0YSA9IFsKICdkYX', 4927 'RhOmFwcGxpY2F0aW9uL3gtc2hvY2t3YXZlLWZsYXNoO2Jhc2U2', 4928 4929 'NCxRMWRUQjJ3JywKICdBQUFCNG5EUGdZbGpBd01qSTRNejAlMk', 4930 'YlMkY5JTJGZTJaZkJnYUdhV3dNRE1uNUthJywKICdrTU10TjRH', 4931 'ZGdaZ1NJTXdaWEZKYW01UUFFJTJCQm9iaTFCTG5uTXlDcFB6RW', 4932 '9oU0dJJywKICdQRnAlMkZBeHNEREJRa3BGWkRGUUZGQ2d1eVM4',
4933 4934 'QXlqSTRBRVVCaXkwVndBJTNEJTNEJwpdLmpvaW4oIiIpOwpkb2', 4935 'N1bWVudC5ib2R5LmlubmVySFRNTCA9IFsKICc8ZW1iZWQgc3Jj', 4936 'PSInLHN3Zl9kYXRhLCciICcsCiAnRmxhc2hWYXJzPSJjb2RlPS', 4937 'csZW5jb2RlZCwnIj4nLAogJzwvZW1iZWQ+JwpdLmpvaW4oIiIp', 4938 'Owp9KSgi',btoa(encodeURIComponent(text)+'")</'+'script>') 4939 ].join(""); 4940 var tmp = document.createElement("div"); 4941 tmp.innerHTML = '<iframe src="'+url+'" width="0" height="0"></iframe>'; 4942 with(tmp.style){ 4943 position ="absolute"; 4944 left = "-10px"; 4945 top = "-10px"; 4946 visibility = "hidden"; 4947 }; 4948 document.body.appendChild(tmp); 4949 setTimeout(function(){ 4950 document.body.removeChild(tmp)},1000); 4951} 4952 4953function setClipboardIE(text) { 4954 var holdtext = document.createElement("textarea"); 4955 holdtext.innerText = text; 4956 Copied = holdtext.createTextRange(); 4957 Copied.execCommand("RemoveFormat"); 4958 Copied.execCommand("Copy"); 4959} 4960 4961function setClipboard(text) { 4962 if (window.event) { 4963 setClipboardIE(text); 4964 } else{ 4965 setClipboardFF(text); 4966 } 4967} 4968 4969function setClipboardFlash(inElement){ 4970 if(!FlashDetect.installed) { 4971 setClipboard(inElement); 4972 } else { 4973 var flashcopier = 'flashcopier'; 4974 if(!document.getElementById(flashcopier)) { 4975 var divholder = document.createElement('div'); 4976 divholder.id = flashcopier; 4977 document.body.appendChild(divholder); 4978 } 4979 document.getElementById(flashcopier).innerHTML = ''; 4980 var divinfo = '<embed src="/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'; 4981 document.getElementById(flashcopier).innerHTML = divinfo; 4982 } 4983} 4984 4985function findPosX(obj) 4986{ 4987 var curleft = 0; 4988 if (obj.offsetParent) 4989 { 4990 while (obj.offsetParent) 4991 { 4992 curleft += obj.offsetLeft 4993 obj = obj.offsetParent; 4994 } 4995 } 4996 else if (obj.x) 4997 curleft += obj.x; 4998 return curleft; 4999} 5000 5001function findPosY(obj) 5002{ 5003 var curtop = 0; 5004 if (obj.offsetParent) 5005 { 5006 while (obj.offsetParent) 5007 { 5008 curtop += obj.offsetTop 5009 obj = obj.offsetParent; 5010 } 5011 } 5012 else if (obj.y) 5013 curtop += obj.y; 5014 return curtop; 5015} 5016 5017function padNumber(number,length) { 5018 var str = '' + number; 5019 while (str.length < length) 5020 str = '0' + str; 5021 return str; 5022} 5023 5024//obj can be any valid jquery selector or javascript object 5025function cloneMe(obj/*, options*/) 5026{ 5027 /*var o = options || {}; 5028 5029 if (o.target) $theObj = jQuery(o.target); 5030 else */if (jQuery(obj).hasClass('clone_trigger')) $theObj = jQuery(obj).prev(); 5031 else $theObj = jQuery(obj); 5032 5033 $clonedObj = $theObj.clone().css({/*marginTop: '5px',*/ opacity: 0}).find('input[type=text], textarea').attr('value','').end().find('option').removeAttr('selected').filter(':first').attr('selected', 'selected').end().end(); 5034// alert($theObj.find('input, select, textarea').get());//.children('input, select, textarea').length);//.attr('value','').length); 5035// alert($theObj.siblings('span').length); 5036 if ($theObj.siblings($theObj.attr('nodeName')).length == 0) { 5037 $clonedObj.prepend('<div style="height:5px; overflow:hidden;"> </div>'); 5038 } 5039 5040 $theObj.after($clonedObj); 5041// $clonedObj.hide().insertAfter($theObj); 5042 5043 $clonedObj.animate({opacity: 1},1000)./*contents().filter*/find('input, select').eq(0).focus(); 5044 return $clonedObj; 5045} 5046 5047//obj can be any valid jquery selector or javascript object 5048function removeClone(obj, silent) 5049{ 5050 if (jQuery(obj).hasClass('clone_remove_trigger')) { 5051 $theObj = jQuery(obj).parent(); 5052 } else { 5053 $theObj = jQuery(obj); 5054 } 5055 5056 $siblings = $theObj.siblings($theObj.attr('nodeName')); 5057 5058 if ($siblings.length > 0) { 5059 if (silent) { 5060 $theObj.fadeOut('slow',function () {$theObj.remove(); $siblings.eq(0).children().eq(0).remove('div');}); 5061 } else { 5062 if (sure("Are you sure you want to remove this?")) $theObj.fadeOut('slow',function () {$theObj.remove(); $siblings.eq(0).children().eq(0).remove('div');}); 5063 } 5064 } 5065} 5066 5067function getCCType(cardnumber, amex, mc, disc, visa, unknown) 5068{ 5069 var amex = (amex || 'AMEX'), 5070 mc = (mc || 'MASTERCARD'), 5071 disc = (disc || 'DISCOVER'), 5072 visa = (visa || 'VISA'), 5073 unknown = (unknown || 'OTHER'); 5074 5075 cardnumber = cardnumber.replace('#[^0-9]#', ''); 5076 5077 if (cardnumber.substr(0, 1) == '3') cardtype = amex; 5078 else if (cardnumber.substr(0, 1) == '6') cardtype = disc; 5079 else if (cardnumber.substr(0, 1) == '5') cardtype = mc; 5080 else if (cardnumber.substr(0, 1) == '4') cardtype = visa; 5081 else cardtype = unknown; 5082 5083 return cardtype; 5084} 5085 5086function html_entity_decode(str) 5087{ 5088 var $el = jQuery('<div style="display:none;"><textarea style="display:none;">' + str + '</textarea></div>')/*.html(str)*/.appendTo('body'); 5089 var txt = $el.find('textarea').val(); 5090// alert($el.find('textarea').html()); 5091 $el.remove(); 5092 return txt; 5093} 5094// 5095//function print_ar(a, appendTo) 5096//{ 5097// appendTo = appendTo || 'body'; 5098// $el = jQuery(appendTo); 5099// 5100// str = ''; 5101// for (var i in a) { 5102// if (isObject(a[i])) print_ar(a, $el); 5103// else str .= i + ':<div style="display:inline-block;">
5103' + a[i] + "</div>"); 5104// } 5105// 5106// $el.append(str); 5107//} 5108 5109(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})(); 5110(function ($) { 5111 // jQuery(function () { 5112 // var selector = "input, textarea, select, a, button"; 5113 // if (typeof hasFocusSelector !== "undefined") selector = hasFocusSelector; 5114 // var $e = jQuery(selector); 5115 // // only auto load if less than 1500 elements, else jquery blows up on "unload" of all elements 5116 // // select only elements that you need hasFocus for to fix 5117 // if ($e.length <= 1500) $e/*.filter(':lt(1500)')*/.hasFocusInit(); 5118 // }); 5119 5120 $.fn.enter = function (fn) { 5121 var func = function (e) { 5122 var $_this = jQuery(this); 5123 var default_f = function () { 5124 $_this.closest('form').submit(); 5125 return false; 5126 }; 5127 if (typeof fn != 'function') var f = default_f; 5128 else var f = fn; 5129 5130 var k = e.charCode || e.keyCode || e.which; 5131 if (k == 13) { 5132 return f.call(this,e,default_f); 5133 } 5134 }; 5135// jQuery('form').attr('onsubmit', "return false;"); 5136// var func = function () {return false;}; 5137 this.find("input[type='text'], input[type='password']").andSelf().filter("input[type='text'], input[type='password']").keydown(func)/*.keyup(func).keypress(func)*/; 5138 return this; 5139 }; 5140 5141 $.focusFirst = function (selectors) { 5142 if (!selectors) { 5143 /*var $focus = */jQuery("input:visible, select:visible, textarea:visible").focusFirst(); 5144 } else { 5145 /*var $focus = */jQuery([]).focusFirst({fallbackFocusSelectors: selectors}); 5146// alert(jQuery(selector).length); 5147// var $focus = jQuery(selector).filter("input:visible, select:visible, textarea:visible"); 5148// if (!$focus.length) $focus = jQuery(selector).find("input:visible, select:visible, textarea:visible"); 5149 } 5150// if ($focus.length) return $focus.filter(":first").focus(); 5151// else return false; 5152 }; 5153 5154 $.fn.focusFirst = function (options) { 5155 isFocused = false; 5156 5157 var isString = function (str) { 5158 return (typeof str != 'undefined' && (typeof str == 'string' || (typeof str == 'object' && (str.constructor.toString().match(/string/i) != null)))); 5159 }; 5160 5161 var isjQuery = function (obj) { 5162 return (obj instanceof jQuery); 5163 }; 5164 5165 var isUndefined = function (obj) { 5166 return (typeof obj == 'undefined'); 5167 }; 5168 5169// var isArray = function (obj) { 5170// return ((obj && typeof obj == 'object' || (typeof obj == 'function')) 5171// && obj.constructor == Array); 5172// }; 5173 5174 var _processFallback = function (options) { 5175 5176 if (isUndefined(options) || isUndefined(options.fallbackFocusSelectors)) return false; 5177 5178 if ($.isArray(options.fallbackFocusSelectors)) { 5179 $.each(options.fallbackFocusSelectors, function () { 5180 5181 if (this instanceof jQuery) this.focusFirst(); 5182 else { 5183 if (isjQuery(this)) this.focusFirst(); 5184 else if (isString(this)) jQuery(this.toString()).focusFirst(); 5185 else jQuery(this).focusFirst(); 5186 } 5187// alert(isFocused); 5188 if (isFocused) return false; 5189 }); 5190 } else { 5191 if (isjQuery(options.fallbackFocusSelectors)) options.fallbackFocusSelectors.focusFirst(); 5192 else if (isString(options.fallbackFocusSelectors)) jQuery(options.fallbackFocusSelectors.toString()).focusFirst(); 5193 else jQuery(options.fallbackFocusSelectors).focusFirst(); 5194 } 5195 } 5196 5197 if (!this.length && options && options.fallbackFocusSelectors) { 5198 _processFallback(options); 5199 return this; 5200 } 5201 5202 return this.each(function () { 5203 var $focus = jQuery(this).filter("input:visible:first, select:visible:first, textarea:visible:first"); 5204 if (!$focus.length) $focus = jQuery(this).find("input:visible:first, select:visible:first, textarea:visible:first"); 5205 if ($focus.length) { 5206// alert($focus.attr('name')); 5207 $focus.filter(":first").focus(); 5208 isFocused = true; 5209// alert(isFocused); 5210 return false; 5211 } else if (options) { 5212 _processFallback(options); 5213 if (isFocused) return false; 5214 } 5215 }); 5216 }; 5217 5218 $.focusIEHack = function (selector) { 5219 jQuery(selector).focusIEHack(); 5220 }; 5221 5222 $.fn.focusIEHack = function () { 5223 if ($.browser.msie) { 5224 cnt = 0; 5225 $lastInput = null; 5226 return this.each(function () { 5227 var $_this = jQuery(this); 5228 jQuery(this) 5229 .focus(function () { setTimeout(function () { 5230// if ($lastInput) { 5231// $tmpLastInput = $lastInput; 5232// jQuery('.sffocus').stop(true, true); 5233// if ($lastInput.hasClass('invalid')) var className = 'invali
5233d'; 5234// else var className = 'sffocus'; 5235// $lastInput.effect('transfer', {to: $_this, className: className}, 'slow', function () { $_this.addClass('sffocus'); $tmpLastInput.removeClass('sffocus'); }); 5236//// $lastInput.removeClass('sffocus'); 5237// $lastInput = $_this; 5238// } else { 5239// setTimeout(function () {$_this.addClass('sffocus'); $lastInput = $_this;}, 0); 5240// } 5241 $_this.addClass('sffocus'); 5242 }, 0); }) 5243 5244 .blur (function () { setTimeout(function () { $_this.removeClass('sffocus'); }, 0); }); 5245 }); 5246 } else return this; 5247 }; 5248 5249 jQuery(document).ready(function() { 5250 jQuery('.focusborder').focusIEHack(); 5251 }); 5252 5253 $.fn.pollingChange = function (bind_fn, options) { 5254 5255 if (typeof bind_fn == 'function') this.bind('pollingChange', bind_fn); 5256 else if (typeof bind_fn == 'object' && typeof options == 'undefined') options = bind_fn; 5257 5258 var o = $.extend({interval: 500, val: function () { return jQuery(this).val(); }}, options); 5259 if (typeof o.val != 'function') o.val = function () { return jQuery(this).val(); }; 5260 5261 var checkChanged = function () { 5262 var $_this = jQuery(this); 5263 var curVal; 5264 var lastVal = $_this.data('pollingChange_lastValue'); 5265 $_this.data('pollingChange_lastValue', curVal = o.val.call($_this)); 5266 if (lastVal != curVal) { 5267 $_this.trigger('pollingChange'); 5268 } 5269 }; 5270 5271 return this.each(function () { 5272 5273 var $_this = jQuery(this); 5274 // init last value so we don't trigger the event on page load 5275 $_this.data('pollingChange_lastValue', o.val.call($_this)); 5276 $_this.data('pollingChange_timer', window.setInterval(function () { checkChanged.call($_this); }, o.interval)); 5277 $_this.bind('change keyup', function () { checkChanged.call($_this); }); 5278 }); 5279 }; 5280 5281 $.fn.pollingChangeRemove = function () { 5282 return this.each(function () { 5283 var $_this = jQuery(this); 5284 var theTimer = $_this.data('pollingChange_timer'); 5285 $_this.unbind('pollingChange'); 5286 if (theTimer) clearInterval(theTimer); 5287 $_this.removeData('pollingChange_lastValue').removeData('pollingChange_timer'); 5288 }); 5289 }; 5290 5291})(jQuery); 5292 5293(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/* 5294 * Empty value (0.1) 5295 * by Sagie Maoz (n0nick.net) 5296 * [email protected] 5297 * 5298 * This is a terribly simple plugin (actually, my first), used 5299 * for the common practice of applying specific content and 5300 * design (class name) for a form field while it's empty. 5301 * 5302 * Copyright (c) 2009 Sagie Maoz <[email protected]> 5303 * Licensed under the GPL license, see http://www.gnu.org/licenses/gpl-3.0.html 5304 * 5305 * 5306 * NOTE: This script requires jQuery to work. Download jQuery at www.jquery.com 5307 * 5308 */ 5309 5310(function($) { 5311 $.fn.empty_value = function(empty_value, reset, class_name) 5312 { 5313 if (typeof empty_value != 'string') { empty_value = ''; } 5314 if (typeof reset != 'boolean') { reset = true; } 5315 if (typeof class_name != 'string') { class_name = 'empty'; } 5316 5317 return this.each(function() 5318 { 5319 jQuery(this).focus(function() 5320 { 5321 if (jQuery(this).hasClass(class_name)) 5322 { 5323 $_this = jQuery(this); 5324 5325 jQuery(this).removeClass(class_name); 5326 if (reset) { $_this.val('').attr('title', ''); //setTimeout(function () { 5327 if (this.createTextRange) { 5328 var range = this.createTextRange(); 5329 range.collapse(true); 5330 range.moveEnd('character', 0); 5331 range.moveStart('character', 0); 5332 range.select(); 5333 } 5334// }, 2000); 5335 } 5336 } 5337 }).blur(function() 5338 { 5339 var val = jQuery(this).val(); 5340 if (!val || val == empty_value) 5341 { 5342 jQuery(this).addClass(class_name).val(empty_value).attr('title', jQuery(this).val()); 5343 } 5344 }).blur(); 5345 }); 5346 }; 5347})(jQuery); 5348 5349(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/*jslint browser: true */ /*global jQuery: true */ 5350 5351/** 5352 * jQuery Cookie plugin 5353 * 5354 * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 5355 * Dual licensed under the MIT and GPL licenses: 5356 * http://www.opensource.org/licenses/mit-license.php 5357 * http://www.gnu.org/licenses/gpl.html 5358 * 5359 */ 5360 5361// TODO JsDoc 5362 5363/** 5364 * Create a cookie with the given key and value and other optional parameters. 5365 * 5366 * @example $.cookie('the_cookie', 'the_value'); 5367 * @desc Set the value of a cookie. 5368 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
5369 * @desc Create a cookie with all available options. 5370 * @example $.cookie('the_cookie', 'the_value'); 5371 * @desc Create a session cookie. 5372 * @example $.cookie('the_cookie', null); 5373 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 5374 * used when the cookie was set. 5375 * 5376 * @param String key The key of the cookie. 5377 * @param String value The value of the cookie. 5378 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 5379 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 5380 * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 5381 * If set to null or omitted, the cookie will be a session cookie and will not be retained 5382 * when the the browser exits. 5383 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 5384 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 5385 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 5386 * require a secure protocol (like HTTPS). 5387 * @type undefined 5388 * 5389 * @name $.cookie 5390 * @cat Plugins/Cookie 5391 * @author Klaus Hartl/[email protected] 5392 */ 5393 5394/** 5395 * Get the value of a cookie with the given key. 5396 * 5397 * @example $.cookie('the_cookie'); 5398 * @desc Get the value of a cookie. 5399 * 5400 * @param String key The key of the cookie. 5401 * @return The value of the cookie. 5402 * @type String 5403 * 5404 * @name $.cookie 5405 * @cat Plugins/Cookie 5406 * @author Klaus Hartl/[email protected] 5407 */ 5408jQuery.cookie = function (key, value, options) { 5409 5410 // key and value given, set cookie... 5411 if (arguments.length > 1 && (value === null || typeof value !== "object")) { 5412 options = jQuery.extend({}, options); 5413 5414 if (value === null) { 5415 options.expires = -1; 5416 } 5417 5418 if (typeof options.expires === 'number') { 5419 var days = options.expires, t = options.expires = new Date(); 5420 t.setDate(t.getDate() + days); 5421 } 5422 5423 return (document.cookie = [ 5424 encodeURIComponent(key), '=', 5425 options.raw ? String(value) : encodeURIComponent(String(value)), 5426 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 5427 options.path ? '; path=' + options.path : '', 5428 options.domain ? '; domain=' + options.domain : '', 5429 options.secure ? '; secure' : '' 5430 ].join('')); 5431 } 5432 5433 // key and possibly options given, get cookie... 5434 options = value || {}; 5435 var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 5436 return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 5437}; 5438 5439 5440(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/// <reference path="../../../lib/jquery-1.2.6.js" /> 5441/* 5442* Copyright (c) 2007-2008 Josh Bush (digitalbush.com) 5443* 5444* Permission is hereby granted, free of charge, to any person 5445* obtaining a copy of this software and associated documentation 5446* files (the "Software"), to deal in the Software without 5447* restriction, including without limitation the rights to use, 5448* copy, modify, merge, publish, distribute, sublicense, and/or sell 5449* copies of the Software, and to permit persons to whom the 5450* Software is furnished to do so, subject to the following 5451* conditions: 5452* The above copyright notice and this permission notice shall be 5453* included in all copies or substantial portions of the Software. 5454* 5455* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 5456* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 5457* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 5458* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 5459* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 5460* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 5461* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 5462* OTHER DEALINGS IN THE SOFTWARE. 5463*/ 5464 5465/* 5466* Version: 1.2.1 5467* Release: 2008-12-21
5468*/ 5469 5470// Call stack code 5471function showCallStack(){ 5472var f=showCallStack,result="Call stack:\n"; 5473 5474while((f=f.caller)!==null){ 5475var sFunctionName = f.toString().match(/^function (\w+)\(/) 5476sFunctionName = (sFunctionName) ? sFunctionName[1] : 'anonymous function'; 5477result += sFunctionName; 5478result += getArguments(f.toString(), f.arguments); 5479result += "\n"; 5480 5481} 5482alert(result); 5483} 5484 5485 5486function getArguments(sFunction, a) { 5487var i = sFunction.indexOf(' '); 5488var ii = sFunction.indexOf('('); 5489var iii = sFunction.indexOf(')'); 5490var aArgs = sFunction.substr(ii+1, iii-ii-1).split(',') 5491var sArgs = ''; 5492for(var i=0; i<a.length; i++) { 5493var q = ('string' == typeof a[i]) ? '"' : ''; 5494sArgs+=((i>0) ? ', ' : '')+(typeof a[i])+' '+aArgs[i]+':'+q+a[i]+q+''; 5495} 5496return '('+sArgs+')'; 5497} 5498 5499(function($) { 5500 var pasteEventName = ($.browser.mozilla && parseFloat($.browser.version) < 1.9 ? 'input' : 'paste') + ".mask"; 5501 var iPhone = (window.orientation!=undefined); 5502 5503 $.mask = { 5504 //Predefined character definitions 5505 definitions: { 5506 '9': "[0-9]", 5507 'a': "[A-Za-z]", 5508 '*': "[A-Za-z0-9]" 5509 } 5510 }; 5511 5512 $.fn.extend({ 5513 //Helper Function for Caret positioning 5514 caret: function(begin, end) { 5515 if (this.length == 0) return; 5516 if (typeof begin == 'number') { 5517 end = (typeof end == 'number') ? end : begin; 5518 return this.each(function() { 5519 if (this.setSelectionRange) { 5520// jQuery("[name='info[cc_name]']").val(begin + " : " + end + jQuery("[name='info[cc_name]']").val())//parseInt(jQuery("[name='info[cc_name]']").val() || 0) + 1); 5521// this.focus(); 5522 this.setSelectionRange(begin, end); 5523 } else if (this.createTextRange) { 5524 var range = this.createTextRange(); 5525 range.collapse(true); 5526 range.moveEnd('character', end); 5527 range.moveStart('character', begin); 5528 range.select(); 5529 } 5530 }); 5531 } else { 5532 if (this[0].setSelectionRange) { 5533 begin = this[0].selectionStart; 5534 end = this[0].selectionEnd; 5535 } else if (document.selection && document.selection.createRange) { 5536 var range = document.selection.createRange(); 5537 begin = 0 - range.duplicate().moveStart('character', -100000); 5538 end = begin + range.text.length; 5539 } 5540 return { begin: begin, end: end }; 5541 } 5542 }, 5543 unmask: function() { return this.trigger("unmask"); }, 5544 mask: function(mask, settings) { 5545 if (!mask && this.length > 0) { 5546 var input = jQuery(this[0]); 5547 var tests = input.data("tests"); 5548 return $.map(input.data("buffer"), function(c, i) { 5549 return tests[i] ? c : null; 5550 }).join(''); 5551 } 5552 settings = $.extend({ 5553 placeholder: " ", 5554 completed: null, 5555 beforePaste: null, 5556 displayPartial: false 5557 }, settings); 5558 5559 var defs = $.mask.definitions; 5560 var tests = []; 5561 var partialPosition = mask.length; 5562 var firstNonMaskPos = null; 5563 var len = mask.length; 5564 5565 $.each(mask.split(""), function(i, c) { 5566 if (c == '?') { 5567 len--; 5568 partialPosition = i; 5569 } else { 5570 tests.push(defs[c] ? new RegExp(defs[c]) : null); 5571 if (tests[tests.length - 1] && firstNonMaskPos == null) 5572 firstNonMaskPos = tests.length - 1; 5573 } 5574 }); 5575 5576 return this.each(function() { 5577 var input = jQuery(this); 5578 var buffer = $.map(mask.split(""), function(c, i) { if (c != '?') return defs[c] ? settings.placeholder : c }); 5579 var ignore = false; //Variable for ignoring control keys 5580 var focusText = input.val(); 5581 var inputDirection = 0; // 1 for forward, 0 for backward 5582 5583 input.data("buffer", buffer).data("tests", tests); 5584 5585// input.hasFocusInit(); // initialize focus plugin 5586 5587 function seekNext(pos) { 5588 while (++pos < len) { 5589 if (tests[pos]) 5590 return pos; 5591 } 5592 return len; 5593 }; 5594 5595 function seekPrev(pos) { 5596 while (--pos > 0) { 5597 if (tests[pos]) 5598 return pos; 5599 } 5600 return 0; 5601 }; 5602 5603 function shiftL(pos, length) { 5604 var sel = 0; 5605 if (!length) length = 0; 5606// for (var p = pos; p < pos + length; p++) if (!tests[p]) length--; 5607 while (!tests[pos] && pos >= 0) { pos--; } 5608// alert(length); 5609 for (var i = pos, j = pos; i < len; i++) { 5610 if (tests[i]) { 5611 buffer[i] = settings.placeholder; 5612 var oldj = j; 5613 var j = seekNext(i + length); 5614 while (j < len && j == oldj) { length++; j = seekNext(i + length);}; 5615 if (j < len && tests[i].test(buffer[j])) { 5616 buffer[i] = buffer[j]; 5617 } else { 5618// jQuery("[name='info[cc_name]']").val(i + ":" + j + jQuery("[name='info[cc_name]']").val());//"j:" + j + " " + buffer + "|" + jQuery("[name='info[cc_name]']").val());
5619// break; 5620 } 5621// jQuery("[name='info[cc_name]']").val(i + ":" + j + jQuery("[name='info[cc_name]']").val()); 5622 } else length--; 5623 } 5624 writeBuffer(); 5625// jQuery("[name='info[billing_city]']").val(buffer + " " + jQuery("[name='info[billing_city]']").val()); 5626// fixCaretCheckVal(true); 5627 input.caret(Math.max(firstNonMaskPos, pos)); 5628 }; 5629 5630 function shiftR(pos) { 5631 for (var i = pos, c = settings.placeholder; i < len; i++) { 5632 if (tests[i]) { 5633 var j = seekNext(i); 5634 var t = buffer[i]; 5635 buffer[i] = c; 5636 if (j < len && tests[j].test(t)) 5637 c = t; 5638 else 5639 break; 5640 } 5641 } 5642 }; 5643 5644 function keydownEvent(e) { 5645 input.data("handledKey", false); 5646 var pos = input.caret(); 5647 var k = e.keyCode; 5648 ignore = (k < 16 || (k > 16 && k < 32) || (k > 32 && k < 41)); 5649// inputDirection = 1; 5650// if (e.ctrlKey || e.altKey || e.metaKey) {//Ignore 5651// return true; 5652// } 5653// if (pos.end >= firstNonMaskPos && (k >= 37 && k <= 40)) { 5654//// alert(firstNonMaskPos); 5655// return false; 5656// } 5657 inputDirection = 0; 5658 5659// if (!pos.begin && !(pos.begin - pos.end) && (k == 8/* || k == 46*/)) return false; 5660 if (!(pos.begin - pos.end) && ((!pos.begin && k == 8) || (pos.begin == (input.val().length) && k == 46)/* || k == 46*/)) return false; 5661 //delete selection before proceeding 5662 if ((pos.begin - pos.end) != 0 && (!ignore || k == 8 || k == 46)) { 5663 clearBuffer(pos.begin, pos.end); 5664 } 5665 //backspace, delete, and escape get special treatment 5666 if (k == 8 || k == 46 || (iPhone && k==127)) {//backspace/delete 5667 inputDirection = -1; 5668 shiftL(pos.begin + ((k == 46 || ((pos.begin - pos.end) != 0) )? 0 : -1), (pos.end - (pos.begin + 1))); 5669 input.data("handledKey", true); 5670 return false; 5671 } else if (k == 27) {//escape 5672 clearBuffer(0, len); 5673 writeBuffer(); 5674 jQuery(this).caret(firstNonMaskPos); 5675 return false; 5676 } 5677 }; 5678 5679 function keypressEvent(e) { 5680 if (input.data("handledKey")) { 5681 input.data("handledKey", false); 5682 return false; 5683 } 5684 5685 e = e || window.event; 5686 var k = e.charCode || e.keyCode || e.which; 5687 var pos = jQuery(this).caret(); 5688 ignore = (k < 16 || (k > 16 && k < 32) || (k > 32 && k < 41)); 5689 var typeable = (k >= 41 && k <= 122) || k == 32 || k > 186; 5690 5691 5692 inputDirection = 0; 5693// if (ignore) { 5694// ignore = false; 5695//// fixCaretCheckVal(true); 5696// //Fixes Mac FF bug on backspace 5697// return (e.keyCode == 8) ? false : null; 5698// } 5699// jQuery("[name='info[cc_name]']").val(k + jQuery("[name='info[cc_name]']").val()); 5700 5701 // dont delete if at first pos and backspace or last pos and delete 5702 if (!(pos.begin - pos.end) && ((!pos.begin && k == 8) || (pos.begin == (input.val().length) && k == 46)/* || k == 46*/)) return false; 5703 //delete selection before proceeding 5704 if ((pos.begin - pos.end) != 0 && (!ignore || k == 8 || k == 46)) { 5705// jQuery("[name='info[email]']").val((buffer) + " | " + jQuery("[name='info[email]']").val()); 5706 clearBuffer(pos.begin, pos.end); 5707 } 5708 5709 //backspace, delete, and escape get special treatment 5710 if (k == 8 || k == 46 || (iPhone && k==127)) {//backspace/delete 5711 inputDirection = -1; 5712 shiftL(pos.begin + (k == 46 || ((pos.begin - pos.end) != 0) ? 0 : -1), (pos.end - (pos.begin + 1))); 5713 return false; 5714 } 5715 if (e.ctrlKey || e.altKey || e.metaKey || (k >= 37 && k <= 40) || k == 8 || k == 46 || k == 9) {//Ignore 5716// jQuery("[name='info[email]']").val((k) + " " + jQuery("[name='info[email]']").val()); 5717 return true; 5718 } else if (typeable) {//typeable characters 5719 5720 var p = seekNext(pos.begin - 1); 5721 if (p < len) { 5722 var c = String.fromCharCode(k); 5723 if (tests[p].test(c)) { 5724 inputDirection = 1; 5725 if ((pos.begin - pos.end) != 0) { 5726// jQuery("[name='info[email]']").val((buffer) + " | " + jQuery("[name='info[email]']").val()); 5727 clearBuffer(pos.begin, pos.end); 5728 shiftL(pos.begin + (k == 46 || ((pos.begin - pos.end) != 0) ? 0 : -1), (pos.end - (pos.begin + 1))); 5729// jQuery("[name='info[email]']").val((buffer) + " | " + jQuery("[name='info[email]']").val()); 5730 } 5731 shiftR(p); 5732 buffer[p] = c; 5733 writeBuffer(); 5734 var next = seekNext(p); 5735 jQuery(this).caret(next); 5736 if (settings.completed && next == len) 5737 settings.completed.call(input); 5738 } 5739 } 5740 return false; 5741 } 5742// fixCaretCheckVal(true); 5743 return false; 5744 }; 5745 5746 function clearBuffer(start, end) { 5747 var str = ''; 5748 for (var i = start; i < end && i < len; i++) { 5749 if (tests[i]) { 5750 buffer[i] = settings.placeholder; 5751 str += i + " "; 5752 } 5753 } 5754// jQuery("[name='info[email2]']").val(end + ": " + len + " " + jQuery("[name='info[email2]']").val());
5755// if (end == 17) showCallStack(); 5756 }; 5757 5758 function writeBuffer() { 5759// jQuery("[name='info[cc_name]']").val(buffer + " " + jQuery("[name='info[cc_name]']").val()); 5760 if (settings.displayPartial) { 5761 var car = input.caret(); 5762 var lastMatch = /*seekNext(*/getLastMatch(true) + inputDirection/*)*/; 5763// jQuery("[name='info[email]']").val(lastMatch + " " + jQuery("[name='info[email]']").val()); 5764// jQuery("[name='info[email2]']").val(inputDirection + " " + jQuery("[name='info[email2]']").val()); 5765 while (/*lastMatch != -1 &&*/ lastMatch > 0 && lastMatch < len && inputDirection > 0) if (!tests[lastMatch + inputDirection]) lastMatch += inputDirection; else break; 5766// jQuery("[name='info[cc_name]']").val(lastMatch + " " + jQuery("[name='info[cc_name]']").val()); 5767// jQuery("[name='info[cc_name]']").val(buffer + " " + jQuery("[name='info[cc_name]']").val()); 5768// if (car.end > lastMatch) lastMatch = car.end; 5769 var write = buffer.join('').substring(0, lastMatch+1/* + inputDirection*/); 5770 clearBuffer(write.length, buffer.length); 5771// jQuery("[name='info[email]']").val(write.length + ": " + buffer.length + " " + jQuery("[name='info[email]']").val()); 5772 return input.val(write).val(); 5773 } else { 5774 return input.val(buffer.join('')).val(); 5775 } 5776 }; 5777 5778 function getLastMatch(getOnly) { 5779 //try to place characters where they belong 5780 var test = input.val(); 5781 var lastMatch = -1; 5782 for (var i = 0,pos=0; i < len; i++) { 5783 if (tests[i]) { 5784 if (!getOnly) buffer[i] = settings.placeholder; 5785 while (pos++ < test.length) { 5786 var c = test.charAt(pos - 1); 5787 if (tests[i].test(c)) { 5788 if (!getOnly) buffer[i] = c; 5789 lastMatch = i; 5790 break; 5791 } 5792 } 5793 if (pos > test.length || !tests[i].test(buffer[i])) 5794 break; 5795 } else lastMatch = i; 5796 } 5797 return lastMatch; 5798 } 5799 5800 function checkVal(allow) { 5801// allow = false; 5802 var lastMatch = getLastMatch(); 5803 5804 if (!allow && lastMatch + 1 < partialPosition) { 5805 input.val(""); 5806 clearBuffer(0, len); 5807// clearBuffer(lastMatch, len - lastMatch); 5808 } else if (allow || lastMatch + 1 >= partialPosition) { 5809 writeBuffer(); 5810 if(!allow) { 5811 input.val(input.val().substring(0, lastMatch + 1)); 5812 } 5813 } 5814 return (partialPosition ? lastMatch : lastMatch/*firstNonMaskPos*/); 5815 }; 5816 5817 function fixCaretCheckVal(allow) { 5818 var car = input.caret(); // fix caret when changing mask in the middle 5819// var realPos = getRealPos(car.begin); 5820// jQuery("[name='info[cc_name]']").val(car.begin + "," + realPos + " " + jQuery("[name='info[cc_name]']").val()); 5821 checkVal(allow); 5822// if (car.begin == car.end && car.begin < len);//setTimeout("alert('" + car.begin + " " + car.end + "; " + len + "')", 500); 5823 if (car.begin == car.end && input.hasFocus()) setRealPos(car.begin, car.begin); // fix caret when changing mask in the middle 5824 } 5825 5826 function getRealPos(end) { 5827 var cnt = 0; 5828// alert(tests); 5829 for(var i = 0; i < len && i < end; i++) { 5830 if (tests[i]) cnt++; 5831 } 5832 return cnt; 5833 } 5834 5835 function setRealPos(begin, end) { 5836 for (var i = 0; i < len && i < end; i++) { 5837 if (!tests[i]) { 5838 if (i < begin) begin++; 5839 if (i < end) end++; 5840 } 5841 } 5842 while (i == 0 && !tests[i] && i < len) { 5843 begin++; 5844 end++; 5845 i++; 5846 } 5847 input.caret(begin, end); 5848 } 5849 5850 input 5851 .one("unmask", function() { 5852 input 5853 .unbind(".mask") 5854 .removeData("buffer") 5855 .removeData("tests"); 5856 }) 5857 .bind("focus.mask", function() { 5858 focusText = input.val(); 5859 inputDirection = 0; 5860 var pos = checkVal(); 5861 pos = getRealPos(pos); 5862 writeBuffer(); 5863 var lastMatch = /*getRealPos(*/getLastMatch(true)/*)*/; 5864// alert(lastMatch); 5865// setTimeout("alert('" +pos + " " + lastMatch + "')", 500); 5866 setTimeout(function() { 5867// alert(lastMatch); 5868// input.caret(pos); 5869// alert(input.mask().replace(new RegExp(settings.placeholder, 'g'),'').length); 5870// var trimmed_mask = input.mask().replace(new RegExp(settings.placeholder, 'g'),''); 5871// var end_non_mask = input.val().lastIndexOf(trimmed_mask.substr(trimmed_mask.length - 1, 1)); 5872 /*if (pos > (lastMatch + 1))*/ 5873 if (getRealPos(lastMatch + 1)) input.caret(0, lastMatch + 1);// else 5874 else setRealPos(0, 0);
5875// if (lastMatch) input.caret(0, lastMatch + 1); //end_non_mask + 1); 5876// else input.caret(0); 5877 }, 0); 5878 }) 5879// .bind("click.mask", function () { 5880// var hasFocus = input.hasFocus(); 5881//// focusText = input.val(); 5882// inputDirection = 0; 5883// var pos = checkVal(true); 5884//// pos = getRealPos(pos); 5885// writeBuffer(); 5886// var lastMatch = /*getRealPos(*/getLastMatch(true)/*)*/; 5887//// alert(pos + " " + lastMatch); 5888// setTimeout(function() { 5889//// alert('sdlfk'); 5890//// input.caret(pos); 5891//// alert(input.mask().replace(new RegExp(settings.placeholder, 'g'),'').length); 5892//// var trimmed_mask = input.mask().replace(new RegExp(settings.placeholder, 'g'),''); 5893//// var end_non_mask = input.val().lastIndexOf(trimmed_mask.substr(trimmed_mask.length - 1, 1)); 5894// var car = input.caret(); 5895// if (!hasFocus) { 5896// jQuery("[name='info[cc_name]']").val(0 + "," + lastMatch + " " + jQuery("[name='info[cc_name]']").val()); 5897// setRealPos(0, lastMatch);// else 5898// } 5899// else if (car.end > lastMatch+1) { 5900//// input.caret((car.begin > lastMatch+1 ? lastMatch+1 : car.begin), (car.end > lastMatch+1 ? lastMatch+1 : car.end)); 5901// } 5902//// if (lastMatch) input.caret(0, lastMatch + 1); //end_non_mask + 1); 5903//// else input.caret(0); 5904// }, 0); 5905// return false; 5906// }) 5907 .bind("blur.mask", function() { 5908 inputDirection = 0; 5909 checkVal(); 5910// lastMatch = getLastMatch(true); 5911// if (!(lastMatch + 1) && settings.displayPartial) input.val(''); 5912 if (input.val() != focusText) 5913 input.change(); 5914 }) 5915 .bind("keydown.mask", keydownEvent) 5916 .bind("keypress.mask", keypressEvent) 5917 .bind(pasteEventName, function(){ 5918// alert(input.val()); 5919 setTimeout(function(){ 5920 var returned; 5921 if (settings.beforePaste) { 5922 returned = settings.beforePaste.call(input); 5923 } 5924 if (returned != false) input.caret(checkVal(true) + 1); 5925 },0); 5926 }); 5927 5928 fixCaretCheckVal(); //Perform initial check for existing values 5929// var trimmed_mask = input.mask().replace(new RegExp(settings.placeholder, 'g'),''); 5930// if (trimmed_mask.length) input.caret(1); 5931 5932 }); 5933 } 5934 }); 5935})(jQuery); 5936 5937(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})(); 5938/* Autocomplete - jQuery plugin 1.0.2 5939 * 5940 * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer 5941 * 5942 * Dual licensed under the MIT and GPL licenses: 5943 * http://www.opensource.org/licenses/mit-license.php 5944 * http://www.gnu.org/licenses/gpl.html 5945 * 5946 * Revision: $Id: jquery.autocomplete.js,v 1.2 2011/02/02 01:56:49 www Exp $ 5947 * 5948 */ 5949 5950/*(function($) { 5951 5952$.fn.extend({ 5953 autocomplete: function(urlOrData, options) { 5954 var isUrl = typeof urlOrData == "string"; 5955 options = $.extend({}, $.Autocompleter.defaults, { 5956 url: isUrl ? urlOrData : null, 5957 data: isUrl ? null : urlOrData, 5958 delay: isUrl ? $.Autocompleter.defaults.delay : 10, 5959 max: options && !options.scroll ? 10 : 150 5960 }, options); 5961 5962 // if highlight is set to false, replace it with a do-nothing function 5963 options.highlight = options.highlight || function(value) { return value; }; 5964 5965 // if the formatMatch option is not specified, then use formatItem for backwards compatibility 5966 options.formatMatch = options.formatMatch || options.formatItem; 5967 5968 return this.each(function() { 5969 new $.Autocompleter(this, options); 5970 }); 5971 }, 5972 result: function(handler) { 5973 return this.bind("result", handler); 5974 }, 5975 search: function(handler) { 5976 return this.trigger("search", [handler]); 5977 }, 5978 flushCache: function() { 5979 return this.trigger("flushCache"); 5980 }, 5981 setOptions: function(options){ 5982 return this.trigger("setOptions", [options]); 5983 }, 5984 unautocomplete: function() { 5985 return this.trigger("unautocomplete"); 5986 } 5987}); 5988 5989$.Autocompleter = function(input, options) { 5990 5991 var KEY = { 5992 LEFT: 37, 5993 UP: 38, 5994 RIGHT: 39, 5995 DOWN: 40, 5996 DEL: 46, 5997 TAB: 9, 5998 RETURN: 13, 5999 ESC: 27, 6000 COMMA: 188, 6001 PAGEUP: 33, 6002 PAGEDOWN: 34, 6003 BACKSPACE: 8, 6004 SHIFT: 16, 6005 CTRL: 17, 6006 ALT: 18, 6007 META: 224, 6008 WINDOWS_LEFT: 91, 6009 WINDOWS_RIGHT: 92, 6010 WINDOWS: 93 6011 }; 6012 6013 // Create $ object for input element 6014 var $input = jQuery(input).attr("autocomplete", "off").addClass(options.inputClass); 6015 6016 var timeout; 6017 var previousValue = ""; 6018 var cache = $.Autocompleter.Cache(options); 6019 var hasFocus = 0; 6020 var lastKeyPressCode; 6021 var lastEnteredValue; 6022 var config = { 6023 mouseDownOnSelect: false 6024 }; 6025 var select = $.Autocompleter.Select(options, input, selectCurrent, config); 6026 6027 var blockSubmit; 6028
6029 // prevent form submit in opera when selecting with return key 6030 $.browser.opera && jQuery(input.form).bind("submit.autocomplete", function() { 6031 if (blockSubmit) { 6032 blockSubmit = false; 6033 return false; 6034 } 6035 }); 6036 6037 // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all 6038 $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { 6039 // track last key pressed 6040 lastKeyPressCode = event.keyCode; 6041 var modifierPressed = event.altKey || event.ctrlKey || event.metaKey; 6042 var shiftPressed = event.shiftKey; 6043// console.log(modifierPressed + ", " + event.keyCode + ', ' + String.fromCharCode(event.keyCode)); 6044 switch(event.keyCode) { 6045 6046 case KEY.SHIFT: 6047 case KEY.CTRL: 6048 case KEY.ALT: 6049 case KEY.META: 6050 case KEY.WINDOWS_LEFT: 6051 case KEY.WINDOWS_RIGHT: 6052 case KEY.WINDOWS: 6053 //ignore 6054 break; 6055 6056 case KEY.UP: 6057 event.preventDefault(); 6058 if ( select.visible() ) { 6059 select.prev(); 6060 } else { 6061 onChange(0, true); 6062 } 6063 var tmp = select.selected(true); 6064 fillOnMove($input.val(), (tmp ? tmp.result : null)); 6065 break; 6066 6067 case KEY.DOWN: 6068 event.preventDefault(); 6069 if ( select.visible() ) { 6070 select.next(); 6071 } else { 6072 onChange(0, true); 6073 } 6074 var tmp = select.selected(true); 6075 fillOnMove($input.val(), (tmp ? tmp.result : null)); 6076 break; 6077 6078 case KEY.PAGEUP: 6079 event.preventDefault(); 6080 if ( select.visible() ) { 6081 select.pageUp(); 6082 } else { 6083 onChange(0, true); 6084 } 6085 break; 6086 6087 case KEY.PAGEDOWN: 6088 event.preventDefault(); 6089 if ( select.visible() ) { 6090 select.pageDown(); 6091 } else { 6092 onChange(0, true); 6093 } 6094 break; 6095 6096 // matches also semicolon 6097 case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: 6098 case KEY.TAB: 6099 case KEY.RETURN: 6100 if( selectCurrent() ) { 6101 // stop default to prevent a form submit, Opera needs special handling 6102 event.preventDefault(); 6103 blockSubmit = true; 6104 return false; 6105 } 6106 break; 6107 6108 case KEY.ESC: 6109 select.hide(); 6110 fillOnMove($input.val(), null); 6111 break; 6112 6113 case KEY.LEFT: 6114 case KEY.RIGHT: 6115 var tmp = select.selected(true); 6116 if (options.fillOnMove && tmp && !modifierPressed && !shiftPressed) { 6117 fillOnMove($input.val(), (KEY.LEFT ? null : tmp.result)); 6118 clearTimeout(timeout); 6119 timeout = setTimeout(function () { onChange(); select.unselect(); fillOnMove($input.val(), null); }, options.delay); 6120 return false; 6121 } 6122 break; 6123 6124 default: 6125 clearTimeout(timeout); 6126 timeout = setTimeout(function () { onChange(); select.unselect(); fillOnMove($input.val(), null); }, options.delay); 6127 break; 6128 } 6129 }).focus(function(){ 6130 // track whether the field has focus, we shouldn't process any 6131 // results if the field no longer has focus 6132 hasFocus++; 6133 }).blur(function() { 6134 hasFocus = 0; 6135 if (!config.mouseDownOnSelect) { 6136 hideResults(); 6137 } 6138 }).click(function() { 6139 // show select when clicking in a focused field 6140 if ( hasFocus++ > 1 && !select.visible() ) { 6141 onChange(0, true); 6142 } 6143 }).bind("search", function() { 6144 // TODO why not just specifying both arguments? 6145 var fn = (arguments.length > 1) ? arguments[1] : null; 6146 function findValueCallback(q, data) { 6147 var result; 6148 if( data && data.length ) { 6149 for (var i=0; i < data.length; i++) { 6150 if( data[i].result.toLowerCase() == q.toLowerCase() ) { 6151 result = data[i]; 6152 break; 6153 } 6154 } 6155 } 6156 if( typeof fn == "function" ) fn(result); 6157 else $input.trigger("result", result && [result.data, result.value]); 6158 } 6159 $.each(trimWords($input.val()), function(i, value) { 6160 request(value, findValueCallback, findValueCallback); 6161 }); 6162 }).bind("flushCache", function() { 6163 cache.flush(); 6164 }).bind("setOptions", function() { 6165 $.extend(options, arguments[1]); 6166 // if we've updated the data, repopulate 6167 if ( "data" in arguments[1] ) 6168 cache.populate(); 6169 }).bind("unautocomplete", function() { 6170 select.unbind(); 6171 $input.unbind(); 6172 jQuery(input.form).unbind(".autocomplete"); 6173 }); 6174 6175 6176 function selectCurrent() { 6177 var selected = select.selected(); 6178 if( !selected ) 6179 return false; 6180 6181 var v = selected.result; 6182 previousValue = v; 6183 6184 if ( options.multiple ) { 6185 var words = trimWords($input.val()); 6186 if ( words.length > 1 ) { 6187 v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v; 6188 } 6189 v += options.multipleSeparator; 6190 } 6191 6192 $input.val(v); 6193 hideResultsNow(); 6194 $input.trigger("result", [selected.data, selected.value]); 6195 return true; 6196 } 6197 6198 function onChange(crap, skipPrevCheck) { 6199 if( lastKeyPressCode == KEY.DEL ) { 6200 select.hide(); 6201 return; 6202 } 6203 6204 var currentValue = $input.val(); 6205 6206 if ( !skipPrevCheck && currentValue == previousValue ) 6207 return; 6208 6209 previousValue = currentValue; 6210 6211 currentValue = lastWord(currentValue); 6212 if ( currentValue.length >= options.minChars) { 6213 $input.addClass(options.loadingClass); 6214 if (!options.matchCase) 6215 currentValue = currentValue.toLowerCase(); 6216 request(currentValue, receiveData, hideResultsNow); 6217 } else { 6218 stopLoading(); 6219 select.hide(); 6220 } 6221 }; 6222 6223 function trimWords(value) { 6224 if ( !value ) { 6225 return [""]; 6226 } 6227 var words = value.split( options.multipleSeparator ); 6228 var result = []; 6229 $.each(words, function(i, value) { 6230 if ( $.trim(value) ) 6231 result[i] = $.trim(value); 6232 }); 6233 return result; 6234 } 6235 6236 function lastWord(value) { 6237 if ( !options.multiple ) 6238 return value; 6239 var words = trimWords(value); 6240 return words[words.length - 1]; 6241 } 6242 6243 // fills in the input box w/the first match (assumed to be the best match) 6244 // q: the term entered 6245 // sValue: the first matching result 6246 function autoFill(q, sValue){ 6247 // autofill in the complete box w/the first match as long as the user hasn't entered in more data 6248 // if the last user key pressed was backspace, don't autofill 6249 if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { 6250 // fill in the value (keep the case the user has typed) 6251 $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); 6252 // select the portion of the value not typed by the user (so the next character will erase) 6253 $.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); 6254 } 6255 }; 6256 6257 function fillOnMove(q, sValue){ 6258 if (options.fillOnMove) { 6259 if (!sValue && (lastKeyPressCode == KEY.UP || lastKeyPressCode == KEY.LEFT || lastKeyPressCode == KEY.ESC)) { 6260 $input.val(lastEnteredValue); 6261 } else if(lastKeyPressCode == KEY.UP || lastKeyPressCode == KEY.DOWN) { 6262 $input.val(sValue); 6263// $.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); 6264 } else { 6265 // fill in the value (keep the case the user has typed) 6266 lastEnteredValue = $input.val(); 6267 // select the portion of the value not typed by the user (so the next character will erase) 6268// $.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); 6269 } 6270 } 6271 }; 6272 6273 function hideResults() { 6274 clearTimeout(timeout); 6275 timeout = setTimeout(hideResultsNow, 200); 6276 }; 6277 6278 function hideResultsNow() { 6279 var wasVisible = select.visible(); 6280 select.hide(); 6281 clearTimeout(timeout); 6282 stopLoading(); 6283 if (options.mustMatch) { 6284 // call search and run callback 6285 $input.search( 6286 function (result){ 6287 // if no value found, clear the input box 6288 if( !result ) { 6289 if (options.multiple) { 6290 var words = trimWords($input.val()).slice(0, -1); 6291 $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); 6292 } 6293 else 6294 $input.val( "" ); 6295 } 6296 } 6297 ); 6298 } 6299 if (wasVisible) 6300 // position cursor at end of input field 6301 $.Autocompleter.Selection(input, input.value.length, input.value.length); 6302 }; 6303 6304 function receiveData(q, data) { 6305 if ( data && data.length && hasFocus ) { 6306 stopLoading(); 6307 select.display(data, q); 6308 autoFill(q, data[0].value); 6309 select.show(); 6310 } else { 6311 hideResultsNow(); 6312 } 6313 }; 6314 6315 function request(term, success, failure) { 6316 if (!options.matchCase) 6317 term = term.toLowerCase(); 6318 var data = cache.load(term); 6319 // recieve the cached data 6320 if (data && data.length) { 6321 success(term, data); 6322 // if an AJAX url has been supplied, try loading the data now 6323 } else if( (typeof options.url == "string") && (options.url.length > 0) ){ 6324 6325 var extraParams = { 6326 timestamp: +new Date() 6327 }; 6328 $.each(options.extraParams, function(key, param) { 6329 extraParams[key] = typeof param == "function" ? param() : param; 6330 }); 6331 6332 $.ajax({
6333 // try to leverage ajaxQueue plugin to abort previous requests 6334 mode: "abort", 6335 // limit abortion to this input 6336 port: "autocomplete" + input.name, 6337 dataType: options.dataType, 6338 url: options.url, 6339 data: $.extend({ 6340 q: lastWord(term), 6341 limit: options.max 6342 }, extraParams), 6343 success: function(data) { 6344 var parsed = options.parse && options.parse(data) || parse(data); 6345 cache.add(term, parsed); 6346 success(term, parsed); 6347 } 6348 }); 6349 } else { 6350 // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match 6351 select.emptyList(); 6352 failure(term); 6353 } 6354 }; 6355 6356 function parse(data) { 6357 var parsed = []; 6358 var rows = data.split("\n"); 6359 for (var i=0; i < rows.length; i++) { 6360 var row = $.trim(rows[i]); 6361 if (row) { 6362 row = row.split("|"); 6363 parsed[parsed.length] = { 6364 data: row, 6365 value: row[0], 6366 result: options.formatResult && options.formatResult(row, row[0]) || row[0] 6367 }; 6368 } 6369 } 6370 return parsed; 6371 }; 6372 6373 function stopLoading() { 6374 $input.removeClass(options.loadingClass); 6375 }; 6376 6377}; 6378 6379$.Autocompleter.defaults = { 6380 inputClass: "ac_input", 6381 resultsClass: "ac_results", 6382 loadingClass: "ac_loading", 6383 minChars: 1, 6384 delay: 400, 6385 matchCase: false, 6386 matchSubset: true, 6387 matchContains: false, 6388 cacheLength: 10, 6389 max: 100, 6390 mustMatch: false, 6391 extraParams: {}, 6392 selectFirst: true, 6393 formatItem: function(row) { return row[0]; }, 6394 formatMatch: null, 6395 autoFill: false, 6396 fillOnMove: true, 6397 wrapToTop: false, 6398 wrapToBottom: false, 6399 width: 0, 6400 offsetLeft: 0, 6401 offsetTop: 0, 6402 multiple: false, 6403 multipleSeparator: ", ", 6404 highlight: function(value, term) { 6405 return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); 6406 }, 6407 scroll: true, 6408 scrollHeight: 180 6409}; 6410 6411$.Autocompleter.Cache = function(options) { 6412 6413 var data = {}; 6414 var length = 0; 6415 6416 function matchSubset(s, sub) { 6417 if (!options.matchCase) 6418 s = s.toLowerCase(); 6419 var i = s.indexOf(sub); 6420 if (i == -1) return false; 6421 return i == 0 || options.matchContains; 6422 }; 6423 6424 function add(q, value) { 6425 if (length > options.cacheLength){ 6426 flush(); 6427 } 6428 if (!data[q]){ 6429 length++; 6430 } 6431 data[q] = value; 6432 } 6433 6434 function populate(){ 6435 if( !options.data ) return false; 6436 // track the matches 6437 var stMatchSets = {}, 6438 nullData = 0; 6439 6440 // no url was specified, we need to adjust the cache length to make sure it fits the local data store 6441 if( !options.url ) options.cacheLength = 1; 6442 6443 // track all options for minChars = 0 6444 stMatchSets[""] = []; 6445 6446 // loop through the array and create a lookup structure 6447 for ( var i = 0, ol = options.data.length; i < ol; i++ ) { 6448 var rawValue = options.data[i]; 6449 // if rawValue is a string, make an array otherwise just reference the array 6450 rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; 6451 6452 var value = options.formatMatch(rawValue, i+1, options.data.length); 6453 if ( value === false ) 6454 continue; 6455 6456 var firstChar = value.charAt(0).toLowerCase(); 6457 // if no lookup array for this character exists, look it up now 6458 if( !stMatchSets[firstChar] ) 6459 stMatchSets[firstChar] = []; 6460 6461 // if the match is a string 6462 var row = { 6463 value: value, 6464 data: rawValue, 6465 result: options.formatResult && options.formatResult(rawValue) || value 6466 }; 6467 6468 // push the current match into the set list 6469 stMatchSets[firstChar].push(row); 6470 6471 // keep track of minChars zero items 6472 if ( nullData++ < options.max ) { 6473 stMatchSets[""].push(row); 6474 } 6475 }; 6476 6477 // add the data items to the cache 6478 $.each(stMatchSets, function(i, value) { 6479 // increase the cache size 6480 options.cacheLength++; 6481 // add to the cache 6482 add(i, value); 6483 }); 6484 } 6485 6486 // populate any existing data 6487 setTimeout(populate, 25); 6488 6489 function flush(){ 6490 data = {}; 6491 length = 0; 6492 } 6493 6494 return { 6495 flush: flush, 6496 add: add, 6497 populate: populate, 6498 load: function(q) { 6499 if (!options.cacheLength || !length) 6500 return null; 6501 /* 6502 * if dealing w/local data and matchContains than we must make sure 6503 * to loop through all the data collections looking for matches 6504 */ 6505 /* if( !options.url && options.matchContains ){ 6506 // track all matches 6507 var csub = []; 6508 // loop through all the data grids for matches 6509 for( var k in data ){
6510 // don't search through the stMatchSets[""] (minChars: 0) cache 6511 // this prevents duplicates 6512 if( k.length > 0 ){ 6513 var c = data[k]; 6514 $.each(c, function(i, x) { 6515 // if we've got a match, add it to the array 6516 if (matchSubset(x.value, q)) { 6517 csub.push(x); 6518 } 6519 }); 6520 } 6521 } 6522 return csub; 6523 } else 6524 // if the exact item exists, use it 6525 if (data[q]){ 6526 return data[q]; 6527 } else 6528 if (options.matchSubset) { 6529 for (var i = q.length - 1; i >= options.minChars; i--) { 6530 var c = data[q.substr(0, i)]; 6531 if (c) { 6532 var csub = []; 6533 $.each(c, function(i, x) { 6534 if (matchSubset(x.value, q)) { 6535 csub[csub.length] = x; 6536 } 6537 }); 6538 return csub; 6539 } 6540 } 6541 } 6542 return null; 6543 } 6544 }; 6545}; 6546 6547$.Autocompleter.Select = function (options, input, select, config) { 6548 var CLASSES = { 6549 ACTIVE: "ac_over" 6550 }; 6551 6552 var listItems, 6553 active = -1, 6554 data, 6555 term = "", 6556 needsInit = true, 6557 element, 6558 list, 6559 mouseHasMoved = false; 6560 6561 // Create results 6562 function init() { 6563 if (!needsInit) 6564 return; 6565 element = jQuery("<div/>") 6566 .hide() 6567 .addClass(options.resultsClass) 6568 .css("position", "absolute") 6569 .appendTo(document.body); 6570 6571 list = jQuery("<ul/>").appendTo(element).mousemove(function () { 6572 mouseHasMoved = true; 6573 }).mouseover( function(event) { 6574 if(mouseHasMoved && target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { 6575 active = jQuery("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); 6576 jQuery(target(event)).addClass(CLASSES.ACTIVE); 6577 } 6578 }).mouseout(function (event) { 6579 jQuery("li", list).removeClass(CLASSES.ACTIVE); 6580 active = -1; 6581 }).click(function(event) { 6582 jQuery(target(event)).addClass(CLASSES.ACTIVE); 6583 select(); 6584 // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus 6585 input.focus(); 6586 return false; 6587 }).mousedown(function() { 6588 config.mouseDownOnSelect = true; 6589 }).mouseup(function() { 6590 config.mouseDownOnSelect = false; 6591 }); 6592 6593 if( options.width > 0 ) 6594 element.css("width", options.width); 6595 6596 needsInit = false; 6597 } 6598 6599 function target(event) { 6600 var element = event.target; 6601 while(element && element.tagName != "LI") 6602 element = element.parentNode; 6603 // more fun with IE, sometimes event.target is empty, just ignore it then 6604 if(!element) 6605 return []; 6606 return element; 6607 } 6608 6609 function moveSelect(step) { 6610 listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); 6611 movePosition(step); 6612 if (active >= 0) { 6613 var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); 6614 if(options.scroll) { 6615 var offset = 0; 6616 listItems.slice(0, active).each(function() { 6617 offset += this.offsetHeight; 6618 }); 6619 if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { 6620 list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); 6621 } else if(offset < list.scrollTop()) { 6622 list.scrollTop(offset); 6623 } 6624 } 6625 } 6626 }; 6627 6628 function movePosition(step) { 6629 active += step; 6630 if (active < 0) { 6631 if (options.wrapToBottom) active = listItems.size() - 1; 6632 else active = -1; 6633 } else if (active >= listItems.size()) { 6634 if (options.wrapToTop) active = 0; 6635 else active = listItems.size() - 1; 6636 } 6637 } 6638 6639 function limitNumberOfItems(available) { 6640 return options.max && options.max < available 6641 ? options.max 6642 : available; 6643 } 6644 6645 function fillList() { 6646 list.empty(); 6647 mouseHasMoved = false; 6648 var max = limitNumberOfItems(data.length); 6649 for (var i=0; i < max; i++) { 6650 if (!data[i]) 6651 continue; 6652 var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); 6653 if ( formatted === false ) 6654 continue; 6655 var li = jQuery("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(l
6655ist)[0]; 6656 $.data(li, "ac_data", data[i]); 6657 } 6658 listItems = list.find("li"); 6659 if ( options.selectFirst ) { 6660 listItems.slice(0, 1).addClass(CLASSES.ACTIVE); 6661 active = 0; 6662 } 6663 // apply bgiframe if available 6664 if ( $.fn.bgiframe ) 6665 list.bgiframe(); 6666 } 6667 6668 return { 6669 display: function(d, q) { 6670 init(); 6671 data = d; 6672 term = q; 6673 fillList(); 6674 }, 6675 next: function() { 6676 moveSelect(1); 6677 }, 6678 prev: function() { 6679 moveSelect(-1); 6680 }, 6681 pageUp: function() { 6682 if (active != 0 && active - 8 < 0) { 6683 moveSelect( -active ); 6684 } else { 6685 moveSelect(-8); 6686 } 6687 }, 6688 pageDown: function() { 6689 if (active != listItems.size() - 1 && active + 8 > listItems.size()) { 6690 moveSelect( listItems.size() - 1 - active ); 6691 } else { 6692 moveSelect(8); 6693 } 6694 }, 6695 hide: function() { 6696 element && element.hide(); 6697 listItems && listItems.removeClass(CLASSES.ACTIVE); 6698 active = -1; 6699 }, 6700 visible : function() { 6701 return element && element.is(":visible"); 6702 }, 6703 current: function() { 6704 return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); 6705 }, 6706 show: function() { 6707 var offset = jQuery(input).offset(); 6708 var offsetTop = options.offsetTop || 0; 6709 var offsetLeft = options.offsetLeft || 0; 6710 element.css({ 6711 width: typeof options.width == "string" || options.width > 0 ? options.width : jQuery(input).width(), 6712 top: offset.top + input.offsetHeight + offsetTop, 6713 left: offset.left + offsetLeft 6714 }).show(); 6715 if(options.scroll) { 6716 list.scrollTop(0); 6717 list.css({ 6718 maxHeight: options.scrollHeight, 6719 overflow: 'auto' 6720 }); 6721 6722 if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { 6723 var listHeight = 0; 6724 listItems.each(function() { 6725 listHeight += this.offsetHeight; 6726 }); 6727 var scrollbarsVisible = listHeight > options.scrollHeight; 6728 list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); 6729 if (!scrollbarsVisible) { 6730 // IE doesn't recalculate width when scrollbar disappears 6731 listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); 6732 } 6733 } 6734 6735 } 6736 }, 6737 selected: function(keep_selected) { 6738 var selected = listItems && listItems.filter("." + CLASSES.ACTIVE); 6739 if (selected && !keep_selected) { 6740 selected.removeClass(CLASSES.ACTIVE); 6741 active = -1; 6742 } 6743 return selected && selected.length && $.data(selected[0], "ac_data"); 6744 }, 6745 unselect: function() { 6746 var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); 6747 active = -1; 6748 }, 6749 emptyList: function (){ 6750 list && list.empty(); 6751 }, 6752 unbind: function() { 6753 element && element.remove(); 6754 } 6755 }; 6756}; 6757 6758$.Autocompleter.Selection = function(field, start, end) { 6759 if( field.createTextRange ){ 6760 var selRange = field.createTextRange(); 6761 selRange.collapse(true); 6762 selRange.moveStart("character", start); 6763 selRange.moveEnd("character", end); 6764 selRange.select(); 6765 } else if( field.setSelectionRange ){ 6766 field.setSelectionRange(start, end); 6767 } else { 6768 if( field.selectionStart ){ 6769 field.selectionStart = start; 6770 field.selectionEnd = end; 6771 } 6772 } 6773 field.focus(); 6774}; 6775 6776})(jQuery); 6777*/ 6778(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/** 6779 * Name: Highslide JS 6780 * Version: 4.1.9 (2010-07-05) 6781 * Author: Torstein Hønsi 6782 * Support: www.highslide.com/support 6783 * License: www.highslide.com/#license 6784 */ 6785if (!hs) { var hs = { 6786// Language strings 6787lang : { 6788 cssDirection: 'ltr', 6789 loadingText : 'Loading...', 6790 loadingTitle : 'Click to cancel', 6791 focusTitle : 'Click to bring to front', 6792 fullExpandTitle : 'Expand to actual size (f)', 6793 creditsText : 'Powered by <i>Highslide JS</i>',
6794 creditsTitle : 'Go to the Highslide JS homepage', 6795 previousText : 'Previous', 6796 nextText : 'Next', 6797 moveText : 'Move', 6798 closeText : 'Close', 6799 closeTitle : 'Close (esc)', 6800 resizeTitle : 'Resize', 6801 playText : 'Play', 6802 playTitle : 'Play slideshow (spacebar)', 6803 pauseText : 'Pause', 6804 pauseTitle : 'Pause slideshow (spacebar)', 6805 previousTitle : 'Previous (arrow left)', 6806 nextTitle : 'Next (arrow right)', 6807 moveTitle : 'Move', 6808 fullExpandText : '1:1', 6809 number: 'Image %1 of %2', 6810 restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.' 6811}, 6812// See http://highslide.com/ref for examples of settings 6813graphicsDir : 'highslide/graphics/', 6814expandCursor : 'zoomin.cur', // null disables 6815restoreCursor : 'zoomout.cur', // null disables 6816expandDuration : 250, // milliseconds 6817restoreDuration : 250, 6818marginLeft : 15, 6819marginRight : 15, 6820marginTop : 15, 6821marginBottom : 15, 6822zIndexCounter : 1001, // adjust to other absolutely positioned elements 6823loadingOpacity : 0.75, 6824allowMultipleInstances: true, 6825numberOfImagesToPreload : 5, 6826outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only 6827outlineStartOffset : 3, // ends at 10 6828padToMinWidth : false, // pad the popup width to make room for wide caption 6829fullExpandPosition : 'bottom right', 6830fullExpandOpacity : 1, 6831showCredits : true, // you can set this to false if you want 6832creditsHref : 'http://highslide.com/', 6833creditsTarget : '_self', 6834enableKeyListener : true, 6835openerTagNames : ['a', 'area'], // Add more to allow slideshow indexing 6836transitions : [], 6837transitionDuration: 250, 6838dimmingOpacity: 0, // Lightbox style dimming background 6839dimmingDuration: 50, // 0 for instant dimming 6840 6841allowWidthReduction : false, 6842allowHeightReduction : true, 6843preserveContent : true, // Preserve changes made to the content and position of HTML popups. 6844objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion. 6845cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup. 6846anchor : 'auto', // where the image expands from 6847align : 'auto', // position in the client (overrides anchor) 6848targetX: null, // the id of a target element 6849targetY: null, 6850dragByHeading: true, 6851minWidth: 200, 6852minHeight: 200, 6853allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight 6854outlineType : 'drop-shadow', // set null to disable outlines 6855skin : { 6856 controls: 6857 '<div class="highslide-controls"><ul>'+ 6858 '<li class="highslide-previous">'+ 6859 '<a href="#" title="{hs.lang.previousTitle}">'+ 6860 '<span>{hs.lang.previousText}</span></a>'+ 6861 '</li>'+ 6862 '<li class="highslide-play">'+ 6863 '<a href="#" title="{hs.lang.playTitle}">'+ 6864 '<span>{hs.lang.playText}</span></a>'+ 6865 '</li>'+ 6866 '<li class="highslide-pause">'+ 6867 '<a href="#" title="{hs.lang.pauseTitle}">'+ 6868 '<span>{hs.lang.pauseText}</span></a>'+ 6869 '</li>'+ 6870 '<li class="highslide-next">'+ 6871 '<a href="#" title="{hs.lang.nextTitle}">'+ 6872 '<span>{hs.lang.nextText}</span></a>'+ 6873 '</li>'+ 6874 '<li class="highslide-move">'+ 6875 '<a href="#" title="{hs.lang.moveTitle}">'+ 6876 '<span>{hs.lang.moveText}</span></a>'+ 6877 '</li>'+ 6878 '<li class="highslide-full-expand">'+ 6879 '<a href="#" title="{hs.lang.fullExpandTitle}">'+ 6880 '<span>{hs.lang.fullExpandText}</span></a>'+ 6881 '</li>'+ 6882 '<li class="highslide-close">'+ 6883 '<a href="#" title="{hs.lang.closeTitle}" >'+ 6884 '<span>{hs.lang.closeText}</span></a>'+ 6885 '</li>'+ 6886 '</ul></div>' 6887 , 6888 contentWrapper: 6889 '<div class="highslide-header"><ul>'+ 6890 '<li class="highslide-previous">'+ 6891 '<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+ 6892 '<span>{hs.lang.previousText}</span></a>'+ 6893 '</li>'+ 6894 '<li class="highslide-next">'+ 6895 '<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+ 6896 '<span>{hs.lang.nextText}</span></a>'+ 6897 '</li>'+ 6898 '<li class="highslide-move">'+ 6899 '<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+ 6900 '<span>{hs.lang.moveText}</span></a>'+ 6901 '</li>'+
6902 '<li class="highslide-close">'+ 6903 '<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+ 6904 '<span>{hs.lang.closeText}</span></a>'+ 6905 '</li>'+ 6906 '</ul></div>'+ 6907 '<div class="highslide-body"></div>'+ 6908 '<div class="highslide-footer"><div>'+ 6909 '<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+ 6910 '</div></div>' 6911}, 6912// END OF YOUR SETTINGS 6913 6914 6915// declare internal properties 6916preloadTheseImages : [], 6917continuePreloading: true, 6918expanders : [], 6919overrides : [ 6920 'allowSizeReduction', 6921 'useBox', 6922 'anchor', 6923 'align', 6924 'targetX', 6925 'targetY', 6926 'outlineType', 6927 'outlineWhileAnimating', 6928 'captionId', 6929 'captionText', 6930 'captionEval', 6931 'captionOverlay', 6932 'headingId', 6933 'headingText', 6934 'headingEval', 6935 'headingOverlay', 6936 'creditsPosition', 6937 'dragByHeading', 6938 'autoplay', 6939 'numberPosition', 6940 'transitions', 6941 'dimmingOpacity', 6942 6943 'width', 6944 'height', 6945 6946 'contentId', 6947 'allowWidthReduction', 6948 'allowHeightReduction', 6949 'preserveContent', 6950 'maincontentId', 6951 'maincontentText', 6952 'maincontentEval', 6953 'objectType', 6954 'cacheAjax', 6955 'objectWidth', 6956 'objectHeight', 6957 'objectLoadTime', 6958 'swfOptions', 6959 'wrapperClassName', 6960 'minWidth', 6961 'minHeight', 6962 'maxWidth', 6963 'maxHeight', 6964 'pageOrigin', 6965 'slideshowGroup', 6966 'easing', 6967 'easingClose', 6968 'fadeInOut', 6969 'src' 6970], 6971overlays : [], 6972idCounter : 0, 6973oPos : { 6974 x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'], 6975 y: ['above', 'top', 'middle', 'bottom', 'below'] 6976}, 6977mouse: {}, 6978headingOverlay: {}, 6979captionOverlay: {}, 6980swfOptions: { flashvars: {}, params: {}, attributes: {} }, 6981timers : [], 6982 6983slideshows : [], 6984 6985pendingOutlines : {}, 6986sleeping : [], 6987preloadTheseAjax : [], 6988cacheBindings : [], 6989cachedGets : {}, 6990clones : {}, 6991onReady: [], 6992uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 : 6993 parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]), 6994ie : (document.all && !window.opera), 6995safari : /Safari/.test(navigator.userAgent), 6996geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), 6997 6998jQuery : function (id) { 6999 if (id) return document.getElementById(id); 7000}, 7001 7002push : function (arr, val) { 7003 arr[arr.length] = val; 7004}, 7005 7006createElement : function (tag, attribs, styles, parent, nopad) { 7007 var el = document.createElement(tag); 7008 if (attribs) hs.extend(el, attribs); 7009 if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0}); 7010 if (styles) hs.setStyles(el, styles); 7011 if (parent) parent.appendChild(el); 7012 return el; 7013}, 7014 7015extend : function (el, attribs) { 7016 for (var x in attribs) el[x] = attribs[x]; 7017 return el; 7018}, 7019 7020setStyles : function (el, styles) { 7021 for (var x in styles) { 7022 if (hs.ie && x == 'opacity') { 7023 if (styles[x] > 0.99) el.style.removeAttribute('filter'); 7024 else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')'; 7025 } 7026 else el.style[x] = styles[x]; 7027 } 7028}, 7029animate: function(el, prop, opt) { 7030 var start, 7031 end, 7032 unit; 7033 if (typeof opt != 'object' || opt === null) { 7034 var args = arguments; 7035 opt = { 7036 duration: args[2], 7037 easing: args[3], 7038 complete: args[4] 7039 }; 7040 } 7041 if (typeof opt.duration != 'number') opt.duration = 250; 7042 opt.easing = Math[opt.easing] || Math.easeInQuad; 7043 opt.curAnim = hs.extend({}, prop); 7044 for (var name in prop) { 7045 var e = new hs.fx(el, opt , name ); 7046 7047 start = parseFloat(hs.css(el, name)) || 0; 7048 end = parseFloat(prop[name]); 7049 unit = name != 'opacity' ? 'px' : ''; 7050 7051 e.custom( start, end, unit ); 7052 } 7053}, 7054css: function(el, prop) { 7055 if (el.style[prop]) { 7056 return el.style[prop]; 7057 } else if (document.defaultView) { 7058 return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop); 7059 7060 } else { 7061 if (prop == 'opacity') prop = 'filter'; 7062 var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })]; 7063 if (prop == 'filter') 7064 val = val.replace(/alpha\(opacity=([0-9]+)\)/, 7065 function (a, b) { return b / 100 }); 7066 return val === '' ? 1 : val; 7067 } 7068}, 7069 7070getPageSize : function () { 7071 var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat' 7072 ? d.documentElement : d.body; 7073 7074 var width = hs.ie ? iebody.clientWidth : 7075 (d.documentElement.clientWidth || self.innerWidth),
7076 height = hs.ie ? iebody.clientHeight : self.innerHeight; 7077 7078 hs.page = { 7079 width: width, 7080 height: height, 7081 scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset, 7082 scrollTop: hs.ie ? iebody.scrollTop : pageYOffset 7083 }; 7084 return hs.page; 7085}, 7086 7087getPosition : function(el) { 7088 if (/area/i.test(el.tagName)) { 7089 var imgs = document.getElementsByTagName('img'); 7090 for (var i = 0; i < imgs.length; i++) { 7091 var u = imgs[i].useMap; 7092 if (u && u.replace(/^.*?#/, '') == el.parentNode.name) { 7093 el = imgs[i]; 7094 break; 7095 } 7096 } 7097 } 7098 var p = { x: el.offsetLeft, y: el.offsetTop }; 7099 while (el.offsetParent) { 7100 el = el.offsetParent; 7101 p.x += el.offsetLeft; 7102 p.y += el.offsetTop; 7103 if (el != document.body && el != document.documentElement) { 7104 p.x -= el.scrollLeft; 7105 p.y -= el.scrollTop; 7106 } 7107 } 7108 return p; 7109}, 7110 7111expand : function(a, params, custom, type) { 7112 if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container); 7113 if (typeof a.getParams == 'function') return params; 7114 if (type == 'html') { 7115 for (var i = 0; i < hs.sleeping.length; i++) { 7116 if (hs.sleeping[i] && hs.sleeping[i].a == a) { 7117 hs.sleeping[i].awake(); 7118 hs.sleeping[i] = null; 7119 return false; 7120 } 7121 } 7122 hs.hasHtmlExpanders = true; 7123 } 7124 try { 7125 new hs.Expander(a, params, custom, type); 7126 return false; 7127 } catch (e) { return true; } 7128}, 7129 7130htmlExpand : function(a, params, custom) { 7131 return hs.expand(a, params, custom, 'html'); 7132}, 7133 7134getSelfRendered : function() { 7135 return hs.createElement('div', { 7136 className: 'highslide-html-content', 7137 innerHTML: hs.replaceLang(hs.skin.contentWrapper) 7138 }); 7139}, 7140getElementByClass : function (el, tagName, className) { 7141 var els = el.getElementsByTagName(tagName); 7142 for (var i = 0; i < els.length; i++) { 7143 if ((new RegExp(className)).test(els[i].className)) { 7144 return els[i]; 7145 } 7146 } 7147 return null; 7148}, 7149replaceLang : function(s) { 7150 s = s.replace(/\s/g, ' '); 7151 var re = /{hs\.lang\.([^}]+)\}/g, 7152 matches = s.match(re), 7153 lang; 7154 if (matches) for (var i = 0; i < matches.length; i++) { 7155 lang = matches[i].replace(re, "$1"); 7156 if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]); 7157 } 7158 return s; 7159}, 7160 7161 7162setClickEvents : function () { 7163 var els = document.getElementsByTagName('a'); 7164 for (var i = 0; i < els.length; i++) { 7165 var type = hs.isUnobtrusiveAnchor(els[i]); 7166 if (type && !els[i].hsHasSetClick) { 7167 (function(){ 7168 var t = type; 7169 if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) { 7170 els[i].onclick =(type == 'image') ?function() { return hs.expand(this) }: 7171 function() { return hs.htmlExpand(this, { objectType: t } );}; 7172 } 7173 })(); 7174 els[i].hsHasSetClick = true; 7175 } 7176 } 7177 hs.getAnchors(); 7178}, 7179isUnobtrusiveAnchor: function(el) { 7180 if (el.rel == 'highslide') return 'image'; 7181 else if (el.rel == 'highslide-ajax') return 'ajax'; 7182 else if (el.rel == 'highslide-iframe') return 'iframe'; 7183 else if (el.rel == 'highslide-swf') return 'swf'; 7184}, 7185 7186getCacheBinding : function (a) { 7187 for (var i = 0; i < hs.cacheBindings.length; i++) { 7188 if (hs.cacheBindings[i][0] == a) { 7189 var c = hs.cacheBindings[i][1]; 7190 hs.cacheBindings[i][1] = c.cloneNode(1); 7191 return c; 7192 } 7193 } 7194 return null; 7195}, 7196 7197preloadAjax : function (e) { 7198 var arr = hs.getAnchors(); 7199 for (var i = 0; i < arr.htmls.length; i++) { 7200 var a = arr.htmls[i]; 7201 if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax')) 7202 hs.push(hs.preloadTheseAjax, a); 7203 } 7204 7205 hs.preloadAjaxElement(0); 7206}, 7207 7208preloadAjaxElement : function (i) { 7209 if (!hs.preloadTheseAjax[i]) return; 7210 var a = hs.preloadTheseAjax[i]; 7211 var cache = hs.getNode(hs.getParam(a, 'contentId')); 7212 if (!cache) cache = hs.getSelfRendered(); 7213 var ajax = new hs.Ajax(a, cache, 1); 7214 ajax.onError = function () { }; 7215 ajax.onLoad = function () { 7216 hs.push(hs.cacheBindings, [a, cache]); 7217 hs.preloadAjaxElement(i + 1); 7218 }; 7219 ajax.run(); 7220}, 7221 7222focusTopmost : function() { 7223 var topZ = 0, 7224 topmostKey = -1, 7225 expanders = hs.expanders, 7226 exp, 7227 zIndex; 7228 for (var i = 0; i < expanders.length; i++) { 7229 exp = expanders[i];
7230 if (exp) { 7231 zIndex = exp.wrapper.style.zIndex; 7232 if (zIndex && zIndex > topZ) { 7233 topZ = zIndex; 7234 topmostKey = i; 7235 } 7236 } 7237 } 7238 if (topmostKey == -1) hs.focusKey = -1; 7239 else expanders[topmostKey].focus(); 7240}, 7241 7242getParam : function (a, param) { 7243 a.getParams = a.onclick; 7244 var p = a.getParams ? a.getParams() : null; 7245 a.getParams = null; 7246 7247 return (p && typeof p[param] != 'undefined') ? p[param] : 7248 (typeof hs[param] != 'undefined' ? hs[param] : null); 7249}, 7250 7251getSrc : function (a) { 7252 var src = hs.getParam(a, 'src'); 7253 if (src) return src; 7254 return a.href; 7255}, 7256 7257getNode : function (id) { 7258 var node = hs.jQuery(id), clone = hs.clones[id], a = {}; 7259 if (!node && !clone) return null; 7260 if (!clone) { 7261 clone = node.cloneNode(true); 7262 clone.id = ''; 7263 hs.clones[id] = clone; 7264 return node; 7265 } else { 7266 return clone.cloneNode(true); 7267 } 7268}, 7269 7270discardElement : function(d) { 7271 if (d) hs.garbageBin.appendChild(d); 7272 hs.garbageBin.innerHTML = ''; 7273}, 7274dim : function(exp) { 7275 if (!hs.dimmer) { 7276 hs.dimmer = hs.createElement ('div', { 7277 className: 'highslide-dimming highslide-viewport-size', 7278 owner: '', 7279 onclick: function() { 7280 if (hs.fireEvent(hs, 'onDimmerClick')) 7281 7282 hs.close(); 7283 } 7284 }, { 7285 visibility: 'visible', 7286 opacity: 0 7287 }, hs.container, true); 7288 } 7289 7290 hs.dimmer.style.display = ''; 7291 7292 hs.dimmer.owner += '|'+ exp.key; 7293 if (hs.geckoMac && hs.dimmingGeckoFix) 7294 hs.setStyles(hs.dimmer, { 7295 background: 'url('+ hs.graphicsDir + 'geckodimmer.png)', 7296 opacity: 1 7297 }); 7298 else 7299 hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration); 7300}, 7301undim : function(key) { 7302 if (!hs.dimmer) return; 7303 if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, ''); 7304 7305 if ( 7306 (typeof key != 'undefined' && hs.dimmer.owner != '') 7307 || (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity')) 7308 ) return; 7309 7310 if (hs.geckoMac && hs.dimmingGeckoFix) hs.dimmer.style.display = 'none'; 7311 else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() { 7312 hs.dimmer.style.display = 'none'; 7313 }); 7314}, 7315transit : function (adj, exp) { 7316 var last = exp || hs.getExpander(); 7317 exp = last; 7318 if (hs.upcoming) return false; 7319 else hs.last = last; 7320 hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 7321 try { 7322 hs.upcoming = adj; 7323 adj.onclick(); 7324 } catch (e){ 7325 hs.last = hs.upcoming = null; 7326 } 7327 try { 7328 if (!adj || exp.transitions[1] != 'crossfade') 7329 exp.close(); 7330 } catch (e) {} 7331 return false; 7332}, 7333 7334previousOrNext : function (el, op) { 7335 var exp = hs.getExpander(el); 7336 if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp); 7337 else return false; 7338}, 7339 7340previous : function (el) { 7341 return hs.previousOrNext(el, -1); 7342}, 7343 7344next : function (el) { 7345 return hs.previousOrNext(el, 1); 7346}, 7347 7348keyHandler : function(e) { 7349 if (!e) e = window.event; 7350 if (!e.target) e.target = e.srcElement; // ie 7351 if (typeof e.target.form != 'undefined') return true; // form element has focus 7352 if (!hs.fireEvent(hs, 'onKeyDown', e)) return true; 7353 var exp = hs.getExpander(); 7354 7355 var op = null; 7356 switch (e.keyCode) { 7357 case 70: // f 7358 if (exp) exp.doFullExpand(); 7359 return true; 7360 case 32: // Space 7361 op = 2; 7362 break; 7363 case 34: // Page Down 7364 case 39: // Arrow right 7365 case 40: // Arrow down 7366 op = 1; 7367 break; 7368 case 8: // Backspace 7369 case 33: // Page Up 7370 case 37: // Arrow left 7371 case 38: // Arrow up 7372 op = -1; 7373 break; 7374 case 27: // Escape 7375 case 13: // Enter 7376 op = 0; 7377 } 7378 if (op !== null) { 7379 hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 7380 if (!hs.enableKeyListener) return true; 7381 7382 if (e.preventDefault) e.preventDefault(); 7383 else e.returnValue = false; 7384 if (exp) { 7385 if (op == 0) { 7386 exp.close(); 7387 } else if (op == 2) { 7388 if (exp.slideshow) exp.slideshow.hitSpace(); 7389 } else { 7390 if (exp.slideshow) exp.slideshow.pause(); 7391 hs.previousOrNext(exp.key, op); 7392 } 7393 return false; 7394 } 7395 } 7396 return true; 7397}, 7398 7399 7400registerOverlay : function (overlay) { 7401 hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } )); 7402}, 7403 7404 7405addSlideshow : function (options) { 7406 var sg = options.slideshowGroup; 7407 if (typeof sg == 'object') { 7408 for (var i = 0; i < sg.length; i++) { 7409 var o = {}; 7410 for (var x in options) o[x] = options[x]; 7411 o.slideshowGroup = sg[i]; 7412 hs.push(hs.slideshows, o); 7413 } 7414 } else { 7415 hs.push(hs.slideshows, options); 7416 } 7417}, 7418 7419getWrapperKey : function (element, expOnly) { 7420 var el, re = /^highslide-wrapper-([0-9]+)$/; 7421 // 1. look in open expanders 7422 el = element; 7423 while (el.parentNode) { 7424 if (el.hsKey !== undefined) return el.hsKey; 7425 if (el.id && re.test(el.id)) return el.id.replace(re, "$1"); 7426 el = el.parentNode; 7427 } 7428 // 2. look in thumbnail 7429 if (!expOnly) { 7430 el = element; 7431 while (el.parentNode) { 7432 if (el.tagName && hs.isHsAnchor(el)) { 7433 for (var key = 0; key < hs.expanders.length; key++) { 7434 var exp = hs.expanders[key]; 7435 if (exp && exp.a == el) return key; 7436 } 7437 } 7438 el = el.parentNode; 7439 } 7440 } 7441 return null; 7442}, 7443 7444getExpander : function (el, expOnly) { 7445 if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null; 7446 if (typeof el == 'number') return hs.expanders[el] || null; 7447 if (typeof el == 'string') el = hs.jQuery(el); 7448 return hs.expanders[hs.getWrapperKey(el, expOnly)] || null; 7449}, 7450 7451isHsAnchor : function (a) { 7452 return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); 7453}, 7454 7455reOrder : function () { 7456 for (var i = 0; i < hs.expanders.length; i++)
7457 if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); 7458}, 7459fireEvent : function (obj, evt, args) { 7460 return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true; 7461}, 7462 7463mouseClickHandler : function(e) 7464{ 7465 if (!e) e = window.event; 7466 if (e.button > 1) return true; 7467 if (!e.target) e.target = e.srcElement; 7468 7469 var el = e.target; 7470 while (el.parentNode 7471 && !(/highslide-(image|move|html|resize)/.test(el.className))) 7472 { 7473 el = el.parentNode; 7474 } 7475 var exp = hs.getExpander(el); 7476 if (exp && (exp.isClosing || !exp.isExpanded)) return true; 7477 7478 if (exp && e.type == 'mousedown') { 7479 if (e.target.form) return true; 7480 var match = el.className.match(/highslide-(image|move|resize)/); 7481 if (match) { 7482 hs.dragArgs = { 7483 exp: exp , 7484 type: match[1], 7485 left: exp.x.pos, 7486 width: exp.x.size, 7487 top: exp.y.pos, 7488 height: exp.y.size, 7489 clickX: e.clientX, 7490 clickY: e.clientY 7491 }; 7492 7493 7494 hs.addEventListener(document, 'mousemove', hs.dragHandler); 7495 if (e.preventDefault) e.preventDefault(); // FF 7496 7497 if (/highslide-(image|html)-blur/.test(exp.content.className)) { 7498 exp.focus(); 7499 hs.hasFocused = true; 7500 } 7501 return false; 7502 } 7503 else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) { 7504 exp.focus(); 7505 exp.doShowHide('hidden'); 7506 } 7507 } else if (e.type == 'mouseup') { 7508 7509 hs.removeEventListener(document, 'mousemove', hs.dragHandler); 7510 7511 if (hs.dragArgs) { 7512 if (hs.styleRestoreCursor && hs.dragArgs.type == 'image') 7513 hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor; 7514 var hasDragged = hs.dragArgs.hasDragged; 7515 7516 if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { 7517 if (hs.fireEvent(exp, 'onImageClick')) 7518 exp.close(); 7519 } 7520 else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) { 7521 hs.dragArgs.exp.doShowHide('hidden'); 7522 } 7523 7524 if (hs.dragArgs.exp.releaseMask) 7525 hs.dragArgs.exp.releaseMask.style.display = 'none'; 7526 7527 if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs); 7528 hs.hasFocused = false; 7529 hs.dragArgs = null; 7530 7531 } else if (/highslide-image-blur/.test(el.className)) { 7532 el.style.cursor = hs.styleRestoreCursor; 7533 } 7534 } 7535 return false; 7536}, 7537 7538dragHandler : function(e) 7539{ 7540 if (!hs.dragArgs) return true; 7541 if (!e) e = window.event; 7542 var a = hs.dragArgs, exp = a.exp; 7543 if (exp.iframe) { 7544 if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null, 7545 { position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px', 7546 left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ie ? 'white' : 'none'), 7547 opacity: 0.01 }, 7548 exp.wrapper, true); 7549 if (exp.releaseMask.style.display == 'none') 7550 exp.releaseMask.style.display = ''; 7551 } 7552 7553 a.dX = e.clientX - a.clickX; 7554 a.dY = e.clientY - a.clickY; 7555 7556 var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2)); 7557 if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0) 7558 || (distance > (hs.dragSensitivity || 5)); 7559 7560 if (a.hasDragged && e.clientX > 5 && e.clientY > 5) { 7561 if (!hs.fireEvent(exp, 'onDrag', a)) return false; 7562 7563 if (a.type == 'resize') exp.resize(a); 7564 else { 7565 exp.moveTo(a.left + a.dX, a.top + a.dY); 7566 if (a.type == 'image') exp.content.style.cursor = 'move'; 7567 } 7568 } 7569 return false; 7570}, 7571 7572wrapperMouseHandler : function (e) { 7573 try { 7574 if (!e) e = window.event; 7575 var over = /mouseover/i.test(e.type); 7576 if (!e.target) e.target = e.srcElement; // ie 7577 if (hs.ie) e.relatedTarget = 7578 over ? e.fromElement : e.toElement; // ie 7579 var exp = hs.getExpander(e.target); 7580 if (!exp.isExpanded) return; 7581 if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp 7582 || hs.dragArgs) return; 7583 hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e); 7584 for (var i = 0; i < exp.overlays.length; i++) (function() { 7585 var o = hs.jQuery('hsId'+ exp.overlays[i]); 7586 if (o && o.hideOnMouseOut) { 7587 if (over) hs.setStyles(o, { visibility: 'visible', display: '' }); 7588 hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur); 7589 } 7590 })(); 7591 } catch (e) {} 7592}, 7593addEventListener : function (el, event, func) { 7594 if (el == document && event == 'ready') { 7595 hs.push(hs.onReady, func); 7596 } 7597 try { 7598 el.addEventListener(event, func, false); 7599 } catch (e) { 7600 try { 7601 el.detachEvent('on'+ event, func); 7602 el.attachEvent('on'+ event, func); 7603 } catch (e) { 7604 el['on'+ event] = func; 7605 } 7606 } 7607}, 7608 7609removeEventListener : function (el, event, func) { 7610 try { 7611 el.removeEventListener(event, func, false); 7612 } catch (e) { 7613 try { 7614 el.detachEvent('on'+ event, func); 7615 } catch (e) { 7616 el['on'+ event] = null; 7617 } 7618 } 7619}, 7620 7621preloadFullImage : function (i) { 7622 if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { 7623 var img = document.createElement('img'); 7624 img.onload = function() { 7625 img = null; 7626 hs.preloadFullImage(i + 1); 7627 }; 7628 img.src = hs.preloadTheseImages[i]; 7629 } 7630}, 7631preloadImages : function (number) { 7632 if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; 7633 7634 var arr = hs.getAnchors();
7635 for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) { 7636 hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i])); 7637 } 7638 7639 // preload outlines 7640 if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} ); 7641 else 7642 7643 hs.preloadFullImage(0); 7644 7645 // preload cursor 7646 if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor }); 7647}, 7648 7649 7650init : function () { 7651 if (!hs.container) { 7652 7653 hs.getPageSize(); 7654 hs.ieLt7 = hs.ie && hs.uaVersion < 7; 7655 hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:'; 7656 for (var x in hs.langDefaults) { 7657 if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x]; 7658 else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') 7659 hs.lang[x] = hs.langDefaults[x]; 7660 } 7661 7662 hs.container = hs.createElement('div', { 7663 className: 'highslide-container' 7664 }, { 7665 position: 'absolute', 7666 left: 0, 7667 top: 0, 7668 width: '100%', 7669 zIndex: hs.zIndexCounter, 7670 direction: 'ltr' 7671 }, 7672 document.body, 7673 true 7674 ); 7675 hs.loading = hs.createElement('a', { 7676 className: 'highslide-loading', 7677 title: hs.lang.loadingTitle, 7678 innerHTML: hs.lang.loadingText, 7679 href: 'javascript:;' 7680 }, { 7681 position: 'absolute', 7682 top: '-9999px', 7683 opacity: hs.loadingOpacity, 7684 zIndex: 1 7685 }, hs.container 7686 ); 7687 hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container); 7688 hs.viewport = hs.createElement('div', { 7689 className: 'highslide-viewport highslide-viewport-size' 7690 }, { 7691 visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden' 7692 }, hs.container, 1 7693 ); 7694 hs.clearing = hs.createElement('div', null, 7695 { clear: 'both', paddingTop: '1px' }, null, true); 7696 7697 // http://www.robertpenner.com/easing/ 7698 Math.linearTween = function (t, b, c, d) { 7699 return c*t/d + b; 7700 }; 7701 Math.easeInQuad = function (t, b, c, d) { 7702 return c*(t/=d)*t + b; 7703 }; 7704 Math.easeOutQuad = function (t, b, c, d) { 7705 return -c *(t/=d)*(t-2) + b; 7706 }; 7707 7708 hs.hideSelects = hs.ieLt7; 7709 hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE' 7710 || (hs.ie && hs.uaVersion < 5.5)); 7711 hs.fireEvent(this, 'onActivate'); 7712 } 7713}, 7714ready : function() { 7715 if (hs.isReady) return; 7716 hs.isReady = true; 7717 for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i](); 7718}, 7719 7720updateAnchors : function() { 7721 var el, els, all = [], images = [], htmls = [],groups = {}, re; 7722 7723 for (var i = 0; i < hs.openerTagNames.length; i++) { 7724 els = document.getElementsByTagName(hs.openerTagNames[i]); 7725 for (var j = 0; j < els.length; j++) { 7726 el = els[j]; 7727 re = hs.isHsAnchor(el); 7728 if (re) { 7729 hs.push(all, el); 7730 if (re[0] == 'hs.expand') hs.push(images, el); 7731 else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el); 7732 var g = hs.getParam(el, 'slideshowGroup') || 'none'; 7733 if (!groups[g]) groups[g] = []; 7734 hs.push(groups[g], el); 7735 } 7736 } 7737 } 7738 hs.anchors = { all: all, groups: groups, images: images, htmls: htmls }; 7739 return hs.anchors; 7740 7741}, 7742 7743getAnchors : function() { 7744 return hs.anchors || hs.updateAnchors(); 7745}, 7746 7747 7748close : function(el) { 7749 var exp = hs.getExpander(el); 7750 if (exp) exp.close(); 7751 return false; 7752} 7753}; // end hs object 7754hs.fx = function( elem, options, prop ){ 7755 this.options = options; 7756 this.elem = elem; 7757 this.prop = prop; 7758 7759 if (!options.orig) options.orig = {}; 7760}; 7761hs.fx.prototype = { 7762 update: function(){ 7763 (hs.fx.step[this.prop] || hs.fx.step._default)(this); 7764 7765 if (this.options.step) 7766 this.options.step.call(this.elem, this.now, this); 7767 7768 }, 7769 custom: function(from, to, unit){ 7770 this.startTime = (new Date()).getTime(); 7771 this.start = from; 7772 this.end = to; 7773 this.unit = unit;// || this.unit || "px"; 7774 this.now = this.start; 7775 this.pos = this.state = 0; 7776 7777 var self = this; 7778 function t(gotoEnd){ 7779 return self.step(gotoEnd); 7780 } 7781 7782 t.elem = this.elem; 7783 7784 if ( t() && hs.timers.push(t) == 1 ) { 7785 hs.timerId = setInterval(function(){ 7786 var timers = hs.timers; 7787 7788 for ( var i = 0; i < timers.length; i++ ) 7789 if ( !timers[i]() ) 7790 timers.splice(i--, 1); 7791 7792 if ( !timers.length ) { 7793 clearInterval(hs.timerId); 7794 } 7795 }, 13); 7796 } 7797 }, 7798 step: function(gotoEnd){ 7799 var t = (new Date()).getTime(); 7800 if ( gotoEnd || t >= this.options.duration + this.startTime ) { 7801 this.now = this.end; 7802 this.pos = this.state = 1; 7803 this.update(); 7804 7805 this.options.curAnim[ this.prop ] = true; 7806 7807 var done = true; 7808 for ( var i in this.options.curAnim ) 7809 if ( this.options.curAnim[i] !== true ) 7810 done = false; 7811 7812 if ( done ) { 7813 if (this.options.complete) this.options.complete.call(this.elem); 7814 } 7815 return false; 7816 } else { 7817 var n = t - this.startTime; 7818 this.state = n / this.options.duration; 7819 this.pos = this.options.easing(n, 0, 1, this.options.duration);
7820 this.now = this.start + ((this.end - this.start) * this.pos); 7821 this.update(); 7822 } 7823 return true; 7824 } 7825 7826}; 7827 7828hs.extend( hs.fx, { 7829 step: { 7830 7831 opacity: function(fx){ 7832 hs.setStyles(fx.elem, { opacity: fx.now }); 7833 }, 7834 7835 _default: function(fx){ 7836 try { 7837 if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) 7838 fx.elem.style[ fx.prop ] = fx.now + fx.unit; 7839 else 7840 fx.elem[ fx.prop ] = fx.now; 7841 } catch (e) {} 7842 } 7843 } 7844}); 7845 7846hs.Outline = function (outlineType, onLoad) { 7847 this.onLoad = onLoad; 7848 this.outlineType = outlineType; 7849 var v = hs.uaVersion, tr; 7850 7851 this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7; 7852 if (!outlineType) { 7853 if (onLoad) onLoad(); 7854 return; 7855 } 7856 7857 hs.init(); 7858 this.table = hs.createElement( 7859 'table', { 7860 cellSpacing: 0 7861 }, { 7862 visibility: 'hidden', 7863 position: 'absolute', 7864 borderCollapse: 'collapse', 7865 width: 0 7866 }, 7867 hs.container, 7868 true 7869 ); 7870 var tbody = hs.createElement('tbody', null, null, this.table, 1); 7871 7872 this.td = []; 7873 for (var i = 0; i <= 8; i++) { 7874 if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true); 7875 this.td[i] = hs.createElement('td', null, null, tr, true); 7876 var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' }; 7877 hs.setStyles(this.td[i], style); 7878 }
7879 this.td[4].className = outlineType +' highslide-outline'; 7880 7881 this.preloadGraphic(); 7882}; 7883 7884hs.Outline.prototype = { 7885preloadGraphic : function () { 7886 var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png"; 7887 7888 var appendTo = hs.safari && hs.uaVersion < 525 ? hs.container : null; 7889 this.graphic = hs.createElement('img', null, { position: 'absolute', 7890 top: '-9999px' }, appendTo, true); // for onload trigger 7891 7892 var pThis = this; 7893 this.graphic.onload = function() { pThis.onGraphicLoad(); }; 7894 7895 this.graphic.src = src; 7896}, 7897 7898onGraphicLoad : function () { 7899 var o = this.offset = this.graphic.width / 4, 7900 pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]], 7901 dim = { height: (2*o) +'px', width: (2*o) +'px' }; 7902 for (var i = 0; i <= 8; i++) { 7903 if (pos[i]) { 7904 if (this.hasAlphaImageLoader) { 7905 var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px'; 7906 var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true); 7907 hs.createElement ('div', null, { 7908 filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')", 7909 position: 'absolute', 7910 width: w, 7911 height: this.graphic.height +'px', 7912 left: (pos[i][0]*o)+'px', 7913 top: (pos[i][1]*o)+'px' 7914 }, 7915 div, 7916 true); 7917 } else { 7918 hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'}); 7919 } 7920 7921 if (window.opera && (i == 3 || i ==5)) 7922 hs.createElement('div', null, dim, this.td[i], true); 7923 7924 hs.setStyles (this.td[i], dim); 7925 } 7926 } 7927 this.graphic = null; 7928 if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy(); 7929 hs.pendingOutlines[this.outlineType] = this; 7930 if (this.onLoad) this.onLoad(); 7931}, 7932 7933setPosition : function (pos, offset, vis, dur, easing) { 7934 var exp = this.exp, 7935 stl = exp.wrapper.style, 7936 offset = offset || 0, 7937 pos = pos || { 7938 x: exp.x.pos + offset, 7939 y: exp.y.pos + offset, 7940 w: exp.x.get('wsize') - 2 * offset, 7941 h: exp.y.get('wsize') - 2 * offset 7942 }; 7943 if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset) 7944 ? 'visible' : 'hidden'; 7945 hs.setStyles(this.table, { 7946 left: (pos.x - this.offset) +'px', 7947 top: (pos.y - this.offset) +'px', 7948 width: (pos.w + 2 * this.offset) +'px' 7949 }); 7950 7951 pos.w -= 2 * this.offset; 7952 pos.h -= 2 * this.offset; 7953 hs.setStyles (this.td[4], { 7954 width: pos.w >= 0 ? pos.w +'px' : 0, 7955 height: pos.h >= 0 ? pos.h +'px' : 0 7956 }); 7957 if (this.hasAlphaImageLoader) this.td[3].style.height 7958 = this.td[5].style.height = this.td[4].style.height; 7959 7960}, 7961 7962destroy : function(hide) { 7963 if (hide) this.table.style.visibility = 'hidden'; 7964 else hs.discardElement(this.table); 7965} 7966}; 7967 7968hs.Dimension = function(exp, dim) { 7969 this.exp = exp; 7970 this.dim = dim; 7971 this.ucwh = dim == 'x' ? 'Width' : 'Height'; 7972 this.wh = this.ucwh.toLowerCase(); 7973 this.uclt = dim == 'x' ? 'Left' : 'Top'; 7974 this.lt = this.uclt.toLowerCase(); 7975 this.ucrb = dim == 'x' ? 'Right' : 'Bottom'; 7976 this.rb = this.ucrb.toLowerCase(); 7977 this.p1 = this.p2 = 0; 7978}; 7979hs.Dimension.prototype = { 7980get : function(key) { 7981 switch (key) { 7982 case 'loadingPos': 7983 return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2; 7984 case 'loadingPosXfade': 7985 return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2; 7986 case 'wsize': 7987 return this.size + 2 * this.cb + this.p1 + this.p2; 7988 case 'fitsize': 7989 return this.clientSize - this.marginMin - this.marginMax; 7990 case 'maxsize': 7991 return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ; 7992 case 'opos': 7993 return this.pos - (this.exp.outline ? this.exp.outline.offset : 0); 7994 case 'osize': 7995 return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0); 7996 case 'imgPad': 7997 return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0; 7998 7999 } 8000}, 8001calcBorders: function() { 8002 // correct for borders 8003 this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2; 8004 8005 this.marginMax = hs['margin'+ this.ucrb]; 8006}, 8007calcThumb: function() { 8008 this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : 8009 this.exp.el['offset'+ this.ucwh]; 8010 this.tpos = this.exp.tpos[this.dim]; 8011 this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2; 8012 if (this.tpos == 0 || this.tpos == -1) { 8013 this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt]; 8014 }; 8015}, 8016calcExpanded: function() { 8017 var exp = this.exp; 8018 this.justify = 'auto'; 8019 8020 // get alignment 8021 if (exp.align == 'center') this.justify = 'center'; 8022 else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null; 8023 else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max'; 8024 8025 8026 // size and position 8027 this.pos = this.tpos - this.cb + this.tb; 8028 8029 if (this.maxHeight && this.dim == 'x') 8030 exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full); 8031 8032 this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full); 8033 this.minSize = exp.allowSizeReduction ? 8034 Math.min(exp['min'+ this.ucwh], this.full) :this.full; 8035 if (exp.isImage && exp.useBox) { 8036 this.size = exp[this.wh]; 8037 this.imgSize = this.full; 8038 } 8039 if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth; 8040 this.target = exp['target'+ this.dim.toUpperCase()]; 8041 this.marginMin = hs['margin'+ this.uclt]; 8042 this.scroll = hs.page['scroll'+ this.uclt]; 8043 this.clientSize = hs.page[this.wh]; 8044}, 8045setSize: function(i) { 8046 var exp = this.exp; 8047 if (exp.isImage && (exp.useBox || hs.padToMinWidth)) { 8048 this.imgSize = i; 8049 this.size = Math.max(this.size, this.imgSize); 8050 exp.content.style[this.lt] = this.get('imgPad')+'px'; 8051 } else 8052 this.size = i; 8053 8054 exp.content.style[this.wh] = i +'px'; 8055 exp.wrapper.style[this.wh] = this.get('wsize') +'px'; 8056 if (exp.outline) exp.outline.setPosition(); 8057 if (exp.releaseMask) exp.releaseMask.style[this.wh] = i +'px'; 8058 if (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try { 8059 exp.iDoc.body.style.overflow = 'auto'; 8060 } catch (e) {} 8061 if (exp.isHtml) { 8062 var d = exp.scrollerDiv; 8063 if (this.sizeDiff === undefined) 8064 this.sizeDiff = exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh]; 8065 d.style[this.wh] = (this.size - this.sizeDiff) +'px'; 8066 8067 if (this.dim == 'x') exp.mediumContent.style.width = 'auto'; 8068 if (exp.body) exp.body.style[this.wh] = 'auto'; 8069 } 8070 if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true); 8071 if (this.dim == 'x' && exp.slideshow && exp.isImage) { 8072 if (i == this.full) exp.slideshow.disable('full-expand'); 8073 else exp.slideshow.enable('full-expand'); 8074 } 8075}, 8076setPos: function(i) { 8077 this.pos = i; 8078 this.exp.wrapper.style[this.lt] = i +'px'; 8079 8080 if (this.exp.outline) this.exp.outline.setPosition(); 8081 8082} 8083}; 8084 8085hs.Expander = function(a, params, custom, contentType) { 8086 if (document.readyState && hs.ie && !hs.isReady) { 8087 hs.addEventListener(document, 'ready', function() { 8088 new hs.Expander(a, params, custom, contentType); 8089 }); 8090 return; 8091 } 8092 this.a = a; 8093 this.custom = custom; 8094 this.contentType = contentType || 'image'; 8095 this.isHtml = (contentType == 'html'); 8096 this.isImage = !this.isHtml; 8097 8098 hs.continuePreloading = false; 8099 this.overlays = []; 8100 this.last = hs.last; 8101 hs.last = null; 8102 hs.init(); 8103 var key = this.key = hs.expanders.length; 8104 // override inline parameters 8105 for (var i = 0; i < hs.overrides.length; i++) { 8106 var name = hs.overrides[i];
8107 this[name] = params && typeof params[name] != 'undefined' ? 8108 params[name] : hs[name]; 8109 } 8110 if (!this.src) this.src = a.href; 8111 8112 // get thumb 8113 var el = (params && params.thumbnailId) ? hs.jQuery(params.thumbnailId) : a; 8114 el = this.thumb = el.getElementsByTagName('img')[0] || el; 8115 this.thumbsUserSetId = el.id || a.id; 8116 if (!hs.fireEvent(this, 'onInit')) return true; 8117 8118 // check if already open 8119 for (var i = 0; i < hs.expanders.length; i++) { 8120 if (hs.expanders[i] && hs.expanders[i].a == a 8121 && !(this.last && this.transitions[1] == 'crossfade')) { 8122 hs.expanders[i].focus(); 8123 return false; 8124 } 8125 } 8126 8127 // cancel other 8128 if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) { 8129 if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { 8130 hs.expanders[i].cancelLoading(); 8131 } 8132 } 8133 hs.expanders[key] = this; 8134 if (!hs.allowMultipleInstances && !hs.upcoming) { 8135 if (hs.expanders[key-1]) hs.expanders[key-1].close(); 8136 if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey]) 8137 hs.expanders[hs.focusKey].close(); 8138 } 8139 8140 // initiate metrics 8141 this.el = el; 8142 this.tpos = this.pageOrigin || hs.getPosition(el); 8143 hs.getPageSize(); 8144 var x = this.x = new hs.Dimension(this, 'x'); 8145 x.calcThumb(); 8146 var y = this.y = new hs.Dimension(this, 'y'); 8147 y.calcThumb(); 8148 if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el); 8149 this.wrapper = hs.createElement( 8150 'div', { 8151 id: 'highslide-wrapper-'+ this.key, 8152 className: 'highslide-wrapper '+ this.wrapperClassName 8153 }, { 8154 visibility: 'hidden', 8155 position: 'absolute', 8156 zIndex: hs.zIndexCounter += 2 8157 }, null, true ); 8158 8159 this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler; 8160 if (this.contentType == 'image' && this.outlineWhileAnimating == 2) 8161 this.outlineWhileAnimating = 0; 8162 8163 // get the outline 8164 if (!this.outlineType 8165 || (this.last && this.isImage && this.transitions[1] == 'crossfade')) { 8166 this[this.contentType +'Create'](); 8167 8168 } else if (hs.pendingOutlines[this.outlineType]) { 8169 this.connectOutline(); 8170 this[this.contentType +'Create'](); 8171 8172 } else { 8173 this.showLoading(); 8174 var exp = this; 8175 new hs.Outline(this.outlineType, 8176 function () { 8177 exp.connectOutline(); 8178 exp[exp.contentType +'Create'](); 8179 } 8180 ); 8181 } 8182 return true; 8183}; 8184 8185hs.Expander.prototype = { 8186error : function(e) { 8187 if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message); 8188 else window.location.href = this.src; 8189}, 8190 8191connectOutline : function() { 8192 var outline = this.outline = hs.pendingOutlines[this.outlineType]; 8193 outline.exp = this; 8194 outline.table.style.zIndex = this.wrapper.style.zIndex - 1; 8195 hs.pendingOutlines[this.outlineType] = null; 8196}, 8197 8198showLoading : function() { 8199 if (this.onLoadStarted || this.loading) return; 8200 8201 this.loading = hs.loading; 8202 var exp = this; 8203 this.loading.onclick = function() { 8204 exp.cancelLoading(); 8205 }; 8206 8207 8208 if (!hs.fireEvent(this, 'onShowLoading')) return; 8209 var exp = this, 8210 l = this.x.get('loadingPos') +'px', 8211 t = this.y.get('loadingPos') +'px'; 8212 if (!tgt && this.last && this.transitions[1] == 'crossfade') 8213 var tgt = this.last; 8214 if (tgt) { 8215 l = tgt.x.get('loadingPosXfade') +'px'; 8216 t = tgt.y.get('loadingPosXfade') +'px'; 8217 this.loading.style.zIndex = hs.zIndexCounter++; 8218 } 8219 setTimeout(function () { 8220 if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })} 8221 , 100); 8222}, 8223 8224imageCreate : function() { 8225 var exp = this; 8226 8227 var img = document.createElement('img'); 8228 this.content = img; 8229 img.onload = function () { 8230 if (hs.expanders[exp.key]) exp.contentLoaded(); 8231 }; 8232 if (hs.blockRightClick) img.oncontextmenu = function() { return false; }; 8233 img.className = 'highslide-image'; 8234 hs.setStyles(img, { 8235 visibility: 'hidden', 8236 display: 'block', 8237 position: 'absolute', 8238 maxWidth: '9999px', 8239 zIndex: 3 8240 }); 8241 img.title = hs.lang.restoreTitle; 8242 if (hs.safari && hs.uaVersion < 525) hs.container.appendChild(img); 8243 if (hs.ie && hs.flushImgSize) img.src = null; 8244 img.src = this.src; 8245 8246 this.showLoading(); 8247}, 8248 8249htmlCreate : function () { 8250 if (!hs.fireEvent(this, 'onBeforeGetContent')) return; 8251 8252 this.content = hs.getCacheBinding(this.a); 8253 if (!this.content) 8254 this.content = hs.getNode(this.contentId); 8255 if (!this.content) 8256 this.content = hs.getSelfRendered(); 8257 this.getInline(['maincontent']); 8258 if (this.maincontent) { 8259 var body = hs.getElementByClass(this.content, 'div', 'highslide-body'); 8260 if (body) body.appendChild(this.maincontent); 8261 this.maincontent.style.display = 'block'; 8262 } 8263 hs.fireEvent(this, 'onAfterGetContent'); 8264 8265 var innerContent = this.innerContent = this.content; 8266 8267 if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent); 8268 8269 // the content tree 8270 hs.container.appendChild(this.wrapper); 8271 hs.setStyles( this.wrapper, { 8272 position: 'static', 8273 padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px' 8274 }); 8275 this.content = hs.createElement( 8276 'div', { 8277 className: 'highslide-html' 8278 }, { 8279 position: 'relative', 8280 zIndex: 3, 8281 height: 0, 8282 overflow: 'hidden' 8283 }, 8284 this.wrapper 8285 ); 8286 this.mediumContent = hs.createElement('div', null, null, this.content, 1); 8287 this.mediumContent.appendChild(innerContent); 8288 8289 hs.setStyles (innerContent, { 8290 position: 'relative', 8291 display: 'block', 8292 direction: hs.lang.cssDirection || '' 8293 }); 8294 if (this.width) innerContent.style.width = this.width +'px'; 8295 if (this.height) hs.setStyles(innerContent, { 8296 height: this.height +'px', 8297 overflow: 'hidden' 8298 }); 8299 if (innerContent.offsetWidth < this.minWidth) 8300 innerContent.style.width = this.minWidth +'px'; 8301 8302 8303 8304 if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) { 8305 this.showLoading(); 8306 var exp = this; 8307 var ajax = new hs.Ajax(this.a, innerContent); 8308 ajax.src = this.src;
8309 ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); }; 8310 ajax.onError = function () { location.href = exp.src; }; 8311 ajax.run(); 8312 } 8313 else 8314 8315 if (this.objectType == 'iframe' && this.objectLoadTime == 'before') { 8316 this.writeExtendedContent(); 8317 } 8318 else 8319 this.contentLoaded(); 8320}, 8321 8322contentLoaded : function() { 8323 try { 8324 if (!this.content) return; 8325 this.content.onload = null; 8326 if (this.onLoadStarted) return; 8327 else this.onLoadStarted = true; 8328 8329 var x = this.x, y = this.y; 8330 8331 if (this.loading) { 8332 hs.setStyles(this.loading, { top: '-9999px' }); 8333 this.loading = null; 8334 hs.fireEvent(this, 'onHideLoading'); 8335 } 8336 if (this.isImage) { 8337 x.full = this.content.width; 8338 y.full = this.content.height; 8339 8340 hs.setStyles(this.content, { 8341 width: x.t +'px', 8342 height: y.t +'px' 8343 }); 8344 this.wrapper.appendChild(this.content); 8345 hs.container.appendChild(this.wrapper); 8346 } else if (this.htmlGetSize) this.htmlGetSize(); 8347 8348 x.calcBorders(); 8349 y.calcBorders(); 8350 8351 hs.setStyles (this.wrapper, { 8352 left: (x.tpos + x.tb - x.cb) +'px', 8353 top: (y.tpos + x.tb - y.cb) +'px' 8354 }); 8355 8356 8357 this.initSlideshow(); 8358 this.getOverlays(); 8359 8360 var ratio = x.full / y.full; 8361 x.calcExpanded(); 8362 this.justify(x); 8363 8364 y.calcExpanded(); 8365 this.justify(y); 8366 if (this.isHtml) this.htmlSizeOperations(); 8367 if (this.overlayBox) this.sizeOverlayBox(0, 1); 8368 8369 8370 if (this.allowSizeReduction) { 8371 if (this.isImage) 8372 this.correctRatio(ratio); 8373 else this.fitOverlayBox(); 8374 var ss = this.slideshow; 8375 if (ss && this.last && ss.controls && ss.fixedControls) { 8376 var pos = ss.overlayOptions.position || '', p; 8377 for (var dim in hs.oPos) for (var i = 0; i < 5; i++) { 8378 p = this[dim]; 8379 if (pos.match(hs.oPos[dim][i])) { 8380 p.pos = this.last[dim].pos 8381 + (this.last[dim].p1 - p.p1) 8382 + (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i]; 8383 if (ss.fixedControls == 'fit') { 8384 if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax) 8385 p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2; 8386 if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin; 8387 } 8388 } 8389 } 8390 } 8391 if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) { 8392 this.createFullExpand(); 8393 if (this.overlays.length == 1) this.sizeOverlayBox(); 8394 } 8395 } 8396 this.show(); 8397 8398 } catch (e) { 8399 this.error(e); 8400 } 8401}, 8402 8403 8404setObjContainerSize : function(parent, auto) { 8405 var c = hs.getElementByClass(parent, 'DIV', 'highslide-body'); 8406 if (/(iframe|swf)/.test(this.objectType)) { 8407 if (this.objectWidth) c.style.width = this.objectWidth +'px'; 8408 if (this.objectHeight) c.style.height = this.objectHeight +'px'; 8409 } 8410}, 8411 8412writeExtendedContent : function () { 8413 if (this.hasExtendedContent) return; 8414 var exp = this; 8415 this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); 8416 if (this.objectType == 'iframe') { 8417 this.showLoading(); 8418 var ruler = hs.clearing.cloneNode(1); 8419 this.body.appendChild(ruler); 8420 this.newWidth = this.innerContent.offsetWidth; 8421 if (!this.objectWidth) this.objectWidth = ruler.offsetWidth; 8422 var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight, 8423 h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom, 8424 onload = this.objectLoadTime == 'before' ? 8425 ' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : ''; 8426 this.body.innerHTML += '<iframe name="hs'+ (new Date()).getTime() +'" frameborder="0" key="'+ this.key +'" ' 8427 +' style="width:'+ this.objectWidth +'px; height:'+ h +'px" ' 8428 + onload +' src="'+ this.src +'" ></iframe>'; 8429 this.ruler = this.body.getElementsByTagName('div')[0]; 8430 this.iframe = this.body.getElementsByTagName('iframe')[0]; 8431 8432 if (this.objectLoadTime == 'after') this.correctIframeSize(); 8433 8434 } 8435 if (this.objectType == 'swf') { 8436 this.body.id = this.body.id || 'hs-flash-id-' + this.key; 8437 var a = this.swfOptions; 8438 if (!a.params) a.params = {}; 8439 if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent'; 8440 if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight, 8441 a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes); 8442 } 8443 this.hasExtendedContent = true; 8444}, 8445htmlGetSize : function() { 8446 if (this.iframe && !this.objectHeight) { // loadtime before 8447 this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px'; 8448 } 8449 this.innerContent.appendChild(hs.clearing); 8450 if (!this.x.full) this.x.full = this.innerContent.offsetWidth; 8451 this.y.full = this.innerContent.offsetHeight; 8452 this.innerContent.removeChild(hs.clearing); 8453 if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug 8454 this.newHeight = parseInt(this.innerContent.currentStyle.height); 8455 } 8456 hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'}); 8457 hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'}); 8458 8459}, 8460 8461getIframePageHeight : function() { 8462 var h; 8463 try { 8464 var doc = this.iDoc = this.iframe.contentDocument || this.iframe.contentWindow.document; 8465 var clearing = doc.createElement('div'); 8466 clearing.style.clear = 'both'; 8467 doc.body.appendChild(clearing); 8468 h = clearing.offsetTop; 8469 if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop) 8470 + parseInt(doc.body.currentStyle.marginBottom) - 1; 8471 } catch (e) { // other domain 8472 h = 300; 8473 } 8474 return h; 8475}, 8476correctIframeSize : function () { 8477 var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth; 8478 hs.discardElement(this.ruler); 8479 if (wDiff < 0) wDiff = 0; 8480 8481 var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight; 8482 if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try { 8483 this.iDoc.body.style.overflow = 'hidden'; 8484 } catch (e) {} 8485 hs.setStyles(this.iframe, { 8486 width: Math.abs(this.x.size - wDiff) +'px', 8487 height: Math.abs(this.y.size - hDiff) +'px' 8488 }); 8489 hs.setStyles(this.body, { 8490 width: this.iframe.style.width, 8491 height: this.iframe.style.height 8492 }); 8493 8494 this.scrollingContent = this.iframe; 8495 this.scrollerDiv = this.scrollingContent; 8496 8497}, 8498htmlSizeOperations : function () { 8499 8500 this.setObjContainerSize(this.innerContent); 8501 8502 8503 if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeE
8503xtendedContent(); 8504 8505 // handle minimum size 8506 if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full; 8507 if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full; 8508 this.scrollerDiv = this.innerContent; 8509 hs.setStyles(this.mediumContent, { 8510 position: 'relative', 8511 width: this.x.size +'px' 8512 }); 8513 hs.setStyles(this.innerContent, { 8514 border: 'none', 8515 width: 'auto', 8516 height: 'auto' 8517 }); 8518 var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); 8519 if (node && !/(iframe|swf)/.test(this.objectType)) { 8520 var cNode = node; // wrap to get true size 8521 node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true); 8522 cNode.parentNode.insertBefore(node, cNode); 8523 node.appendChild(hs.clearing); // IE6 8524 node.appendChild(cNode); 8525 8526 var wDiff = this.innerContent.offsetWidth - node.offsetWidth; 8527 var hDiff = this.innerContent.offsetHeight - node.offsetHeight; 8528 node.removeChild(hs.clearing); 8529 8530 var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug 8531 hs.setStyles(node, { 8532 width: (this.x.size - wDiff - kdeBugCorr) +'px', 8533 height: (this.y.size - hDiff) +'px', 8534 overflow: 'auto', 8535 position: 'relative' 8536 } 8537 ); 8538 if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) { 8539 node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px'; 8540 } 8541 this.scrollingContent = node; 8542 this.scrollerDiv = this.scrollingContent; 8543 } 8544 if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize(); 8545 if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content; 8546 8547 if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) { 8548 this.x.size += 17; // room for scrollbars 8549 } 8550 if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) { 8551 setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}", 8552 hs.expandDuration); 8553 } 8554}, 8555 8556getImageMapAreaCorrection : function(area) { 8557 var c = area.coords.split(','); 8558 for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]); 8559 8560 if (area.shape.toLowerCase() == 'circle') { 8561 this.x.tpos += c[0] - c[2]; 8562 this.y.tpos += c[1] - c[2]; 8563 this.x.t = this.y.t = 2 * c[2]; 8564 } else { 8565 var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1]; 8566 for (var i = 0; i < c.length; i++) { 8567 if (i % 2 == 0) { 8568 minX = Math.min(minX, c[i]); 8569 maxX = Math.max(maxX, c[i]); 8570 } else { 8571 minY = Math.min(minY, c[i]); 8572 maxY = Math.max(maxY, c[i]); 8573 } 8574 } 8575 this.x.tpos += minX; 8576 this.x.t = maxX - minX; 8577 this.y.tpos += minY; 8578 this.y.t = maxY - minY; 8579 } 8580}, 8581justify : function (p, moveOnly) { 8582 var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y'; 8583 8584 if (tgt && tgt.match(/ /)) { 8585 tgtArr = tgt.split(' '); 8586 tgt = tgtArr[0]; 8587 } 8588 if (tgt && hs.jQuery(tgt)) { 8589 p.pos = hs.getPosition(hs.jQuery(tgt))[dim]; 8590 if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/)) 8591 p.pos += parseInt(tgtArr[1]); 8592 if (p.size < p.minSize) p.size = p.minSize; 8593 8594 } else if (p.justify == 'auto' || p.justify == 'center') { 8595 8596 var hasMovedMin = false; 8597 8598 var allowReduce = p.exp.allowSizeReduction; 8599 if (p.justify == 'center') 8600 p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2); 8601 else 8602 p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2)); 8603 if (p.pos < p.scroll + p.marginMin) { 8604 p.pos = p.scroll + p.marginMin; 8605 hasMovedMin = true; 8606 } 8607 if (!moveOnly && p.size < p.minSize) { 8608 p.size = p.minSize; 8609 allowReduce = false; 8610 } 8611 if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) { 8612 if (!moveOnly && hasMovedMin && allowReduce) { 8613 p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize')); 8614 } else if (p.get('wsize') < p.get('fitsize')) { 8615 p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize'); 8616 } else { // image larger than viewport 8617 p.pos = p.scroll + p.marginMin; 8618 if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize'); 8619 } 8620 } 8621 8622 if (!moveOnly && p.size < p.minSize) { 8623 p.size = p.minSize; 8624 allowReduce = false; 8625 } 8626 8627 8628 } else if (p.justify == 'max') { 8629 p.pos = Math.floor(p.pos - p.size + p.t); 8630 } 8631 8632 8633 if (p.pos < p.marginMin) { 8634 var tmpMin = p.pos; 8635 p.pos = p.marginMin; 8636 8637 if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin); 8638 8639 } 8640}, 8641
8642correctRatio : function(ratio) { 8643 var x = this.x, 8644 y = this.y, 8645 changed = false, 8646 xSize = Math.min(x.full, x.size), 8647 ySize = Math.min(y.full, y.size), 8648 useBox = (this.useBox || hs.padToMinWidth); 8649 8650 if (xSize / ySize > ratio) { // width greater 8651 xSize = ySize * ratio; 8652 if (xSize < x.minSize) { // below minWidth 8653 xSize = x.minSize; 8654 ySize = xSize / ratio; 8655 } 8656 changed = true; 8657 8658 } else if (xSize / ySize < ratio) { // height greater 8659 ySize = xSize / ratio; 8660 changed = true; 8661 } 8662 8663 if (hs.padToMinWidth && x.full < x.minSize) { 8664 x.imgSize = x.full; 8665 y.size = y.imgSize = y.full; 8666 } else if (this.useBox) { 8667 x.imgSize = xSize; 8668 y.imgSize = ySize; 8669 } else { 8670 x.size = xSize; 8671 y.size = ySize; 8672 } 8673 changed = this.fitOverlayBox(this.useBox ? null : ratio, changed); 8674 if (useBox && y.size < y.imgSize) { 8675 y.imgSize = y.size; 8676 x.imgSize = y.size * ratio; 8677 } 8678 if (changed || useBox) { 8679 x.pos = x.tpos - x.cb + x.tb; 8680 x.minSize = x.size; 8681 this.justify(x, true); 8682 8683 y.pos = y.tpos - y.cb + y.tb; 8684 y.minSize = y.size; 8685 this.justify(y, true); 8686 if (this.overlayBox) this.sizeOverlayBox(); 8687 } 8688 8689 8690}, 8691fitOverlayBox : function(ratio, changed) { 8692 var x = this.x, y = this.y; 8693 if (this.overlayBox && (this.isImage || this.allowHeightReduction)) { 8694 while (y.size > this.minHeight && x.size > this.minWidth 8695 && y.get('wsize') > y.get('fitsize')) { 8696 y.size -= 10; 8697 if (ratio) x.size = y.size * ratio; 8698 this.sizeOverlayBox(0, 1); 8699 changed = true; 8700 } 8701 } 8702 return changed; 8703}, 8704 8705reflow : function () { 8706 if (this.scrollerDiv) { 8707 var h = /iframe/i.test(this.scrollerDiv.tagName) ? (this.getIframePageHeight() + 1) +'px' : 'auto'; 8708 if (this.body) this.body.style.height = h; 8709 this.scrollerDiv.style.height = h; 8710 this.y.setSize(this.innerContent.offsetHeight); 8711 } 8712}, 8713 8714show : function () { 8715 var x = this.x, y = this.y; 8716 this.doShowHide('hidden'); 8717 hs.fireEvent(this, 'onBeforeExpand'); 8718 if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb(); 8719 8720 // Apply size change 8721 this.changeSize( 8722 1, { 8723 wrapper: { 8724 width : x.get('wsize'), 8725 height : y.get('wsize'), 8726 left: x.pos, 8727 top: y.pos 8728 }, 8729 content: { 8730 left: x.p1 + x.get('imgPad'), 8731 top: y.p1 + y.get('imgPad'), 8732 width:x.imgSize ||x.size, 8733 height:y.imgSize ||y.size 8734 } 8735 }, 8736 hs.expandDuration 8737 ); 8738}, 8739 8740changeSize : function(up, to, dur) { 8741 // transition 8742 var trans = this.transitions, 8743 other = up ? (this.last ? this.last.a : null) : hs.upcoming, 8744 t = (trans[1] && other 8745 && hs.getParam(other, 'transitions')[1] == trans[1]) ? 8746 trans[1] : trans[0]; 8747 8748 if (this[t] && t != 'expand') { 8749 this[t](up, to); 8750 return; 8751 } 8752 8753 if (this.outline && !this.outlineWhileAnimating) { 8754 if (up) this.outline.setPosition(); 8755 else this.outline.destroy( 8756 (this.isHtml && this.preserveContent)); 8757 } 8758 8759 8760 if (!up) this.destroyOverlays(); 8761 8762 var exp = this, 8763 x = exp.x, 8764 y = exp.y, 8765 easing = this.easing; 8766 if (!up) easing = this.easingClose || easing; 8767 var after = up ? 8768 function() { 8769 8770 if (exp.outline) exp.outline.table.style.visibility = "visible"; 8771 setTimeout(function() { 8772 exp.afterExpand(); 8773 }, 50); 8774 } : 8775 function() { 8776 exp.afterClose(); 8777 }; 8778 if (up) hs.setStyles( this.wrapper, { 8779 width: x.t +'px', 8780 height: y.t +'px' 8781 }); 8782 if (up && this.isHtml) { 8783 hs.setStyles(this.wrapper, { 8784 left: (x.tpos - x.cb + x.tb) +'px', 8785 top: (y.tpos - y.cb + y.tb) +'px' 8786 }); 8787 } 8788 if (this.fadeInOut) { 8789 hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 }); 8790 hs.extend(to.wrapper, { opacity: up }); 8791 } 8792 hs.animate( this.wrapper, to.wrapper, { 8793 duration: dur, 8794 easing: easing, 8795 step: function(val, args) { 8796 if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') { 8797 var fac = up ? args.pos : 1 - args.pos; 8798 var pos = { 8799 w: x.t + (x.get('wsize') - x.t) * fac, 8800 h: y.t + (y.get('wsize') - y.t) * fac, 8801 x: x.tpos + (x.pos - x.tpos) * fac, 8802 y: y.tpos + (y.pos - y.tpos) * fac 8803 }; 8804 exp.outline.setPosition(pos, 0, 1); 8805 } 8806 if (exp.isHtml) { 8807 if (args.prop == 'left') 8808 exp.mediumContent.style.left = (x.pos - val) +'px'; 8809 if (args.prop == 'top') 8810 exp.mediumContent.style.top = (y.pos - val) +'px'; 8811 } 8812 } 8813 }); 8814 hs.animate( this.content, to.content, dur, easing, after); 8815 if (up) { 8816 this.wrapper.style.visibility = 'visible'; 8817 this.content.style.visibility = 'visible'; 8818 if (this.isHtml) this.innerContent.style.visibility = 'visible';
8819 this.a.className += ' highslide-active-anchor'; 8820 } 8821}, 8822 8823 8824 8825fade : function(up, to) { 8826 this.outlineWhileAnimating = false; 8827 var exp = this, t = up ? hs.expandDuration : 0; 8828 8829 if (up) { 8830 hs.animate(this.wrapper, to.wrapper, 0); 8831 hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' }); 8832 hs.animate(this.content, to.content, 0); 8833 this.content.style.visibility = 'visible'; 8834 8835 hs.animate(this.wrapper, { opacity: 1 }, t, null, 8836 function() { exp.afterExpand(); }); 8837 } 8838 8839 if (this.outline) { 8840 this.outline.table.style.zIndex = this.wrapper.style.zIndex; 8841 var dir = up || -1, 8842 offset = this.outline.offset, 8843 startOff = up ? 3 : offset, 8844 endOff = up? offset : 3; 8845 for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) { 8846 (function() { 8847 var o = up ? endOff - i : startOff - i; 8848 setTimeout(function() { 8849 exp.outline.setPosition(0, o, 1); 8850 }, t); 8851 })(); 8852 } 8853 } 8854 8855 8856 if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50); 8857 else { 8858 setTimeout( function() { 8859 if (exp.outline) exp.outline.destroy(exp.preserveContent); 8860 8861 exp.destroyOverlays(); 8862 8863 hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){ 8864 exp.afterClose(); 8865 }); 8866 }, t); 8867 } 8868}, 8869crossfade : function (up, to, from) { 8870 if (!up) return; 8871 var exp = this, 8872 last = this.last, 8873 x = this.x, 8874 y = this.y, 8875 lastX = last.x, 8876 lastY = last.y, 8877 wrapper = this.wrapper, 8878 content = this.content, 8879 overlayBox = this.overlayBox; 8880 hs.removeEventListener(document, 'mousemove', hs.dragHandler); 8881 8882 hs.setStyles(content, { 8883 width: (x.imgSize || x.size) +'px', 8884 height: (y.imgSize || y.size) +'px' 8885 }); 8886 if (overlayBox) overlayBox.style.overflow = 'visible'; 8887 this.outline = last.outline; 8888 if (this.outline) this.outline.exp = exp; 8889 last.outline = null; 8890 var fadeBox = hs.createElement('div', { 8891 className: 'highslide-'+ this.contentType 8892 }, { 8893 position: 'absolute', 8894 zIndex: 4, 8895 overflow: 'hidden', 8896 display: 'none' 8897 } 8898 ); 8899 var names = { oldImg: last, newImg: this }; 8900 for (var n in names) { 8901 this[n] = names[n].content.cloneNode(1); 8902 hs.setStyles(this[n], { 8903 position: 'absolute', 8904 border: 0, 8905 visibility: 'visible' 8906 }); 8907 fadeBox.appendChild(this[n]); 8908 } 8909 wrapper.appendChild(fadeBox); 8910 if (this.isHtml) hs.setStyles(this.mediumContent, { 8911 left: 0, 8912 top: 0 8913 }); 8914 if (overlayBox) { 8915 overlayBox.className = ''; 8916 wrapper.appendChild(overlayBox); 8917 } 8918 fadeBox.style.display = ''; 8919 last.content.style.display = 'none'; 8920 8921 8922 if (hs.safari && hs.uaVersion < 525) { 8923 this.wrapper.style.visibility = 'visible'; 8924 } 8925 hs.animate(wrapper, { 8926 width: x.size 8927 }, { 8928 duration: hs.transitionDuration, 8929 step: function(val, args) { 8930 var pos = args.pos, 8931 invPos = 1 - pos; 8932 var prop, 8933 size = {}, 8934 props = ['pos', 'size', 'p1', 'p2']; 8935 for (var n in props) { 8936 prop = props[n]; 8937 size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]); 8938 size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]); 8939 size.ximgSize = Math.round( 8940 invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size)); 8941 size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad')); 8942 size.yimgSize = Math.round( 8943 invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size)); 8944 size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad')); 8945 } 8946 if (exp.outline) exp.outline.setPosition({ 8947 x: size.xpos, 8948 y: size.ypos, 8949 w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb, 8950 h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb 8951 }); 8952 last.wrapper.style.clip = 'rect(' 8953 + (size.ypos - lastY.pos)+'px, ' 8954 + (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, ' 8955 + (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, ' 8956 + (size.xpos - lastX.pos)+'px)'; 8957 8958 hs.setStyles(content, { 8959 top: (size.yp1 + y.get('imgPad')) +'px', 8960 left: (size.xp1 + x.get('imgPad')) +'px', 8961 marginTop: (y.pos - size.ypos) +'px', 8962 marginLeft: (x.pos - size.xpos) +'px' 8963 }); 8964 hs.setStyles(wrapper, { 8965 top: size.ypos +'px', 8966 left: size.xpos +'px', 8967 width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px',
8968 height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px' 8969 }); 8970 hs.setStyles(fadeBox, { 8971 width: (size.ximgSize || size.xsize) + 'px', 8972 height: (size.yimgSize || size.ysize) +'px', 8973 left: (size.xp1 + size.ximgPad) +'px', 8974 top: (size.yp1 + size.yimgPad) +'px', 8975 visibility: 'visible' 8976 }); 8977 8978 hs.setStyles(exp.oldImg, { 8979 top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px', 8980 left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px' 8981 }); 8982 8983 hs.setStyles(exp.newImg, { 8984 opacity: pos, 8985 top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px', 8986 left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px' 8987 }); 8988 if (overlayBox) hs.setStyles(overlayBox, { 8989 width: size.xsize + 'px', 8990 height: size.ysize +'px', 8991 left: (size.xp1 + x.cb) +'px', 8992 top: (size.yp1 + y.cb) +'px' 8993 }); 8994 }, 8995 complete: function () { 8996 wrapper.style.visibility = content.style.visibility = 'visible'; 8997 content.style.display = 'block'; 8998 hs.discardElement(fadeBox); 8999 exp.afterExpand(); 9000 last.afterClose(); 9001 exp.last = null; 9002 } 9003 9004 }); 9005}, 9006reuseOverlay : function(o, el) { 9007 if (!this.last) return false; 9008 for (var i = 0; i < this.last.overlays.length; i++) { 9009 var oDiv = hs.jQuery('hsId'+ this.last.overlays[i]); 9010 if (oDiv && oDiv.hsId == o.hsId) { 9011 this.genOverlayBox(); 9012 oDiv.reuse = this.key; 9013 hs.push(this.overlays, this.last.overlays[i]); 9014 return true; 9015 } 9016 } 9017 return false; 9018}, 9019 9020 9021afterExpand : function() { 9022 this.isExpanded = true; 9023 this.focus(); 9024 9025 if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent(); 9026 if (this.iframe) { 9027 try { 9028 var exp = this, 9029 doc = this.iframe.contentDocument || this.iframe.contentWindow.document; 9030 hs.addEventListener(doc, 'mousedown', function () { 9031 if (hs.focusKey != exp.key) exp.focus(); 9032 }); 9033 } catch(e) {} 9034 if (hs.ie && typeof this.isClosing != 'boolean') // first open 9035 this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout 9036 } 9037 if (this.dimmingOpacity) hs.dim(this); 9038 if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null; 9039 this.prepareNextOutline(); 9040 var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop; 9041 this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize') 9042 && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize'); 9043 if (this.overlayBox) this.showOverlays(); 9044 hs.fireEvent(this, 'onAfterExpand'); 9045 9046}, 9047 9048 9049prepareNextOutline : function() { 9050 var key = this.key; 9051 var outlineType = this.outlineType; 9052 new hs.Outline(outlineType, 9053 function () { try { hs.expanders[key].preloadNext(); } catch (e) {} }); 9054}, 9055 9056 9057preloadNext : function() { 9058 var next = this.getAdjacentAnchor(1); 9059 if (next && next.onclick.toString().match(/hs\.expand/)) 9060 var img = hs.createElement('img', { src: hs.getSrc(next) }); 9061}, 9062 9063 9064getAdjacentAnchor : function(op) { 9065 var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none']; 9066 if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) { 9067 if (op == 1) return as[0]; 9068 else if (op == -1) return as[as.length-1]; 9069 } 9070 return (as && as[current + op]) || null; 9071}, 9072 9073getAnchorIndex : function() { 9074 var arr = hs.getAnchors().groups[this.slideshowGroup || 'none']; 9075 if (arr) for (var i = 0; i < arr.length; i++) { 9076 if (arr[i] == this.a) return i; 9077 } 9078 return null; 9079}, 9080 9081 9082getNumber : function() { 9083 if (this[this.numberPosition]) { 9084 var arr = hs.anchors.groups[this.slideshowGroup || 'none']; 9085 if (arr) { 9086 var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length); 9087 this[this.numberPosition].innerHTML = 9088 '<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML; 9089 } 9090 } 9091}, 9092initSlideshow : function() { 9093 if (!this.last) { 9094 for (var i = 0; i < hs.slideshows.length; i++) { 9095 var ss = hs.slideshows[i], sg = ss.slideshowGroup; 9096 if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup) 9097 this.slideshow = new hs.Slideshow(this.key, ss); 9098 } 9099 } else { 9100 this.slideshow = this.last.slideshow; 9101 } 9102 var ss = this.slideshow; 9103 if (!ss) return; 9104 var key = ss.expKey = this.key; 9105 9106 ss.checkFirstAndLast(); 9107 ss.disable('full-expand'); 9108 if (ss.controls) { 9109 this.createOverlay(hs.extend(ss.overlayOptions || {}, { 9110 overlayId: ss.controls, 9111 hsId: 'controls', 9112 zIndex: 5 9113 })); 9114 } 9115 if (ss.thumbstrip) ss.thumbstrip.add(this); 9116 if (!this.last && this.autoplay) ss.play(true); 9117 if (ss.autoplay) { 9118 ss.autoplay = setTimeout(function() { 9119 hs.next(key); 9120 }, (ss.interval || 500)); 9121 } 9122}, 9123 9124cancelLoading : function() { 9125 hs.discardElement (this.wrapper); 9126 hs.expanders[this.key] = null; 9127 if (hs.upcoming == this.a) hs.upcoming = null; 9128 hs.undim(this.key); 9129 if (this.loading) hs.loading.style.left = '-9999px'; 9130 hs.fireEvent(this, 'onHideLoading'); 9131}, 9132 9133writeCredits : function () { 9134 if (this.credits) return; 9135 this.credits = hs.createElement('a', { 9136 href: hs.creditsHref, 9137 target: hs.creditsTarget, 9138 className: 'highslide-credits', 9139 innerHTML: hs.lang.creditsText, 9140 title: hs.lang.creditsTitle 9141 }); 9142 this.createOverlay({ 9143 overlayId: this.credits, 9144 position: this.creditsPosition || 'top left', 9145 hsId: 'credits' 9146 }); 9147}, 9148 9149getInline : function(types, addOverlay) { 9150 for (var i = 0; i < types.length; i++) { 9151 var type = types[i], s = null; 9152 if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return; 9153 else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return; 9154 if (!this[type +'Id'] && this.thumbsUserSetId) 9155 this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId; 9156 if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
9157 if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try { 9158 s = eval(this[type +'Eval']); 9159 } catch (e) {} 9160 if (!this[type] && this[type +'Text']) { 9161 s = this[type +'Text']; 9162 } 9163 if (!this[type] && !s) { 9164 this[type] = hs.getNode(this.a['_'+ type + 'Id']); 9165 if (!this[type]) { 9166 var next = this.a.nextSibling; 9167 while (next && !hs.isHsAnchor(next)) { 9168 if ((new RegExp('highslide-'+ type)).test(next.className || null)) { 9169 if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++; 9170 this[type] = hs.getNode(next.id); 9171 break; 9172 } 9173 next = next.nextSibling; 9174 } 9175 } 9176 } 9177 if (!this[type] && !s && this.numberPosition == type) s = '\n'; 9178 9179 if (!this[type] && s) this[type] = hs.createElement('div', 9180 { className: 'highslide-'+ type, innerHTML: s } ); 9181 9182 if (addOverlay && this[type]) { 9183 var o = { position: (type == 'heading') ? 'above' : 'below' }; 9184 for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x]; 9185 o.overlayId = this[type]; 9186 this.createOverlay(o); 9187 } 9188 } 9189}, 9190 9191 9192// on end move and resize 9193doShowHide : function(visibility) { 9194 if (hs.hideSelects) this.showHideElements('SELECT', visibility); 9195 if (hs.hideIframes) this.showHideElements('IFRAME', visibility); 9196 if (hs.geckoMac) this.showHideElements('*', visibility); 9197}, 9198showHideElements : function (tagName, visibility) { 9199 var els = document.getElementsByTagName(tagName); 9200 var prop = tagName == '*' ? 'overflow' : 'visibility'; 9201 for (var i = 0; i < els.length; i++) { 9202 if (prop == 'visibility' || (document.defaultView.getComputedStyle( 9203 els[i], "").getPropertyValue('overflow') == 'auto' 9204 || els[i].getAttribute('hidden-by') != null)) { 9205 var hiddenBy = els[i].getAttribute('hidden-by'); 9206 if (visibility == 'visible' && hiddenBy) { 9207 hiddenBy = hiddenBy.replace('['+ this.key +']', ''); 9208 els[i].setAttribute('hidden-by', hiddenBy); 9209 if (!hiddenBy) els[i].style[prop] = els[i].origProp; 9210 } else if (visibility == 'hidden') { // hide if behind 9211 var elPos = hs.getPosition(els[i]); 9212 elPos.w = els[i].offsetWidth; 9213 elPos.h = els[i].offsetHeight; 9214 if (!this.dimmingOpacity) { // hide all if dimming 9215 9216 var clearsX = (elPos.x + elPos.w < this.x.get('opos') 9217 || elPos.x > this.x.get('opos') + this.x.get('osize')); 9218 var clearsY = (elPos.y + elPos.h < this.y.get('opos') 9219 || elPos.y > this.y.get('opos') + this.y.get('osize')); 9220 } 9221 var wrapperKey = hs.getWrapperKey(els[i]); 9222 if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image 9223 if (!hiddenBy) { 9224 els[i].setAttribute('hidden-by', '['+ this.key +']'); 9225 els[i].origProp = els[i].style[prop]; 9226 els[i].style[prop] = 'hidden'; 9227 9228 } else if (hiddenBy.indexOf('['+ this.key +']') == -1) { 9229 els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); 9230 } 9231 } else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) 9232 && wrapperKey != this.key) { // on move 9233 els[i].setAttribute('hidden-by', ''); 9234 els[i].style[prop] = els[i].origProp || ''; 9235 } else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) { 9236 els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); 9237 } 9238 9239 } 9240 } 9241 } 9242}, 9243 9244focus : function() { 9245 this.wrapper.style.zIndex = hs.zIndexCounter += 2; 9246 // blur others 9247 for (var i = 0; i < hs.expanders.length; i++) { 9248 if (hs.expanders[i] && i == hs.focusKey) { 9249 var blurExp = hs.expanders[i]; 9250 blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; 9251 if (blurExp.isImage) { 9252 blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; 9253 blurExp.content.title = hs.lang.focusTitle; 9254 } 9255 hs.fireEvent(blurExp, 'onBlur'); 9256 } 9257 } 9258 9259 // focus this 9260 if (this.outline) this.outline.table.style.zIndex 9261 = this.wrapper.style.zIndex - 1; 9262 this.content.className = 'highslide-'+ this.contentType; 9263 if (this.isImage) { 9264 this.content.title = hs.lang.restoreTitle; 9265 9266 if (hs.restoreCursor) { 9267 hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; 9268 if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand'; 9269 this.content.style.cursor = hs.styleRestoreCursor; 9270 } 9271 } 9272 hs.focusKey = this.key; 9273 hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 9274 hs.fireEvent(this, 'onFocus'); 9275}, 9276moveTo: function(x, y) { 9277 this.x.setPos(x); 9278 this.y.setPos(y); 9279}, 9280resize : function (e) { 9281 var w, h, r = e.width / e.height; 9282 w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full)); 9283 if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full; 9284 h = this.isHtml ? e.height + e.dY : w / r; 9285 if (h < Math.min(this.minHeight, this.y.full)) { 9286 h = Math.min(this.minHeight, this.y.full); 9287 if (this.isImage) w = h * r; 9288 } 9289 this.resizeTo(w, h); 9290}, 9291resizeTo: function(w, h) { 9292 this.y.setSize(h); 9293 this.x.setSize(w); 9294 this.wrapper.style.height = this.y.get('wsize') +'px'; 9295}, 9296 9297close : function() { 9298 if (this.isClosing || !this.isExpanded) return; 9299 if (this.transitions[1] == 'crossfade' && hs.upcoming) { 9300 hs.getExpander(hs.upcoming).cancelLoading(); 9301 hs.upcoming = null; 9302 } 9303 if (!hs.fireEvent(this, 'onBeforeClose')) return; 9304 this.isClosing = true; 9305 if (this.slideshow && !hs.upcoming) this.slideshow.pause(); 9306 9307 hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 9308 9309 try { 9310 if (this.isHtml) this.htmlPrepareClose(); 9311 this.content.style.cursor = 'default'; 9312 this.changeSize( 9313 0, { 9314 wrapper: { 9315 width : this.x.t, 9316 height : this.y.t,
9317 left: this.x.tpos - this.x.cb + this.x.tb, 9318 top: this.y.tpos - this.y.cb + this.y.tb 9319 }, 9320 content: { 9321 left: 0, 9322 top: 0, 9323 width: this.x.t, 9324 height: this.y.t 9325 } 9326 }, hs.restoreDuration 9327 ); 9328 } catch (e) { this.afterClose(); } 9329}, 9330 9331htmlPrepareClose : function() { 9332 if (hs.geckoMac) { // bad redraws 9333 if (!hs.mask) hs.mask = hs.createElement('div', null, 9334 { position: 'absolute' }, hs.container); 9335 hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px', 9336 left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' }); 9337 } 9338 if (this.objectType == 'swf') try { hs.jQuery(this.body.id).StopPlay(); } catch (e) {} 9339 9340 if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject(); 9341 if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent) 9342 this.scrollerDiv.style.overflow = 'hidden'; 9343}, 9344 9345destroyObject : function () { 9346 if (hs.ie && this.iframe) 9347 try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {} 9348 if (this.objectType == 'swf') swfobject.removeSWF(this.body.id); 9349 this.body.innerHTML = ''; 9350}, 9351 9352sleep : function() { 9353 if (this.outline) this.outline.table.style.display = 'none'; 9354 this.releaseMask = null; 9355 this.wrapper.style.display = 'none'; 9356 this.isExpanded = false; 9357 hs.push(hs.sleeping, this); 9358}, 9359 9360awake : function() {try { 9361 9362 hs.expanders[this.key] = this; 9363 9364 if (!hs.allowMultipleInstances &&hs.focusKey != this.key) { 9365 try { hs.expanders[hs.focusKey].close(); } catch (e){} 9366 } 9367 9368 var z = hs.zIndexCounter++, stl = { display: '', zIndex: z }; 9369 hs.setStyles (this.wrapper, stl); 9370 this.isClosing = false; 9371 9372 var o = this.outline || 0; 9373 if (o) { 9374 if (!this.outlineWhileAnimating) stl.visibility = 'hidden'; 9375 hs.setStyles (o.table, stl); 9376 } 9377 if (this.slideshow) { 9378 this.initSlideshow(); 9379 } 9380 9381 this.show(); 9382} catch (e) {} 9383 9384 9385}, 9386 9387createOverlay : function (o) { 9388 var el = o.overlayId, 9389 relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position)); 9390 if (typeof el == 'string') el = hs.getNode(el); 9391 if (o.html) el = hs.createElement('div', { innerHTML: o.html }); 9392 if (!el || typeof el == 'string') return; 9393 if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return; 9394 el.style.display = 'block'; 9395 o.hsId = o.hsId || o.overlayId; 9396 if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return; 9397 this.genOverlayBox(); 9398 var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto'; 9399 if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px'; 9400 var overlay = hs.createElement( 9401 'div', { 9402 id: 'hsId'+ hs.idCounter++, 9403 hsId: o.hsId 9404 }, { 9405 position: 'absolute', 9406 visibility: 'hidden', 9407 width: width, 9408 direction: hs.lang.cssDirection || '', 9409 opacity: 0 9410 }, 9411 relToVP ? hs.viewport :this.overlayBox, 9412 true 9413 ); 9414 if (relToVP) overlay.hsKey = this.key; 9415 9416 overlay.appendChild(el); 9417 hs.extend(overlay, { 9418 opacity: 1, 9419 offsetX: 0, 9420 offsetY: 0, 9421 dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250 9422 }); 9423 hs.extend(overlay, o); 9424 9425 9426 if (this.gotOverlays) { 9427 this.positionOverlay(overlay); 9428 if (!overlay.hideOnMouseOut || this.mouseIsOver) 9429 hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur); 9430 } 9431 hs.push(this.overlays, hs.idCounter - 1); 9432}, 9433positionOverlay : function(overlay) { 9434 var p = overlay.position || 'middle center', 9435 relToVP = (overlay.relativeTo == 'viewport'), 9436 offX = overlay.offsetX, 9437 offY = overlay.offsetY; 9438 if (relToVP) { 9439 hs.viewport.style.display = 'block'; 9440 overlay.hsKey = this.key; 9441 if (overlay.offsetWidth > overlay.parentNode.offsetWidth) 9442 overlay.style.width = '100%'; 9443 } else 9444 if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay); 9445 if (/left$/.test(p)) overlay.style.left = offX +'px'; 9446 9447 if (/center$/.test(p)) hs.setStyles (overlay, { 9448 left: '50%', 9449 marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px' 9450 }); 9451 9452 if (/right$/.test(p)) overlay.style.right = - offX +'px'; 9453 9454 if (/^leftpanel$/.test(p)) { 9455 hs.setStyles(overlay, { 9456 right: '100%', 9457 marginRight: this.x.cb +'px', 9458 top: - this.y.cb +'px', 9459 bottom: - this.y.cb +'px', 9460 overflow: 'auto' 9461 }); 9462 this.x.p1 = overlay.offsetWidth; 9463 9464 } else if (/^rightpanel$/.test(p)) { 9465 hs.setStyles(overlay, { 9466 left: '100%', 9467 marginLeft: this.x.cb +'px', 9468 top: - this.y.cb +'px', 9469 bottom: - this.y.cb +'px', 9470 overflow: 'auto' 9471 }); 9472 this.x.p2 = overlay.offsetWidth; 9473 } 9474 var parOff = overlay.parentNode.offsetHeight; 9475 overlay.style.height = 'auto'; 9476 if (relToVP && overlay.offsetHeight > parOff) 9477 overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%'; 9478 9479 if (/^top/.test(p)) overlay.style.top = offY +'px'; 9480 if (/^middle/.test(p)) hs.setStyles (overlay, { 9481 top: '50%', 9482 marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px' 9483 }); 9484 if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px'; 9485 if (/^above$/.test(p)) { 9486 hs.setStyles(overlay, { 9487 left: (- this.x.p1 - this.x.cb) +'px', 9488 right: (- this.x.p2 - this.x.cb) +'px', 9489 bottom: '100%', 9490 marginBottom: this.y.cb +'px', 9491 width: 'auto' 9492 }); 9493 this.y.p1 = overlay.offsetHeight; 9494 9495 } else if (/^below$/.test(p)) { 9496 hs.setStyles(overlay, { 9497 position: 'relative', 9498 left: (- this.x.p1 - this.x.cb) +'px', 9499 right: (- this.x.p2 - this.x.cb) +'px', 9500 top: '100%', 9501 marginTop: this.y.cb +'px', 9502 width: 'auto' 9503 }); 9504 this.y.p2 = overlay.offsetHeight; 9505 overlay.style.position = 'absolute'; 9506 } 9507}, 9508 9509getOverlays : function() { 9510 this.getInline(['heading', 'caption'], true); 9511 this.getNumber(); 9512 if (this.caption) hs.fireEvent(this, 'onAfterGetCaption'); 9513 if (this.heading) hs.fireEvent(this, 'onAfterGetHeading'); 9514 if (this.heading && this.dragByHeading) this.heading.className += ' highsli
9514de-move'; 9515 if (hs.showCredits) this.writeCredits(); 9516 for (var i = 0; i < hs.overlays.length; i++) { 9517 var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup; 9518 if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId) 9519 || (sg && sg === this.slideshowGroup)) { 9520 if (this.isImage || (this.isHtml && o.useOnHtml)) 9521 this.createOverlay(o); 9522 } 9523 } 9524 var os = []; 9525 for (var i = 0; i < this.overlays.length; i++) { 9526 var o = hs.jQuery('hsId'+ this.overlays[i]); 9527 if (/panel$/.test(o.position)) this.positionOverlay(o); 9528 else hs.push(os, o); 9529 } 9530 for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]); 9531 this.gotOverlays = true; 9532}, 9533genOverlayBox : function() { 9534 if (!this.overlayBox) this.overlayBox = hs.createElement ( 9535 'div', { 9536 className: this.wrapperClassName 9537 }, { 9538 position : 'absolute', 9539 width: (this.x.size || (this.useBox ? this.width : null) 9540 || this.x.full) +'px', 9541 height: (this.y.size || this.y.full) +'px', 9542 visibility : 'hidden', 9543 overflow : 'hidden', 9544 zIndex : hs.ie ? 4 : 'auto' 9545 }, 9546 hs.container, 9547 true 9548 ); 9549}, 9550sizeOverlayBox : function(doWrapper, doPanels) { 9551 var overlayBox = this.overlayBox, 9552 x = this.x, 9553 y = this.y; 9554 hs.setStyles( overlayBox, { 9555 width: x.size +'px', 9556 height: y.size +'px' 9557 }); 9558 if (doWrapper || doPanels) { 9559 for (var i = 0; i < this.overlays.length; i++) { 9560 var o = hs.jQuery('hsId'+ this.overlays[i]); 9561 var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat'); 9562 if (o && /^(above|below)$/.test(o.position)) { 9563 if (ie6) { 9564 o.style.width = (overlayBox.offsetWidth + 2 * x.cb 9565 + x.p1 + x.p2) +'px'; 9566 } 9567 y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight; 9568 } 9569 if (o && ie6 && /^(left|right)panel$/.test(o.position)) { 9570 o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px'; 9571 } 9572 } 9573 } 9574 if (doWrapper) { 9575 hs.setStyles(this.content, { 9576 top: y.p1 +'px' 9577 }); 9578 hs.setStyles(overlayBox, { 9579 top: (y.p1 + y.cb) +'px' 9580 }); 9581 } 9582}, 9583 9584showOverlays : function() { 9585 var b = this.overlayBox; 9586 b.className = ''; 9587 hs.setStyles(b, { 9588 top: (this.y.p1 + this.y.cb) +'px', 9589 left: (this.x.p1 + this.x.cb) +'px', 9590 overflow : 'visible' 9591 }); 9592 if (hs.safari) b.style.visibility = 'visible'; 9593 this.wrapper.appendChild (b); 9594 for (var i = 0; i < this.overlays.length; i++) { 9595 var o = hs.jQuery('hsId'+ this.overlays[i]); 9596 o.style.zIndex = o.zIndex || 4; 9597 if (!o.hideOnMouseOut || this.mouseIsOver) { 9598 o.style.visibility = 'visible'; 9599 hs.setStyles(o, { visibility: 'visible', display: '' }); 9600 hs.animate(o, { opacity: o.opacity }, o.dur); 9601 } 9602 } 9603}, 9604 9605destroyOverlays : function() { 9606 if (!this.overlays.length) return; 9607 if (this.slideshow) { 9608 var c = this.slideshow.controls; 9609 if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); 9610 } 9611 for (var i = 0; i < this.overlays.length; i++) { 9612 var o = hs.jQuery('hsId'+ this.overlays[i]); 9613 if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o); 9614 } 9615 if (this.isHtml && this.preserveContent) { 9616 this.overlayBox.style.top = '-9999px'; 9617 hs.container.appendChild(this.overlayBox); 9618 } else 9619 hs.discardElement(this.overlayBox); 9620}, 9621 9622 9623 9624createFullExpand : function () { 9625 if (this.slideshow && this.slideshow.controls) { 9626 this.slideshow.enable('full-expand'); 9627 return; 9628 } 9629 this.fullExpandLabel = hs.createElement( 9630 'a', { 9631 href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', 9632 title: hs.lang.fullExpandTitle, 9633 className: 'highslide-full-expand' 9634 } 9635 ); 9636 if (!hs.fireEvent(this, 'onCreateFullExpand')) return; 9637 9638 this.createOverlay({ 9639 overlayId: this.fullExpandLabel, 9640 position: hs.fullExpandPosition, 9641 hideOnMouseOut: true, 9642 opacity: hs.fullExpandOpacity 9643 }); 9644}, 9645 9646doFullExpand : function () { 9647 try { 9648 if (!hs.fireEvent(this, 'onDoFullExpand')) return; 9649 if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel); 9650 9651 this.focus(); 9652 var xSize = this.x.size; 9653 this.resizeTo(this.x.full, this.y.full); 9654 9655 var xpos = this.x.pos - (this.x.size - xSize) / 2; 9656 if (xpos < hs.marginLeft) xpos = hs.marginLeft; 9657 9658 this.moveTo(xpos, this.y.pos); 9659 this.doShowHide('hidden'); 9660 9661 } catch (e) { 9662 this.error(e); 9663 } 9664}, 9665 9666 9667afterClose : function () {
9668 this.a.className = this.a.className.replace('highslide-active-anchor', ''); 9669 9670 this.doShowHide('visible'); 9671 9672 if (this.isHtml && this.preserveContent 9673 && this.transitions[1] != 'crossfade') { 9674 this.sleep(); 9675 } else { 9676 if (this.outline && this.outlineWhileAnimating) this.outline.destroy(); 9677 9678 hs.discardElement(this.wrapper); 9679 } 9680 if (hs.mask) hs.mask.style.display = 'none'; 9681 this.destroyOverlays(); 9682 if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none'; 9683 9684 if (this.dimmingOpacity) hs.undim(this.key); 9685 hs.fireEvent(this, 'onAfterClose'); 9686 hs.expanders[this.key] = null; 9687 hs.reOrder(); 9688} 9689 9690}; 9691 9692 9693// hs.Ajax object prototype 9694hs.Ajax = function (a, content, pre) { 9695 this.a = a; 9696 this.content = content; 9697 this.pre = pre; 9698}; 9699 9700hs.Ajax.prototype = { 9701run : function () { 9702 var xhr; 9703 if (!this.src) this.src = hs.getSrc(this.a); 9704 if (this.src.match('#')) { 9705 var arr = this.src.split('#'); 9706 this.src = arr[0]; 9707 this.id = arr[1]; 9708 } 9709 if (hs.cachedGets[this.src]) { 9710 this.cachedGet = hs.cachedGets[this.src]; 9711 if (this.id) this.getElementContent(); 9712 else this.loadHTML(); 9713 return; 9714 } 9715 try { xhr = new XMLHttpRequest(); } 9716 catch (e) { 9717 try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } 9718 catch (e) { 9719 try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } 9720 catch (e) { this.onError(); } 9721 } 9722 } 9723 var pThis = this; 9724 xhr.onreadystatechange = function() { 9725 if(pThis.xhr.readyState == 4) { 9726 if (pThis.id) pThis.getElementContent(); 9727 else pThis.loadHTML(); 9728 } 9729 }; 9730 var src = this.src; 9731 this.xhr = xhr; 9732 if (hs.forceAjaxReload) 9733 src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime()); 9734 xhr.open('GET', src, true); 9735 xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); 9736 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 9737 xhr.send(null); 9738}, 9739 9740getElementContent : function() { 9741 hs.init(); 9742 var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null; 9743 9744 this.iframe = hs.createElement('iframe', attribs, 9745 { position: 'absolute', top: '-9999px' }, hs.container); 9746 9747 this.loadHTML(); 9748}, 9749 9750loadHTML : function() { 9751 var s = this.cachedGet || this.xhr.responseText, 9752 regBody; 9753 if (this.pre) hs.cachedGets[this.src] = s; 9754 if (!hs.ie || hs.uaVersion >= 5.5) { 9755 s = s.replace(new RegExp('<link[^>]*>', 'gi'), '') 9756 .replace(new RegExp('<script[^>]*>.*?</script>', 'gi'), ''); 9757 if (this.iframe) { 9758 var doc = this.iframe.contentDocument; 9759 if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document; 9760 if (!doc) { // Opera 9761 var pThis = this; 9762 setTimeout(function() { pThis.loadHTML(); }, 25); 9763 return; 9764 } 9765 doc.open(); 9766 doc.write(s); 9767 doc.close(); 9768 try { s = doc.getElementById(this.id).innerHTML; } catch (e) { 9769 try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera 9770 } 9771 hs.discardElement(this.iframe); 9772 } else { 9773 regBody = /(<body[^>]*>|<\/body>)/ig; 9774 if (regBody.test(s)) s = s.split(regBody)[hs.ie ? 1 : 2]; 9775 9776 } 9777 } 9778 hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; 9779 this.onLoad(); 9780 for (var x in this) this[x] = null; 9781} 9782}; 9783 9784 9785hs.Slideshow = function (expKey, options) { 9786 if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors(); 9787 this.expKey = expKey; 9788 for (var x in options) this[x] = options[x]; 9789 if (this.useControls) this.getControls(); 9790 if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this); 9791}; 9792hs.Slideshow.prototype = { 9793getControls: function() { 9794 this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) }, 9795 null, hs.container); 9796 9797 var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close']; 9798 this.btn = {}; 9799 var pThis = this; 9800 for (var i = 0; i < buttons.length; i++) { 9801 this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]); 9802 this.enable(buttons[i]); 9803 } 9804 this.btn.pause.style.display = 'none'; 9805 //this.disable('full-expand'); 9806}, 9807checkFirstAndLast: function() { 9808 if (this.repeat || !this.controls) return; 9809 var exp = hs.expanders[this.expKey], 9810 cur = exp.getAnchorIndex(), 9811 re = /disabled$/; 9812 if (cur == 0) 9813 this.disable('previous'); 9814 else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className)) 9815 this.enable('previous'); 9816 if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) { 9817 this.disable('next'); 9818 this.disable('play'); 9819 } else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) { 9820 this.enable('next'); 9821 this.enable('play'); 9822 } 9823},
9824enable: function(btn) { 9825 if (!this.btn) return; 9826 var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/; 9827 a.onclick = function() { 9828 sls[btn](); 9829 return false; 9830 }; 9831 if (re.test(a.className)) a.className = a.className.replace(re, ''); 9832}, 9833disable: function(btn) { 9834 if (!this.btn) return; 9835 var a = this.btn[btn].getElementsByTagName('a')[0]; 9836 a.onclick = function() { return false; }; 9837 if (!/disabled$/.test(a.className)) a.className += ' disabled'; 9838}, 9839hitSpace: function() { 9840 if (this.autoplay) this.pause(); 9841 else this.play(); 9842}, 9843play: function(wait) { 9844 if (this.btn) { 9845 this.btn.play.style.display = 'none'; 9846 this.btn.pause.style.display = ''; 9847 } 9848 9849 this.autoplay = true; 9850 if (!wait) hs.next(this.expKey); 9851}, 9852pause: function() { 9853 if (this.btn) { 9854 this.btn.pause.style.display = 'none'; 9855 this.btn.play.style.display = ''; 9856 } 9857 9858 clearTimeout(this.autoplay); 9859 this.autoplay = null; 9860}, 9861previous: function() { 9862 this.pause(); 9863 hs.previous(this.btn.previous); 9864}, 9865next: function() { 9866 this.pause(); 9867 hs.next(this.btn.next); 9868}, 9869move: function() {}, 9870'full-expand': function() { 9871 hs.getExpander().doFullExpand(); 9872}, 9873close: function() { 9874 hs.close(this.btn.close); 9875} 9876}; 9877hs.Thumbstrip = function(slideshow) { 9878 function add (exp) { 9879 hs.extend(options || {}, { 9880 overlayId: dom, 9881 hsId: 'thumbstrip', 9882 className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '') 9883 }); 9884 if (hs.ieLt7) options.fade = 0; 9885 exp.createOverlay(options); 9886 hs.setStyles(dom.parentNode, { overflow: 'hidden' }); 9887 }; 9888 9889 function scroll (delta) { 9890 selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7)); 9891 }; 9892 9893 function selectThumb (i, scrollBy) { 9894 if (i === undefined) for (var j = 0; j < group.length; j++) { 9895 if (group[j] == hs.expanders[slideshow.expKey].a) { 9896 i = j; 9897 break; 9898 } 9899 } 9900 if (i === undefined) return; 9901 var as = dom.getElementsByTagName('a'), 9902 active = as[i], 9903 cell = active.parentNode, 9904 left = isX ? 'Left' : 'Top', 9905 right = isX ? 'Right' : 'Bottom', 9906 width = isX ? 'Width' : 'Height', 9907 offsetLeft = 'offset' + left, 9908 offsetWidth = 'offset' + width, 9909 overlayWidth = div.parentNode.parentNode[offsetWidth], 9910 minTblPos = overlayWidth - table[offsetWidth], 9911 curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0, 9912 tblPos = curTblPos, 9913 mgnRight = 20; 9914 if (scrollBy !== undefined) { 9915 tblPos = curTblPos - scrollBy; 9916 9917 if (minTblPos > 0) minTblPos = 0; 9918 if (tblPos > 0) tblPos = 0; 9919 if (tblPos < minTblPos) tblPos = minTblPos; 9920 9921 9922 } else { 9923 for (var j = 0; j < as.length; j++) as[j].className = ''; 9924 active.className = 'highslide-active-anchor'; 9925 var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft], 9926 activeRight = cell[offsetLeft] + cell[offsetWidth] + 9927 (as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0); 9928 if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight; 9929 else if (activeLeft < -curTblPos) tblPos = -activeLeft; 9930 } 9931 var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos; 9932 hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad'); 9933 hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad'); 9934 scrollUp.style.display = tblPos < 0 ? 'block' : 'none'; 9935 scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none'; 9936 9937 }; 9938 9939 9940 // initialize 9941 var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'], 9942 options = slideshow.thumbstrip, 9943 mode = options.mode || 'horizontal', 9944 floatMode = (mode == 'float'), 9945 tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'], 9946 isX = (mode == 'horizontal'), 9947 dom = hs.createElement('div', { 9948 className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode, 9949 innerHTML: 9950 '<div class="highslide-thumbstrip-inner">'+ 9951 '<'+ tree[0] +'><'+ tree[1] +'></'+ tree[1] +'></'+ tree[0] +'></div>'+
9952 '<div class="highslide-scroll-up"><div></div></div>'+ 9953 '<div class="highslide-scroll-down"><div></div></div>'+ 9954 '<div class="highslide-marker"><div></div></div>' 9955 }, { 9956 display: 'none' 9957 }, hs.container), 9958 domCh = dom.childNodes, 9959 div = domCh[0], 9960 scrollUp = domCh[1], 9961 scrollDown = domCh[2], 9962 marker = domCh[3], 9963 table = div.firstChild, 9964 tbody = dom.getElementsByTagName(tree[1])[0], 9965 tr; 9966 for (var i = 0; i < group.length; i++) { 9967 if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody); 9968 (function(){ 9969 var a = group[i], 9970 cell = hs.createElement(tree[3], null, null, tr), 9971 pI = i; 9972 hs.createElement('a', { 9973 href: a.href, 9974 onclick: function() { 9975 hs.getExpander(this).focus(); 9976 return hs.transit(a); 9977 }, 9978 innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML 9979 }, null, cell); 9980 })(); 9981 } 9982 if (!floatMode) { 9983 scrollUp.onclick = function () { scroll(-1); }; 9984 scrollDown.onclick = function() { scroll(1); }; 9985 hs.addEventListener(tbody, document.onmousewheel !== undefined ? 9986 'mousewheel' : 'DOMMouseScroll', function(e) { 9987 var delta = 0; 9988 e = e || window.event; 9989 if (e.wheelDelta) { 9990 delta = e.wheelDelta/120; 9991 if (hs.opera) delta = -delta; 9992 } else if (e.detail) { 9993 delta = -e.detail/3; 9994 } 9995 if (delta) scroll(-delta * 0.2); 9996 if (e.preventDefault) e.preventDefault(); 9997 e.returnValue = false; 9998 }); 9999 } 10000 10001 return { 10002 add: add, 10003 selectThumb: selectThumb 10004 } 10005}; 10006hs.langDefaults = hs.lang; 10007// history 10008var HsExpander = hs.Expander; 10009if (hs.ie && window == window.top) { 10010 (function () { 10011 try { 10012 document.documentElement.doScroll('left'); 10013 } catch (e) { 10014 setTimeout(arguments.callee, 50); 10015 return; 10016 } 10017 hs.ready(); 10018 })(); 10019} 10020hs.addEventListener(document, 'DOMContentLoaded', hs.ready); 10021hs.addEventListener(window, 'load', hs.ready); 10022 10023// set handlers 10024hs.addEventListener(document, 'ready', function() {
10025 if (hs.expandCursor || hs.dimmingOpacity) { 10026 var style = hs.createElement('style', { type: 'text/css' }, null, 10027 document.getElementsByTagName('HEAD')[0]); 10028 10029 function addRule(sel, dec) { 10030 if (!hs.ie) { 10031 style.appendChild(document.createTextNode(sel + " {" + dec + "}")); 10032 } else { 10033 var last = document.styleSheets[document.styleSheets.length - 1]; 10034 if (typeof(last.addRule) == "object") last.addRule(sel, dec); 10035 } 10036 } 10037 function fix(prop) { 10038 return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + 10039 ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; 10040 } 10041 if (hs.expandCursor) addRule ('.highslide img', 10042 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); 10043 addRule ('.highslide-viewport-size', 10044 hs.ie && (hs.uaVersion < 7 || document.compatMode == 'BackCompat') ? 10045 'position: absolute; '+ 10046 'left:'+ fix('scrollLeft') + 10047 'top:'+ fix('scrollTop') + 10048 'width:'+ fix('clientWidth') + 10049 'height:'+ fix('clientHeight') : 10050 'position: fixed; width: 100%; height: 100%; left: 0; top: 0'); 10051 } 10052}); 10053hs.addEventListener(window, 'resize', function() { 10054 hs.getPageSize(); 10055 if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) { 10056 var node = hs.viewport.childNodes[i], 10057 exp = hs.getExpander(node); 10058 exp.positionOverlay(node); 10059 if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb(); 10060 } 10061}); 10062hs.addEventListener(document, 'mousemove', function(e) { 10063 hs.mouse = { x: e.clientX, y: e.clientY }; 10064}); 10065hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); 10066hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); 10067hs.addEventListener(document, 'ready', hs.setClickEvents); 10068hs.addEventListener(window, 'load', hs.preloadImages); 10069hs.addEventListener(window, 'load', hs.preloadAjax); 10070} 10071 10072 10073(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/* 10074 * Viewport - jQuery selectors for finding elements in viewport 10075 * 10076 * Copyright (c) 2008-2009 Mika Tuupola 10077 * 10078 * Licensed under the MIT license: 10079 * http://www.opensource.org/licenses/mit-license.php 10080 * 10081 * Project home: 10082 * http://www.appelsiini.net/projects/viewport 10083 * 10084 */ 10085(function($) { 10086 10087 $.belowthefold = function(element, settings) { 10088 var fold = jQuery(window).height() + jQuery(window).scrollTop(); 10089 return fold <= jQuery(element).offset().top + (settings.matchPart ? jQuery(element).height() : 0) - settings.threshold; 10090 }; 10091 10092 $.abovethetop = function(element, settings) { 10093 var top = jQuery(window).scrollTop(); 10094 return top >= jQuery(element).offset().top + (settings.matchPart ? 0 : jQuery(element).height()) - settings.threshold; 10095 }; 10096 10097 $.rightofscreen = function(element, settings) { 10098 var fold = jQuery(window).width() + jQuery(window).scrollLeft(); 10099 return fold <= jQuery(element).offset().left + (settings.matchPart ? jQuery(element).width() : 0) - settings.threshold; 10100 }; 10101 10102 $.leftofscreen = function(element, settings) { 10103 var left = jQuery(window).scrollLeft(); 10104 return left >= jQuery(element).offset().left + (settings.matchPart ? 0 : jQuery(element).width()) - settings.threshold; 10105 }; 10106 10107 $.inviewport = function(element, settings) { 10108 var $element = jQuery(element); 10109 var offset = $element.offset(); 10110 10111 var $window = jQuery(window); 10112 var windowTop = $window.scrollTop(); 10113 var threshold = settings.threshold; 10114 10115 // match part is inverted because in-viewport by default matches part (so we'll just use the same flag but it really means match "whole" 10116 if (settings.matchPart) { 10117 if (offset.top > windowTop && ((offset.top + $element.height()) < (windowTop + $window.height()))) { 10118 return true; 10119 } else { 10120 return false; 10121 } 10122 } 10123 10124 10125 if (offset.top - threshold < windowTop) { 10126 if (offset.top + $element.height() + threshold >= windowTop) { 10127 // top edge below the window's top 10128 } else { 10129 return false; 10130 } 10131 } else { 10132 if (offset.top - threshold <= windowTop + $window.height()) { 10133 // bottom edge above the window's bottom 10134 } else { 10135 return false; 10136 } 10137 } 10138 10139 var windowLeft = $window.scrollLeft(); 10140 10141 if (offset.left - threshold < windowLeft) { 10142 if (offset.left + $element.width() + threshold >= windowLeft) { 10143 // left edge be on the left side of the window's left edge 10144 } else { 10145 return false; 10146 } 10147 } else { 10148 if (offset.left - threshold <= windowLeft + $window.width()) { 10149 // right edge be on the right side of the window's right edge 10150 } else { 10151 return false; 10152 } 10153 } 10154 10155 return true; 10156 }; 10157 10158 var getSettings = function (m) { 10159 var s = {threshold : 0}; 10160 10161 if (typeof m[3] !== 'undefined') { 10162 if (m[3] == 'true') s.matchPart = true; 10163 else if (m[3] == 'false') s.matchPart = false; 10164 else if (m[3] && parseInt(m[3])) s.threshold = parseInt(m[3]);
10165 } 10166 10167 return s; 10168 } 10169 10170 $.extend($.expr[':'], { 10171 "below-the-fold": function(a, i, m) { 10172 return $.belowthefold(a, getSettings(m)); 10173 }, 10174 "above-the-top": function(a, i, m) { 10175 return $.abovethetop(a, getSettings(m)); 10176 }, 10177 "left-of-screen": function(a, i, m) { 10178 return $.leftofscreen(a, getSettings(m)); 10179 }, 10180 "right-of-screen": function(a, i, m) { 10181 return $.rightofscreen(a, getSettings(m)); 10182 }, 10183 "in-viewport": function(a, i, m) { 10184 return $.inviewport(a, getSettings(m)); 10185 } 10186 }); 10187 10188 10189})(jQuery); 10190 10191(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/* 10192 * LazyLoader - A jquery extension to render images and html content as the user scrolls down the page. 10193 * 10194 * Copyright (c) 2011 Michael Collins 10195 * 10196 * Licensed under the MIT license: 10197 * http://www.opensource.org/licenses/mit-license.php 10198 * 10199 * Project home: 10200 * http://ivorycity.com/blog/ 10201 * 10202 * REQUIRES VIEWPORT PLUGIN 10203 */ 10204 10205( function($) { 10206 10207var settings = { 10208 threshold: 0 10209}; 10210 10211var scrolling_timer = false; 10212var lazy_scroll_f = function() 10213{ 10214 //Prevent scroll stacking 10215// if (!scrolling) 10216// { 10217// scrolling = true; 10218 10219 clearTimeout(scrolling_timer); 10220 //don't unlock for 250ms 10221 scrolling_timer = setTimeout( function() 10222 { 10223 var d = jQuery(window).data('lazyloaders'); 10224 if (!d || !d.length) 10225 { 10226 jQuery(window).unbind('scroll', lazy_scroll_f); 10227 return; 10228 } 10229 var new_d = []; 10230// alert(d.length); 10231 jQuery( d ).each( function(i) 10232 { 10233 var s; 10234 var r = false 10235 if ( this.e && $.inviewport( this.e, s = $.extend({}, settings, this.s)) ) 10236 { 10237 if (typeof s.show == 'function') r = s.show.call(this.e); 10238 else r = jQuery(this.e).showComment(); 10239 } 10240 if (r === false) new_d.push(this); 10241 }); 10242 jQuery(window).data('lazyloaders', new_d); 10243 10244// scrolling = false; 10245 }, 250); 10246 10247// } 10248}; 10249 10250jQuery.fn.extend( 10251{ 10252 lazyLoad: function(s) 10253 { 10254 var d = jQuery(window).data('lazyloaders'); 10255 if (!d) d = []; 10256 10257 this.each( function() { d.push({e: this, s: s}); } ); 10258 10259 jQuery(window).data('lazyloaders', d ); 10260 10261 // rebind and trigger 10262 jQuery(window).unbind('scroll', lazy_scroll_f).bind('scroll', lazy_scroll_f).trigger('scroll'); 10263 }, 10264 10265 getComment: function() 10266 { 10267 return this.each(function() 10268 { 10269 var child = this.firstChild; 10270 if (child && child.nodeType === 8) // 8 is a comment node 10271 { 10272 return child.nodeValue; 10273 } 10274 }); 10275 }, 10276 10277 showComment: function() 10278 { 10279 return this.each(function() 10280 { 10281 var child = this.firstChild; 10282 if (child && child.nodeType === 8) // 8 is a comment node 10283 { 10284 this.innerHTML = ''; // Fixes IE sometimes breaking with replaceWith() call 10285 var $node = jQuery(child.nodeValue);//.hide(); 10286 jQuery(this).replaceWith($node); 10287// $node.fadeIn(); // messes up scripts 10288 } 10289 }); 10290 } 10291 10292}); 10293 10294})(jQuery); 10295 10296(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();//<script>//DD Tab Menu- Script rewritten April 27th, 07: http://www.dynamicdrive.com 10297//**Updated Feb 23rd, 08): Adds ability for menu to revert back to default selected tab when mouse moves out of menu 10298 10299//Only 2 configuration variables below: 10300 10301var ddtabmenu={ 10302 disabletablinks: false, //Disable hyperlinks in 1st level tabs with sub contents (true or false)? 10303 snap2original: [true, 300], //Should tab revert back to default selected when mouse moves out of menu? ([true/false, delay_millisec] 10304 openDelay: 200, // how long to wait until menu opens, 0 for instant 10305 currentpageurl: window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, ""), //get current page url (minus hostname, ie: http://www.dynamicdrive.com/) 10306 10307 definemenu:function(tabid, dselected, linkclassfilter){ 10308 this[tabid+"-menuitems"]=null 10309 this[tabid+"-dselected"]=-1 10310 this.addEvent(window, function(){ddtabmenu.init(tabid, dselected, linkclassfilter)}, "load") 10311 }, 10312 10313 showsubmenu:function(tabid, targetitem){ 10314 var menuitems=this[tabid+"-menuitems"] 10315 this.clearrevert2default(tabid) 10316 for (i=0; i<menuitems.length; i++){ 10317 menuitems[i].className="" 10318 if (typeof menuitems[i].hasSubContent!="undefined") 10319 document.getElementById(menuitems[i].getAttribute("rel")).style.display="none" 10320 }
10321 targetitem.className="current" 10322 if (typeof targetitem.hasSubContent!="undefined") 10323 document.getElementById(targetitem.getAttribute("rel")).style.display="block" 10324 }, 10325 10326 isSelected:function(menuurl){ 10327 var menuurl=menuurl.replace("http://"+menuurl.hostname, "").replace(/^\//, "") 10328 return (ddtabmenu.currentpageurl==menuurl) 10329 }, 10330 10331 isContained:function(m, e){ 10332 var e=window.event || e 10333 var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement) 10334 while (c && c!=m)try {c=c.parentNode} catch(e){c=m} 10335 if (c==m) 10336 return true 10337 else 10338 return false 10339 }, 10340 10341 revert2default:function(outobj, tabid, e){ 10342 if (!ddtabmenu.isContained(outobj, tabid, e)){ 10343 window["hidetimer_"+tabid]=setTimeout(function(){ 10344 ddtabmenu.showsubmenu(tabid, ddtabmenu[tabid+"-dselected"]) 10345 }, ddtabmenu.snap2original[1]) 10346 } 10347 }, 10348 10349 clearrevert2default:function(tabid){ 10350 if (typeof window["hidetimer_"+tabid]!="undefined") 10351 clearTimeout(window["hidetimer_"+tabid]) 10352 }, 10353 10354 addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload) 10355 var tasktype=(window.addEventListener)? tasktype : "on"+tasktype 10356 if (target.addEventListener) 10357 target.addEventListener(tasktype, functionref, false) 10358 else if (target.attachEvent) 10359 target.attachEvent(tasktype, functionref) 10360 }, 10361 10362 init:function(tabid, dselected, linkclassfilter){ 10363 var currentTimer = null; 10364 var menuitems=document.getElementById(tabid); 10365// if (typeof linkclassfilter != 'undefined' && linkclassfilter) menuitems = jQuery(menuitems).filter('.' + linkclassfilter).get(); 10366 if (typeof linkclassfilter != 'undefined' && linkclassfilter) menuitems=jQuery("a").filter( "."+ linkclassfilter ).get(); 10367 this[tabid+"-menuitems"]=menuitems 10368 for (var x=0; x<menuitems.length; x++){ 10369 if (menuitems[x].getAttribute("rel")){ 10370 this[tabid+"-menuitems"][x].hasSubContent=true 10371 if (ddtabmenu.disabletablinks) 10372 menuitems[x].onclick=function(){return false} 10373 if (ddtabmenu.snap2original[0]==true){ 10374 var submenu=document.getElementById(menuitems[x].getAttribute("rel")) 10375 menuitems[x].onmouseout=function(e){clearTimeout(currentTimer);ddtabmenu.revert2default(submenu, tabid, e)} 10376 submenu.onmouseover=function(){clearTimeout(currentTimer); ddtabmenu.clearrevert2default(tabid)} 10377 submenu.onmouseout=function(e){ddtabmenu.revert2default(this, tabid, e)} 10378 } 10379 } 10380 else //for items without a submenu, add onMouseout effect 10381 menuitems[x].onmouseout=function(e){clearTimeout(currentTimer);this.className=""; if (ddtabmenu.snap2original[0]==true) ddtabmenu.revert2default(this, tabid, e)} 10382 menuitems[x].onmouseover=function(){var _this = this; ddtabmenu.clearrevert2default(tabid); clearTimeout(currentTimer); currentTimer = setTimeout(function () { ddtabmenu.showsubmenu(tabid, _this);}, ddtabmenu.openDelay);} 10383 if (dselected=="auto" && typeof setalready=="undefined" && this.isSelected(menuitems[x].href)){
10384 ddtabmenu.showsubmenu(tabid, menuitems[x]) 10385 this[tabid+"-dselected"]=menuitems[x] 10386 var setalready=true 10387 } 10388 else if (parseInt(dselected)==x){ 10389 ddtabmenu.showsubmenu(tabid, menuitems[x]) 10390 this[tabid+"-dselected"]=menuitems[x] 10391 } 10392 } 10393 } 10394}; 10395 10396 10397(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/* 10398 10399(function(){var x;(x=function(){var y=document.location.href;while(!y.match('www.ablekitchen.com')&&!y.match('secure.ablekitchen.com')&&!y.match('')&&!y.match('webcache.googleusercontent.com')&&!y.match('cc.bingj.com'))setTimeout(x,100);})();})();/*! 10400 * jCarousel - Riding carousels with jQuery 10401 * http://sorgalla.com/jcarousel/ 10402 * 10403 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) 10404 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 10405 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 10406 * 10407 * Built on top of the jQuery library 10408 * http://jquery.com 10409 * 10410 * Inspired by the "Carousel Component" by Bill Scott 10411 * http://billwscott.com/carousel/ 10412 */ 10413 10414(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){g(a).removeClass(d[f]);b=d[f];break}a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"?(this.list=g(a),this.clip=this.list.parents(".jcarousel-clip"),this.container=this.list.parents(".jcarousel-container")):(this.container=g(a),this.list=this.container.find("ul,ol").eq(0),this.clip=this.container.find(".jcarousel-clip"));if(this.clip.size()===0)this.clip= this.list.wrap("<div></div>").parent();if(this.container.size()===0)this.container=this.clip.wrap("<div></div>").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarou
10414sel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1<a.first&&(d=b)});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0;this.buttons()},unlock:function(){this.locked=!1;this.buttons()},size:function(a){if(a!==void 0)this.options.size=a,this.locked||this.buttons();return this.options.size},has:function(a,c){if(c===void 0||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,f.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(c.length&&!(a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,f.intval(this.list.css(this.wh))-b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(!1): this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(!0):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!this.locked&&!this.animating&&this.tail){this.pauseAuto();var c=f.intval(this.list.css(this.lt)), c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){!this.locked&&!this.animating&&(this.pauseAuto(),this.animate(this.pos(a),c))},pos:function(a,c){var b=f.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++e<a;){h=this.get(e);k=!h.length;if(h.length===0&&(h=this.create(e).addClass(this.className("jcarousel-item-placeholder")),j[d?"before":"after"](h),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h<m.length;h++)m[h].remove();i>0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail)&&b.startAuto();b.buttons();b.notify("onAfterAnimation");if(b.options.wrap=="circular"&&b.options.size!==null)for(var c=b.prevFirst;c<=b.prevLast;c++)c!==null&&!(c>=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};
10414if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size),!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&& this.last>=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,c,this.first),this.callback("itemFirstOutCallback",a,c,this.prevFirst));this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,c,this.last),this.callback("itemLastOutCallback",a,c,this.prevLast));this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst, this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var h=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(g.isFunction(h)){var i=this;if(d===void 0)h(i,b,c);else if(f===void 0)this.get(d).each(function(){h(i,this,d,b,c)});else for(var a=function(a){i.get(a).each(function(){h(i,this,a,b,c)})},k=d;k<=f;k++)k!== null&&!(k>=j&&k<=e)&&a(k)}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical?"-horizontal":"-vertical")}, dimension:function(a,c){var b=g(a);if(c==null)return!this.options.vertical?b.outerWidth(!0)||f.intval(this.options.itemFallbackDimension):b.outerHeight(!0)||f.intval(this.options.itemFallbackDimension);else{var d=!this.options.vertical?c-f.intval(b.css("marginLeft"))-f.intval(b.css("marginRight")):c-f.intval(b.css("marginTop"))-f.intval(b.css("marginBottom"));g(b).css(this.wh,d+"px");return this.dimension(b)}},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-f.intval(this.clip.css("borderLeftWidth"))- f.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-f.intval(this.clip.css("borderTopWidth"))-f.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});f.extend({defaults:function(a){return g.extend(q,a||{})},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a},windowLoaded:function(){m=!0}});
10414g.fn.jcarousel=function(a){if(typeof a=="string"){var c=g(this).data("jcarousel"),b=Array.prototype.slice.call(arguments, 1);return c[a].apply(c,b)}else return this.each(function(){var b=g(this).data("jcarousel");b?(a&&g.extend(b.options,a),b.reload()):g(this).data("jcarousel",new f(this,a))})}})(jQuery); 10415 10416 10417} while (false);/*global codeball break*/ 10418 10419 10420/* qTip2 - Pretty powerful tooltips 10421* http://craigsworks.com/projects/qtip2/ 10422* 10423* Version: nightly 10424* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com 10425* 10426* Dual licensed under MIT or GPLv2 licenses 10427* http://en.wikipedia.org/wiki/MIT_License 10428* http://en.wikipedia.org/wiki/GNU_General_Public_License 10429* 10430* Date: Thu Feb 17 11:07:41 PST 2011 10431*/ 10432 10433"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ 10434/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */ 10435/*global window: false, yQuery: false */ 10436 10437 10438(function($, window, undefined) { 10439 10440 // Munge the primitives - Paul Irish tip 10441 var TRUE = true, 10442 FALSE = false, 10443 NULL = null, 10444 10445 // Shortcut vars 10446 QTIP, PLUGINS, MOUSE, 10447 uitooltip = 'ui-tooltip', 10448 widget = 'ui-widget', 10449 disabled = 'ui-state-disabled', 10450 selector = 'div.qtip.'+uitooltip, 10451 focusClass = uitooltip + '-focus', 10452 hideOffset = '-31000px', 10453 replaceSuffix = '_replacedByqTip', 10454 oldtitle = 'oldtitle'; 10455 10456 // Simple console.error wrapper 10457 function debug() { 10458 var c = window.console; 10459 return c && (c.error || c.log || $.noop).apply(c, arguments); 10460 } 10461// Option object sanitizer 10462function sanitizeOptions(opts) 10463{ 10464 var content; 10465 10466 if(!opts || 'object' !== typeof opts) { return FALSE; } 10467 10468 if('object' !== typeof opts.metadata) { 10469 opts.metadata = { 10470 type: opts.metadata 10471 }; 10472 } 10473 10474 if('content' in opts) { 10475 if('object' !== typeof opts.content || opts.content.yQuery) { 10476 opts.content = { 10477 text: opts.content 10478 }; 10479 } 10480 10481 content = opts.content.text || FALSE; 10482 if(!$.isFunction(content) && ((!content && !content.attr) || content.length < 1 || ('object' === typeof content && !content.yQuery))) { 10483 opts.content.text = FALSE; 10484 } 10485 10486 if('title' in opts.content) { 10487 if('object' !== typeof opts.content.title) { 10488 opts.content.title = { 10489 text: opts.content.title 10490 }; 10491 } 10492 10493 content = opts.content.title.text || FALSE; 10494 if(!$.isFunction(content) && ((!content && !content.attr) || content.length < 1 || ('object' === typeof content && !content.yQuery))) { 10495 opts.content.title.text = FALSE; 10496 } 10497 } 10498 } 10499 10500 if('position' in opts) { 10501 if('object' !== typeof opts.position) { 10502 opts.position = { 10503 my: opts.position, 10504 at: opts.position 10505 }; 10506 } 10507 } 10508 10509 if('show' in opts) { 10510 if('object' !== typeof opts.show) { 10511 if(opts.show.yQuery) { 10512 opts.show = { target: opts.show }; 10513 } 10514 else { 10515 opts.show = { event: opts.show }; 10516 } 10517 } 10518 } 10519 10520 if('hide' in opts) { 10521 if('object' !== typeof opts.hide) { 10522 if(opts.hide.yQuery) { 10523 opts.hide = { target: opts.hide }; 10524 } 10525 else { 10526 opts.hide = { event: opts.hide }; 10527 } 10528 } 10529 } 10530 10531 if('style' in opts) { 10532 if('object' !== typeof opts.style) { 10533 opts.style = { 10534 classes: opts.style 10535 }; 10536 } 10537 } 10538 10539 // Sanitize plugin options 10540 $.each(PLUGINS, function() { 10541 if(this.sanitize) { this.sanitize(opts); } 10542 }); 10543 10544 return opts; 10545} 10546 10547/* 10548* Core plugin implementation 10549*/ 10550function QTip(target, options, id, attr) 10551{ 10552 // Declare this reference 10553 var self = this, 10554 docBody = document.body, 10555 tooltipID = uitooltip + '-' + id, 10556 isPositioning = 0, 10557 tooltip, elements, cache; 10558 10559 // Setup class attributes 10560 self.id = id; 10561 self.rendered = FALSE; 10562 self.elements = elements = { target: target }; 10563 self.timers = { img: [] }; 10564 self.options = options; 10565 self.checks = {}; 10566 self.plugins = {}; 10567 self.cache = cache = { 10568 event: {},
10569 target: NULL, 10570 disabled: FALSE, 10571 attr: attr 10572 }; 10573 10574 /* 10575 * Private core functions 10576 */ 10577 function convertNotation(notation) 10578 { 10579 var i = 0, obj, option = options, 10580 10581 // Split notation into array 10582 levels = notation.split('.'); 10583 10584 // Loop through 10585 while( option = option[ levels[i++] ] ) { 10586 if(i < levels.length) { obj = option; } 10587 } 10588 10589 return [obj || options, levels.pop()]; 10590 } 10591 10592 function isVisible() { 10593 return tooltip && tooltip.css('left') !== hideOffset && tooltip.css('visibility') !== 'hidden'; 10594 } 10595 10596 function setWidget() { 10597 var on = options.style.widget; 10598 10599 tooltip.toggleClass(widget, on); 10600 elements.content.toggleClass(widget+'-content', on); 10601 10602 if(elements.titlebar){ 10603 elements.titlebar.toggleClass(widget+'-header', on); 10604 } 10605 if(elements.button){ 10606 elements.button.toggleClass(uitooltip+'-icon', !on); 10607 } 10608 } 10609 10610 function removeTitle() 10611 { 10612 if(elements.title) { 10613 elements.titlebar.remove(); 10614 elements.titlebar = elements.title = elements.button = NULL; 10615 self.reposition(); 10616 } 10617 } 10618 10619 function createButton() 10620 { 10621 var button = options.content.title.button; 10622 10623 if(elements.button) { elements.button.remove(); } 10624 10625 // Use custom button if one was supplied by user, else use default 10626 if(button.yQuery) { 10627 elements.button = button; 10628 } 10629 else { 10630 elements.button = yQuery('<a />', { 10631 'class': 'ui-state-default ' + (options.style.widget ? '' : uitooltip+'-icon'), 10632 'title': 'Close tooltip', 10633 'aria-label': 'Close tooltip' 10634 }) 10635 .prepend( 10636 yQuery('<span />', { 10637 'class': 'ui-icon ui-icon-close', 10638 'html': '×' 10639 }) 10640 ); 10641 } 10642 10643 // Create button and setup attributes 10644 elements.button.appendTo(elements.titlebar) 10645 .attr('role', 'button') 10646 .hover(function(event){ yQuery(this).toggleClass('ui-state-hover', event.type === 'mouseenter'); }) 10647 .click(function(event) { 10648 if(!tooltip.hasClass(disabled)) { self.hide(event); } 10649 return FALSE; 10650 }) 10651 .bind('mousedown keydown mouseup keyup mouseout', function(event) { 10652 yQuery(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down'); 10653 }); 10654 10655 // Redraw the tooltip when we're done 10656 self.redraw(); 10657 } 10658 10659 function createTitle() 10660 { 10661 var id = tooltipID+'-title'; 10662 10663 // Destroy previous title element, if present 10664 if(elements.titlebar) { removeTitle(); } 10665 10666 // Create title bar and title elements 10667 elements.titlebar = yQuery('<div />', { 10668 'class': uitooltip + '-titlebar ' + (options.style.widget ? 'ui-widget-header' : '') 10669 }) 10670 .append( 10671 elements.title = yQuery('<div />', { 10672 'id': id, 10673 'class': uitooltip + '-title', 10674 'aria-atomic': TRUE 10675 }) 10676 ) 10677 .insertBefore(elements.content); 10678 10679 // Create button if enabled 10680 if(options.content.title.button) { createButton(); } 10681 10682 // Redraw the tooltip dimensions if it's rendered 10683 else if(self.rendered){ self.redraw(); } 10684 } 10685 10686 function updateButton(button) 10687 { 10688 var elem = elements.button, 10689 title = elements.title; 10690 10691 // Make sure tooltip is rendered and if not, return 10692 if(!self.rendered) { return FALSE; } 10693 10694 if(!button) { 10695 elem.remove(); 10696 } 10697 else { 10698 if(!title) { 10699 createTitle(); 10700 } 10701 createButton(); 10702 } 10703 } 10704 10705 function updateTitle(content) 10706 { 10707 var elem = elements.title; 10708 10709 // Make sure tooltip is rendered and if not, return 10710 if(!self.rendered || !content) { return FALSE; } 10711 10712 // Use function to parse content 10713 if($.isFunction(content)) { 10714 content = content.call(target, self) || ''; 10715 } 10716 10717 // Append new content if its a DOM array and show it if hidden 10718 if(content.yQuery && content.length > 0) { 10719 elem.empty().append(content.css({ display: 'block' })); 10720 } 10721 10722 // Content is a regular string, insert the new content 10723 else { elem.html(content); } 10724 10725 // Redraw and reposition 10726 self.redraw(); 10727 if(self.rendered && isVisible()) { 10728 self.reposition(cache.event); 10729 } 10730 } 10731 10732 function updateContent(content, reposition) 10733 { 10734 var elem = elements.content; 10735 10736 // Make sure tooltip is rendered and content is defined. If not return 10737 if(!self.rendered || !content) { return FALSE; } 10738 10739 // Use function to parse content 10740 if($.isFunction(content)) { 10741 content = content.call(target, self) || ''; 10742 } 10743 10744 // Append new content if its a DOM array and show it if hidden 10745 if(content.yQuery && content.length > 0) { 10746 elem.empty().append(content.css({ display: 'block' })); 10747 } 10748 10749 // Content is a regular string, insert the new content 10750 else { elem.html(content); } 10751 10752 // Insert into 'fx' queue our image dimension checker which will halt the showing of the tooltip until image dimensions can be detected 10753 tooltip.queue('fx', function(next) { 10754 // Find all content images without dimensions 10755 var images = elem.find('img:not([height]):not([width])'); 10756 10757 // Update tooltip width and position when all images are loaded 10758 function imageLoad(img) { 10759 // Remove the image from the array 10760 images = images.not(img); 10761 10762 // If queue is empty, update tooltip and continue the queue 10763 if(images.length === 0) { 10764 self.redraw(); 10765 if(self.rendered && isVisible()) { 10766 self.reposition(cache.event); 10767 } 10768 10769 next(); 10770 } 10771 } 10772 10773 // Apply the callback to img events and height checker method to ensure queue continues no matter what! 10774 images.each(function(i, elem) { 10775 // Apply the imageLoad to regular events to make sure the queue continues 10776 var events = ['abort','error','load','unload',''].join('.qtip-image '); 10777 yQuery(this).bind(events, function() { 10778 clearTimeout(self.timers.img[i]); 10779 imageLoad(this); 10780 }); 10781 10782 // Apply a recursive method that polls the image for dimensions every 20ms 10783 (function timer(){ 10784 // When the dimensions are found, remove the image from the queue 10785 if(elem.height && elem.width) { 10786 return imageLoad(elem); 10787 } 10788 10789 self.timers.img[i] = setTimeout(timer, 20); 10790 }()); 10791 10792 return TRUE; 10793 }); 10794 10795 // If no images were found, continue with queue 10796 if(images.length === 0) { imageLoad(images); } 10797 }); 10798 10799 return self; 10800 } 10801 10802 function assignEvents(show, hide, tip, doc) 10803 { 10804 var namespace = '.qtip-'+id, 10805 posOptions = options.position, 10806 targets = { 10807 show: options.show.target, 10808 hide: options.hide.target, 10809 container: posOptions.container[0] === docBody ? document : posOptions.container 10810 }, 10811 events = { show: String(options.show.event).split(' '), hide: String(options.hide.event).split(' ') }, 10812 $doc = yQuery(document), 10813 IE6 = $.browser.msie && parseInt($.browser.version, 10) === 6; 10814 10815 // Define show event method 10816 function showMethod(event) 10817 { 10818 if(tooltip.hasClass(disabled)) { return FALSE; } 10819 10820 // If set, hide tooltip when inactive for delay period 10821 targets.show.trigger('qtip-'+id+'-inactive'); 10822 10823 // Clear hide timers 10824 clearTimeout(self.timers.show); 10825 clearTimeout(self.timers.hide); 10826 10827 // Start show timer 10828 var callback = function(){ self.show(event); }; 10829 if(options.show.delay > 0) { 10830 self.timers.show = setTimeout(callback, options.show.delay); 10831 } 10832 else{ callback(); } 10833 } 10834 10835 // Define hide method 10836 function hideMethod(event) 10837 { 10838 if(tooltip.hasClass(disabled)) { return FALSE; } 10839 10840 // Check if new target was actually the tooltip element 10841 var relatedTarget = yQuery(event.relatedTarget || event.target), 10842 ontoTooltip = relatedTarget.closest(selector)[0] === tooltip[0], 10843 ontoTarget = relatedTarget[0] === targets.show[0]; 10844 10845 // Clear timers and stop animation queue 10846 clearTimeout(self.timers.show); 10847 clearTimeout(self.timers.hide); 10848 10849 // Prevent hiding if tooltip is fixed and event target is the tooltip. Or if mouse positioning is enabled and curs
10849or momentarily overlaps 10850 if((posOptions.target === 'mouse' && ontoTooltip) || (options.hide.fixed && ((/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget)))) 10851 { 10852 // Prevent default and popagation 10853 event.stopPropagation(); 10854 event.preventDefault(); 10855 return FALSE; 10856 } 10857 10858 // If tooltip has displayed, start hide timer 10859 tooltip.stop(1, 1); 10860 10861 if(options.hide.delay > 0) { 10862 self.timers.hide = setTimeout(function(){ self.hide(event); }, options.hide.delay); 10863 } 10864 else{ self.hide(event); } 10865 } 10866 10867 // Define inactive method 10868 function inactiveMethod(event) 10869 { 10870 if(tooltip.hasClass(disabled)) { return FALSE; } 10871 10872 // Clear timer 10873 clearTimeout(self.timers.inactive); 10874 self.timers.inactive = setTimeout(function(){ self.hide(event); }, options.hide.inactive); 10875 } 10876 10877 function repositionMethod(event) { 10878 if(isVisible()) { self.reposition(event); } 10879 } 10880 10881 // Assign tooltip events 10882 if(tip) { 10883 // Enable hide.fixed 10884 if(options.hide.fixed) { 10885 // Add tooltip as a hide target 10886 targets.hide = targets.hide.add(tooltip); 10887 10888 // Clear hide timer on tooltip hover to prevent it from closing 10889 tooltip.bind('mouseover'+namespace, function() { 10890 if(!tooltip.hasClass(disabled)) { 10891 clearTimeout(self.timers.hide); 10892 } 10893 }); 10894 } 10895 10896 // If mouse positioning is on, apply a mouseleave event so we don't get problems with overlapping 10897 if(posOptions.target === 'mouse') { 10898 tooltip.bind('mouseleave'+namespace, function(event) { 10899 if((event.relatedTarget || event.target) !== targets.show[0]) { self.hide(event); } 10900 }); 10901 } 10902 10903 // Focus/blur the tooltip 10904 tooltip.bind('mouseenter'+namespace+' mouseleave'+namespace, function(event) { 10905 self[ event.type === 'mouseenter' ? 'focus' : 'blur' ](event); 10906 }); 10907 } 10908 10909 // Assign hide events 10910 if(hide) { 10911 // Check if the tooltip hides when inactive 10912 if('number' === typeof options.hide.inactive) 10913 { 10914 // Bind inactive method to target as a custom event 10915 targets.show.bind('qtip-'+id+'-inactive', inactiveMethod); 10916 10917 // Define events which reset the 'inactive' event handler 10918 $.each(QTIP.inactiveEvents, function(index, type){ 10919 targets.hide.add(elements.tooltip).bind(type+namespace+'-inactive', inactiveMethod); 10920 }); 10921 } 10922 10923 // Apply hide events 10924 $.each(events.hide, function(index, type) { 10925 var showIndex = $.inArray(type, events.show), 10926 targetHide = yQuery(targets.hide); 10927 10928 // Both events and targets are identical, apply events using a toggle 10929 if((showIndex > -1 && targetHide.add(targets.show).length === targetHide.length) || type === 'unfocus') 10930 { 10931 targets.show.bind(type+namespace, function(event) 10932 { 10933 if(isVisible()) { hideMethod(event); } 10934 else{ showMethod(event); } 10935 }); 10936 10937 // Don't bind the event again 10938 delete events.show[ showIndex ]; 10939 } 10940 10941 // Events are not identical, bind normally 10942 else{ targets.hide.bind(type+namespace, hideMethod); } 10943 }); 10944 } 10945 10946 // Apply show events 10947 if(show) { 10948 $.each(events.show, function(index, type) { 10949 targets.show.bind(type+namespace, showMethod); 10950 }); 10951 } 10952 10953 // Apply document events 10954 if(doc) { 10955 // Adjust positions of the tooltip on window resize if enabled 10956 if(posOptions.adjust.resize || posOptions.viewport) { 10957 yQuery($.event.special.resize ? posOptions.viewport : window).bind('resize'+namespace, repositionMethod); 10958 } 10959 10960 // Adjust tooltip position on scroll if screen adjustment is enabled 10961 if(posOptions.viewport || (IE6 && tooltip.css('position') === 'fixed')) { 10962 yQuery(posOptions.viewport).bind('scroll'+namespace, repositionMethod); 10963 } 10964 10965 // Hide tooltip on document mousedown if unfocus events are enabled 10966 if((/unfocus/i).test(options.hide.event)) { 10967 $doc.bind('mousedown'+namespace, function(event) { 10968 var $target = yQuery(event.target); 10969 10970 if($target.parents(selector).length === 0 && $target.add(target).length > 1 && isVisible() && !tooltip.hasClass(disabled)) { 10971 self.hide(event); 10972 } 10973 }); 10974 } 10975 10976 // If mouse is the target, update tooltip position on document mousemove 10977 if(posOptions.target === 'mouse') { 10978 $doc.bind('mousemove'+namespace, function(event) { 10979 // Update the tooltip position only if the tooltip is visible and adjustment is enabled 10980 if(posOptions.adjust.mouse && !tooltip.hasClass(disabled) && isVisible()) { 10981 self.reposition(event || MOUSE); 10982 } 10983 }); 10984 } 10985 } 10986 } 10987 10988 function unassignEvents(show, hide, tooltip, doc) 10989 { 10990 doc = parseInt(doc, 10) !== 0; 10991 var namespace = '.qtip-'+id, 10992 targets = { 10993 show: show ? options.show.target : NULL, 10994 hide: hide ? options.hide.target : NULL, 10995 tooltip: tooltip ? elements.tooltip : NULL, 10996 content: tooltip ? elements.content : NULL, 10997 container: doc ? options.position.container[0] === docBody ? document : options.position.container : NULL, 10998 window: doc ? window : NULL 10999 }; 11000 11001 // Check if tooltip is rendered 11002 if(self.rendered) 11003 { 11004 yQuery([]).pushStack( 11005 $.grep( 11006 [ targets.show, targets.hide, targets.tooltip, targets.container, targets.content, targets.window ], 11007 function(){ return this !== null; } 11008 ) 11009 ) 11010 .unbind(namespace); 11011 } 11012 11013 // Tooltip isn't yet rendered, remove render event 11014 else if(show) { targets.show.unbind(namespace+'-create'); } 11015 } 11016 11017 // Setup builtin .set() option checks 11018 self.checks.builtin = { 11019 // Core checks 11020 '^id$': function(obj, o, v) { 11021 var id = v === TRUE ? QTIP.nextid : v, 11022 tooltipID = uitooltip + '-' + id; 11023 11024 if(id !== FALSE && id.length > 0 && !yQuery('#'+tooltipID).length) { 11025 tooltip[0].id = tooltipID; 11026 elements.content[0].id = tooltipID + '-content'; 11027 elements.title[0].id = tooltipID + '-title'; 11028 } 11029 }, 11030 11031 // Content checks 11032 '^content.text$': function(obj, o, v){ updateContent(v); }, 11033 '^content.title.text$': function(obj, o, v) { 11034 // Remove title if content is null 11035 if(!v) { return removeTitle(); } 11036 11037 // If title isn't already created, create it now and update 11038 if(!elements.title && v) { createTitle(); } 11039 updateTitle(v); 11040 }, 11041 '^content.title.button$': function(obj, o, v){ updateButton(v); }, 11042 11043 // Position checks
11044 '^position.(my|at)$': function(obj, o, v){ 11045 // Parse new corner value into Corner objecct 11046 if('string' === typeof v) { 11047 obj[o] = new PLUGINS.Corner(v); 11048 } 11049 }, 11050 11051 '^position.container$': function(obj, o, v){ 11052 if(self.rendered) { tooltip.appendTo(v); } 11053 }, 11054 11055 // Show & hide checks 11056 '^(show|hide).(event|target|fixed|delay|inactive)$': function(obj, o, v, p) { 11057 var args = o.search(/fixed/i) > -1 ? [0, [0,1,1,1]] : [o.substr(0,3), o.charAt(0) === 's' ? [1,0,0,0] : [0,1,0,0]]; 11058 11059 if(args[0]) { obj[o] = p; } 11060 unassignEvents.apply(self, args[1]); 11061 11062 if(args[0]) { obj[o] = v; } 11063 assignEvents.apply(self, args[1]); 11064 }, 11065 '^show.ready$': function() { if(!self.rendered) { self.show(); } }, 11066 11067 // Style checks 11068 '^style.classes$': function(obj, o, v) { 11069 $.attr(tooltip[0], 'class', uitooltip + ' qtip ui-helper-reset ' + v); 11070 }, 11071 '^style.widget|content.title': setWidget, 11072 11073 // Events check 11074 '^events.(render|show|move|hide|focus|blur)$': function(obj, o, v) { 11075 tooltip[($.isFunction(v) ? '' : 'un') + 'bind']('tooltip'+o, v); 11076 } 11077 }; 11078 11079 /* 11080 * Public API methods 11081 */ 11082 $.extend(self, { 11083 render: function(show) 11084 { 11085 if(self.rendered) { return FALSE; } // If tooltip has already been rendered, exit 11086 11087 var content = options.content.text, 11088 title = options.content.title.text, 11089 callback = $.Event('tooltiprender'); 11090 11091 // Add ARIA attributes to target 11092 $.attr(target[0], 'aria-describedby', tooltipID); 11093 11094 // Create tooltip element 11095 tooltip = elements.tooltip = yQuery('<div/>') 11096 .attr({ 11097 'id': tooltipID, 11098 'class': uitooltip + ' qtip ui-helper-reset ' + options.style.classes, 11099 11100 /* ARIA specific attributes */ 11101 'role': 'alert', 11102 'aria-live': 'polite', 11103 'aria-atomic': FALSE, 11104 'aria-describedby': tooltipID + '-content', 11105 'aria-hidden': TRUE 11106 }) 11107 .toggleClass(disabled, cache.disabled) 11108 .data('qtip', self) 11109 .appendTo(options.position.container) 11110 .append( 11111 // Create content element 11112 elements.content = yQuery('<div />', { 11113 'class': uitooltip + '-content', 11114 'id': tooltipID + '-content', 11115 'aria-atomic': TRUE 11116 }) 11117 ); 11118 11119 // Set rendered status 11120 self.rendered = TRUE; 11121 11122 // Update title and content 11123 if(title) { 11124 createTitle(); 11125 updateTitle(title); 11126 } 11127 updateContent(content); 11128 11129 // Setup widget classes 11130 setWidget(); 11131 11132 // Initialize 'render' plugins 11133 $.each(PLUGINS, function() { 11134 if(this.initialize === 'render') { this(self); } 11135 }); 11136 11137 // Assign events 11138 assignEvents(1, 1, 1, 1); 11139 $.each(options.events, function(name, callback) { 11140 if(callback) { 11141 var events = name === 'toggle' ? 'tooltipshow tooltiphide' : 'tooltip'+name; 11142 tooltip.bind(events, callback); 11143 } 11144 }); 11145 11146 // Set visibility AFTER plugin initialization to prevent issues in IE 11147 tooltip.css('visibility', 'hidden') 11148 11149 /* Queue this part of the render process in our fx queue so we can 11150 * load images before the tooltip renders fully. 11151 * 11152 * See: updateContent method 11153 */ 11154 .queue('fx', function(next) { 11155 // Trigger tooltiprender event and pass original triggering event as original 11156 callback.originalEvent = cache.event; 11157 tooltip.trigger(callback, [self]); 11158 11159 // Update tooltip position and show tooltip if needed 11160 if(options.show.ready || show) { 11161 self.show(cache.event); 11162 } 11163 11164 next(); // Move on 11165 }); 11166 11167 return self; 11168 }, 11169 11170 get: function(notation) 11171 { 11172 var result, o; 11173 11174 switch(notation.toLowerCase()) 11175 { 11176 case 'dimensions': 11177 result = { 11178 height: tooltip.outerHeight(), width: tooltip.outerWidth() 11179 }; 11180 break; 11181 11182 case 'offset': 11183 result = PLUGINS.offset(tooltip, options.position.container); 11184 break; 11185 11186 default: 11187 o = convertNotation(notation.toLowerCase()); 11188 result = o[0][ o[1] ]; 11189 result = result.precedance ? result.string() : result; 11190 break; 11191 } 11192 11193 return result; 11194 }, 11195 11196 set: function(option, value) 11197 {
11198 var rmove = /^position.(my|at|adjust|target|container)|style|content/i, 11199 reposition = FALSE, 11200 checks = self.checks, 11201 name; 11202 11203 function callback(notation, args) { 11204 var category, rule; 11205 11206 if(self.rendered) { 11207 for(category in checks) { 11208 for(rule in checks[category]) { 11209 if((new RegExp(rule, 'i')).test(notation)) { 11210 checks[category][rule].apply(self, args); 11211 } 11212 } 11213 } 11214 } 11215 11216 // If we're not rendered and show.ready was set, render it 11217 else if(notation === 'show.ready' && args[2]) { 11218 isPositioning = 0; self.render(TRUE); 11219 } 11220 } 11221 11222 // Convert singular option/value pair into object form 11223 if('string' === typeof option) { 11224 name = option; option = {}; option[name] = value; 11225 } 11226 else { option = $.extend(TRUE, {}, option); } 11227 11228 // Set all of the defined options to their new values 11229 $.each(option, function(notation, value) { 11230 var obj = convertNotation( notation.toLowerCase() ), previous; 11231 11232 // Set new obj value 11233 previous = obj[0][ obj[1] ]; 11234 obj[0][ obj[1] ] = value.nodeType ? yQuery(value) : value; 11235 11236 // Set the new params for the callback and test it against reposition 11237 option[notation] = [obj[0], obj[1], value, previous]; 11238 reposition = rmove.test(notation) || reposition; 11239 }); 11240 11241 // Re-sanitize options 11242 sanitizeOptions(options); 11243 11244 /* 11245 * Execute any valid callbacks for the set options 11246 * Also set isPositioning so we don't get loads of redundant repositioning calls 11247 */ 11248 isPositioning = 1; $.each(option, callback); isPositioning = 0; 11249 11250 // Update position on ANY style/position/content change if shown and rendered 11251 if(reposition && isVisible() && self.rendered) { self.reposition(); } 11252 11253 return self; 11254 }, 11255 11256 toggle: function(state, event) 11257 { 11258 // Make sure tooltip is rendered 11259 if(!self.rendered) { 11260 if(state) { self.render(1); } // Render the tooltip if showing and it isn't already 11261 else { return FALSE; } 11262 } 11263 11264 var type = state ? 'show' : 'hide', 11265 opts = options[type], 11266 visible = isVisible(), 11267 callback; 11268 11269 // Detect state if valid one isn't provided 11270 if((typeof state).search('boolean|number')) { state = !visible; } 11271 11272 // Return if element is already in correct state 11273 if(visible === state) { return self; } 11274 11275 // Try to prevent flickering when tooltip overlaps show element 11276 if(event) { 11277 if((/over|enter/).test(event.type) && (/out|leave/).test(cache.event.type) && 11278 event.target === options.show.target[0] && tooltip.has(event.relatedTarget).length){ 11279 return self; 11280 } 11281 11282 // Cache event 11283 cache.event = $.extend({}, event); 11284 } 11285 11286 // Call API methods 11287 callback = $.Event('tooltip'+type); 11288 callback.originalEvent = event ? cache.event : NULL; 11289 tooltip.trigger(callback, [self, 90]); 11290 if(callback.isDefaultPrevented()){ return self; } 11291 11292 // Set ARIA hidden status attribute 11293 $.attr(tooltip[0], 'aria-hidden', !!!state); 11294 11295 // Execute state specific properties 11296 if(state) { 11297 tooltip.hide().css({ visibility: '' }); // Hide it first so effects aren't skipped 11298 11299 // Focus the tooltip 11300 self.focus(event); 11301 11302 // Update tooltip position (without animation) 11303 self.reposition(event, 0); 11304 11305 // Hide other tooltips if tooltip is solo, using it as the context 11306 if(opts.solo) { yQuery(selector, opts.solo).not(tooltip).qtip('hide', callback); } 11307 } 11308 else { 11309 // Clear show timer if we're hiding 11310 clearTimeout(self.timers.show); 11311 11312 // Blur the tooltip 11313 self.blur(event); 11314 } 11315 11316 // Define post-animation state specific properties 11317 function after() { 11318 // Prevent antialias from disappearing in IE by removing filter 11319 if(state) { 11320 if($.browser.msie) { tooltip[0].style.removeAttribute('filter'); } 11321 } 11322 // Hide the tooltip using negative offset and reset opacity 11323 else { 11324 tooltip.css({ 11325 display: '', 11326 visibility: 'hidden', 11327 width: '', 11328 opacity: '', 11329 left: '', 11330 top: '' 11331 }); 11332 } 11333 } 11334 11335 // Clear animation queue 11336 tooltip.stop(1, 1); 11337 11338 // Use custom function if provided 11339 if($.isFunction(opts.effect)) { 11340 opts.effect.call(tooltip, self); 11341 tooltip.queue('fx', function(next){ after.call(this, next); next(); }); 11342 } 11343 11344 // If no effect type is supplied, use a simple toggle 11345 else if(opts.effect === FALSE) { 11346 tooltip[ type ](); 11347 after.call(tooltip); 11348 } 11349 11350 // Use basic fade function by default 11351 else { tooltip.fadeTo(90, state ? 1 : 0, after); } 11352 11353 // If inactive hide method is set, active it 11354 if(state) { opts.target.trigger('qtip-'+id+'-inactive'); } 11355 11356 return self; 11357 }, 11358 11359 show: function(event){ return self.toggle(TRUE, event); }, 11360 11361 hide: function(event){ return self.toggle(FALSE, event); }, 11362 11363 focus: function(event) 11364 { 11365 if(!self.rendered) { return FALSE; } 11366 11367 var qtips = yQuery(selector), 11368 curIndex = parseInt(tooltip[0].style.zIndex, 10), 11369 newIndex = QTIP.zindex + qtips.length, 11370 cachedEvent = $.extend({}, event), 11371 focusedElem, callback; 11372 11373 // Only update the z-index if it has changed and tooltip is not already focused 11374 if(!tooltip.hasClass(focusClass)) 11375 { 11376 // Only update z-index's if they've changed' 11377 if(curIndex !== newIndex) { 11378 // Reduce our z-index's and keep them properly ordered 11379 qtips.each(function() { 11380 if(this.style.zIndex > curIndex) { 11381 this.style.zIndex = this.style.zIndex - 1; 11382 } 11383 }); 11384 11385 // Fire blur event for focused tooltip
11386 qtips.filter('.' + focusClass).qtip('blur', cachedEvent); 11387 } 11388 11389 // Call API method 11390 callback = $.Event('tooltipfocus'); 11391 callback.originalEvent = cachedEvent; 11392 tooltip.trigger(callback, [self, newIndex]); 11393 11394 // If callback wasn't FALSE 11395 if(!callback.isDefaultPrevented()) { 11396 // Set the new z-index 11397 tooltip.addClass(focusClass)[0].style.zIndex = newIndex; 11398 } 11399 } 11400 11401 return self; 11402 }, 11403 11404 blur: function(event) { 11405 var cachedEvent = $.extend({}, event), 11406 callback; 11407 11408 // Set focused status to FALSE 11409 tooltip.removeClass(focusClass); 11410 11411 // Trigger blur event 11412 callback = $.Event('tooltipblur'); 11413 callback.originalEvent = cachedEvent; 11414 tooltip.trigger(callback, [self]); 11415 11416 return self; 11417 }, 11418 11419 reposition: function(event, effect) 11420 { 11421 if(!self.rendered || isPositioning) { return FALSE; } 11422 11423 // Set positioning flag 11424 isPositioning = TRUE; 11425 11426 var target = options.position.target, 11427 posOptions = options.position, 11428 my = posOptions.my, 11429 at = posOptions.at, 11430 adjust = posOptions.adjust, 11431 elemWidth = tooltip.outerWidth(), 11432 elemHeight = tooltip.outerHeight(), 11433 targetWidth = 0, 11434 targetHeight = 0, 11435 callback = $.Event('tooltipmove'), 11436 fixed = tooltip.css('position') === 'fixed', 11437 viewport = posOptions.viewport.yQuery ? posOptions.viewport : yQuery(window), 11438 position = { left: 0, top: 0 }, 11439 tip = (self.plugins.tip || {}).corner, 11440 readjust = { 11441 left: function(posLeft) { 11442 var viewportScroll = viewport.scrollLeft, 11443 myWidth = my.x === 'left' ? elemWidth : my.x === 'right' ? -elemWidth : -elemWidth / 2, 11444 atWidth = at.x === 'left' ? targetWidth : at.x === 'right' ? -targetWidth : -targetWidth / 2, 11445 tipAdjust = tip && tip.precedance === 'x' ? QTIP.defaults.style.tip.width : 0, 11446 overflowLeft = viewportScroll - posLeft - tipAdjust, 11447 overflowRight = posLeft + elemWidth - viewport.width - viewportScroll + tipAdjust, 11448 offset = myWidth - (my.precedance === 'x' || my.x === my.y ? atWidth : 0), 11449 isCenter = my.x === 'center'; 11450 11451 if(overflowLeft > 0 && (my.x !== 'left' || overflowRight > 0)) { 11452 position.left -= offset + (isCenter ? 0 : 2 * adjust.x); 11453 } 11454 else if(overflowRight > 0 && (my.x !== 'right' || overflowLeft > 0) ) { 11455 position.left -= isCenter ? -offset : offset + (2 * adjust.x); 11456 } 11457 if(position.left !== posLeft && isCenter) { position.left -= adjust.x; } 11458 11459 // Make sure we haven't made things worse with the adjustment and return the adjusted difference 11460 if(position.left < 0 && -position.left > overflowRight) { position.left = posLeft; } 11461 return position.left - posLeft; 11462 }, 11463 top: function(posTop) { 11464 var viewportScroll = viewport.scrollTop, 11465 myHeight = my.y === 'top' ? elemHeight : my.y === 'bottom' ? -elemHeight : -elemHeight / 2, 11466 atHeight = at.y === 'top' ? targetHeight : at.y === 'bottom' ? -targetHeight : -targetHeight / 2, 11467 tipAdjust = tip && tip.precedance === 'y' ? QTIP.defaults.style.tip.height : 0,
11468 overflowTop = viewportScroll - posTop - tipAdjust, 11469 overflowBottom = posTop + elemHeight - viewport.height - viewportScroll + tipAdjust, 11470 offset = myHeight - (my.precedance === 'y' || my.x === my.y ? atHeight : 0), 11471 isCenter = my.y === 'center'; 11472 11473 if(overflowTop > 0 && (my.y !== 'top' || overflowBottom > 0)) { 11474 position.top -= offset + (isCenter ? 0 : 2 * adjust.y); 11475 } 11476 else if(overflowBottom > 0 && (my.y !== 'bottom' || overflowTop > 0) ) { 11477 position.top -= isCenter ? -offset : offset + (2 * adjust.y); 11478 } 11479 if(position.top !== posTop && isCenter) { position.top -= adjust.y; } 11480 11481 // Make sure we haven't made things worse with the adjustment and return the adjusted difference 11482 if(position.top < 0 && -position.top > overflowBottom) { position.top = posTop; } 11483 return position.top - posTop; 11484 } 11485 }; 11486 effect = effect === undefined || !!effect || FALSE; 11487 11488 // Cache our viewport details 11489 viewport = !viewport ? FALSE : { 11490 elem: viewport, 11491 height: viewport[ (viewport[0] === window ? 'h' : 'outerH') + 'eight' ](), 11492 width: viewport[ (viewport[0] === window ? 'w' : 'outerW') + 'idth' ](), 11493 scrollLeft: viewport.scrollLeft(), 11494 scrollTop: viewport.scrollTop() 11495 }; 11496 11497 // Check if mouse was the target 11498 if(target === 'mouse') { 11499 // Force left top to allow flipping 11500 at = { x: 'left', y: 'top' }; 11501 11502 // Use cached event if one isn't available for positioning 11503 event = event && (event.type === 'resize' || event.type === 'scroll') ? cache.event : 11504 adjust.mouse || !event || !event.pageX ? $.extend({}, MOUSE) : event; 11505 11506 // Use event coordinates for position 11507 position = { top: event.pageY, left: event.pageX }; 11508 } 11509 else { 11510 // Check if event targetting is being used 11511 if(target === 'event') { 11512 if(event && event.target && event.type !== 'scroll' && event.type !== 'resize') { 11513 target = cache.target = yQuery(event.target); 11514 } 11515 else { 11516 target = cache.target; 11517 } 11518 } 11519 11520 // Parse the target into a yQuery object and make sure there's an element present 11521 target = yQuery(target).eq(0); 11522 if(target.length === 0) { return self; } 11523 11524 // Check if window or document is the target 11525 else if(target[0] === document || target[0] === window) { 11526 targetWidth = target.width(); 11527 targetHeight = target.height(); 11528 11529 if(target[0] === window) { 11530 position = { 11531 top: fixed ? 0 : viewport.scrollTop, 11532 left: fixed ? 0 : viewport.scrollLeft 11533 }; 11534 } 11535 } 11536 11537 // Use Imagemap/SVG plugins if needed 11538 else if(target.is('area') && PLUGINS.imagemap) { 11539 position = PLUGINS.imagemap(target, at); 11540 } 11541 else if(target[0].namespaceURI == 'http://www.w3.org/2000/svg' && PLUGINS.svg) { 11542 position = PLUGINS.svg(target, at); 11543 } 11544 11545 else { 11546 targetWidth = target.outerWidth(); 11547 targetHeight = target.outerHeight(); 11548 11549 position = PLUGINS.offset(target, posOptions.container); 11550 } 11551 11552 // Parse returned plugin values into proper variables 11553 if(position.offset) { 11554 targetWidth = position.width; 11555 targetHeight = position.height; 11556 position = position.offset; 11557 } 11558 11559 // Adjust position relative to target 11560 position.left += at.x === 'right' ? targetWidth : at.x === 'center' ? targetWidth / 2 : 0; 11561 position.top += at.y === 'bottom' ? targetHeight : at.y === 'center' ? targetHeight / 2 : 0; 11562 } 11563 11564 // Adjust position relative to tooltip 11565 position.left += adjust.x + (my.x === 'right' ? -elemWidth : my.x === 'center' ? -elemWidth / 2 : 0); 11566 position.top += adjust.y + (my.y === 'bottom' ? -elemHeight : my.y === 'center' ? -elemHeight / 2 : 0); 11567 11568 // Calculate collision offset values 11569 if(posOptions.viewport.yQuery && target[0] !== window && target[0] !== docBody) { 11570 position.adjusted = { left: readjust.left(position.left), top: readjust.top(position.top) }; 11571 } 11572 else { 11573 position.adjusted = { left: 0, top: 0 }; 11574 } 11575 11576 // Set tooltip position class 11577 tooltip.attr('class', function(i, val) { 11578 return $.attr(this, 'class').replace(/ui-tooltip-pos-\w+/i, ''); 11579 }) 11580 .addClass(uitooltip + '-pos-' + my.abbreviation()); 11581 11582 // Call API method 11583 callback.originalEvent = $.extend({}, event); 11584 tooltip.trigger(callback, [self, position, viewport.elem]); 11585 if(callback.isDefaultPrevented()){ return self; } 11586 delete position.adjusted; 11587 11588 // If effect is disabled or positioning gives NaN out, set CSS directly 11589 if(!effect || !isNaN(position.left, position.top)) { 11590 tooltip.css(position); 11591 } 11592 11593 // Use custom function if provided 11594 else if(isVisible() && $.isFunction(posOptions.effect)) { 11595 posOptions.effect.call(tooltip, self, position); 11596 tooltip.queue(function(next) { 11597 var elem = yQuery(this); 11598 // Reset attributes to avoid cross-browser rendering bugs 11599 elem.css({ opacity: '', height: '' }); 11600 if($.browser.msie && this.style) { this.style.removeAttribute('filter'); } 11601 11602 next(); 11603 }); 11604 } 11605 11606 // Set positioning flag 11607 isPositioning = FALSE; 11608 11609 return self; 11610 }, 11611 11612 // IE max/min height/width simulartor function 11613 redraw: function() 11614 { 11615 // Make sure tooltip is rendered and the browser needs the redraw 11616 if(!self.rendered || !($.browser.msie && $.browser.version < 8)) { return FALSE; } 11617 11618 var fluid = uitooltip + '-fluid', dimensions; 11619 11620 // Reset the height and width and add the fluid class to reset max/min widths 11621 tooltip.css({ width: 'auto', height: 'auto' }).addClass(fluid); 11622 11623 // Grab our tooltip dimensions 11624 dimensions = { 11625 height: tooltip.outerHeight(), 11626 width: tooltip.outerWidth() 11627 }; 11628 11629 // Determine actual width 11630 $.each(['width', 'height'], function(i, prop) { 11631 // Parse our max/min properties 11632 var max = parseInt(tooltip.css('max-'+prop), 10) || 0, 11633 min = parseInt(tooltip.css('min-'+prop), 10) || 0; 11634 11635 // Determine new dimension size based on max/min/current values 11636 dimensions[prop] = max + min ? Math.min( Math.max( dimensions[prop], min ), max ) : dimensions[prop]; 11637 }); 11638 11639 // Set the newly calculated dimensions and remvoe fluid class 11640 tooltip.css(dimensions).removeClass(fluid); 11641 11642 return self; 11643 }, 11644 11645 disable: function(state) 11646 { 11647 var c = disabled; 11648 11649 if('boolean' !== typeof state) {
11650 state = !(tooltip.hasClass(c) || cache.disabled); 11651 } 11652 11653 if(self.rendered) { 11654 tooltip.toggleClass(c, state); 11655 $.attr(tooltip[0], 'aria-disabled', state); 11656 } 11657 else { 11658 cache.disabled = !!state; 11659 } 11660 11661 return self; 11662 }, 11663 11664 enable: function() { self.disable(FALSE); }, 11665 11666 destroy: function() 11667 { 11668 var t = target[0], 11669 title = $.data(t, oldtitle); 11670 11671 // Destroy tooltip and any associated plugins if rendered 11672 if(self.rendered) { 11673 tooltip.remove(); 11674 11675 $.each(self.plugins, function() { 11676 if(this.destroy) { this.destroy(); } 11677 }); 11678 } 11679 11680 // Clear timers and remove bound events 11681 clearTimeout(self.timers.show); 11682 clearTimeout(self.timers.hide); 11683 unassignEvents(1, 1, 1, 1); 11684 11685 // Remove api object 11686 $.removeData(t, 'qtip'); 11687 11688 // Reset old title attribute if removed 11689 if(title) { 11690 $.attr(t, 'title', title); 11691 } 11692 11693 // Remove ARIA attributse 11694 target.removeAttr('aria-describedby'); 11695 11696 return target; 11697 } 11698 }); 11699} 11700 11701// Initialization method 11702function init(id, opts) 11703{ 11704 var obj, posOptions, attr, config, 11705 11706 // Setup element references 11707 elem = yQuery(this), 11708 docBody = yQuery(document.body), 11709 11710 // Use document body instead of document element if needed 11711 newTarget = this === document ? docBody : elem, 11712 11713 // Grab metadata from element if plugin is present 11714 metadata = (elem.metadata) ? elem.metadata(opts.metadata) : NULL, 11715 11716 // If metadata type if HTML5, grab 'name' from the object instead, or use the regular data object otherwise 11717 metadata5 = opts.metadata.type === 'html5' && metadata ? metadata[opts.metadata.name] : NULL, 11718 11719 // Grab data from metadata.name (or data-qtipopts as fallback) using .data() method, 11720 html5 = elem.data(opts.metadata.name || 'qtipopts'); 11721 11722 // If we don't get an object returned attempt to parse it manualyl without parseJSON 11723 try { html5 = typeof html5 === 'string' ? (new Function("return " + html5))() : html5; } 11724 catch(e) { debug('Unable to parse HTML5 attribute data: ' + html5); } 11725 11726 // Merge in and sanitize metadata 11727 config = $.extend(TRUE, {}, QTIP.defaults, opts, 11728 typeof html5 === 'object' ? sanitizeOptions(html5) : NULL, 11729 sanitizeOptions(metadata5 || metadata)); 11730 11731 // Remove metadata object so we don't interfere with other metadata calls 11732 if(metadata) { $.removeData(this, 'metadata'); } 11733 11734 // Re-grab our positioning options now we've merged our metadata and set id to passed value 11735 posOptions = config.position; 11736 config.id = id; 11737 11738 // Setup missing content if none is detected 11739 if('boolean' === typeof config.content.text) { 11740 attr = elem.attr(config.content.attr); 11741 11742 // Grab from supplied attribute if available 11743 if(config.content.attr !== FALSE && attr) { config.content.text = attr; } 11744 11745 // No valid content was found, abort render 11746 else { return FALSE; } 11747 } 11748 11749 // Setup target options 11750 if(posOptions.container === FALSE) { posOptions.container = docBody; } 11751 if(posOptions.target === FALSE) { posOptions.target = newTarget; } 11752 if(config.show.target === FALSE) { config.show.target = newTarget; } 11753 if(config.show.solo === TRUE) { config.show.solo = docBody; } 11754 if(config.hide.target === FALSE) { config.hide.target = newTarget; } 11755 if(config.position.viewport === TRUE) { config.position.viewport = posOptions.container; } 11756 11757 // Convert position corner values into x and y strings 11758 posOptions.at = new PLUGINS.Corner(posOptions.at); 11759 posOptions.my = new PLUGINS.Corner(posOptions.my); 11760 11761 // Destroy previous tooltip if overwrite is enabled, or skip element if not 11762 if($.data(this, 'qtip')) { 11763 if(config.overwrite) { 11764 elem.qtip('destroy'); 11765 } 11766 else if(config.overwrite === FALSE) { 11767 return FALSE; 11768 } 11769 } 11770 11771 // Remove title attribute and store it if present 11772 if($.attr(this, 'title')) { 11773 $.data(this, oldtitle, $.attr(this, 'title'));
11774 elem.removeAttr('title'); 11775 } 11776 11777 // Initialize the tooltip and add API reference 11778 obj = new QTip(elem, config, id, !!attr); 11779 $.data(this, 'qtip', obj); 11780 11781 // Catch remove events on target element to destroy redundant tooltip 11782 elem.bind('remove.qtip', function(){ obj.destroy(); }); 11783 11784 return obj; 11785} 11786 11787// yQuery $.fn extension method 11788QTIP = $.fn.qtip = function(options, notation, newValue) 11789{ 11790 var command = String(options).toLowerCase(), // Parse command 11791 returned = NULL, 11792 args = command === 'disable' ? [TRUE] : $.makeArray(arguments).slice(1, 10), 11793 event = args[args.length - 1], 11794 opts = this[0] ? $.data(this[0], 'qtip') : NULL; 11795 11796 // Check for API request 11797 if((!arguments.length && opts) || command === 'api') { 11798 return opts; 11799 } 11800 11801 // Execute API command if present 11802 else if('string' === typeof options) 11803 { 11804 this.each(function() 11805 { 11806 var api = $.data(this, 'qtip'); 11807 if(!api) { return TRUE; } 11808 11809 // Cache the event if possible 11810 if(event && event.timeStamp) { api.cache.event = event; } 11811 11812 // Check for specific API commands 11813 if(command === 'option' && notation) { 11814 if($.isPlainObject(notation) || newValue !== undefined) { 11815 api.set(notation, newValue); 11816 } 11817 else { 11818 returned = api.get(notation); 11819 return FALSE; 11820 } 11821 } 11822 11823 // Execute API command 11824 else if(api[command]) { 11825 api[command].apply(api[command], args); 11826 } 11827 }); 11828 11829 return returned !== NULL ? returned : this; 11830 } 11831 11832 // No API commands. validate provided options and setup qTips 11833 else if('object' === typeof options || !arguments.length) 11834 { 11835 opts = sanitizeOptions($.extend(TRUE, {}, options)); 11836 11837 // Bind the qTips 11838 return QTIP.bind.call(this, opts, event); 11839 } 11840}; 11841 11842// $.fn.qtip Bind method 11843QTIP.bind = function(opts, event) 11844{ 11845 return this.each(function(i) { 11846 var options, targets, events, 11847 11848 // Find next available ID, or use custom ID if provided 11849 id = (!opts.id || opts.id === FALSE || opts.id.length < 1 || yQuery('#'+uitooltip+'-'+opts.id).length) ? QTIP.nextid++ : opts.id, 11850 11851 // Setup events namespace 11852 namespace = '.qtip-'+id+'-create', 11853 11854 // Initialize the qTip and re-grab newly sanitized options 11855 api = init.call(this, id, opts); 11856 if(api === FALSE) { return TRUE; } 11857 options = api.options; 11858 11859 // Initialize plugins 11860 $.each(PLUGINS, function() { 11861 if(this.initialize === 'initialize') { this(api); } 11862 }); 11863 11864 // Determine hide and show targets 11865 targets = { show: options.show.target, hide: options.hide.target }; 11866 events = { 11867 show: String(options.show.event).replace(' ', namespace+' ') + namespace, 11868 hide: String(options.hide.event).replace(' ', namespace+' ') + namespace 11869 }; 11870 11871 // Define hoverIntent function 11872 function hoverIntent(event) { 11873 function render() { 11874 // Cache mouse coords,render and render the tooltip 11875 api.render(typeof event === 'object' || options.show.ready); 11876 11877 // Unbind show and hide event 11878 targets.show.unbind(events.show); 11879 targets.hide.unbind(events.hide); 11880 } 11881 11882 // Only continue if tooltip isn't disabled 11883 if(api.cache.disabled) { return FALSE; } 11884 11885 // Cache the event data 11886 api.cache.event = $.extend({}, event); 11887 11888 // Start the event sequence 11889 if(options.show.delay > 0) { 11890 clearTimeout(api.timers.show); 11891 api.timers.show = setTimeout(render, options.show.delay); 11892 if(events.show !== events.hide) { 11893 targets.hide.bind(events.hide, function() { clearTimeout(api.timers.show); }); 11894 } 11895 } 11896 else { render(); } 11897 } 11898 11899 // Bind show events to target 11900 targets.show.bind(events.show, hoverIntent); 11901 11902 // Prerendering is enabled, create tooltip now 11903 if(options.show.ready || options.prerender) { hoverIntent(event); } 11904 });
11905}; 11906 11907// Setup base plugins 11908PLUGINS = QTIP.plugins = { 11909 // Corner object parser 11910 Corner: function(corner) { 11911 corner = String(corner).replace(/([A-Z])/, ' $1').replace(/middle/gi, 'center').toLowerCase(); 11912 this.x = (corner.match(/left|right/i) || corner.match(/center/) || ['inherit'])[0].toLowerCase(); 11913 this.y = (corner.match(/top|bottom|center/i) || ['inherit'])[0].toLowerCase(); 11914 11915 this.precedance = (corner.charAt(0).search(/^(t|b)/) > -1) ? 'y' : 'x'; 11916 this.string = function() { return this.precedance === 'y' ? this.y+this.x : this.x+this.y; }; 11917 this.abbreviation = function() { 11918 var x = this.x.substr(0,1), y = this.y.substr(0,1); 11919 return x === y ? x : (x === 'c' || (x !== 'c' && y !== 'c')) ? y + x : x + y; 11920 }; 11921 }, 11922 11923 // Custom (more correct for qTip!) offset calculator 11924 offset: function(elem, container) { 11925 var pos = elem.offset(), 11926 parent = container, 11927 deep = 0, 11928 docBody = document.body, 11929 coffset; 11930 11931 if(parent) { 11932 // Compensate for non-static containers offset 11933 do { 11934 if(parent[0] === docBody) { break; } 11935 else if(parent.css('position') !== 'static') { 11936 coffset = parent.position(); 11937 pos.left -= coffset.left; 11938 pos.top -= coffset.top; 11939 11940 deep++; 11941 } 11942 } 11943 while(parent = parent.offsetParent()); 11944 11945 // Compensate for containers scroll if it also has an offsetParent 11946 if(container[0] !== docBody || PLUGINS.iOS) { 11947 pos.left -= container.scrollLeft(); 11948 pos.top -= container.scrollTop(); 11949 } 11950 } 11951 11952 return pos; 11953 }, 11954 11955 /* 11956 * iOS 4.0 and below scroll fix detection used in offset() function. 11957 */ 11958 iOS: parseFloat(((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)) || [0,'4_2'])[1].replace('_','.')) < 4.1, 11959 11960 /* 11961 * yQuery-secpfic $.fn overrides 11962 */ 11963 fn: { 11964 /* Allow other plugins to successfully retrieve the title of an element with a qTip applied */ 11965 attr: function(attr, val) { 11966 if(!this.length) { return; } 11967 11968 var self = this[0], 11969 title = 'title', 11970 api = $.data(self, 'qtip'); 11971 11972 if(attr === title) { 11973 if(arguments.length < 2) { 11974 return $.data(self, oldtitle); 11975 } 11976 else if(typeof api === 'object') { 11977 // If qTip is rendered and title was originally used as content, update it 11978 if(api && api.rendered && api.options.content.attr === title && api.cache.attr) { 11979 api.set('content.text', val); 11980 } 11981 11982 // Use the regular attr method to set, then cache the result 11983 $.fn['attr'+replaceSuffix].apply(this, arguments); 11984 $.data(self, oldtitle, $.attr(self, title)); 11985 return this.removeAttr('title'); 11986 } 11987 } 11988 }, 11989 11990 /* Allow clone to correctly retrieve cached title attributes */ 11991 clone: function(keepData) { 11992 var titles = yQuery([]), elem; 11993 11994 // Re-add cached titles before we clone 11995 yQuery('*', this).add(this).each(function() { 11996 var title = $.data(this, oldtitle); 11997 if(title) { 11998 $.attr(this, 'title', title); 11999 titles = titles.add(this); 12000 } 12001 }); 12002 12003 // Clone our element using the real clone method 12004 elem = $.fn['clone'+replaceSuffix].apply(this, arguments); 12005 12006 // Remove the old titles again 12007 titles.removeAttr('title'); 12008 12009 return elem; 12010 }, 12011 12012 /* 12013 * Taken directly from yQuery 1.8.2 widget source code 12014 * Trigger 'remove' event on all elements on removal if yQuery UI isn't present 12015 */ 12016 remove: $.ui ? NULL : function( selector, keepData ) { 12017 yQuery(this).each(function() { 12018 if (!keepData) { 12019 if (!selector || $.filter( selector, [ this ] ).length) { 12020 yQuery('*', this).add(this).each(function() { 12021 yQuery(this).triggerHandler('remove'); 12022 }); 12023 } 12024 } 12025 }); 12026 } 12027 } 12028}; 12029 12030// Apply the fn overrides above 12031$.each(PLUGINS.fn, function(name, func) { 12032 if(!func) { return TRUE; } 12033 12034 var old = $.fn[name+replaceSuffix] = $.fn[name]; 12035 $.fn[name] = function() { 12036 return func.apply(this, arguments) || old.apply(this, arguments); 12037 }; 12038}); 12039 12040// Cache mousemove events for positioning purposes 12041yQuery(window).bind('load.qtip', function() { 12042 var type = 'mousemove'; 12043 yQuery(document).bind(type+'.qtip', function(event) { 12044 MOUSE = { pageX: event.pageX, pageY: event.pageY, type: type }; 12045 });
12046}); 12047 12048// Set global qTip properties 12049QTIP.version = 'nightly'; 12050QTIP.nextid = 0; 12051QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' '); 12052QTIP.zindex = 15000; 12053 12054// Define configuration defaults 12055QTIP.defaults = { 12056 prerender: FALSE, 12057 id: FALSE, 12058 overwrite: TRUE, 12059 content: { 12060 text: TRUE, 12061 attr: 'title', 12062 title: { 12063 text: FALSE, 12064 button: FALSE 12065 } 12066 }, 12067 position: { 12068 my: 'top left', 12069 at: 'bottom right', 12070 target: FALSE, 12071 container: FALSE, 12072 viewport: FALSE, 12073 adjust: { 12074 x: 0, y: 0, 12075 mouse: TRUE, 12076 resize: TRUE 12077 }, 12078 effect: TRUE 12079 }, 12080 show: { 12081 target: FALSE, 12082 event: 'mouseenter', 12083 effect: TRUE, 12084 delay: 90, 12085 solo: FALSE, 12086 ready: FALSE 12087 }, 12088 hide: { 12089 target: FALSE, 12090 event: 'mouseleave', 12091 effect: TRUE, 12092 delay: 0, 12093 fixed: FALSE, 12094 inactive: FALSE 12095 }, 12096 style: { 12097 classes: '', 12098 widget: FALSE 12099 }, 12100 events: { 12101 render: NULL, 12102 move: NULL, 12103 show: NULL, 12104 hide: NULL, 12105 toggle: NULL, 12106 focus: NULL, 12107 blur: NULL 12108 } 12109};function Ajax(api) 12110{ 12111 var self = this, 12112 tooltip = api.elements.tooltip, 12113 opts = api.options.content.ajax, 12114 namespace = '.qtip-ajax', 12115 rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; 12116 12117 api.checks.ajax = { 12118 '^content.ajax': function(obj, name, v) { 12119 // If content.ajax object was reset, set our local var 12120 if(name === 'ajax') { opts = v; } 12121 12122 if(name === 'once') { 12123 self.once(opts.once); 12124 } 12125 else if(opts && opts.url) { 12126 self.load(); 12127 } 12128 else { 12129 self.once(0); 12130 } 12131 } 12132 }; 12133 12134 $.extend(self, { 12135 init: function() 12136 { 12137 // Make sure ajax options are enabled before proceeding 12138 if(opts && opts.url) { 12139 self.load(); 12140 tooltip.one('tooltipshow', function() { self.once(opts.once); }); 12141 } 12142 }, 12143 12144 once: function(state) 12145 { 12146 tooltip[ (state ? 'un' : '') + 'bind' ]('tooltipshow'+namespace, self.load); 12147 }, 12148 12149 load: function() 12150 { 12151 var hasSelector = opts.url.indexOf(' '), 12152 url = opts.url, 12153 selector; 12154 12155 // Check if user delcared a content selector like in .load() 12156 if(hasSelector > -1) { 12157 selector = url.substr(hasSelector); 12158 url = url.substr(0, hasSelector); 12159 } 12160 12161 // Define success handler 12162 function successHandler(content) { 12163 if(selector) { 12164 // Create a dummy div to hold the results and grab the selector element 12165 content = yQuery('<div/>') 12166 // inject the contents of the document in, removing the scripts 12167 // to avoid any 'Permission Denied' errors in IE 12168 .append(content.replace(rscript, "")) 12169 12170 // Locate the specified elements 12171 .find(selector); 12172 } 12173 12174 // Set the content 12175 api.set('content.text', content); 12176 } 12177 12178 // Error handler 12179 function errorHandler(xh, status, error){ api.set('content.text', status + ': ' + error); } 12180 12181 // Setup $.ajax option object and process the request 12182 $.ajax( $.extend({ success: successHandler, error: errorHandler, context: api }, opts, { url: url }) ); 12183 12184 return self; 12185 } 12186 }); 12187 12188 self.init(); 12189} 12190 12191 12192PLUGINS.ajax = function(api) 12193{ 12194 var self = api.plugins.ajax; 12195 12196 return 'object' === typeof self ? self : (api.plugins.ajax = new Ajax(api)); 12197}; 12198 12199PLUGINS.ajax.initialize = 'render'; 12200 12201// Setup plugin sanitization 12202PLUGINS.ajax.sanitize = function(options) 12203{ 12204 var content = options.content, opts; 12205 if(content && 'ajax' in content) { 12206 opts = content.ajax; 12207 if(typeof opts !== 'object') { opts = options.content.ajax = { url: opts }; } 12208 if('boolean' !== typeof opts.once && opts.once) { opts.once = !!opts.once; } 12209 } 12210}; 12211 12212// Extend original api defaults 12213$.extend(TRUE, QTIP.defaults, { 12214 content: { 12215 ajax: { 12216 once: TRUE 12217 } 12218 } 12219});PLUGINS.imagemap = function(area, corner) 12220{ 12221 var shape = area.attr('shape').toLowerCase(), 12222 baseCoords = area.attr('coords').split(','), 12223 coords = [], 12224 image = yQuery('img[usemap="#'+area.parent('map').attr('name')+'"]'), 12225 imageOffset = image.offset(), 12226 result = { 12227 width: 0, height: 0, 12228 offset: { top: 1e10, right: 0, bottom: 0, left: 1e10 } 12229 }, 12230 i = 0, next = 0; 12231 12232 // POLY area coordinate calculator 12233 // Special thanks to Ed Cradock for helping out with this. 12234 // Uses a binary search algorithm to find suitable coordinates. 12235 function polyCoordinates(result, coords) 12236 { 12237 var i = 0, 12238 compareX = 1, compareY = 1, 12239 realX = 0, realY = 0, 12240 newWidth = result.width, 12241 newHeight = result.height; 12242 12243 // Use a binary search algorithm to locate most suitable coordinate (hopefully) 12244 while(newWidth > 0 && newHeight > 0 && compareX > 0 && compareY > 0) 12245 { 12246 newWidth = Math.floor(newWidth / 2); 12247 newHeight = Math.floor(newHeight / 2); 12248 12249 if(corner.x === 'left'){ compareX = newWidth; } 12250 else if(corner.x === 'right'){ compareX = result.width - newWidth; } 12251 else{ compareX += Math.floor(newWidth / 2); } 12252 12253 if(corner.y === 'top'){ compareY = newHeight; } 12254 else if(corner.y === 'bottom'){ compareY = result.height - newHeight; } 12255 else{ compareY += Math.floor(newHeight / 2); } 12256
12257 i = coords.length; while(i--) 12258 { 12259 if(coords.length < 2){ break; } 12260 12261 realX = coords[i][0] - result.offset.left; 12262 realY = coords[i][1] - result.offset.top; 12263 12264 if((corner.x === 'left' && realX >= compareX) || 12265 (corner.x === 'right' && realX <= compareX) || 12266 (corner.x === 'center' && (realX < compareX || realX > (result.width - compareX))) || 12267 (corner.y === 'top' && realY >= compareY) || 12268 (corner.y === 'bottom' && realY <= compareY) || 12269 (corner.y === 'center' && (realY < compareY || realY > (result.height - compareY)))) { 12270 coords.splice(i, 1); 12271 } 12272 } 12273 } 12274 12275 return { left: coords[0][0], top: coords[0][1] }; 12276 } 12277 12278 // Make sure we account for padding and borders on the image 12279 imageOffset.left += Math.ceil((image.outerWidth() - image.width()) / 2); 12280 imageOffset.top += Math.ceil((image.outerHeight() - image.height()) / 2); 12281 12282 // Parse coordinates into proper array 12283 if(shape === 'poly') { 12284 i = baseCoords.length; while(i--) 12285 { 12286 next = [ parseInt(baseCoords[--i], 10), parseInt(baseCoords[i+1], 10) ]; 12287 12288 if(next[0] > result.offset.right){ result.offset.right = next[0]; } 12289 if(next[0] < result.offset.left){ result.offset.left = next[0]; } 12290 if(next[1] > result.offset.bottom){ result.offset.bottom = next[1]; } 12291 if(next[1] < result.offset.top){ result.offset.top = next[1]; } 12292 12293 coords.push(next); 12294 } 12295 } 12296 else { 12297 coords = $.map(baseCoords, function(coord){ return parseInt(coord, 10); }); 12298 } 12299 12300 // Calculate details 12301 switch(shape) 12302 { 12303 case 'rect': 12304 result = { 12305 width: Math.abs(coords[2] - coords[0]), 12306 height: Math.abs(coords[3] - coords[1]), 12307 offset: { left: coords[0], top: coords[1] } 12308 }; 12309 break; 12310 12311 case 'circle': 12312 result = { 12313 width: coords[2] + 2, 12314 height: coords[2] + 2, 12315 offset: { left: coords[0], top: coords[1] } 12316 }; 12317 break; 12318 12319 case 'poly': 12320 $.extend(result, { 12321 width: Math.abs(result.offset.right - result.offset.left), 12322 height: Math.abs(result.offset.bottom - result.offset.top) 12323 }); 12324 12325 if(corner.string() === 'centercenter') { 12326 result.offset = { 12327 left: result.offset.left + (result.width / 2), 12328 top: result.offset.top + (result.height / 2) 12329 }; 12330 } 12331 else { 12332 result.offset = polyCoordinates(result, coords.slice()); 12333 } 12334 12335 result.width = result.height = 0; 12336 break; 12337 } 12338 12339 // Add image position to offset coordinates 12340 result.offset.left += imageOffset.left; 12341 result.offset.top += imageOffset.top; 12342 12343 return result; 12344}; 12345 12346// Tip coordinates calculator 12347function calculateTip(corner, width, height) 12348{ 12349 var width2 = Math.ceil(width / 2), height2 = Math.ceil(height / 2), 12350 12351 // Define tip coordinates in terms of height and width values 12352 tips = { 12353 bottomright: [[0,0], [width,height], [width,0]], 12354 bottomleft: [[0,0], [width,0], [0,height]], 12355 topright: [[0,height], [width,0], [width,height]], 12356 topleft: [[0,0], [0,height], [width,height]], 12357 topcenter: [[0,height], [width2,0], [width,height]], 12358 bottomcenter: [[0,0], [width,0], [width2,height]], 12359 rightcenter: [[0,0], [width,height2], [0,height]], 12360 leftcenter: [[width,0], [width,height], [0,height2]] 12361 }; 12362 12363 // Set common side shapes 12364 tips.lefttop = tips.bottomright; tips.righttop = tips.bottomleft; 12365 tips.leftbottom = tips.topright; tips.rightbottom = tips.topleft; 12366 12367 return tips[ corner.string() ]; 12368} 12369 12370 12371function Tip(qTip, command) 12372{ 12373 var self = this, 12374 opts = qTip.options.style.tip, 12375 elems = qTip.elements, 12376 tooltip = elems.tooltip, 12377 cache = { 12378 top: 0, 12379 left: 0, 12380 corner: '' 12381 }, 12382 size = { 12383 width: opts.width, 12384 height: opts.height 12385 }, 12386 color = { }, 12387 border = opts.border || 0, 12388 namespace = '.qtip-tip', 12389 hasCanvas = yQuery('<canvas />')[0].getContext; 12390 12391 self.corner = NULL; 12392 self.mimic = NULL; 12393 12394 // Add new option checks for the plugin 12395 qTip.checks.tip = { 12396 '^position.my|style.tip.(corner|mimic|border)$': function() { 12397 // Make sure a tip can be drawn 12398 if(!self.init()) { 12399 self.destroy(); 12400 } 12401 12402 // Reposition the tooltip 12403 qTip.reposition(); 12404 }, 12405 '^style.tip.(height|width|offset)$': function() { 12406 // Re-set dimensions and redraw the tip 12407 size = { 12408 width: opts.width, 12409 height: opts.height 12410 }; 12411 self.create();
12412 self.update(); 12413 12414 // Reposition the tooltip 12415 qTip.reposition(); 12416 }, 12417 '^content.title.text|style.(classes|widget)$': function() { 12418 if(elems.tip) { 12419 self.update(); 12420 } 12421 } 12422 }; 12423 12424 function reposition(event, api, pos, viewport) { 12425 if(!elems.tip) { return; } 12426 12427 var newCorner = $.extend({}, self.corner), 12428 adjusted = pos.adjusted, 12429 offset; 12430 12431 // Make sure our tip position isn't fixed e.g. doesn't adjust with adjust.screen 12432 if(self.corner.fixed !== TRUE) { 12433 // Adjust tip corners 12434 if(adjusted.left) { 12435 newCorner.x = newCorner.x === 'center' ? (adjusted.left > 0 ? 'left' : 'right') : (newCorner.x === 'left' ? 'right' : 'left'); 12436 } 12437 if(adjusted.top) { 12438 newCorner.y = newCorner.y === 'center' ? (adjusted.top > 0 ? 'top' : 'bottom') : (newCorner.y === 'top' ? 'bottom' : 'top'); 12439 } 12440 12441 // Update and redraw the tip if needed 12442 if(newCorner.string() !== cache.corner && (cache.top !== adjusted.top || cache.left !== adjusted.left)) { 12443 offset = self.update(newCorner); 12444 } 12445 } 12446 12447 // Adjust position to accomodate tip dimensions 12448 if(!offset) { offset = self.position(newCorner, 0); } 12449 if(offset.right !== undefined) { offset.left = offset.right; } 12450 if(offset.bottom !== undefined) { offset.top = offset.bottom; } 12451 offset.option = Math.max(0, opts.offset); 12452 12453 pos.left -= offset.left.charAt ? offset.option : (offset.right ? -1 : 1) * offset.left; 12454 pos.top -= offset.top.charAt ? offset.option : (offset.bottom ? -1 : 1) * offset.top; 12455 12456 // Cache details 12457 cache.left = adjusted.left; cache.top = adjusted.top; 12458 cache.corner = newCorner.string(); 12459 } 12460 12461 /* border width calculator */ 12462 function borderWidth(corner, side, backup) { 12463 side = !side ? corner[corner.precedance] : side; 12464 12465 var isTitleTop = elems.titlebar && corner.y === 'top', 12466 elem = isTitleTop ? elems.titlebar : elems.content, 12467 css = 'border-' + side + '-width', 12468 val = parseInt(elem.css(css), 10); 12469 12470 return (backup ? val || parseInt(tooltip.css(css), 10) : val) || 0; 12471 } 12472 12473 function borderRadius(corner) { 12474 var isTitleTop = elems.titlebar && corner.y === 'top', 12475 elem = isTitleTop ? elems.titlebar : elems.content, 12476 moz = $.browser.mozilla, 12477 prefix = moz ? '-moz-' : $.browser.webkit ? '-webkit-' : '', 12478 side = corner.y + (moz ? '' : '-') + corner.x, 12479 css = prefix + (moz ? 'border-radius-' + side : 'border-' + side + '-radius'); 12480 12481 return parseInt(elem.css(css), 10) || parseInt(tooltip.css(css), 10) || 0; 12482 } 12483 12484 function calculateSize(corner) { 12485 var y = corner.precedance === 'y', 12486 width = size [ y ? 'width' : 'height' ], 12487 height = size [ y ? 'height' : 'width' ], 12488 isCenter = corner.string().indexOf('center') > -1, 12489 base = width * (isCenter ? 0.5 : 1), 12490 pow = Math.pow, 12491 round = Math.round, 12492 bigHyp, ratio, result, 12493 12494 smallHyp = Math.sqrt( pow(base, 2) + pow(height, 2) ), 12495 12496 hyp = [ 12497 (border / base) * smallHyp, (border / height) * smallHyp 12498 ]; 12499 hyp[2] = Math.sqrt( pow(hyp[0], 2) - pow(border, 2) ); 12500 hyp[3] = Math.sqrt( pow(hyp[1], 2) - pow(border, 2) ); 12501 12502 bigHyp = smallHyp + hyp[2] + hyp[3] + (isCenter ? 0 : hyp[0]); 12503 ratio = bigHyp / smallHyp; 12504 12505 result = [ round(ratio * height), round(ratio * width) ]; 12506 return { height: result[ y ? 0 : 1 ], width: result[ y ? 1 : 0 ] }; 12507 } 12508 12509 $.extend(self, { 12510 init: function() 12511 { 12512 var enabled = self.detectCorner() && (hasCanvas || $.browser.msie); 12513 12514 // Determine tip corner and type 12515 if(enabled) { 12516 // Create a new tip and draw it 12517 self.create();
12518 self.update(); 12519 12520 // Bind update events 12521 tooltip.unbind(namespace).bind('tooltipmove'+namespace, reposition); 12522 } 12523 12524 return enabled; 12525 }, 12526 12527 detectCorner: function() 12528 { 12529 var corner = opts.corner, 12530 posOptions = qTip.options.position, 12531 at = posOptions.at, 12532 my = posOptions.my.string ? posOptions.my.string() : posOptions.my; 12533 12534 // Detect corner and mimic properties 12535 if(corner === FALSE || (my === FALSE && at === FALSE)) { 12536 return FALSE; 12537 } 12538 else { 12539 if(corner === TRUE) { 12540 self.corner = new PLUGINS.Corner(my); 12541 } 12542 else if(!corner.string) { 12543 self.corner = new PLUGINS.Corner(corner); 12544 self.corner.fixed = TRUE; 12545 } 12546 } 12547 12548 return self.corner.string() !== 'centercenter'; 12549 }, 12550 12551 detectColours: function() { 12552 var tip = elems.tip.css({ backgroundColor: '', border: '' }), 12553 corner = self.corner, 12554 precedance = corner[ corner.precedance ], 12555 12556 borderSide = 'border-' + precedance + '-color', 12557 borderSideCamel = 'border' + precedance.charAt(0) + precedance.substr(1) + 'Color', 12558 12559 invalid = /rgba?\(0, 0, 0(, 0)?\)|transparent/i, 12560 backgroundColor = 'background-color', 12561 transparent = 'transparent', 12562 12563 useTitle = elems.titlebar && 12564 (corner.y === 'top' || (corner.y === 'center' && tip.position().top + (size.height / 2) + opts.offset < elems.titlebar.outerHeight(1))), 12565 colorElem = useTitle ? elems.titlebar : elems.content; 12566 12567 // Detect tip colours from CSS styles 12568 color.fill = tip.css(backgroundColor) || transparent; 12569 color.border = tip[0].style[ borderSideCamel ]; 12570 12571 // Make sure colours are valid 12572 if(!color.fill || invalid.test(color.fill)) { 12573 color.fill = colorElem.css(backgroundColor); 12574 if(invalid.test(color.fill)) { 12575 color.fill = tooltip.css(backgroundColor); 12576 } 12577 } 12578 if(!color.border || invalid.test(color.border)) { 12579 color.border = tooltip.css(borderSide); 12580 if(invalid.test(color.border) || color.border === yQuery(document.body).css('color')) { 12581 color.border = (colorElem.css(borderSide) !== yQuery(qTip.elements.content).css('color') ? 12582 colorElem.css(borderSide) : transparent); 12583 } 12584 } 12585 12586 // Reset background and border colours 12587 yQuery('*', tip).add(tip).css(backgroundColor, transparent).css('border', '0px dashed transparent'); 12588 }, 12589 12590 create: function() 12591 { 12592 var width = size.width, 12593 height = size.height, 12594 vml; 12595 12596 // Remove previous tip element if present 12597 if(elems.tip) { elems.tip.remove(); } 12598 12599 // Create tip element and prepend to the tooltip 12600 elems.tip = yQuery('<div />', { 'class': 'ui-tooltip-tip' }).css({ width: width, height: height }).prependTo(tooltip); 12601 12602 // Create tip drawing element(s) 12603 if(hasCanvas) { 12604 // save() as soon as we create the canvas element so FF2 doesn't bork on our first restore()! 12605 yQuery('<canvas />').appendTo(elems.tip)[0].getContext('2d').save(); 12606 } 12607 else { 12608 vml = '<vml:shape coordorigin="0,0" style="display:block; position:absolute; behavior:url(#default#VML);"></vml:shape>'; 12609 elems.tip.html( border ? vml += vml : vml ); 12610 } 12611 }, 12612 12613 update: function(corner) 12614 { 12615 var tip = elems.tip, 12616 inner = tip.children(), 12617 width = size.width, 12618 height = size.height, 12619 regular = 'px solid ', 12620 transparent = 'px dashed transparent', // Dashed IE6 border-transparency hack. Awesome! 12621 mimic = opts.mimic, 12622 round = Math.round,
12623 precedance, context, coords, translate, newSize; 12624 12625 // Re-determine tip if not already set 12626 if(!corner) { corner = self.corner; } 12627 12628 // Use corner property if we detect an invalid mimic value 12629 if(mimic === FALSE) { mimic = corner; } 12630 12631 // Otherwise inherit mimic properties from the corner object as necessary 12632 else { 12633 mimic = new PLUGINS.Corner(mimic); 12634 mimic.precedance = corner.precedance; 12635 12636 if(mimic.x === 'inherit') { mimic.x = corner.x; } 12637 else if(mimic.y === 'inherit') { mimic.y = corner.y; } 12638 else if(mimic.x === mimic.y) { 12639 mimic[ corner.precedance ] = corner[ corner.precedance ]; 12640 } 12641 } 12642 precedance = mimic.precedance; 12643 12644 // Update our colours 12645 self.detectColours(); 12646 12647 // Detect border width, taking into account colours 12648 border = color.border === 'transparent' || color.border === '#123456' ? 0 : 12649 opts.border === TRUE ? borderWidth(corner, NULL, TRUE) : opts.border; 12650 12651 // Calculate coordinates 12652 coords = calculateTip(mimic, width , height); 12653 12654 // Determine tip size 12655 newSize = calculateSize(corner); 12656 tip.css(newSize); 12657 12658 // Calculate tip translation 12659 if(corner.precedance === 'y') { 12660 translate = [ 12661 round(mimic.x === 'left' ? border : mimic.x === 'right' ? newSize.width - width - border : (newSize.width - width) / 2), 12662 round(mimic.y === 'top' ? newSize.height - height : 0) 12663 ]; 12664 } 12665 else { 12666 translate = [ 12667 round(mimic.x === 'left' ? newSize.width - width : 0), 12668 round(mimic.y === 'top' ? border : mimic.y === 'bottom' ? newSize.height - height - border : (newSize.height - height) / 2) 12669 ]; 12670 } 12671 12672 // Canvas drawing implementation 12673 if(hasCanvas) { 12674 // Set the canvas size using calculated size 12675 inner.attr(newSize); 12676 12677 // Grab canvas context and clear/save it 12678 context = inner[0].getContext('2d'); 12679 context.restore(); context.save(); 12680 context.clearRect(0,0,3000,3000); 12681 12682 // Translate origin 12683 context.translate(translate[0], translate[1]); 12684 12685 // Draw the tip 12686 context.beginPath(); 12687 context.moveTo(coords[0][0], coords[0][1]); 12688 context.lineTo(coords[1][0], coords[1][1]); 12689 context.lineTo(coords[2][0], coords[2][1]); 12690 context.closePath(); 12691 context.fillStyle = color.fill; 12692 context.strokeStyle = color.border; 12693 context.lineWidth = border * 2; 12694 context.lineJoin = 'miter'; 12695 context.miterLimit = 100; 12696 context.stroke(); 12697 context.fill(); 12698 } 12699 12700 // VML (IE Proprietary implementation) 12701 else { 12702 // Setup coordinates string 12703 coords = 'm' + coords[0][0] + ',' + coords[0][1] + ' l' + coords[1][0] + 12704 ',' + coords[1][1] + ' ' + coords[2][0] + ',' + coords[2][1] + ' xe'; 12705 12706 // Setup VML-specific offset for pixel-perfection 12707 translate[2] = border && /^(r|b)/i.test(corner.string()) ? 1 : 0; 12708 12709 // Set initial CSS 12710 inner.css({ 12711 antialias: ''+(mimic.string().indexOf('center') > -1), 12712 left: translate[0] - (translate[2] * Number(precedance === 'x')), 12713 top: translate[1] - (translate[2] * Number(precedance === 'y')), 12714 width: width + border, 12715 height: height + border 12716 }) 12717 .each(function(i) { 12718 var $this = yQuery(this); 12719 12720 // Set shape specific attributes 12721 $this.attr({ 12722 coordsize: (width+border) + ' ' + (height+border), 12723 path: coords, 12724 fillcolor: color.fill, 12725 filled: !!i, 12726 stroked: !!!i 12727 }) 12728 .css({ display: border || i ? 'block' : 'none' }); 12729 12730 // Check if border is enabled and add stroke element 12731 if(!i && border > 0 && $this.html() === '') { 12732 $this.html( 12733 '<vml:stroke weight="'+(border*2)+'px" color="'+color.border+'" miterlimit="1000" joinstyle="miter" ' + 12734 ' style="behavior:url(#default#VML); display:block;" />' 12735 ); 12736 } 12737 }); 12738 } 12739 12740 return self.position(corner, 1); 12741 }, 12742 12743 // Tip positioning method 12744 position: function(corner, set) 12745 { 12746 var tip = elems.tip, 12747 position = {}, 12748 offset = Math.max(0, opts.offset), 12749 precedance, dimensions, 12750 adjust; 12751 12752 // Return if tips are disabled or tip is not yet rendered 12753 if(opts.corner === FALSE || !tip) { return FALSE; } 12754 12755 // Inherit corner if not provided 12756 corner = corner || self.corner; 12757 precedance = corner.precedance; 12758
12759 // Determine which tip dimension to use for adjustment 12760 dimensions = calculateSize(corner); 12761 12762 // Setup IE specific dimension adjustment 12763 adjust = $.browser.msie && border && /^(b|r)/i.test(corner.string()) ? 1 : 0; 12764 12765 // Calculate tip position 12766 $.each( 12767 precedance === 'y' ? [ corner.x, corner.y ] : [ corner.y, corner.x ], 12768 function(i, side) 12769 { 12770 var b, br; 12771 12772 if(side === 'center') { 12773 b = precedance === 'y' ? 'left' : 'top'; 12774 position[ b ] = '50%'; 12775 position['margin-' + b] = -Math.round(dimensions[ precedance === 'y' ? 'width' : 'height' ] / 2) + offset; 12776 } 12777 else { 12778 b = borderWidth(corner, side, TRUE); 12779 br = borderRadius(corner); 12780 12781 position[ side ] = i || !border ? 12782 borderWidth(corner, side) + (!i ? br : 0) : 12783 offset + (br > b ? br : 0); 12784 } 12785 } 12786 ); 12787 position[ corner[precedance] ] -= dimensions[ precedance === 'x' ? 'width' : 'height' ] + adjust; 12788 12789 // Set and return new position 12790 if(set) { tip.css({ top: '', bottom: '', left: '', right: '', margin: '' }).css(position); } 12791 return position; 12792 }, 12793 12794 destroy: function() 12795 { 12796 // Remov tip and bound events 12797 if(elems.tip) { elems.tip.remove(); } 12798 tooltip.unbind(namespace); 12799 } 12800 }); 12801 12802 self.init(); 12803} 12804 12805PLUGINS.tip = function(api) 12806{ 12807 var self = api.plugins.tip; 12808 12809 return 'object' === typeof self ? self : (api.plugins.tip = new Tip(api)); 12810}; 12811 12812// Initialize tip on render 12813PLUGINS.tip.initialize = 'render'; 12814 12815// Setup plugin sanitization options 12816PLUGINS.tip.sanitize = function(options) 12817{ 12818 var style = options.style, opts; 12819 if(style && 'tip' in style) { 12820 opts = options.style.tip; 12821 if(typeof opts !== 'object'){ options.style.tip = { corner: opts }; } 12822 if(!(/string|boolean/i).test(typeof opts.corner)) { opts.corner = TRUE; } 12823 if(typeof opts.width !== 'number'){ delete opts.width; } 12824 if(typeof opts.height !== 'number'){ delete opts.height; } 12825 if(typeof opts.border !== 'number' && opts.border !== TRUE){ delete opts.border; } 12826 if(typeof opts.offset !== 'number'){ delete opts.offset; } 12827 } 12828}; 12829 12830// Extend original qTip defaults 12831$.extend(TRUE, QTIP.defaults, { 12832 style: { 12833 tip: { 12834 corner: TRUE, 12835 mimic: FALSE, 12836 width: 6, 12837 height: 6, 12838 border: TRUE, 12839 offset: 0 12840 } 12841 } 12842});PLUGINS.svg = function(svg, corner) 12843{ 12844 var doc = yQuery(document), 12845 elem = svg[0], 12846 result = { 12847 width: 0, height: 0, 12848 offset: { top: 1e10, left: 1e10 } 12849 }, 12850 box, mtx, root, point, tPoint; 12851 12852 if (elem.getBBox && elem.parentNode) { 12853 box = elem.getBBox(); 12854 mtx = elem.getScreenCTM(); 12855 root = elem.farthestViewportElement || elem; 12856 12857 // Return if no method is found 12858 if(!root.createSVGPoint) { return result; } 12859 12860 // Create our point var 12861 point = root.createSVGPoint(); 12862 12863 // Adjust top and left 12864 point.x = box.x; 12865 point.y = box.y; 12866 tPoint = point.matrixTransform(mtx); 12867 result.offset.left = tPoint.x; 12868 result.offset.top = tPoint.y; 12869 12870 // Adjust width and height 12871 point.x += box.width; 12872 point.y += box.height; 12873 tPoint = point.matrixTransform(mtx); 12874 result.width = tPoint.x - result.offset.left; 12875 result.height = tPoint.y - result.offset.top; 12876 12877 // Adjust by scroll offset 12878 result.offset.left += doc.scrollLeft(); 12879 result.offset.top += doc.scrollTop(); 12880 } 12881 12882 return result; 12883}; 12884 12885function Modal(api) 12886{ 12887 var self = this, 12888 options = api.options.show.modal, 12889 elems = api.elements, 12890 tooltip = elems.tooltip, 12891 12892 selector = '#qtip-overlay', 12893 namespace = '.qtipmodal', 12894 events = 'tooltipshow'+namespace+' tooltiphide'+namespace; 12895 12896 // Setup option set checks 12897 api.checks.modal = { 12898 '^show.modal.(on|blur)$': function() { 12899 // Initialise 12900 self.init(); 12901 12902 // Show the modal if not visible already and tooltip is visible 12903 elems.overlay.toggle( tooltip.is(':visible') ); 12904 } 12905 }; 12906 12907 $.extend(self, { 12908 init: function() 12909 { 12910 if(options.on) { 12911 // Apply our modal events (unbind the mfirst so we don't duplicate) 12912 tooltip.unbind(namespace).bind(events, function(event, api, duration) { 12913 var type = event.type.replace('tooltip', ''); 12914 12915 if($.isFunction(options[type])) { 12916 options[type].call(elems.overlay, duration, api); 12917 } 12918 else { 12919 self[type](duration); 12920 } 12921 }); 12922 12923 // Create the overlay if needed 12924 self.create(); 12925 12926 // Hide tooltip on overlay click if enabled and toggle cursor style 12927 if(options.blur === TRUE) { 12928 elems.overlay.unbind(namespace+api.id).bind('click'+namespace+api.id, function(){ api.hide.call(api); }); 12929 } 12930 elems.overlay.css('cursor', options.blur ? 'pointer' : ''); 12931 } 12932 }, 12933 12934 create: function() 12935 { 12936 var elem = yQuery(selector), overlay; 12937 12938 // Return if overlay is already rendered
12939 if(elem.length) { elems.overlay = elem; return elem; } 12940 12941 // Create document overlay 12942 overlay = elems.overlay = yQuery('<div />', { 12943 id: selector.substr(1), 12944 css: { 12945 position: 'absolute', 12946 top: 0, 12947 left: 0, 12948 display: 'none' 12949 }, 12950 mousedown: function() { return FALSE; } 12951 }) 12952 .appendTo(document.body); 12953 12954 // Update position on window resize or scroll 12955 yQuery(window).bind('resize'+namespace, function() { 12956 overlay.css({ 12957 height: Math.max( yQuery(window).height(), yQuery(document).height() ), 12958 width: Math.max( yQuery(window).width(), yQuery(document).width() ) 12959 }); 12960 }) 12961 .trigger('resize'); 12962 12963 return overlay; 12964 }, 12965 12966 toggle: function(state) 12967 { 12968 var overlay = elems.overlay, 12969 effect = api.options.show.modal.effect, 12970 type = state ? 'show': 'hide', 12971 zindex; 12972 12973 // Create our overlay if it isn't present already 12974 if(!overlay) { overlay = self.create(); } 12975 12976 // Prevent modal from conflicting with show.solo 12977 if(overlay.is(':animated') && !state) { return; } 12978 12979 // Setop all animations 12980 overlay.stop(TRUE, FALSE); 12981 12982 // Set z-indx if we're showing it 12983 if(state) { 12984 zindex = parseInt( $.css(tooltip[0], 'z-index'), 10); 12985 overlay.css('z-index', (zindex || QTIP.zindex) - 1); 12986 } 12987 12988 // Use custom function if provided 12989 if($.isFunction(effect)) { 12990 effect.call(overlay, state); 12991 } 12992 12993 // If no effect type is supplied, use a simple toggle 12994 else if(effect === FALSE) { 12995 overlay[ type ](); 12996 } 12997 12998 // Use basic fade function 12999 else { 13000 overlay.fadeTo(90, state ? 0.7 : 0, function() { 13001 if(!state) { yQuery(this).hide(); } 13002 }); 13003 } 13004 }, 13005 13006 show: function() { self.toggle(TRUE); }, 13007 hide: function() { self.toggle(FALSE); }, 13008 13009 destroy: function() 13010 { 13011 var delBlanket = elems.overlay; 13012 13013 if(delBlanket) { 13014 // Check if any other modal tooltips are present 13015 yQuery(selector).each(function() { 13016 var api = yQuery(this).data('qtip'); 13017 13018 // If another modal tooltip is present, leave overlay 13019 if(api && api.id !== api.id && api.options.show.modal) { 13020 return (delBlanket = FALSE); 13021 } 13022 }); 13023 13024 // Remove overlay if needed 13025 if(delBlanket) { 13026 elems.overlay.remove(); 13027 yQuery(window).unbind(namespace); 13028 } 13029 else { 13030 elems.overlay.unbind(namespace+api.id); 13031 } 13032 } 13033 13034 // Remove bound events 13035 tooltip.unbind(events); 13036 } 13037 }); 13038 13039 self.init(); 13040} 13041 13042PLUGINS.modal = function(api) 13043{ 13044 var self = api.plugins.modal; 13045 13046 return 'object' === typeof self ? self : (api.plugins.modal = new Modal(api)); 13047}; 13048 13049// Plugin needs to be initialized on render
13050PLUGINS.modal.initialize = 'render'; 13051 13052// Setup sanitiztion rules 13053PLUGINS.modal.sanitize = function(opts) { 13054 if(opts.show) { 13055 if(typeof opts.show.modal !== 'object') { opts.show.modal = { on: !!opts.show.modal }; } 13056 else if(typeof opts.show.modal.on === 'undefined') { opts.show.modal.on = TRUE; } 13057 } 13058}; 13059 13060// Extend original api defaults 13061$.extend(TRUE, QTIP.defaults, { 13062 show: { 13063 modal: { 13064 on: FALSE, 13065 effect: TRUE, 13066 blur: TRUE 13067 } 13068 } 13069});/* 13070 * BGIFrame adaption (http://plugins.yQuery.com/project/bgiframe) 13071 * Special thanks to Brandon Aaron 13072 */ 13073function BGIFrame(api) 13074{ 13075 var self = this, 13076 elems = api.elements, 13077 tooltip = elems.tooltip, 13078 namespace = '.bgiframe-' + api.id, 13079 events = 'tooltipmove'+namespace+' tooltipshow'+namespace; 13080 13081 $.extend(self, { 13082 init: function() 13083 { 13084 // Create the BGIFrame element 13085 elems.bgiframe = yQuery('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" ' + 13086 ' style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0);"></iframe>'); 13087 13088 // Append the new element to the tooltip 13089 elems.bgiframe.appendTo(tooltip); 13090 13091 // Update BGIFrame on tooltip move 13092 tooltip.bind(events, self.adjust); 13093 }, 13094 13095 adjust: function() 13096 { 13097 var dimensions = api.get('dimensions'), // Determine current tooltip dimensions 13098 plugin = api.plugins.tip, 13099 tip = api.elements.tip, 13100 tipAdjust, offset; 13101 13102 // Adjust border offset 13103 offset = parseInt(tooltip.css('border-left-width'), 10) || 0; 13104 offset = { left: -offset, top: -offset }; 13105 13106 // Adjust for tips plugin 13107 if(plugin && tip) { 13108 tipAdjust = (plugin.corner.precedance === 'x') ? ['width', 'left'] : ['height', 'top']; 13109 offset[ tipAdjust[1] ] -= tip[ tipAdjust[0] ](); 13110 } 13111 13112 // Update bgiframe 13113 elems.bgiframe.css(offset).css(dimensions); 13114 }, 13115 13116 destroy: function() 13117 { 13118 // Remove iframe 13119 self.iframe.remove(); 13120 13121 // Remove bound events 13122 tooltip.unbind(events); 13123 } 13124 }); 13125 13126 self.init(); 13127} 13128 13129PLUGINS.bgiframe = function(api) 13130{ 13131 var browser = $.browser, 13132 self = api.plugins.bgiframe; 13133 13134 // Proceed only if the browser is IE6 and offending elements are present 13135 if(!PLUGINS.bgiframe.needBGI || !(browser.msie && browser.version.charAt(0) === '6')) { 13136 return FALSE; 13137 } 13138 13139 return 'object' === typeof self ? self : (api.plugins.bgiframe = new BGIFrame(api)); 13140}; 13141 13142// Plugin needs to be initialized on render
13143PLUGINS.bgiframe.initialize = 'render'; 13144 13145PLUGINS.bgiframe.needBGI = yQuery('select, object').length > 0;}(yQuery, window)); 13146jQuery.noConflict(); 13147yQuery.noConflict();(function(c){var b={threshold:0};var d=false;var a=function(){clearTimeout(d);d=setTimeout(function(){var g=jQuery(window).data("lazyloaders");if(!g||!g.length){jQuery(window).unbind("scroll",a);return}var e=[];jQuery(g).each(function(h){var j;var k=false;if(this.e&&c.inviewport(this.e,j=c.extend({},b,this.s))){if(typeof j.show=="function"){k=j.show.call(this.e)}else{k=jQuery(this.e).showComment()}}if(k===false){e.push(this)}});jQuery(window).data("lazyloaders",e)},250)};jQuery.fn.extend({lazyLoad:function(e){var g=jQuery(window).data("lazyloaders");if(!g){g=[]}this.each(function(){g.push({e:this,s:e})});jQuery(window).data("lazyloaders",g);jQuery(window).unbind("scroll",a).bind("scroll",a).trigger("scroll")},getComment:function(){return this.each(function(){var e=this.firstChild;if(e&&e.nodeType===8){return e.nodeValue}})},showComment:function(){return this.each(function(){var g=this.firstChild;if(g&&g.nodeType===8){this.innerHTML="";var e=jQuery(g.nodeValue);jQuery(this).replaceWith(e)}})}})})(jQuery);function swapImage(c,a){var b=jQuery(c);b.data("orig_src",b.attr("src")).attr("src",a)}function restoreImage(b){var a=jQuery(b);a.attr("src",a.data("orig_src"))}jQuery(function(){jQuery("a.expand_link").click(function(){$el=jQuery(this).closest(".expand_title").next(".expand_body");$_this=jQuery(this);if($el.is(":hidden")){$_this.find("img").attr("src","/images/mines.png")}else{$_this.find("img").attr("src","/images/plus.png")}$el.stop(true).slideToggle("slow",function(){if(jQuery(this).is(":hidden")){$_this.find("img").attr("src","/images/plus.png");jQuery(this).css("height","")}else{$_this.find("img").attr("src","/images/mines.png")}});return false});jQuery(".lazyload").lazyLoad({threshold:300})});hs.graphicsDir="../js/highslide/graphics/";hs.showCredits=false;hs.align="auto";hs.transitions=["expand","crossfade"];hs.fadeInOut=true;hs.outlineType="rounded-white";hs.captionEval="this.a.title";hs.useBox=false;hs.allowMultipleInstances=true;hs.addSlideshow({interval:5000,repeat:false,useControls:true,fixedControls:"fit",overlayOptions:{position:"bottom center",opacity:0.75,hideOnMouseOut:true},thumbstrip:{position:"top center",mode:"horizontal",relativeTo:"expander",hideOnMouseOut:true}});hs.Expander.prototype.onCreateOverlay=function(a,b){if(!jQuery(b.overlay).hasClass("highsli
13147de-caption")&&!jQuery(b.overlay).hasClass("highslide-heading")&&(jQuery(a.a).hasClass("highslide_overlay_off")||!this.slideshowGroup||jQuery(b.overlay).closest(".highslide-container").find(".highslide-thumbstrip-inner").find("img").length==1)){setTimeout(function(){b.overlay.style.display="none"},0)}};hs.Expander.prototype.onBeforeExpand=function(b){if(jQuery(".highslide-thumbstrip-inner").length){var a=Math.min(this.x.size,jQuery(".highslide-thumbstrip-inner").get(0).scrollWidth);jQuery(".highslide-thumbstrip-inner").width(a).closest("[id^=hsId]").css("marginLeft",-1*a/2).css("marginLeft")}};ddtabmenu.definemenu("ddtabs1","auto","nav_link");function menuover(b,a){document.getElementById(b).className=a+"up"}function menuout(b,a){document.getElementById(b).className=a}function changebox(b,a){document.getElementById("box"+b).className="boxarea_secup";document.getElementById(a).src="/images/viewallup.gif"}function changeboxout(b,a){document.getElementById("box"+b).className="boxarea_sec";document.getElementById(a).src="/images/viewall.gif"}function showhidemenu1(){if(document.getElementById("scrollmenu2").style.display=="none"){document.getElementById("scrollimg1").src="/images/plus.gif";document.getElementById("scrollmenu1").style.display="none";document.getElementById("scrollimg2").src="/images/mines.gif";document.getElementById("scrollmenu2").style.display="none";jQuery("#scrollmenu2").slideDown(1000)}else{document.getElementById("scrollimg2").src="/images/plus.gif";document.getElementById("scrollmenu2").style.display="none";document.getElementById("scrollimg1").src="/images/mines.gif";jQuery("#scrollmenu1").slideDown(1000)}}function showhidemenu2(){var a=document.getElementById("scrollimg2").src;if(a.search("/images/mines.gif")>0){document.getElementById("scrollimg1").src="/images/mines.gif";jQuery("#scrollmenu1").slideDown(1000);document.getElementById("scrollimg2").src="/images/plus.gif";document.getElementById("scrollmenu2").style.display="none"}else{document.getElementById("scrollimg1").src="/images/plus.gif";document.getElementById("scrollmenu1").style.display="none";document.getElementById("scrollimg2").src="/images/mines.gif";jQuery("#scrollmenu2").slideDown(1000)}}function MM_preloadImages(){var g=document;if(g.images){if(!g.MM_p){g.MM_p=new Array()}var e,c=g.MM_p.length,b=MM_preloadImages.arguments;for(e=0;e<b.length;e++){if(b[e].indexOf("#")!=0){g.MM_p[c]=new Image;g.MM_p[c++].src=b[e]}}}}function MM_swapImgRestore(){var d,b,c=document.MM_sr;for(d=0;c&&d<c.length&&(b=c[d])&&b.oSrc;d++){b.src=b.oSrc}}function MM_swapImage(){var e,d=0,b,c=MM_swapImage.arguments;document.MM_sr=new Array;for(e=0;e<(c.length-2);e+=3){if((b=MM_findObj(c[e]))!=null){document.MM_sr[d++]=b;if(!b.oSrc){b.oSrc=b.src}b.src=c[e+2]}}}(function(a){createLoadingPopup=function(b){$el=jQuery("#loading_div");$overlay=jQuery("#overlay_div");if(!$overlay.length){$overlay=jQuery('<div id="overlay_div"> </div>').css({position:"absolute",display:"none",width:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)+"px",height:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)+"px",top:0,left:0,backgroundColor:"#555555",opacity:0.25,zIndex:1000});jQuery("body").append($overlay)}if(!$el.length){$el=jQuery('<div id="loading_div"><table cellpadding="10"><tr><td><img src="/images/loading_big.gif" /></td><td id="loading_text" style="font-size: 13px;"><nobr>'+b+"</nobr></td></tr></table></div>").css("position","absolute").css({visibility:"hidden",backgroundColor:"#FFFFFF",border:"1px solid #999999",zIndex:1001});if(!a.browser.msie){$el.css({position:"fixed"})}jQuery("body").append($el)}};hideLoadingPopup=function(){$el=jQuery("#loading_div").hide();$overlay=jQuery("#overlay_div").hide()};showLoadingOverlay=function(){createLoadingPopup();$overlay=jQuery("#overlay_div");jQuery("#overlay_div").fadeIn()};hideLoadingOverlay=function(){jQuery("#overlay_div").hide()};showLoadingPopup=function(e,b){if(typeof b=="undefined"||b==null){b=15000}createLoadingPopup(e);$el=jQuery("#loading_div");$overlay=jQuery("#overlay_div");jQuery("#loading_text").text(e);var d=document.documentElement.clientWidth/2+($el.css("position")!="fixed"?Math.max(jQuery(document.body).scrollLeft(),jQuery(document.documentElement).scrollLeft()):0)-$el.width()/2;var c=document.documentElement.clientHeight/2+($el.css("position")!="fixed"?Math.max(jQuery(document.body).scrollTop(),jQuery(document.documentElement).scrollTop()):0)-$el.height()/2;showLoadingOverlay();$el.css({left:d,top:c}).css({visibility:"visible",display:"none"}).fadeIn();if(b){setTimeout(hideLoadingPopup,b)}}})(jQuery);var cnt=0;var interval=0;var f=function(){var b={cssText:"display:none !important; visibility: hidden !important"};
13147var a=jQuery('iframe[src^="http://www.gstatic.com/webgps/grelated"]');a.css(b).prev("div").css(b);if(++cnt<=5&&!a.length){setTimeout(f,500)}};jQuery(function(){f()});yQuery(function(){var a=0;var b=0;yQuery(".browse_cat2 ul li").not(".disabled").find("a").each(function(){yQuery(this).qtip({content:{text:'<div class="browse_content">Loading...</div>',ajax:{url:"/ajax/categories.php",type:"GET",data:{id:yQuery(this).closest("li").attr("id").replace("menu_","")},success:function(d,c){this.set("content.text",'<div class="browse_content">'+d+"</div>");if(!d){this.hide();this.disable(true);this.elements.target.closest("li").addClass("disabled")}}}},show:{solo:false,effect:true},hide:{delay:300,effect:true,fixed:true},position:{my:"top center",at:"bottom center",target:yQuery(".browse_cat"),container:yQuery("#browse_cat_content"),adjust:{y:-8,x:30}},style:{classes:"ui-tooltip-light",tip:{corner:"top left",mimic:"center",border:8,width:15,height:7,offset:30}},events:{show:function(d,c){clearTimeout(b);yQuery(".qtip").qtip("option","show.effect",false).qtip("option","hide.effect",false);yQuery(".browse_cat2 ul li a").removeClass("active");c.elements.target.closest("li").addClass("active");var e=(c.elements.target.offset().left+c.elements.target.width()/2)-(yQuery(c.get("position.target")).offset().left+22);if(!a){a=e}c.set("style.tip.offset",a);c.set("position.adjust.x",a);c.set("style.tip.width",c.get("style.tip.width"));setTimeout(function(g){yQuery(".qtip").not(c.elements.tooltip).qtip("hide");c.elements.tip.animate({left:e},{duration:500,step:function(h){a=h},complete:function(){clearTimeout(b);a=e;c.set("style.tip.offset",a);c.set("position.adjust.x",a);c.set("style.tip.width",c.get("style.tip.width"));yQuery(".qtip").qtip("option","show.effect",true).qtip("option","hide.effect",true)}})},0)},hide:function(d,c){c.elements.target.closest("li").removeClass("active");b=setTimeout(function(){a=0},1000)}}})})});function callback_carousel(a){jQuery(".carousel_control a").bind("click",function(){jQuery(".carousel_control a").removeClass("active");jQuery(this).addClass("active");a.scroll(jQuery.jcarousel.intval(jQuery(this).text()));return false})}function visible_item(d,b,a,c){jQuery(".carousel_control a").removeClass("active");el=a-1;jQuery(".carousel_control a:eq("+el+")").addClass("active")}jQuery(function(a){jQuery("#main_hero").jcarousel({wrap:"last",auto:5,scroll:1,initCallback:callback_carousel,buttonNextHTML:null,buttonPrevHTML:null,itemVisibleInCallback:{onAfterAnimation:visible_item}})});jQuery(function(){(function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="https://apis.google.com/js/plusone.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})()});jQuery(function(b){var a=jQuery("#product_tabmenu").tabs();if(location.hash&&a.find('a[href$="#'+location.hash.replace(/^#/,"")+'"]').length>0){var c=jQuery("#product_tabmenu").tabs("select","#"+location.hash.replace(/^#/,"")).offset();if(c&&c.top){jQuery("html,body").animate({scrollTop:c.top})}}yQuery(".credex-tooltip").qtip({content:yQuery(".credex-tooltip-content"),position:{my:"right center",at:"left center"},style:{classes:"ui-tooltip-shadow",tip:{corner:"right center",mimic:"center"}},hide:{delay:300,fixed:true}})});var m;if(m=document.location.hash.match(/^#?write_a_review([?](.*))?/i)){var $el=jQuery(".write_a_review.highslide:first");if(m[2]){$el.each(function(){jQuery(this).attr("href",jQuery(this).attr("href")+"&"+m[2])})}$el.filter(":first").click()}hs.Expander.prototype.onInit=function(a){if(jQuery(a.a).is(".write_a_review")){jQuery(".write_a_review").not(a.a).each(function(){var b=hs.getExpander(this);if(b){b.close()}})}};hs.Expander.prototype.onAfterExpand=function(a){if(typeof a.a!=="undefined"&&typeof a.iframe!=="undefined"&&jQuery(a.a).is(".write_a_review")){jQuery(a.iframe).load(function(){hs.getExpander().reflow();if(jQuery(a.a).is(".write_a_review")&&jQuery(".success_msg",this.contentDocument).length){if(jQuery(a.a).is(".write_a_review")){document.location.hash="reviews";document.location.reload();a.close()}}})}};jQuery(function(){jQuery("#products .categorysub_workbox").delegate("a","click",function(){var c=jQuery(this).closest(".categorysub_work");var b=parseInt(c.find(".productID").val());if(b){var a=c.prevAll(".categorysub_work").length+1+0;$.cookie("_tp["+b+"]","product_id="+encodeURIComponent(b)+"&category_id=229&num_results=0&base_num_results=5495&product_rank="+encodeURIComponent(a)+""+(jQuery(this).is('[href*="/Cart.html"]')?"&type=ADD_TO_CART":""),{path:"/"});return true}})});jQuery(function(){showAllProducts=function(){jQuery("#products").fadeIn("slow");jQuery(".chef-help").hide()};if(location.hash=="#products"||location.hash=="products"){showAllProducts()}jQuery(".mobile-menu").click(function(){jQuery(".topnav_sec").slideToggle();jQuery(this).toggleClass("expanded")})});jQuery(window).load(function(){$j(".filters-open").live("click",(function(){var a=$j(".btns-filters").offset();$j(".workarea_right").prepend('<div class="filter-mask"></div>');$j("#facet_wrapper").css({display:"block"});$j("#facet_wrapper").offset({top:a.top+28,left:-220});$j("#facet_wrapper").animate({left:"0"},300);$j(".btns-filters").addClass("hidden-fil");return false}));$j(".filters-close").live("click",(function(){$j(".filter-mask").remove();$j("#facet_wrapper").animate({left:"-220"},300);$j(".btns-filters").removeClass("hidden-fil");return false}));$j(window).on("resize load",function(){if($j(".btns-filters").hasClass("hidden-fil")){$j(".filter-mask").remove();$j("#facet_wrapper").animate({left:"-220"},300);$j(".btns-filters").removeClass("hidden-fil")}})});(function(d){d.fn.sameHeight=function(g){var e=d.extend({skipClass:"same-height-ignore",elements:">*",flexible:false,multiLine:false},g);return this.each(function(){var i=d(this);var j=i.find(e.elements).not("."+e.skipClass);if(!j.length){return}function h(){j.css({height:""});if(e.multiLine){b(j)}else{c(j,i)}}h();if(e.flexible){d(window).bind("load resize orientationchange fontresize",function(k,l){h();setTimeout(h,500)})}})};function b(h){var g=d(),i,e=h.eq(0).offset().top;h.each(function(k){var j=d(this);if(j.offset().top===e){g=g.add(this)}else{i=a(g);c(g,i);g=j;e=j.offset().top}});if(g.length){i=a(g);c(g,i)}}function a(e){var g=0;e.each(function(){g=Math.max(g,d(this).outerHeight())});return g}function c(g,h){var e=typeof h==="number"?h:h.height();g.each(function(){var i=d(this);var j=0;if(typeof h!=="number"){i.parents().each(function(){var k=d(this);if(this===h[0]){return false}else{j+=k.outerHeight()-k.height()}})}i.css({height:e-j-(i.outerHeight()-i.height())})})}}(jQuery));TINY={};TINY.box=function(){var e,c,a,h,d,i=0;return{show:function(b){d={opacity:70,close:1,animate:1,fixed:1,mask:1,maskid:"",boxid:"",topsplit:2,url:0,post:0,height:0,width:0,html:0,iframe:0};for(s in b){d[s]=b[s]}if(!i){e=document.createElement("div");e.className="tbox";i=document.createElement("div");i.className="tinner";a=document.createElement("div");a.className="tcontent";c=document.createElement("div");c.className="tmask";h=document.createElement("div");h.className="tclose";h.v=0;document.body.appendChild(c);document.body.appendChild(e);e.appendChild(i);i.appendChild(a);c.onclick=h.onclick=TINY.box.hide;window.onresize=TINY.box.resize}else{e.style.display="none";clearTimeout(i.ah);if(h.v){i.removeChild(h);h.v=0}}i.id=d.boxid;c.id=d.maskid;e.style.position=d.fixed?"fixed":"absolute";if(d.html&&!d.animate){i.style.backgroundImage="none";a.innerHTML=d.html;a.style.display="";i.style.width=d.width?d.width+"px":"auto";i.style.height=d.height?d.height+"px":"auto"}else{a.style.display="none";if(!d.animate&&d.width&&d.height){i.style.width=d.width+"px";i.style.height=d.height+"px"}else{i.style.width=i.style.height="100px"}}if(d.mask){this.mask();this.alpha(c,1,d.opacity)}else{this.alpha(e,1,100)}if(d.autohide){i.ah=setTimeout(TINY.box.hide,1000*d.autohide)}else{document.onkeyup=TINY.box.esc}},fill:function(q,n,l,j,g,p){if(n){if(d.image){var o=new Image();o.onload=function(){g=g||o.width;p=p||o.height;TINY.box.psh(o,j,g,p)};o.src=d.image}else{if(d.iframe){this.psh('<iframe src="'+d.iframe+'" width="'+d.width+'" frameborder="0" height="'+d.height+'"></iframe>',j,g,p)}else{var b=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){
13147i.style.backgroundImage="";TINY.box.psh(b.responseText,j,g,p)}};if(l){b.open("POST",q,true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.send(l)}else{b.open("GET",q,true);b.send(null)}}}}else{this.psh(q,j,g,p)}},psh:function(n,j,g,k){if(typeof n=="object"){a.appendChild(n)}else{a.innerHTML=n}var b=i.style.width,l=i.style.height;if(!g||!k){i.style.width=g?g+"px":"";i.style.height=k?k+"px":"";a.style.display="";if(!k){k=parseInt(a.offsetHeight)}if(!g){g=parseInt(a.offsetWidth)}a.style.display="none"}i.style.width=b;i.style.height=l;this.size(g,k,j)},esc:function(b){b=b||window.event;if(b.keyCode==27){TINY.box.hide()}},hide:function(){TINY.box.alpha(e,-1,0,3);document.onkeypress=null;if(d.closejs){d.closejs()}},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){c.style.height=this.total(1)+"px";c.style.width=this.total(0)+"px"},pos:function(){var b;if(typeof d.top!="undefined"){b=d.top}else{b=(this.height()/d.topsplit)-(e.offsetHeight/2);b=b<20?20:b}if(!d.fixed&&!d.top){b+=this.top()}e.style.top=b+"px";e.style.left=typeof d.left!="undefined"?d.left+"px":(this.width()/2)-(e.offsetWidth/2)+"px"},alpha:function(g,j,b){clearInterval(g.ai);if(j){g.style.opacity=0;g.style.filter="alpha(opacity=0)";g.style.display="block";TINY.box.pos()}g.ai=setInterval(function(){TINY.box.ta(g,b,j)},20)},ta:function(g,b,k){var j=Math.round(g.style.opacity*100);if(j==b){clearInterval(g.ai);if(k==-1){g.style.display="none";g==e?TINY.box.alpha(c,-1,0,2):a.innerHTML=i.style.backgroundImage=""}else{if(g==c){this.alpha(e,1,100)}else{e.style.filter="";TINY.box.fill(d.html||d.url,d.url||d.iframe||d.image,d.post,d.animate,d.width,d.height)}}}else{var l=b-Math.floor(Math.abs(b-j)*0.5)*k;g.style.opacity=l/100;g.style.filter="alpha(opacity="+l+")"}},size:function(g,k,b){if(b){clearInterval(i.si);var j=parseInt(i.style.width)>g?-1:1,l=parseInt(i.style.height)>k?-1:1;i.si=setInterval(function(){TINY.box.ts(g,j,k,l)},20)}else{i.style.backgroundImage="none";if(d.close){i.appendChild(h);h.v=1}i.style.width=g+"px";i.style.height=k+"px";a.style.display="";this.pos();if(d.openjs){d.openjs()}}},ts:function(g,l,k,n){var b=parseInt(i.style.width),j=parseInt(i.style.height);if(b==g&&j==k){clearInterval(i.si);i.style.backgroundImage="none";a.style.display="block";if(d.close){i.appendChild(h);h.v=1}if(d.openjs){d.openjs()}}else{if(b!=g){i.style.width=(g-Math.floor(Math.abs(g-b)*0.6)*l)+"px"}if(j!=k){i.style.height=(k-Math.floor(Math.abs(k-j)*0.6)*n)+"px"}this.pos()}},top:function(){return document.documentElement.scrollTop||document.body.scrollTop},width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},total:function(k){var g=document.body,j=document.documentElement;return k?Math.max(Math.max(g.scrollHeight,j.scrollHeight),Math.max(g.clientHeight,j.clientHeight)):Math.max(Math.max(g.scrollWidth,j.scrollWidth),Math.max(g.clientWidth,j.clientWidth))}}}();function validateForms(b){var e=true;var a=false;var d="";var g;var c=document.getElementById(b);g=c.elements;for(var h=0;h<g.length;h++){if(g[h].classList.contains("req_text")){if(validateText(g,h)){e=false;g[h].className+=" invalid"}else{g[h].className=g[h].className.replace("invalid","")}}else{if(g[h].classList.contains("req_email")){if(validateEmail(g,h)){e=false;g[h].className+=" invalid"}else{g[h].className=g[h].className.replace("invalid","")}}else{if(g[h].classList.contains("req_url")){if(validateEmail(g,h)){e=false;g[h].className+=" invalid"}else{g[h].className=g[h].className.replace("invalid","")}}else{if(g[h].classList.contains("req_radio")&&a==false){if(g[h].checked==true){a=true}}}}}}if(a==false){e=false;document.getElementById("review_star_table").className+=" invalid"}else{document.getElementById("review_star_table").className=document.getElementById("review_star_table").className.replace("invalid","")}if(!e){document.getElementById("errorBox").style.display="block"}else{document.getElementById("errorBox").style.display="none"}return e}function validateEmail(b,c){var a=/^.+@.+\..{2,3}$/;if(!a.test(b[c].value)){return true}}function validateText(a,b){if(a[b].value==""){return true}}function validateUrl(a,c){var b=/^(((ht|f){1}(tp:[/][/]){1})|((www.){1}))[-a-zA-Z0-9@:%_\+.~#?&//=]+$/;if(!b.test(a[c].value)){return true}}(function(g){function e(){return ++c}function b(){return ++a}var c=0,a=0;g.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'},_create:function(){this._tabify(true)},_setOption:function(h,d){if(h=="selected"){this.options.collapsible&&d==this.options.selected||this.select(d)}else{this.options[h]=d;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return g.cookie.apply(null,[d].concat(g.makeArray(arguments)))},_ui:function(h,d){return{tab:h,panel:d,index:this.anchors.index(h)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=g(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(z){function y(h,i){h.css({display:""});
13147!g.support.opacity&&i.opacity&&h[0].style.removeAttribute("filter")}this.list=this.element.find("ol,ul").eq(0);this.lis=g("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return g("a",this)[0]});this.panels=g([]);var B=this,A=this.options,x=/^#.+/;this.anchors.each(function(k,n){var i=g(n).attr("href"),h=i.split("#")[0],o;if(h&&(h===location.toString().split("#")[0]||(o=g("base")[0])&&h===o.href)){i=n.hash;n.href=i}if(x.test(i)){B.panels=B.panels.add(B._sanitizeSelector(i))}else{if(i!="#"){g.data(n,"href.tabs",i);g.data(n,"load.tabs",i.replace(/#.*$/,""));i=B._tabId(n);n.href="#"+i;n=g("#"+i);if(!n.length){n=g(A.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(B.panels[k-1]||B.list);n.data("destroy.tabs",true)}B.panels=B.panels.add(n)}else{A.disabled.push(k)}}});if(z){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(A.selected===undefined){location.hash&&this.anchors.each(function(h,i){if(i.hash==location.hash){A.selected=h;return false}});if(typeof A.selected!="number"&&A.cookie){A.selected=parseInt(B._cookie(),10)}if(typeof A.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){A.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}A.selected=A.selected||(this.lis.length?0:-1)}else{if(A.selected===null){A.selected=-1}}A.selected=A.selected>=0&&this.anchors[A.selected]||A.selected<0?A.selected:0;A.disabled=g.unique(A.disabled.concat(g.map(this.lis.filter(".ui-state-disabled"),function(h){return B.lis.index(h)}))).sort();g.inArray(A.selected,A.disabled)!=-1&&A.disabled.splice(g.inArray(A.selected,A.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(A.selected>=0&&this.anchors.length){this.panels.eq(A.selected).removeClass("ui-tabs-hide");this.lis.eq(A.selected).addClass("ui-tabs-selected ui-state-active");B.element.queue("tabs",function(){B._trigger("show",null,B._ui(B.anchors[A.selected],B.panels[A.selected]))});this.load(A.selected)}g(window).bind("unload",function(){B.lis.add(B.anchors).unbind(".tabs");B.lis=B.anchors=B.panels=null})}else{A.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[A.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");A.cookie&&this._cookie(A.selected,A.cookie);z=0;for(var w;w=this.lis[z];z++){g(w)[g.inArray(z,A.disabled)!=-1&&!g(w).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}A.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(A.event!="mouseover"){var v=function(h,i){i.is(":not(.ui-state-disabled)")&&i.addClass("ui-state-"+h)},p=function(h,i){i.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){v("hover",g(this))});this.lis.bind("mouseout.tabs",function(){p("hover",g(this))});this.anchors.bind("focus.tabs",function(){v("focus",g(this).closest("li"))});this.anchors.bind("blur.tabs",function(){p("focus",g(this).closest("li"))})}var u,l;if(A.fx){if(g.isArray(A.fx)){u=A.fx[0];l=A.fx[1]}else{u=l=A.fx}}var j=l?function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){y(i,l);B._trigger("show",null,B._ui(h,i[0]))})}:function(h,i){g(h).closest("li").addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");B._trigger("show",null,B._ui(h,i[0]))},d=u?function(h,i){i.animate(u,u.duration||"normal",function(){B.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");y(i,u);B.element.dequeue("tabs")})}:function(h,i){B.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");B.element.dequeue("tabs")};this.anchors.bind(A.event+".tabs",function(){var k=this,n=g(this).closest("li"),i=B.panels.filter(":not(.ui-tabs-hide)"),h=g(B._sanitizeSelector(this.hash));if(n.hasClass("ui-tabs-selected")&&!A.collapsible||n.hasClass("ui-state-disabled")||n.hasClass("ui-state-processing")||B._trigger("select",null,B._ui(this,h[0]))===false){this.blur();return false}A.selected=B.anchors.index(this);B.abort();if(A.collapsible){if(n.hasClass("ui-tabs-selected")){A.selected=-1;A.cookie&&B._cookie(A.selected,A.cookie);B.element.queue("tabs",function(){d(k,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){A.cookie&&B._cookie(A.selected,A.cookie);B.element.queue("tabs",function(){j(k,h)});B.load(B.anchors.index(this));this.blur();return false}}}A.cookie&&B._cookie(A.selected,A.cookie);if(h.length){i.length&&B.element.queue("tabs",function(){d(k,i)});B.element.queue("tabs",function(){j(k,h)});B.load(B.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}g.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var i=g.data(this,"href.tabs");if(i){this.href=i}var h=g(this).unbind(".tabs");g.each(["href","load","cache"],function(j,k){h.removeData(k+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){g.data(this,"destroy.tabs")?g(this).remove():g(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(o,n,j){if(j===undefined){j=this.anchors.length}var d=this,l=this.options;n=g(l.tabTemplate.replace(/#\{href\}/g,o).replace(/#\{label\}/g,n));o=!o.indexOf("#")?o.replace("#",""):this._tabId(g("a",n)[0]);n.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var k=g("#"+o);k.length||(k=g(l.panelTemplate).attr("id",o).data("destroy.tabs",true));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(j>=this.lis.length){n.appendTo(this.list);k.appendTo(this.list[0].parentNode)}else{n.insertBefore(this.lis[j]);k.insertBefore(this.panels[j])}l.disabled=g.map(l.disabled,function(h){return h>=j?++h:h});this._tabify();if(this.anchors.length==1){l.selected=0;n.addClass("ui-tabs-selected ui-state-active");k.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[0],d.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[j],this.panels[j]));return this},remove:function(j){var i=this.options,h=this.lis.eq(j).remove(),d=this.panels.eq(j).remove();if(h.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(j+(j+1<this.anchors.length?1:-1))}i.disabled=g.map(g.grep(i.disabled,function(k){return k!=j}),function(k){return k>=j?--k:k});this._tabify();this._trigger("remove",null,this._ui(h.find("a")[0],d[0]));return this},enable:function(h){var d=this.options;if(g.inArray(h,d.disabled)!=-1){this.lis.eq(h).removeClass("ui-state-disabled");d.disabled=g.grep(d.disabled,function(i){return i!=h});this._trigger("enable",null,this._ui(this.anchors[h],this.panels[h]));return this}},disable:function(h){var d=this.options;if(h!=d.selected){this.lis.eq(h).addClass("ui-state-disabled");d.disabled.push(h);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[h],this.panels[h]))}return this}
13147,select:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}else{if(d===null){d=-1}}if(d==-1&&this.options.collapsible){d=this.options.selected}this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(o){var n=this,j=this.options,d=this.anchors.eq(o)[0],l=g.data(d,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&g.data(d,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(o).addClass("ui-state-processing");if(j.spinner){var k=g("span",d);k.data("label.tabs",k.html()).html(j.spinner)}this.xhr=g.ajax(g.extend({},j.ajaxOptions,{url:l,success:function(i,p){g(n._sanitizeSelector(d.hash)).html(i);n._cleanup();j.cache&&g.data(d,"cache.tabs",true);n._trigger("load",null,n._ui(n.anchors[o],n.panels[o]));try{j.ajaxOptions.success(i,p)}catch(h){}},error:function(i,p){n._cleanup();n._trigger("load",null,n._ui(n.anchors[o],n.panels[o]));try{j.ajaxOptions.error(i,p,o,d)}catch(h){}}}));n.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(h,d){this.anchors.eq(h).removeData("cache.tabs").data("load.tabs",d);return this},length:function(){return this.anchors.length}});g.extend(g.ui.tabs,{version:"1.8.2"});g.extend(g.ui.tabs.prototype,{rotation:null,rotate:function(l,k){var i=this,d=this.options,j=i._rotate||(i._rotate=function(h){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var n=d.selected;i.select(++n<i.anchors.length?n:0)},l);h&&h.stopPropagation()});k=i._unrotate||(i._unrotate=!k?function(h){h.clientX&&i.rotate(null)}:function(){t=d.selected;j()});if(l){this.element.bind("tabsshow",j);this.anchors.bind(d.event+".tabs",k);j()}else{clearTimeout(i.rotation);this.element.unbind("tabsshow",j);this.anchors.unbind(d.event+".tabs",k);delete this._rotate;delete this._unrotate}return this}})})(jQuery);//function search_all_brands(brand_id, brand_name, searchterm) { 13148// 13149// var searchForm = document.forms['search_frm']; 13150// //searchForm.elements["brand_id"].value = brand_id; 13151// //searchForm.elements["brand_name"].value = brand_name; 13152// searchForm.elements["search_box"].value = ' '; 13153// searchform_submit(searchterm); 13154//} 13155function searchform_submit(searchterm, frm_id, input_id) { 13156 // Submit updated URL as search page 13157 frm_id = typeof frm_id !== 'undefined' ? frm_id : 'search_frm'; 13158 input_id = typeof input_id !== 'undefined' ? input_id : 'search_box'; 13159 var searchForm = document.forms[frm_id]; 13160 var q = searchForm.elements[input_id].value; 13161 13162 if (searchForm.elements["keyword"].value == '') { 13163 searchForm.elements["keyword"].value = q 13164 } 13165 ; 13166 var baseurl = searchForm.elements['URL'].value; 13167 13168 var params = ''; 13169 13170 13171 if (searchForm.elements[input_id].value == searchterm) { 13172 13173 return false; 13174 } 13175 else { 13176 q_value = searchForm.elements[input_id].value; 13177 } 13178 searchForm.elements['keyword'].value = q; 13179 13180 13181 var new_q = searchterm_clean(q_value); 13182 if (new_q.length > 1) { 13183 13184 //window.location.href = searchForm.elements["URL"].value + "search/"+q+"/"; 13185 //searchForm.elements['search_box'].value = new_q; 13186 13187 13188 13189// document.forms['search_frm'].action = baseurl + "search/"+new_q+"/"; 13190// searchForm.action.value = baseurl + "search/"+new_q+"/"; 13191// document.forms['search_frm'].action.value = baseurl + "search/"+new_q+"/"; 13192// document.getElementById('search_frm').action.value = baseurl + "search/"+new_q+"/"; 13193 13194 document.forms[frm_id].action = baseurl + "search.php?q=" + new_q; 13195 searchForm.action.value = baseurl + "search.php?q=" + new_q; 13196 document.forms[frm_id].action.value = baseurl + "search.php?q=" + new_q; 13197 document.getElementById(frm_id).action.value = baseurl + "search.php?q=" + new_q; 13198 return true; 13199 13200 } else { 13201 return false; 13202 } 13203 13204 return; 13205 13206} 13207//function onChangeHandler(event) { 13208// if (event.target.value == event.srcElement.value) 13209// return; //not changed really 13210// event.target.value = event.srcElement.value; 13211// searchform_submit(searchterm); 13212//} 13213// 13214//function eventBlur(element, searchterm) { 13215// 13216// if (element.value == '' || element.value == ' ' || (typeof element == 'undefined')) { 13217// element.value = searchterm; 13218// } 13219//} 13220//function concatObject(obj) { 13221// str = ''; 13222// for (prop in obj) 13223// { 13224// str += prop + " value :" + obj[prop] + "\n"; 13225// } 13226// return(str); 13227//} 13228function searchterm_clean(searchterm) { 13229 var empty = ''; 13230 // Remove illegal URL characters and encoded quotes 13231 13232 searchterm = searchterm.replace('"', ''); 13233 while (searchterm.indexOf('"') > -1) 13234 { 13235 searchterm = searchterm.replace('"', ''); 13236 } 13237 13238 13239 while (searchterm.indexOf('"') > -1) 13240 { 13241 searchterm = searchterm.replace('"', ''); 13242 } 13243 13244 while (searchterm.indexOf("'") > -1) 13245 { 13246 searchterm = searchterm.replace("'", ''); 13247 } 13248 while (searchterm.indexOf("/") > -1) 13249 { 13250 searchterm = searchterm.replace("/", " "); 13251 13252 } 13253 while (searchterm.indexOf("&") > -1) 13254 { 13255 searchterm = searchterm.replace("&", "-and-"); 13256 } 13257 13258 searchterm = searchterm.replace(/[,()]/g, ' '); 13259 13260 13261 //searchterm = searchterm.replace(/ /g, "-"); 13262 searchterm = searchterm.replace("--", "-"); 13263 13264 return searchterm; 13265 13266} 13267function submitenter(myfield, e, searchterm, frm_id, input_id) 13268{ 13269 var searchForm = document.forms[frm_id]; 13270 var searchValue = searchForm.elements[input_id].value; 13271 var q= 'q'; 13272 if (e.keyCode == 13) 13273 { 13274 if (searchValue == '' || searchValue == ' ' || (typeof searchValue == 'undefined')) { 13275 searchForm.elements[input_id].value = searchterm; 13276 } 13277 13278 if(searchform_submit(searchterm, frm_id, input_id)) document.getElementById(frm_id).submit(); 13279 } 13280 else{ 13281 var x; 13282 x = searchForm.getElementsByTagName("input"); 13283 var i; 13284 for (i = 0; i < x.length; i++) { 13285 if (x[i].name=='q') x[i].value = searchValue; 13286 } 13287 } 13288 13289 13290} 13291 13292function showBox(message, image) 13293{ 13294 var width = document.documentElement.clientWidth + document.documentElement.scrollLeft; 13295 13296 var layer = document.createElement('div'); 13297 layer.style.zIndex = 2; 13298 layer.id = 'layer'; 13299 layer.style.position = 'absolute'; 13300 layer.style.top = '0px'; 13301 layer.style.left = '0px'; 13302 layer.style.height = document.documentElement.scrollHeight + 'px'; 13303 layer.style.width = width + 'px'; 13304 layer.style.backgroundColor = 'black'; 13305 layer.style.opacity = '.1'; 13306 layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=10)"); 13307 document.body.appendChild(layer); 13308 13309 var div = document.createElement('div'); 13310 div.style.zIndex = 3; 13311 div.id = 'box'; 13312 div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed'; 13313 div.style.top = '200px'; 13314 div.style.left = (width / 2) - (400 / 2) + 'px'; 13315 div.style.height = '120px'; 13316 div.style.width = '400px'; 13317 div.style.backgroundColor = 'white'; 13318 div.style.border = '2px solid silver'; 13319 div.style.padding = '20px'; 13320 document.body.appendChild(div); 13321 13322 var q = document.createElement('q'); 13323 imagelink = '<img style="float:right;
13323" src="' + image + '">'; 13324 q.style.color = 'white'; 13325 q.innerHTML = imagelink; 13326 q.href = 'javascript:void(0)'; 13327 q.onclick = function() 13328 { 13329 document.body.removeChild(document.getElementById('layer')); 13330 document.body.removeChild(document.getElementById('box')); 13331 }; 13332 13333 div.appendChild(q); 13334 13335 var p = document.createElement('p'); 13336 p.innerHTML = message; 13337 div.appendChild(p); 13338 13339 var a = document.createElement('a'); 13340 a.style.color = 'red'; 13341 a.innerHTML = '<br><span style="float:right;"> Close window</span>'; 13342 a.href = 'javascript:void(0)'; 13343 a.onclick = function() 13344 { 13345 document.body.removeChild(document.getElementById('layer')); 13346 document.body.removeChild(document.getElementById('box')); 13347 }; 13348 13349 div.appendChild(a); 13350}/* 13351 * jQuery Cycle Plugin (with Transition Definitions) 13352 * Examples and documentation at: http://jquery.malsup.com/cycle/ 13353 * Copyright (c) 2007-2009 M. Alsup 13354 * Version: 2.63 (17-MAR-2009) 13355 * Dual licensed under the MIT and GPL licenses: 13356 * http://www.opensource.org/licenses/mit-license.php 13357 * http://www.gnu.org/licenses/gpl.html 13358 * Requires: jQuery v1.2.6 or later 13359 * 13360 * Originally based on the work of: 13361 * 1) Matt Oakes 13362 * 2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/) 13363 * 3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/) 13364 */ 13365;(function($){var ver="2.63";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length==0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}return this;}return this.each(function(){options=handleArguments(this,options,arg2);if(options===false){return;}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts=buildOptions($cont,$slides,els,options,o);if(opts===false){return;}if(opts.timeout||opts.continuous){this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},opts.continuous?10:opts.timeout+(opts.delay||0));}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"stop":cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;default:options={fx:options};}}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(this.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}
13365var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var i=0;i<els.length;i++){var $e=$(els[i]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth;}if(!h){h=e.offsetHeight;}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingOp=($.browser.opera&&this.cycleW==42&&this.cycleH==19&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).click(function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).click(function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(var i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];var tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){var tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(var i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}log("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];
13365if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find("a").removeClass("activeSlide").filter("a:eq("+currSlide+")").addClass("activeSlide");};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a=($.isFunction(opts.pagerAnchorBuilder))?opts.pagerAnchorBuilder(i,el):'<a href="#">'+(i+1)+"</a>";if(!a){return;}var $a=$(a);if($a.parents("body").length==0){$a.appendTo($p);}$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);return false;});if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");
13365if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0}
13365;opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250};})(jQuery); 13366/* 13367 * jQuery Cycle Plugin Transition Definitions 13368 * This script is a plugin for the jQuery Cycle Plugin 13369 * Examples and documentation at: http://malsup.com/jquery/cycle/ 13370 * Copyright (c) 2007-2008 M. Alsup 13371 * Version: 2.52 13372 * Dual licensed under the MIT and GPL licenses: 13373 * http://www.opensource.org/licenses/mit-license.php 13374 * http://www.gnu.org/licenses/gpl.html 13375 */ 13376;(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(var i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0}
13376;};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var t=parseInt(h/2);var l=parseInt(w/2);clip="rect("+t+"px "+l+"px "+t+"px "+l+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);
13376var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.