/*!
 * selectivizr v1.0.1 - (c) Keith Clark, freely distributable under the terms of the MIT license.
 * selectivizr.com
 */
var k=true,p=false;(function(A){function N(a){return a.replace(O,q).replace(P,function(b,e,c){b=c.split(",");c=0;for(var g=b.length;c<g;c++){var h=Q(b[c].replace(R,q).replace(S,q))+w,f=[];b[c]=h.replace(T,function(d,l,m,j,i){if(l){if(f.length>0){d=f;var x;i=h.substring(0,i).replace(U,o);if(i==o||i.charAt(i.length-1)==w){i+="*"}try{x=y(i)}catch(ha){}if(x){i=0;for(m=x.length;i<m;i++){j=x[i];for(var B=j.className,C=0,V=d.length;C<V;C++){var r=d[C];if(!RegExp("(^|\\s)"+r.className+"(\\s|$)").test(j.className)){if(r.b&&(r.b===k||r.b(j)===k)){B=E(B,r.className,k)}}}j.className=B}}f=[]}return l}else{if(l=m?W(m):!F||F.test(j)?{className:G(j),b:k}:null){f.push(l);return"."+l.className}return d}})}return e+b.join(",")})}function W(a){var b=k,e=G(a.slice(1)),c=a.substring(0,5)==":not(",g,h;if(c){a=a.slice(5,-1)}var f=a.indexOf("(");if(f>-1){a=a.substring(0,f)}if(a.charAt(0)==":"){switch(a.slice(1)){case"root":b=function(d){return c?d!=H:d==H};break;case"target":if(s==8){b=function(d){function l(){var m=location.hash,j=m.slice(1);return c?m==""||d.id!=j:m!=""&&d.id==j}t(A,"hashchange",function(){u(d,e,l())});return l()};break}return p;case"checked":b=function(d){X.test(d.type)&&t(d,"propertychange",function(){event.propertyName=="checked"&&u(d,e,d.checked!==c)});return d.checked!==c};break;case"disabled":c=!c;case"enabled":b=function(d){if(Y.test(d.tagName)){t(d,"propertychange",function(){event.propertyName=="$disabled"&&u(d,e,d.a===c)});z.push(d);d.a=d.disabled;return d.disabled===c}return a==":enabled"?c:!c};break;case"focus":g="focus";h="blur";case"hover":if(!g){g="mouseenter";h="mouseleave"}b=function(d){t(d,c?h:g,function(){u(d,e,k)});t(d,c?g:h,function(){u(d,e,p)});return c};break;default:if(!Z.test(a)){return p}}}return{className:e,b:b}}function G(a){return I+"-"+(s==6&&$?aa++:a.replace(ba,function(b){return b.charCodeAt(0)}))}function Q(a){return a.replace(J,q).replace(ca,w)}function u(a,b,e){var c=a.className;b=E(c,b,e);if(b!=c){a.className=b;a.parentNode.className+=o}}function E(a,b,e){var c=RegExp("(^|\\s)"+b+"(\\s|$)"),g=c.test(a);return e?g?a:a+w+b:g?a.replace(c,q).replace(J,q):a}function t(a,b,e){a.attachEvent("on"+b,e)}function D(a,b){if(/^https?:\/\//i.test(a)){return b.substring(0,b.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null}if(a.charAt(0)=="/"){return b.substring(0,b.indexOf("/",8))+a}var e=b.split("?")[0];if(a.charAt(0)!="?"&&e.charAt(e.length-1)!="/"){e=e.substring(0,e.lastIndexOf("/")+1)}return e+a}function K(a){if(a){v.open("GET",a,p);v.send();return(v.status==200?v.responseText:o).replace(da,o).replace(ea,function(b,e,c,g,h){return K(D(c||h,a))}).replace(fa,function(b,e,c){e=e||"";return" url("+e+D(c,a)+e+") "})}return o}function ga(){var a,b;a=n.getElementsByTagName("BASE");for(var e=a.length>0?a[0].href:n.location.href,c=0;c<n.styleSheets.length;c++){b=n.styleSheets[c];if(b.href!=o){if(a=D(b.href,e)){b.cssText=N(K(a))}}}z.length>0&&setInterval(function(){for(var g=0,h=z.length;g<h;g++){var f=z[g];if(f.disabled!==f.a){if(f.disabled){f.disabled=p;f.a=k;f.disabled=k}else{f.a=f.disabled}}}},250)}if(!
/*@cc_on!@*/
true){var n=document,H=n.documentElement,v=function(){if(A.XMLHttpRequest){return new XMLHttpRequest}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}(),s=/MSIE ([\d])/.exec(navigator.userAgent)[1];if(!(n.compatMode!="CSS1Compat"||s<6||s>8||!v)){var L={NW:"*.Dom.select",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",MooTools:"$$",Sizzle:"*",jQuery:"*",dojo:"*.query"},y,z=[],aa=0,$=k,I="slvzr",M=I+"DOMReady",da=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,ea=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,fa=/\burl\(\s*(["']?)([^"')]+)\1\s*\)/g,Z=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,O=/:(:first-(?:line|letter))/g,P=/(^|})\s*([^\{]*?[\[:][^{]+)/g,T=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,U=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,ba=/[^\w-]/g,Y=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,X=/^(checkbox|radio)$/,F=s>6?/[\$\^*]=(['"])\1/:null,R=/([(\[+~])\s+/g,S=/\s+([)\]+~])/g,ca=/\s+/g,J=/^\s*((?:[\S\s]*\S)?)\s*$/,o="",w=" ",q="$1";
n.write("<script id="+M+" defer src='//:'><\/script>");n.getElementById(M).onreadystatechange=function(){if(this.readyState=="complete"){a:{var a,b;for(b in L){if(A[b]&&(a=eval(L[b].replace("*",b)))){y=a;break a}}y=p}if(y){ga();this.parentNode.removeChild(this)}}}}}})(this);if(typeof Object.create!=="function"){Object.create=function(b){function a(){}a.prototype=b;return new a()}}var ua={toString:function(){return navigator.userAgent},test:function(a){return this.toString().toLowerCase().indexOf(a.toLowerCase())>-1}};ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];ua.webkit=ua.test("webkit");ua.gecko=ua.test("gecko")&&!ua.webkit;ua.opera=ua.test("opera");ua.ie=ua.test("msie")&&!ua.opera;ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";var domReady=function(){var b=[];var a=function(){if(!arguments.callee.done){arguments.callee.done=true;for(var c=0;c<b.length;c++){b[c]()}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false)}if(ua.ie){(function(){try{document.documentElement.doScroll("left")}catch(c){setTimeout(arguments.callee,50);return}a()})();document.onreadystatechange=function(){if(document.readyState==="complete"){document.onreadystatechange=null;a()}}}if(ua.webkit&&document.readyState){(function(){if(document.readyState!=="loading"){a()}else{setTimeout(arguments.callee,10)}})()}window.onload=a;return function(c){if(typeof c==="function"){b[b.length]=c}return c}}();var cssHelper=function(){var o={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};var m,l=false;var i=[];var h=function(w){if(typeof w==="function"){i[i.length]=w}};var f=function(){for(var w=0;w<i.length;w++){i[w](m)}};var d={};var q=function(z,w){if(d[z]){var x=d[z].listeners;if(x){for(var y=0;y<x.length;y++){x[y](w)}}}};var n=function(x,w,B){if(ua.ie&&!window.XMLHttpRequest){window.XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}if(!XMLHttpRequest){return""}var y=new XMLHttpRequest();try{y.open("get",x,true);y.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest")}catch(z){B();return}var A=false;setTimeout(function(){A=true},5000);document.documentElement.style.cursor="progress";y.onreadystatechange=function(){if(y.readyState===4&&!A){if(!y.status&&location.protocol==="file:"||(y.status>=200&&y.status<300)||y.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof y.status==="undefined"){w(y.responseText)}else{B()}document.documentElement.style.cursor="";y=null}};y.send("")};var j=function(w){w=w.replace(o.REDUNDANT_COMPONENTS,"");w=w.replace(o.REDUNDANT_WHITESPACE,"$1");w=w.replace(o.MORE_WHITESPACE," ");w=w.replace(o.FINAL_SEMICOLONS,"}");return w};var g={mediaQueryList:function(E){var w={};var D=E.indexOf("{");var A=E.substring(0,D);E=E.substring(D+1,E.length-1);var z=[],y=[];var x=A.toLowerCase().substring(7).split(",");for(var C=0;C<x.length;C++){z[z.length]=g.mediaQuery(x[C],w)}var B=E.match(o.BLOCKS_INSIDE);if(B!==null){for(C=0;C<B.length;C++){y[y.length]=g.rule(B[C],w)}}w.getMediaQueries=function(){return z};w.getRules=function(){return y};w.getListText=function(){return A};w.getCssText=function(){return E};return w},mediaQuery:function(F,E){F=F||"";var y=false,C;var B=[];var A=true;var z=F.match(o.NOT_WHITESPACE);for(var D=0;D<z.length;D++){var x=z[D];if(!C&&(x==="not"||x==="only")){if(x==="not"){y=true}}else{if(!C){C=x}else{if(x.charAt(0)==="("){var w=x.substring(1,x.length-1).split(":");
B[B.length]={mediaFeature:w[0],value:w[1]||null}}}}}return{getList:function(){return E||null},getValid:function(){return A},getNot:function(){return y},getMediaType:function(){return C},getExpressions:function(){return B}}},rule:function(D,A){var w={};var B=D.indexOf("{");var C=D.substring(0,B);var E=C.split(",");var x=[];var y=D.substring(B+1,D.length-1).split(";");for(var z=0;z<y.length;z++){x[x.length]=g.declaration(y[z],w)}w.getMediaQueryList=function(){return A||null};w.getSelectors=function(){return E};w.getSelectorText=function(){return C};w.getDeclarations=function(){return x};w.getPropertyValue=function(G){for(var F=0;F<x.length;F++){if(x[F].getProperty()===G){return x[F].getValue()}}return null};return w},declaration:function(y,z){var w=y.indexOf(":");var A=y.substring(0,w);var x=y.substring(w+1);return{getRule:function(){return z||null},getProperty:function(){return A},getValue:function(){return x}}}};var a=function(z){if(typeof z.cssHelperText!=="string"){return}var y={mediaQueryLists:[],rules:[],selectors:{},declarations:[],properties:{}};var E=y.mediaQueryLists;var G=y.rules;var D=z.cssHelperText.match(o.BLOCKS);if(D!==null){for(var F=0;F<D.length;F++){if(D[F].substring(0,7)==="@media "){E[E.length]=g.mediaQueryList(D[F]);G=y.rules=G.concat(E[E.length-1].getRules())}else{G[G.length]=g.rule(D[F])}}}var w=y.selectors;var B=function(J){var I=J.getSelectors();for(var H=0;H<I.length;H++){var K=I[H];if(!w[K]){w[K]=[]}w[K][w[K].length]=J}};for(F=0;F<G.length;F++){B(G[F])}var C=y.declarations;for(F=0;F<G.length;F++){C=y.declarations=C.concat(G[F].getDeclarations())}var x=y.properties;for(F=0;F<C.length;F++){var A=C[F].getProperty();if(!x[A]){x[A]=[]}x[A][x[A].length]=C[F]}z.cssHelperParsed=y;m[m.length]=z;return y};var c=function(x,w){x.cssHelperText=j(w||x.innerHTML);return a(x)};var b=function(){l=true;m=[];var w=[];var x=function(){for(var F=0;F<w.length;F++){a(w[F])}var E=document.getElementsByTagName("style");for(F=0;F<E.length;F++){c(E[F])}l=false;f()};var D=document.getElementsByTagName("link");for(var y=0;y<D.length;y++){var B=D[y];if(B.getAttribute("rel").indexOf("style")>-1&&B.href&&B.href.length!==0&&!B.disabled){w[w.length]=B}}if(w.length>0){var C=0;var A=function(){C++;if(C===w.length){x()}};var z=function(F){var E=F.href;n(E,function(G){G=j(G).replace(o.RELATIVE_URLS,"url("+E.substring(0,E.lastIndexOf("/"))+"/$1)");F.cssHelperText=G;A()},A)};for(y=0;y<w.length;y++){z(w[y])}}else{x()}};var r={mediaQueryLists:"array",rules:"array",selectors:"object",declarations:"array",properties:"object"};var v={mediaQueryLists:null,rules:null,selectors:null,declarations:null,properties:null};var u=function(x,w){if(v[x]!==null){if(r[x]==="array"){return(v[x]=v[x].concat(w))}else{var z=v[x];for(var y in w){if(w.hasOwnProperty(y)){if(!z[y]){z[y]=w[y]}else{z[y]=z[y].concat(w[y])}}}return z}}};var t=function(w){v[w]=(r[w]==="array")?[]:{};for(var x=0;x<m.length;x++){u(w,m[x].cssHelperParsed[w])}return v[w]};domReady(function(){var x=document.body.getElementsByTagName("*");for(var w=0;w<x.length;w++){x[w].checkedByCssHelper=true}if(document.implementation.hasFeature("MutationEvents","2.0")||window.MutationEvent){document.body.addEventListener("DOMNodeInserted",function(z){var y=z.target;if(y.nodeType===1){q("DOMElementInserted",y);y.checkedByCssHelper=true}},false)}else{setInterval(function(){var z=document.body.getElementsByTagName("*");for(var y=0;y<z.length;y++){if(!z[y].checkedByCssHelper){q("DOMElementInserted",z[y]);z[y].checkedByCssHelper=true}}},1000)}});var s=function(w){if(typeof window.innerWidth!="undefined"){return window["inner"+w]}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){return document.documentElement["client"+w]}}};return{addStyle:function(y,w){var x=document.createElement("style");x.setAttribute("type","text/css");document.getElementsByTagName("head")[0].appendChild(x);if(x.styleSheet){x.styleSheet.cssText=y
}else{x.appendChild(document.createTextNode(y))}x.addedWithCssHelper=true;if(typeof w==="undefined"||w===true){cssHelper.parsed(function(z){var A=c(x,y);for(var B in A){if(A.hasOwnProperty(B)){u(B,A[B])}}q("newStyleParsed",x)})}else{x.parsingDisallowed=true}return x},removeStyle:function(w){return w.parentNode.removeChild(w)},parsed:function(w){if(l){h(w)}else{if(typeof m!=="undefined"){if(typeof w==="function"){w(m)}}else{h(w);b()}}},mediaQueryLists:function(w){cssHelper.parsed(function(x){w(v.mediaQueryLists||t("mediaQueryLists"))})},rules:function(w){cssHelper.parsed(function(x){w(v.rules||t("rules"))})},selectors:function(w){cssHelper.parsed(function(x){w(v.selectors||t("selectors"))})},declarations:function(w){cssHelper.parsed(function(x){w(v.declarations||t("declarations"))})},properties:function(w){cssHelper.parsed(function(x){w(v.properties||t("properties"))})},broadcast:q,addListener:function(x,w){if(typeof w==="function"){if(!d[x]){d[x]={listeners:[]}}d[x].listeners[d[x].listeners.length]=w}},removeListener:function(z,y){if(typeof y==="function"&&d[z]){var w=d[z].listeners;for(var x=0;x<w.length;x++){if(w[x]===y){w.splice(x,1);x-=1}}}},getViewportWidth:function(){return s("Width")},getViewportHeight:function(){return s("Height")}}}();domReady(function enableCssMediaQueries(){var l;var i={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};var h=[];var o=function(){var u="css3-mediaqueries-test";var s=document.createElement("div");s.id=u;var t=cssHelper.addStyle("@media all and (width) { #"+u+" { width: 1px !important; } }",false);document.body.appendChild(s);var r=s.offsetWidth===1;t.parentNode.removeChild(t);s.parentNode.removeChild(s);o=function(){return r};return r};var n=function(){l=document.createElement("div");l.style.cssText="position:absolute;top:-9999em;left:-9999em;margin:0;border:none;padding:0;width:1em;font-size:1em;";document.body.appendChild(l);if(l.offsetWidth!==16){l.style.fontSize=16/l.offsetWidth+"em"}l.style.width=""};var m=function(s){l.style.width=s;var r=l.offsetWidth;l.style.width="";return r};var j=function(B,A){var w=B.length;var z=(B.substring(0,4)==="min-");var D=(!z&&B.substring(0,4)==="max-");if(A!==null){var y;var x;if(i.LENGTH_UNIT.exec(A)){y="length";x=m(A)}else{if(i.RESOLUTION_UNIT.exec(A)){y="resolution";x=parseInt(A,10);var v=A.substring((x+"").length)}else{if(i.ASPECT_RATIO.exec(A)){y="aspect-ratio";x=A.split("/")}else{if(i.ABSOLUTE_VALUE){y="absolute";x=A}else{y="unknown"}}}}}var u,t;if("device-width"===B.substring(w-12,w)){u=screen.width;if(A!==null){if(y==="length"){return((z&&u>=x)||(D&&u<x)||(!z&&!D&&u===x))}else{return false}}else{return u>0}}else{if("device-height"===B.substring(w-13,w)){t=screen.height;if(A!==null){if(y==="length"){return((z&&t>=x)||(D&&t<x)||(!z&&!D&&t===x))}else{return false}}else{return t>0}}else{if("width"===B.substring(w-5,w)){u=document.documentElement.clientWidth||document.body.clientWidth;if(A!==null){if(y==="length"){return((z&&u>=x)||(D&&u<x)||(!z&&!D&&u===x))}else{return false}}else{return u>0}}else{if("height"===B.substring(w-6,w)){t=document.documentElement.clientHeight||document.body.clientHeight;if(A!==null){if(y==="length"){return((z&&t>=x)||(D&&t<x)||(!z&&!D&&t===x))}else{return false}}else{return t>0}}else{if("device-aspect-ratio"===B.substring(w-19,w)){return y==="aspect-ratio"&&screen.width*x[1]===screen.height*x[0]}else{if("color-index"===B.substring(w-11,w)){var s=Math.pow(2,screen.colorDepth);if(A!==null){if(y==="absolute"){return((z&&s>=x)||(D&&s<x)||(!z&&!D&&s===x))}else{return false}}else{return s>0}}else{if("color"===B.substring(w-5,w)){var r=screen.colorDepth;if(A!==null){if(y==="absolute"){return((z&&r>=x)||(D&&r<x)||(!z&&!D&&r===x))}else{return false}}else{return r>0}}else{if("resolution"===B.substring(w-10,w)){var C;if(v==="dpcm"){C=m("1cm")}else{C=m("1in")}if(A!==null){if(y==="resolution"){return((z&&C>=x)||(D&&C<x)||(!z&&!D&&C===x))
}else{return false}}else{return C>0}}else{return false}}}}}}}}};var g=function(t){var w=t.getValid();var v=t.getExpressions();var r=v.length;if(r>0){for(var s=0;s<r&&w;s++){w=j(v[s].mediaFeature,v[s].value)}var u=t.getNot();return(w&&!u||u&&!w)}};var f=function(r){var w=r.getMediaQueries();var v={};for(var u=0;u<w.length;u++){if(g(w[u])){v[w[u].getMediaType()]=true}}var x=[],z=0;for(var y in v){if(v.hasOwnProperty(y)){if(z>0){x[z++]=","}x[z++]=y}}if(x.length>0){h[h.length]=cssHelper.addStyle("@media "+x.join("")+"{"+r.getCssText()+"}",false)}};var d=function(s){for(var r=0;r<s.length;r++){f(s[r])}if(ua.ie){document.documentElement.style.display="block";setTimeout(function(){document.documentElement.style.display=""},0);setTimeout(function(){cssHelper.broadcast("cssMediaQueriesTested")},100)}else{cssHelper.broadcast("cssMediaQueriesTested")}};var c=function(){for(var r=0;r<h.length;r++){cssHelper.removeStyle(h[r])}h=[];cssHelper.mediaQueryLists(d)};var b=0;var a=function(){var u=cssHelper.getViewportWidth();var t=cssHelper.getViewportHeight();if(ua.ie){var v=document.createElement("div");v.style.position="absolute";v.style.top="-9999em";v.style.overflow="scroll";document.body.appendChild(v);b=v.offsetWidth-v.clientWidth;document.body.removeChild(v)}var s;var r=function(){var w=cssHelper.getViewportWidth();var x=cssHelper.getViewportHeight();if(Math.abs(w-u)>b||Math.abs(x-t)>b){u=w;t=x;clearTimeout(s);s=setTimeout(function(){if(!o()){c()}else{cssHelper.broadcast("cssMediaQueriesTested")}},500)}};window.onresize=function(){var w=window.onresize||function(){};return function(){w();r()}}()};var q=document.documentElement;q.style.marginLeft="-32767px";setTimeout(function(){q.style.marginTop=""},20000);return function(){if(!o()){cssHelper.addListener("newStyleParsed",function(r){d(r.cssHelperParsed.mediaQueryLists)});cssHelper.addListener("cssMediaQueriesTested",function(){if(ua.ie){q.style.width="1px"}setTimeout(function(){q.style.width="";q.style.marginLeft=""},0);cssHelper.removeListener("cssMediaQueriesTested",arguments.callee)});n();c()}else{q.style.marginLeft=""}a()}}());try{document.execCommand("BackgroundImageCache",false,true)}catch(e){};(function(d){var a="Lite-1.3";d.fn.cycle=function(e){return this.each(function(){e=e||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var l=d(this);var i=e.slideExpr?d(e.slideExpr,this):l.children();var g=i.get();if(g.length<2){window.console&&console.log("terminating; too few slides: "+g.length);return}var f=d.extend({},d.fn.cycle.defaults,e||{},d.metadata?l.metadata():d.meta?l.data():{});var m=d.isFunction(l.data)?l.data(f.metaAttr):null;if(m){f=d.extend(f,m)}f.before=f.before?[f.before]:[];f.after=f.after?[f.after]:[];f.after.unshift(function(){f.busy=0});var n=this.className;f.width=parseInt((n.match(/w:(\d+)/)||[])[1])||f.width;f.height=parseInt((n.match(/h:(\d+)/)||[])[1])||f.height;f.timeout=parseInt((n.match(/t:(\d+)/)||[])[1])||f.timeout;if(l.css("position")=="static"){l.css("position","relative")}if(f.width){l.width(f.width)}if(f.height&&f.height!="auto"){l.height(f.height)}var h=0;i.css({position:"absolute",top:0,left:0}).each(function(o){d(this).css("z-index",g.length-o)});d(g[h]).css("opacity",1).show();if(d.browser.msie){g[h].style.removeAttribute("filter")}if(f.fit&&f.width){i.width(f.width)}if(f.fit&&f.height&&f.height!="auto"){i.height(f.height)}if(f.pause){l.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}var j=d.fn.cycle.transitions[f.fx];j&&j(l,i,f);i.each(function(){var o=d(this);this.cycleH=(f.fit&&f.height)?f.height:o.height();this.cycleW=(f.fit&&f.width)?f.width:o.width()});if(f.cssFirst){d(i[h]).css(f.cssFirst)}if(f.timeout){if(f.speed.constructor==String){f.speed={slow:600,fast:200}[f.speed]||400}if(!f.sync){f.speed=f.speed/2}while((f.timeout-f.speed)<250){f.timeout+=f.speed}}f.speedIn=f.speed;f.speedOut=f.speed;f.slideCount=g.length;f.currSlide=h;f.nextSlide=1;var k=i[h];if(f.before.length){f.before[0].apply(k,[k,k,f,true])}if(f.after.length>1){f.after[1].apply(k,[k,k,f,true])}if(f.click&&!f.next){f.next=f.click}if(f.next){d(f.next).bind("click",function(){return c(g,f,f.rev?-1:1)})}if(f.prev){d(f.prev).bind("click",function(){return c(g,f,f.rev?1:-1)})}if(f.timeout){this.cycleTimeout=setTimeout(function(){b(g,f,0,!f.rev)},f.timeout+(f.delay||0))}})};function b(j,e,i,k){if(e.busy){return}var h=j[0].parentNode,m=j[e.currSlide],l=j[e.nextSlide];if(h.cycleTimeout===0&&!i){return}if(i||!h.cyclePause){if(e.before.length){d.each(e.before,function(n,p){p.apply(l,[m,l,e,k])})}var f=function(){if(d.browser.msie){this.style.removeAttribute("filter")}d.each(e.after,function(n,p){p.apply(l,[m,l,e,k])})};if(e.nextSlide!=e.currSlide){e.busy=1;d.fn.cycle.custom(m,l,e,f)}var g=(e.nextSlide+1)==j.length;e.nextSlide=g?0:e.nextSlide+1;e.currSlide=g?j.length-1:e.nextSlide-1}if(e.timeout){h.cycleTimeout=setTimeout(function(){b(j,e,0,!e.rev)},e.timeout)}}function c(e,f,i){var h=e[0].parentNode,g=h.cycleTimeout;if(g){clearTimeout(g);h.cycleTimeout=0}f.nextSlide=f.currSlide+i;if(f.nextSlide<0){f.nextSlide=e.length-1}else{if(f.nextSlide>=e.length){f.nextSlide=0}}b(e,f,1,i>=0);return false}d.fn.cycle.custom=function(k,h,i,e){var j=d(k),g=d(h);g.css(i.cssBefore);var f=function(){g.animate(i.animIn,i.speedIn,i.easeIn,e)};j.animate(i.animOut,i.speedOut,i.easeOut,function(){j.css(i.cssAfter);if(!i.sync){f()}});if(i.sync){f()}};d.fn.cycle.transitions={fade:function(f,g,e){g.not(":eq(0)").hide();e.cssBefore={opacity:0,display:"block"};e.cssAfter={display:"none"};e.animOut={opacity:0};e.animIn={opacity:1}},fadeout:function(f,g,e){e.before.push(function(k,i,j,h){d(k).css("zIndex",j.slideCount+(h===true?1:0));d(i).css("zIndex",j.slideCount+(h===true?0:1))});g.not(":eq(0)").hide();e.cssBefore={opacity:1,display:"block",zIndex:1};e.cssAfter={display:"none",zIndex:0};e.animOut={opacity:0}}};d.fn.cycle.ver=function(){return a};d.fn.cycle.defaults={animIn:{},animOut:{},fx:"fade",after:null,before:null,cssBefore:{},cssAfter:{},delay:0,fit:0,height:"auto",metaAttr:"cycle",next:null,pause:0,prev:null,speed:1000,slideExpr:null,sync:1,timeout:4000}})(jQuery);(function(B){var L,T,Q,M,d,m,J,A,O,z,C=0,H={},j=[],e=0,G={},y=[],f=null,o=new Image(),i=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,p,N=1,h=0,t="",b,c,P=false,s=B.extend(B("<div/>")[0],{prop:0}),S=B.browser.msie&&B.browser.version<7&&!window.XMLHttpRequest,r=function(){T.hide();
o.onerror=o.onload=null;if(f){f.abort()}L.empty()},x=function(){if(false===H.onError(j,C,H)){T.hide();P=false;return}H.titleShow=false;H.width="auto";H.height="auto";L.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');n()},w=function(){var Z=j[C],W,Y,ab,aa,V,X;r();H=B.extend({},B.fn.fancybox.defaults,(typeof B(Z).data("fancybox")=="undefined"?H:B(Z).data("fancybox")));X=H.onStart(j,C,H);if(X===false){P=false;return}else{if(typeof X=="object"){H=B.extend(H,X)}}ab=H.title||(Z.nodeName?B(Z).attr("title"):Z.title)||"";if(Z.nodeName&&!H.orig){H.orig=B(Z).children("img:first").length?B(Z).children("img:first"):B(Z)}if(ab===""&&H.orig&&H.titleFromAlt){ab=H.orig.attr("alt")}W=H.href||(Z.nodeName?B(Z).attr("href"):Z.href)||null;if((/^(?:javascript)/i).test(W)||W=="#"){W=null}if(H.type){Y=H.type;if(!W){W=H.content}}else{if(H.content){Y="html"}else{if(W){if(W.match(i)){Y="image"}else{if(W.match(k)){Y="swf"}else{if(B(Z).hasClass("iframe")){Y="iframe"}else{if(W.indexOf("#")===0){Y="inline"}else{Y="ajax"}}}}}}}if(!Y){x();return}if(Y=="inline"){Z=W.substr(W.indexOf("#"));Y=B(Z).length>0?"inline":"ajax"}H.type=Y;H.href=W;H.title=ab;if(H.autoDimensions){if(H.type=="html"||H.type=="inline"||H.type=="ajax"){H.width="auto";H.height="auto"}else{H.autoDimensions=false}}if(H.modal){H.overlayShow=true;H.hideOnOverlayClick=false;H.hideOnContentClick=false;H.enableEscapeButton=false;H.showCloseButton=false}H.padding=parseInt(H.padding,10);H.margin=parseInt(H.margin,10);L.css("padding",(H.padding+H.margin));B(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){B(this).replaceWith(m.children())});switch(Y){case"html":L.html(H.content);n();break;case"inline":if(B(Z).parent().is("#fancybox-content")===true){P=false;return}B('<div class="fancybox-inline-tmp" />').hide().insertBefore(B(Z)).bind("fancybox-cleanup",function(){B(this).replaceWith(m.children())}).bind("fancybox-cancel",function(){B(this).replaceWith(L.children())});B(Z).appendTo(L);n();break;case"image":P=false;B.fancybox.showActivity();o=new Image();o.onerror=function(){x()};o.onload=function(){P=true;o.onerror=o.onload=null;F()};o.src=W;break;case"swf":H.scrolling="no";aa='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+H.width+'" height="'+H.height+'"><param name="movie" value="'+W+'"></param>';V="";B.each(H.swf,function(ac,ad){aa+='<param name="'+ac+'" value="'+ad+'"></param>';V+=" "+ac+'="'+ad+'"'});aa+='<embed src="'+W+'" type="application/x-shockwave-flash" width="'+H.width+'" height="'+H.height+'"'+V+"></embed></object>";L.html(aa);n();break;case"ajax":P=false;B.fancybox.showActivity();H.ajax.win=H.ajax.success;f=B.ajax(B.extend({},H.ajax,{url:W,data:H.ajax.data||{},error:function(ac,ae,ad){if(ac.status>0){x()}},success:function(ad,af,ac){var ae=typeof ac=="object"?ac:f;if(ae.status==200){if(typeof H.ajax.win=="function"){X=H.ajax.win(W,ad,af,ac);if(X===false){T.hide();return}else{if(typeof X=="string"||typeof X=="object"){ad=X}}}L.html(ad);n()}}}));break;case"iframe":E();break}},n=function(){var V=H.width,W=H.height;if(V.toString().indexOf("%")>-1){V=parseInt((B(window).width()-(H.margin*2))*parseFloat(V)/100,10)+"px"}else{V=V=="auto"?"auto":V+"px"}if(W.toString().indexOf("%")>-1){W=parseInt((B(window).height()-(H.margin*2))*parseFloat(W)/100,10)+"px"}else{W=W=="auto"?"auto":W+"px"}L.wrapInner('<div style="width:'+V+";height:"+W+";overflow: "+(H.scrolling=="auto"?"auto":(H.scrolling=="yes"?"scroll":"hidden"))+';position:relative;"></div>');H.width=L.width();H.height=L.height();E()},F=function(){H.width=o.width;H.height=o.height;B("<img />").attr({id:"fancybox-img",src:o.src,alt:H.title}).appendTo(L);E()},E=function(){var W,V;T.hide();if(M.is(":visible")&&false===G.onCleanup(y,e,G)){B.event.trigger("fancybox-cancel");P=false;return}P=true;B(m.add(Q)).unbind();B(window).unbind("resize.fb scroll.fb");B(document).unbind("keydown.fb");if(M.is(":visible")&&G.titlePosition!=="outside"){M.css("height",M.height())
}y=j;e=C;G=H;if(G.overlayShow){Q.css({"background-color":G.overlayColor,opacity:G.overlayOpacity,cursor:G.hideOnOverlayClick?"pointer":"auto",height:B(document).height()});if(!Q.is(":visible")){if(S){B("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}Q.show()}}else{Q.hide()}c=R();l();if(M.is(":visible")){B(J.add(O).add(z)).hide();W=M.position(),b={top:W.top,left:W.left,width:M.width(),height:M.height()};V=(b.width==c.width&&b.height==c.height);m.fadeTo(G.changeFade,0.3,function(){var X=function(){m.html(L.contents()).fadeTo(G.changeFade,1,v)};B.event.trigger("fancybox-change");m.empty().removeAttr("filter").css({"border-width":G.padding,width:c.width-G.padding*2,height:H.autoDimensions?"auto":c.height-h-G.padding*2});if(V){X()}else{s.prop=0;B(s).animate({prop:1},{duration:G.changeSpeed,easing:G.easingChange,step:U,complete:X})}});return}M.removeAttr("style");m.css("border-width",G.padding);if(G.transitionIn=="elastic"){b=I();m.html(L.contents());M.show();if(G.opacity){c.opacity=0}s.prop=0;B(s).animate({prop:1},{duration:G.speedIn,easing:G.easingIn,step:U,complete:v});return}if(G.titlePosition=="inside"&&h>0){A.show()}m.css({width:c.width-G.padding*2,height:H.autoDimensions?"auto":c.height-h-G.padding*2}).html(L.contents());M.css(c).fadeIn(G.transitionIn=="none"?0:G.speedIn,v)},D=function(V){if(V&&V.length){if(G.titlePosition=="float"){return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+V+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+G.titlePosition+'">'+V+"</div>"}return false},l=function(){t=G.title||"";h=0;A.empty().removeAttr("style").removeClass();if(G.titleShow===false){A.hide();return}t=B.isFunction(G.titleFormat)?G.titleFormat(t,y,e,G):D(t);if(!t||t===""){A.hide();return}A.addClass("fancybox-title-"+G.titlePosition).html(t).appendTo("body").show();switch(G.titlePosition){case"inside":A.css({width:c.width-(G.padding*2),marginLeft:G.padding,marginRight:G.padding});h=A.outerHeight(true);A.appendTo(d);c.height+=h;break;case"over":A.css({marginLeft:G.padding,width:c.width-(G.padding*2),bottom:G.padding}).appendTo(d);break;case"float":A.css("left",parseInt((A.width()-c.width-40)/2,10)*-1).appendTo(M);break;default:A.css({width:c.width-(G.padding*2),paddingLeft:G.padding,paddingRight:G.padding}).appendTo(M);break}A.hide()},g=function(){if(G.enableEscapeButton||G.enableKeyboardNav){B(document).bind("keydown.fb",function(V){if(V.keyCode==27&&G.enableEscapeButton){V.preventDefault();B.fancybox.close()}else{if((V.keyCode==37||V.keyCode==39)&&G.enableKeyboardNav&&V.target.tagName!=="INPUT"&&V.target.tagName!=="TEXTAREA"&&V.target.tagName!=="SELECT"){V.preventDefault();B.fancybox[V.keyCode==37?"prev":"next"]()}}})}if(!G.showNavArrows){O.hide();z.hide();return}if((G.cyclic&&y.length>1)||e!==0){O.show()}if((G.cyclic&&y.length>1)||e!=(y.length-1)){z.show()}},v=function(){if(!B.support.opacity){m.get(0).style.removeAttribute("filter");M.get(0).style.removeAttribute("filter")}if(H.autoDimensions){m.css("height","auto")}M.css("height","auto");if(t&&t.length){A.show()}if(G.showCloseButton){J.show()}g();if(G.hideOnContentClick){m.bind("click",B.fancybox.close)}if(G.hideOnOverlayClick){Q.bind("click",B.fancybox.close)}B(window).bind("resize.fb",B.fancybox.resize);if(G.centerOnScroll){B(window).bind("scroll.fb",B.fancybox.center)}if(G.type=="iframe"){B('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" '+(B.browser.msie?'allowtransparency="true""':"")+' scrolling="'+H.scrolling+'" src="'+G.href+'"></iframe>').appendTo(m)}M.show();P=false;B.fancybox.center();G.onComplete(y,e,G);K()},K=function(){var V,W;if((y.length-1)>e){V=y[e+1].href;if(typeof V!=="undefined"&&V.match(i)){W=new Image();W.src=V}}if(e>0){V=y[e-1].href;
if(typeof V!=="undefined"&&V.match(i)){W=new Image();W.src=V}}},U=function(W){var V={width:parseInt(b.width+(c.width-b.width)*W,10),height:parseInt(b.height+(c.height-b.height)*W,10),top:parseInt(b.top+(c.top-b.top)*W,10),left:parseInt(b.left+(c.left-b.left)*W,10)};if(typeof c.opacity!=="undefined"){V.opacity=W<0.5?0.5:W}M.css(V);m.css({width:V.width-G.padding*2,height:V.height-(h*W)-G.padding*2})},u=function(){return[B(window).width()-(G.margin*2),B(window).height()-(G.margin*2),B(document).scrollLeft()+G.margin,B(document).scrollTop()+G.margin]},R=function(){var V=u(),Z={},W=G.autoScale,X=G.padding*2,Y;if(G.width.toString().indexOf("%")>-1){Z.width=parseInt((V[0]*parseFloat(G.width))/100,10)}else{Z.width=G.width+X}if(G.height.toString().indexOf("%")>-1){Z.height=parseInt((V[1]*parseFloat(G.height))/100,10)}else{Z.height=G.height+X}if(W&&(Z.width>V[0]||Z.height>V[1])){if(H.type=="image"||H.type=="swf"){Y=(G.width)/(G.height);if((Z.width)>V[0]){Z.width=V[0];Z.height=parseInt(((Z.width-X)/Y)+X,10)}if((Z.height)>V[1]){Z.height=V[1];Z.width=parseInt(((Z.height-X)*Y)+X,10)}}else{Z.width=Math.min(Z.width,V[0]);Z.height=Math.min(Z.height,V[1])}}Z.top=parseInt(Math.max(V[3]-20,V[3]+((V[1]-Z.height-40)*0.5)),10);Z.left=parseInt(Math.max(V[2]-20,V[2]+((V[0]-Z.width-40)*0.5)),10);return Z},q=function(V){var W=V.offset();W.top+=parseInt(V.css("paddingTop"),10)||0;W.left+=parseInt(V.css("paddingLeft"),10)||0;W.top+=parseInt(V.css("border-top-width"),10)||0;W.left+=parseInt(V.css("border-left-width"),10)||0;W.width=V.width();W.height=V.height();return W},I=function(){var Y=H.orig?B(H.orig):false,X={},W,V;if(Y&&Y.length){W=q(Y);X={width:W.width+(G.padding*2),height:W.height+(G.padding*2),top:W.top-G.padding-20,left:W.left-G.padding-20}}else{V=u();X={width:G.padding*2,height:G.padding*2,top:parseInt(V[3]+V[1]*0.5,10),left:parseInt(V[2]+V[0]*0.5,10)}}return X},a=function(){if(!T.is(":visible")){clearInterval(p);return}B("div",T).css("top",(N*-40)+"px");N=(N+1)%12};B.fn.fancybox=function(V){if(!B(this).length){return this}B(this).data("fancybox",B.extend({},V,(B.metadata?B(this).metadata():{}))).unbind("click.fb").bind("click.fb",function(X){X.preventDefault();if(P){return}P=true;B(this).blur();j=[];C=0;var W=B(this).attr("rel")||"";if(!W||W==""||W==="nofollow"){j.push(this)}else{j=B("a[rel="+W+"], area[rel="+W+"]");C=j.index(this)}w();return});return this};B.fancybox=function(Y){var X;if(P){return}P=true;X=typeof arguments[1]!=="undefined"?arguments[1]:{};j=[];C=parseInt(X.index,10)||0;if(B.isArray(Y)){for(var W=0,V=Y.length;W<V;W++){if(typeof Y[W]=="object"){B(Y[W]).data("fancybox",B.extend({},X,Y[W]))}else{Y[W]=B({}).data("fancybox",B.extend({content:Y[W]},X))}}j=jQuery.merge(j,Y)}else{if(typeof Y=="object"){B(Y).data("fancybox",B.extend({},X,Y))}else{Y=B({}).data("fancybox",B.extend({content:Y},X))}j.push(Y)}if(C>j.length||C<0){C=0}w()};B.fancybox.showActivity=function(){clearInterval(p);T.show();p=setInterval(a,66)};B.fancybox.hideActivity=function(){T.hide()};B.fancybox.next=function(){return B.fancybox.pos(e+1)};B.fancybox.prev=function(){return B.fancybox.pos(e-1)};B.fancybox.pos=function(V){if(P){return}V=parseInt(V);j=y;if(V>-1&&V<y.length){C=V;w()}else{if(G.cyclic&&y.length>1){C=V>=y.length?0:y.length-1;w()}}return};B.fancybox.cancel=function(){if(P){return}P=true;B.event.trigger("fancybox-cancel");r();H.onCancel(j,C,H);P=false};B.fancybox.close=function(){if(P||M.is(":hidden")){return}P=true;if(G&&false===G.onCleanup(y,e,G)){P=false;return}r();B(J.add(O).add(z)).hide();B(m.add(Q)).unbind();B(window).unbind("resize.fb scroll.fb");B(document).unbind("keydown.fb");m.find("iframe").attr("src",S&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");if(G.titlePosition!=="inside"){A.empty()}M.stop();function V(){Q.fadeOut("fast");A.empty().hide();M.hide();B.event.trigger("fancybox-cleanup");m.empty();G.onClosed(y,e,G);y=H=[];e=C=0;G=H={};P=false}if(G.transitionOut=="elastic"){b=I();var W=M.position();c={top:W.top,left:W.left,width:M.width(),height:M.height()};
if(G.opacity){c.opacity=1}A.empty().hide();s.prop=1;B(s).animate({prop:0},{duration:G.speedOut,easing:G.easingOut,step:U,complete:V})}else{M.fadeOut(G.transitionOut=="none"?0:G.speedOut,V)}};B.fancybox.resize=function(){if(Q.is(":visible")){Q.css("height",B(document).height())}B.fancybox.center(true)};B.fancybox.center=function(){var V,W;if(P){return}W=arguments[0]===true?1:0;V=u();if(!W&&(M.width()>V[0]||M.height()>V[1])){return}M.stop().animate({top:parseInt(Math.max(V[3]-20,V[3]+((V[1]-m.height()-40)*0.5)-G.padding)),left:parseInt(Math.max(V[2]-20,V[2]+((V[0]-m.width()-40)*0.5)-G.padding))},typeof arguments[0]=="number"?arguments[0]:200)};B.fancybox.init=function(){if(B("#fancybox-wrap").length){return}B("body").append(L=B('<div id="fancybox-tmp"></div>'),T=B('<div id="fancybox-loading"><div></div></div>'),Q=B('<div id="fancybox-overlay"></div>'),M=B('<div id="fancybox-wrap"></div>'));d=B('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(M);d.append(m=B('<div id="fancybox-content"></div>'),J=B('<a id="fancybox-close"></a>'),A=B('<div id="fancybox-title"></div>'),O=B('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),z=B('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));J.click(B.fancybox.close);T.click(B.fancybox.cancel);O.click(function(V){V.preventDefault();B.fancybox.prev()});z.click(function(V){V.preventDefault();B.fancybox.next()});if(B.fn.mousewheel){M.bind("mousewheel.fb",function(V,W){if(P){V.preventDefault()}else{if(B(V.target).get(0).clientHeight==0||B(V.target).get(0).scrollHeight===B(V.target).get(0).clientHeight){V.preventDefault();B.fancybox[W>0?"prev":"next"]()}}})}if(!B.support.opacity){M.addClass("fancybox-ie")}if(S){T.addClass("fancybox-ie6");M.addClass("fancybox-ie6");B('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(d)}};B.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};B(document).ready(function(){B.fancybox.init()})})(jQuery);(function(a){a.extend(a.fn,{validate:function(d){if(this.length){var c=a.data(this[0],"validator");if(c){return c}this.attr("novalidate","novalidate");c=new a.validator(d,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){d=this.find("input, button");d.filter(".cancel").click(function(){c.cancelSubmit=true});c.settings.submitHandler&&d.filter(":submit").click(function(){c.submitButton=this});this.submit(function(f){function b(){if(c.settings.submitHandler){if(c.submitButton){var e=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);c.submitButton&&e.remove();return false}return true}c.settings.debug&&f.preventDefault();
if(c.cancelSubmit){c.cancelSubmit=false;return b()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return b()}else{c.focusInvalid();return false}})}return c}else{d&&d.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")}},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var d=true,c=a(this[0].form).validate();this.each(function(){d&=c.element(this)});return d}},removeAttrs:function(e){var c={},f=this;a.each(e.split(/\s/),function(d,b){c[b]=f.attr(b);f.removeAttr(b)});return c},rules:function(i,c){var n=this[0];if(i){var m=a.data(n.form,"validator").settings,l=m.rules,k=a.validator.staticRules(n);switch(i){case"add":a.extend(k,a.validator.normalizeRule(c));l[n.name]=k;if(c.messages){m.messages[n.name]=a.extend(m.messages[n.name],c.messages)}break;case"remove":if(!c){delete l[n.name];return k}var j={};a.each(c.split(/\s/),function(b,d){j[d]=k[d];delete k[d]});return j}}n=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(n),a.validator.classRules(n),a.validator.attributeRules(n),a.validator.staticRules(n)),n);if(n.required){m=n.required;delete n.required;n=a.extend({required:m},n)}return n}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(d,c){this.settings=a.extend(true,{},a.validator.defaults,d);this.currentForm=c;this.init()};a.validator.format=function(d,c){if(arguments.length==1){return function(){var b=a.makeArray(arguments);b.unshift(d);return a.validator.format.apply(this,b)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(f,b){d=d.replace(RegExp("\\{"+f+"\\}","g"),b)});return d};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(b)).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{b.parentNode.name in this.submitted&&this.element(b.parentNode)}},highlight:function(e,c,f){e.type==="radio"?this.findByName(e.name).addClass(c).removeClass(f):a(e).addClass(c).removeClass(f)},unhighlight:function(e,c,f){e.type==="radio"?this.findByName(e.name).removeClass(c).addClass(f):a(e).removeClass(c).addClass(f)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function e(h){var d=a.data(this[0].form,"validator"),b="on"+h.type.replace(/^validate/,"");
d.settings[b]&&d.settings[b].call(d,this[0],h)}this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var c=this.groups={};a.each(this.settings.groups,function(d,b){a.each(b.split(/\s/),function(j,i){c[i]=d})});var f=this.settings.rules;a.each(f,function(d,b){f[d]=a.validator.normalizeRule(b)});a(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e);this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var d=0,c=this.currentElements=this.elements();c[d];d++){this.check(c[d])}return this.valid()},element:function(d){this.lastElement=d=this.validationTargetFor(this.clean(d));this.prepareElement(d);this.currentElements=a(d);var c=this.check(d);if(c){delete this.invalid[d.name]}else{this.invalid[d.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return c},showErrors:function(d){if(d){a.extend(this.errorMap,d);this.errorList=[];for(var c in d){this.errorList.push({message:d[c],element:this.findByName(c)[0]})}this.successList=a.grep(this.successList,function(b){return !(b.name in d)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var c=0,f;for(f in e){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var d=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&d.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in c||!d.objectLength(a(this).rules())){return false}return c[this.name]=true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(i){i=this.validationTargetFor(this.clean(i));var c=a(i).rules(),n=false,m;for(m in c){var l={method:m,parameters:c[m]};try{var k=a.validator.methods[m].call(this,i.value.replace(/\r/g,""),i,l.parameters);if(k=="dependency-mismatch"){n=true}else{n=false;
if(k=="pending"){this.toHide=this.toHide.not(this.errorsFor(i));return}if(!k){this.formatAndAdd(i,l);return false}}}catch(j){this.settings.debug&&window.console&&console.log("exception occured when checking element "+i.id+", check the '"+l.method+"' method",j);throw j}}if(!n){this.objectLength(c)&&this.successList.push(i);return true}},customMetaMessage:function(e,c){if(a.metadata){var f=this.settings.meta?a(e).metadata()[this.settings.meta]:a(e).metadata();return f&&f.messages&&f.messages[c]}},customMessage:function(e,c){var f=this.settings.messages[e];return f&&(f.constructor==String?f:f[c])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}},defaultMessage:function(d,c){return this.findDefined(this.customMessage(d.name,c),this.customMetaMessage(d,c),!this.settings.ignoreTitle&&d.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+d.name+"</strong>")},formatAndAdd:function(f,c){var h=this.defaultMessage(f,c.method),g=/\$?\{(\d+)\}/g;if(typeof h=="function"){h=h.call(this,c.parameters,f)}else{if(g.test(h)){h=jQuery.format(h.replace(g,"{$1}"),c.parameters)}}this.errorList.push({message:h,element:f});this.errorMap[f.name]=h;this.submitted[f.name]=h},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var d=0;this.errorList[d];d++){var c=this.errorList[d];this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass);this.showLabel(c.element,c.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(d=0;this.successList[d];d++){this.showLabel(this.successList[d])}}if(this.settings.unhighlight){d=0;for(c=this.validElements();c[d];d++){this.settings.unhighlight.call(this,c[d],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(e,c){var f=this.errorsFor(e);if(f.length){f.removeClass(this.settings.validClass).addClass(this.settings.errorClass);f.attr("generated")&&f.html(c)}else{f=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(e),generated:true}).addClass(this.settings.errorClass).html(c||"");if(this.settings.wrapper){f=f.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}this.labelContainer.append(f).length||(this.settings.errorPlacement?this.settings.errorPlacement(f,a(e)):f.insertAfter(e))}if(!c&&this.settings.success){f.text("");typeof this.settings.success=="string"?f.addClass(this.settings.success):this.settings.success(f)}this.toShow=this.toShow.add(f)},errorsFor:function(d){var c=this.idOrName(d);return this.errors().filter(function(){return a(this).attr("for")==c})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},validationTargetFor:function(b){if(this.checkable(b)){b=this.findByName(b.name).not(this.settings.ignore)[0]}return b},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(d){var c=this.currentForm;return a(document.getElementsByName(d)).map(function(f,b){return b.form==c&&b.name==d&&b||null})},getLength:function(d,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c)){return this.findByName(c.name).filter(":checked").length}}return d.length},depend:function(d,c){return this.dependTypes[typeof d]?this.dependTypes[typeof d](d,c):true},dependTypes:{"boolean":function(b){return b},string:function(d,c){return !!a(d,c.form).length},"function":function(d,c){return d(c)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;
this.pending[b.name]=true}},stopRequest:function(d,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[d.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(d,c){d.constructor==String?this.classRuleSettings[d]=c:a.extend(this.classRuleSettings,d)},classRules:function(d){var c={};(d=a(d).attr("class"))&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])});return c},attributeRules:function(f){var c={};f=a(f);for(var h in a.validator.methods){var g;if(g=h==="required"&&typeof a.fn.prop==="function"?f.prop(h):f.attr(h)){c[h]=g}else{if(f[0].getAttribute("type")===h){c[h]=true}}}c.maxlength&&/-1|2147483647|524288/.test(c.maxlength)&&delete c.maxlength;return c},metadataRules:function(d){if(!a.metadata){return{}}var c=a.data(d.form,"validator").settings.meta;return c?a(d).metadata()[c]:a(d).metadata()},staticRules:function(e){var c={},f=a.data(e.form,"validator");if(f.settings.rules){c=a.validator.normalizeRule(f.settings.rules[e.name])||{}}return c},normalizeRules:function(d,c){a.each(d,function(h,g){if(g===false){delete d[h]}else{if(g.param||g.depends){var b=true;switch(typeof g.depends){case"string":b=!!a(g.depends,c.form).length;break;case"function":b=g.depends.call(c,c)}if(b){d[h]=g.param!==undefined?g.param:true}else{delete d[h]}}}});a.each(d,function(f,b){d[f]=a.isFunction(b)?b(c):b});a.each(["minlength","maxlength","min","max"],function(){if(d[this]){d[this]=Number(d[this])}});a.each(["rangelength","range"],function(){if(d[this]){d[this]=[Number(d[this][0]),Number(d[this][1])]}});if(a.validator.autoCreateRanges){if(d.min&&d.max){d.range=[d.min,d.max];delete d.min;delete d.max}if(d.minlength&&d.maxlength){d.rangelength=[d.minlength,d.maxlength];delete d.minlength;delete d.maxlength}}d.messages&&delete d.messages;return d},normalizeRule:function(d){if(typeof d=="string"){var c={};a.each(d.split(/\s/),function(){c[this]=true});d=c}return d},addMethod:function(e,c,f){a.validator.methods[e]=c;a.validator.messages[e]=f!=undefined?f:a.validator.messages[e];c.length<3&&a.validator.addClassRules(e,a.validator.normalizeRule(e))},methods:{required:function(e,c,f){if(!this.depend(f,c)){return"dependency-mismatch"}switch(c.nodeName.toLowerCase()){case"select":return(e=a(c).val())&&e.length>0;case"input":if(this.checkable(c)){return this.getLength(e,c)>0}default:return a.trim(e).length>0}},remote:function(h,c,l){if(this.optional(c)){return"dependency-mismatch"}var k=this.previousValue(c);this.settings.messages[c.name]||(this.settings.messages[c.name]={});k.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=k.message;l=typeof l=="string"&&{url:l}||l;if(this.pending[c.name]){return"pending"}if(k.old===h){return k.valid}k.old=h;var j=this;this.startRequest(c);var i={};i[c.name]=h;a.ajax(a.extend(true,{url:l,mode:"abort",port:"validate"+c.name,dataType:"json",data:i,success:function(e){j.settings.messages[c.name].remote=k.originalMessage;var b=e===true;if(b){var d=j.formSubmitted;j.prepareElement(c);j.formSubmitted=d;j.successList.push(c);j.showErrors()}else{d={};e=e||j.defaultMessage(c,"remote");d[c.name]=k.message=a.isFunction(e)?e(h):e;j.showErrors(d)}k.valid=b;j.stopRequest(c,b)}},l));return"pending"},minlength:function(e,c,f){return this.optional(c)||this.getLength(a.trim(e),c)>=f},maxlength:function(e,c,f){return this.optional(c)||this.getLength(a.trim(e),c)<=f
},rangelength:function(e,c,f){e=this.getLength(a.trim(e),c);return this.optional(c)||e>=f[0]&&e<=f[1]},min:function(e,c,f){return this.optional(c)||e>=f},max:function(e,c,f){return this.optional(c)||e<=f},range:function(e,c,f){return this.optional(c)||e>=f[0]&&e<=f[1]},email:function(d,c){return this.optional(c)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(d)},url:function(d,c){return this.optional(c)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(d)},date:function(d,c){return this.optional(c)||!/Invalid|NaN/.test(new Date(d))},dateISO:function(d,c){return this.optional(c)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(d)},number:function(d,c){return this.optional(c)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(d)},digits:function(d,c){return this.optional(c)||/^\d+$/.test(d)},creditcard:function(h,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9 -]+/.test(h)){return false}var l=0,k=0,j=false;h=h.replace(/\D/g,"");for(var i=h.length-1;i>=0;i--){k=h.charAt(i);k=parseInt(k,10);if(j){if((k*=2)>9){k-=9}}l+=k;j=!j}return l%10==0},accept:function(e,c,f){f=typeof f=="string"?f.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(c)||e.match(RegExp(".("+f+")$","i"))},equalTo:function(e,c,f){f=a(f).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()});return e==f.val()}}});a.format=a.validator.format})(jQuery);(function(f){var e={};if(f.ajaxPrefilter){f.ajaxPrefilter(function(c,b,a){b=c.port;if(c.mode=="abort"){e[b]&&e[b].abort();e[b]=a}})}else{var d=f.ajax;f.ajax=function(b){var a=("port" in b?b:f.ajaxSettings).port;if(("mode" in b?b:f.ajaxSettings).mode=="abort"){e[a]&&e[a].abort();return e[a]=d.apply(this,arguments)}return d.apply(this,arguments)}}})(jQuery);(function(a){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&a.each({focus:"focusin",blur:"focusout"},function(e,c){function f(b){b=a.event.fix(b);b.type=c;return a.event.handle.call(this,b)}a.event.special[c]={setup:function(){this.addEventListener(e,f,true)
},teardown:function(){this.removeEventListener(e,f,true)},handler:function(b){arguments[0]=a.event.fix(b);arguments[0].type=c;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{validateDelegate:function(e,c,f){return this.bind(c,function(d){var b=a(d.target);if(b.is(e)){return f.apply(b,arguments)}})}})})(jQuery);(function(a){a.validator.addMethod("validateUrl",function(c,b){if(c.length==0){return true}if(!/^(https?|ftp):\/\//i.test(c)){c="http://"+c;a(b).val(c)}return/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&amp;'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&amp;'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&amp;'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&amp;'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&amp;'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},"Please enter a valid url (e.g. http://www.example.com)")})(jQuery);(function(){$(".widget-testimonials").cycle({fx:"fade",height:"142px",timeout:10000});$('.page-content a[href$=".png"], .page-content a[href$=".gif"], .page-content a[href$=".jpg"]').fancybox({zoomOpacity:true,overlayShow:false,zoomSpeedIn:500,zoomSpeedOut:500});$("#about-photo img").data("src",$("#about-photo img").attr("src"));var d=$("<img />").attr("src","http://media.svennerberg.com/2007/02/gabriel-about-2.jpg");$("#about-photo").hover(function(){$(this).find("img").attr("src",d.attr("src"))},function(){var i=$(this).find("img");i.attr("src",i.data("src"))});$(".contact-form").validate({rules:{comment_author:"required",comment_author_email:{required:true,email:true},comment_author_url:{required:false,url:false,validateUrl:true},comment_content:"required"},messages:{comment_author:"Please enter your name",comment_author_email:"Please enter a valid email address (e.g. info@example.com)",comment_author_url:"Please enter a valid url (e.g. http://example.com) or leave it blank",comment_content:"Please write a message"}});$("ul.skills .more").hide();$("ul.skills").delegate("a","click",function(k){k.preventDefault();var j=$(this);var i=j.closest("li").find(".more");if(!i.is(":visible")){i.slideDown("fast",function(){g(j);j.toggleClass("show-less")})}else{i.slideUp("fast",function(){g(j);j.toggleClass("show-less")})}});if(typeof google=="object"){if(typeof google.maps=="object"){var a=new google.maps.LatLng(56.47,59.42);var e={zoom:3,center:a,mapTypeId:google.maps.MapTypeId.ROADMAP,backgroundColor:"#ffffff",scrollwheel:false,mapTypeControl:false};var h=new google.maps.Map(document.getElementById("contact_map"),e);var b=new google.maps.Marker({position:new google.maps.LatLng(56.8775,14.7813),map:h,title:"Växjö, Sweden"});var c=document.getElementById("contact_info").cloneNode(true);c.setAttribute("class","infowindow");var f=new google.maps.InfoWindow({content:c});google.maps.event.addListener(b,"click",function(){f.open(h,b)})}}function g(i){var j=i.text();i.text(i.data("label"));i.data("label",j)}})();
