(function(aw,aA){function j(t,c,E){if(E===aA&&t.nodeType===1){E=t.getAttribute("data-"+c);if(typeof E==="string"){try{E=E==="true"?true:E==="false"?false:E==="null"?null:!Q.isNaN(E)?parseFloat(E):R.test(E)?Q.parseJSON(E):E}catch(B){}Q.data(t,c,E)}else{E=aA}}return E}function al(){return false}function J(){return true}function aY(t,c,B){B[0].type=t;return Q.event.handle.apply(c,B)}function A(aa){var X,W,V,U,T,P,S,E,Z,c,B,t=[];U=[];T=Q.data(this,this.nodeType?"events":"__events__");if(typeof T==="function"){T=T.events}if(!(aa.liveFired===this||!T||!T.live||aa.button&&aa.type==="click")){if(aa.namespace){B=RegExp("(^|\\.)"+aa.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")}aa.liveFired=this;var Y=T.live.slice(0);for(S=0;S<Y.length;S++){T=Y[S];T.origType.replace(ai,"")===aa.type?U.push(T.selector):Y.splice(S--,1)}U=Q(aa.target).closest(U,aa.currentTarget);E=0;for(Z=U.length;E<Z;E++){c=U[E];for(S=0;S<Y.length;S++){T=Y[S];if(c.selector===T.selector&&(!B||B.test(T.namespace))){P=c.elem;V=null;if(T.preType==="mouseenter"||T.preType==="mouseleave"){aa.type=T.preType;V=Q(aa.relatedTarget).closest(T.selector)[0]}if(!V||V!==P){t.push({elem:P,handleObj:T,level:c.level})}}}}E=0;for(Z=t.length;E<Z;E++){U=t[E];if(W&&U.level>W){break}aa.currentTarget=U.elem;aa.data=U.handleObj.data;aa.handleObj=U.handleObj;B=U.handleObj.origHandler.apply(U.elem,arguments);if(B===false||aa.isPropagationStopped()){W=U.level;if(B===false){X=false}if(aa.isImmediatePropagationStopped()){break}}}return X}}function ah(t,c){return(t&&t!=="*"?t+".":"")+c.replace(n,"`").replace(a2,"&")}function aL(t,c,E){if(Q.isFunction(c)){return Q.grep(t,function(S,P){return !!c.call(S,P,S)===E})}else{if(c.nodeType){return Q.grep(t,function(P){return P===c===E})}else{if(typeof c==="string"){var B=Q.grep(t,function(P){return P.nodeType===1});if(aQ.test(c)){return Q.filter(c,B,!E)}else{c=Q.filter(c,B)}}}}return Q.grep(t,function(P){return Q.inArray(P,c)>=0===E})}function ax(t,c){var B=0;c.each(function(){if(this.nodeName===(t[B]&&t[B].nodeName)){var T=Q.data(t[B++]),S=Q.data(this,T);if(T=T&&T.events){delete S.handle;S.events={};for(var P in T){for(var E in T[P]){Q.event.add(this,P,T[P][E],T[P][E].data)}}}}})}function aD(t,c){c.src?Q.ajax({url:c.src,async:false,dataType:"script"}):Q.globalEval(c.text||c.textContent||c.innerHTML||"");c.parentNode&&c.parentNode.removeChild(c)}function O(t,c,E){var B=c==="width"?t.offsetWidth:t.offsetHeight;if(E==="border"){return B}Q.each(c==="width"?ae:F,function(){E||(B-=parseFloat(Q.css(t,"padding"+this))||0);if(E==="margin"){B+=parseFloat(Q.css(t,"margin"+this))||0}else{B-=parseFloat(Q.css(t,"border"+this+"Width"))||0}});return B}function u(t,c,E,B){if(Q.isArray(c)&&c.length){Q.each(c,function(S,P){E||q.test(t)?B(t,P):u(t+"["+(typeof P==="object"||Q.isArray(P)?S:"")+"]",P,E,B)})}else{if(!E&&c!=null&&typeof c==="object"){Q.isEmptyObject(c)?B(t,""):Q.each(c,function(S,P){u(t+"["+S+"]",P,E,B)})}else{B(t,c)}}}function an(t,c){var B={};Q.each(z.concat.apply([],z.slice(0,c)),function(){B[this]=t});return B}function m(t){if(!g[t]){var c=Q("<"+t+">").appendTo("body"),B=c.css("display");c.remove();if(B==="none"||B===""){B="block"}g[t]=B}return g[t]}function aV(c){return Q.isWindow(c)?c:c.nodeType===9?c.defaultView||c.parentWindow:false}var H=aw.document,Q=function(){function bi(){if(!bh.isReady){try{H.documentElement.doScroll("left")}catch(bj){setTimeout(bi,1);return}bh.ready()}}var bh=function(bj,bk){return new bh.fn.init(bj,bk)},bg=aw.jQuery,bf=aw.$,be,bc=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,a9=/\S/,ba=/^\s+/,a6=/\s+$/,V=/\W/,ab=/\d/,a5=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,aa=/^[\],:{}\s]*$/,T=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,W=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,U=/(?:^|:|,)(?:\s*\[)+/g,P=/(webkit)[ \/]([\w.]+)/,bd=/(opera)(?:.*version)?[ \/]([\w.]+)/,bb=/(msie) ([\w.]+)/,a7=/(mozilla)(?:.*? rv:([\w.]+))?/,a8=navigator.userAgent,a4=false,a3=[],Y,S=Object.prototype.toString,X=Object.prototype.hasOwnProperty,E=Array.prototype.push,B=Array.prototype.slice,t=String.prototype.trim,Z=Array.prototype.indexOf,c={};bh.fn=bh.prototype={init:function(bk,bm){var bj,bn,bl;if(!bk){return this}if(bk.nodeType){this.context=this[0]=bk;this.length=1;return this}if(bk==="body"&&!bm&&H.body){this.context=H;this[0]=H.body;this.selector="body";this.length=1;return this}if(typeof bk==="string"){if((bj=bc.exec(bk))&&(bj[1]||!bm)){if(bj[1]){bl=bm?bm.ownerDocument||bm:H;if(bn=a5.exec(bk)){if(bh.isPlainObject(bm)){bk=[H.createElement(bn[1])];bh.fn.attr.call(bk,bm,true)}else{bk=[bl.createElement(bn[1])]}}else{bn=bh.buildFragment([bj[1]],[bl]);bk=(bn.cacheable?bn.fragment.cloneNode(true):bn.fragment).childNodes}return bh.merge(this,bk)}else{if((bn=H.getElementById(bj[2]))&&bn.parentNode){if(bn.id!==bj[2]){return be.find(bk)}this.length=1;this[0]=bn}this.context=H;this.selector=bk;return this}}else{if(!bm&&!V.test(bk)){this.selector=bk;this.context=H;bk=H.getElementsByTagName(bk);return bh.merge(this,bk)}else{return !bm||bm.jquery?(bm||be).find(bk):bh(bm).find(bk)}}}else{if(bh.isFunction(bk)){return be.ready(bk)}}if(bk.selector!==aA){this.selector=bk.selector;this.context=bk.context}return bh.makeArray(bk,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},toArray:function(){return B.call(this,0)},get:function(bj){return bj==null?this.toArray():bj<0?this.slice(bj)[0]:this[bj]},pushStack:function(bk,bl,bj){var bm=bh();bh.isArray(bk)?E.apply(bm,bk):bh.merge(bm,bk);bm.prevObject=this;bm.context=this.context;if(bl==="find"){bm.selector=this.selector+(this.selector?" ":"")+bj}else{if(bl){bm.selector=this.selector+"."+bl+"("+bj+")"}}return bm},each:function(bj,bk){return bh.each(this,bj,bk)},ready:function(bj){bh.bindReady();if(bh.isReady){bj.call(H,bh)}else{a3&&a3.push(bj)}return this},eq:function(bj){return bj===-1?this.slice(bj):this.slice(bj,+bj+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(B.apply(this,arguments),"slice",B.call(arguments).join(","))},map:function(bj){return this.pushStack(bh.map(this,function(bl,bk){return bj.call(bl,bk,bl)}))},end:function(){return this.prevObject||bh(null)},push:E,sort:[].sort,splice:[].splice};bh.fn.init.prototype=bh.fn;bh.extend=bh.fn.extend=function(){var bj,br,bo,bl,bn,bp=arguments[0]||{},bm=1,bk=arguments.length,bq=false;if(typeof bp==="boolean"){bq=bp;bp=arguments[1]||{};bm=2}if(typeof bp!=="object"&&!bh.isFunction(bp)){bp={}}if(bk===bm){bp=this;--bm}for(;bm<bk;bm++){if((bj=arguments[bm])!=null){for(br in bj){bo=bp[br];bl=bj[br];if(bp!==bl){if(bq&&bl&&(bh.isPlainObject(bl)||(bn=bh.isArray(bl)))){if(bn){bn=false;bo=bo&&bh.isArray(bo)?bo:[]}else{bo=bo&&bh.isPlainObject(bo)?bo:{}}bp[br]=bh.extend(bq,bo,bl)}else{if(bl!==aA){bp[br]=bl}}}}}}return bp};bh.extend({noConflict:function(bj){aw.$=bf;if(bj){aw.jQuery=bg}return bh},isReady:false,readyWait:1,ready:function(bk){bk===true&&bh.readyWait--;if(!bh.readyWait||bk!==true&&!bh.isReady){if(!H.body){return setTimeout(bh.ready,1)}bh.isReady=true;if(!(bk!==true&&--bh.readyWait>0)){if(a3){var bl=0,bj=a3;for(a3=null;bk=bj[bl++];){bk.call(H,bh)}bh.fn.trigger&&bh(H).trigger("ready").unbind("ready")}}}},bindReady:function(){if(!a4){a4=true;if(H.readyState==="complete"){return setTimeout(bh.ready,1)}if(H.addEventListener){H.addEventListener("DOMContentLoaded",Y,false);aw.addEventListener("load",bh.ready,false)}else{if(H.attachEvent){H.attachEvent("onreadystatechange",Y);aw.attachEvent("onload",bh.ready);var bj=false;try{bj=aw.frameElement==null}catch(bk){}H.documentElement.doScroll&&bj&&bi()}}}},isFunction:function(bj){return bh.type(bj)==="function"},isArray:Array.isArray||function(bj){return bh.type(bj)==="array"},isWindow:function(bj){return bj&&typeof bj==="object"&&"setInterval" in bj},isNaN:function(bj){return bj==null||!ab.test(bj)||isNaN(bj)},type:function(bj){return bj==null?String(bj):c[S.call(bj)]||"object"},isPlainObject:function(bj){if(!bj||bh.type(bj)!=="object"||bj.nodeType||bh.isWindow(bj)){return false}if(bj.constructor&&!X.call(bj,"constructor")&&!X.call(bj.constructor.prototype,"isPrototypeOf")){return false}for(var bk in bj){}return bk===aA||X.call(bj,bk)},isEmptyObject:function(bj){for(var bk in bj){return false}return true},error:function(bj){throw bj},parseJSON:function(bj){if(typeof bj!=="string"||!bj){return null}bj=bh.trim(bj);if(aa.test(bj.replace(T,"@").replace(W,"]").replace(U,""))){return aw.JSON&&aw.JSON.parse?aw.JSON.parse(bj):(new Function("return "+bj))()}else{bh.error("Invalid JSON: "+bj)}},noop:function(){},globalEval:function(bk){if(bk&&a9.test(bk)){var bl=H.getElementsByTagName("head")[0]||H.documentElement,bj=H.createElement("script");bj.type="text/javascript";if(bh.support.scriptEval){bj.appendChild(H.createTextNode(bk))}else{bj.text=bk}bl.insertBefore(bj,bl.firstChild);bl.removeChild(bj)}},nodeName:function(bj,bk){return bj.nodeName&&bj.nodeName.toUpperCase()===bk.toUpperCase()},each:function(bl,bo,bk){var bp,bm=0,bn=bl.length,bj=bn===aA||bh.isFunction(bl);if(bk){if(bj){for(bp in bl){if(bo.apply(bl[bp],bk)===false){break}}}else{for(;bm<bn;){if(bo.apply(bl[bm++],bk)===false){break}}}}else{if(bj){for(bp in bl){if(bo.call(bl[bp],bp,bl[bp])===false){break}}}else{for(bk=bl[0];bm<bn&&bo.call(bk,bm,bk)!==false;bk=bl[++bm]){}}}return bl},trim:t?function(bj){return bj==null?"":t.call(bj)}:function(bj){return bj==null?"":bj.toString().replace(ba,"").replace(a6,"")},makeArray:function(bk,bl){var bj=bl||[];if(bk!=null){var bm=bh.type(bk);bk.length==null||bm==="string"||bm==="function"||bm==="regexp"||bh.isWindow(bk)?E.call(bj,bk):bh.merge(bj,bk)}return bj},inArray:function(bk,bl){if(bl.indexOf){return bl.indexOf(bk)}for(var bj=0,bm=bl.length;bj<bm;bj++){if(bl[bj]===bk){return bj}}return -1},merge:function(bk,bm){var bj=bk.length,bn=0;if(typeof bm.length==="number"){for(var bl=bm.length;bn<bl;bn++){bk[bj++]=bm[bn]}}else{for(;bm[bn]!==aA;){bk[bj++]=bm[bn++]}}bk.length=bj;return bk},grep:function(bl,bo,bk){var bp=[],bm;bk=!!bk;for(var bn=0,bj=bl.length;bn<bj;bn++){bm=!!bo(bl[bn],bn);bk!==bm&&bp.push(bl[bn])}return bp},map:function(bl,bo,bk){for(var bp=[],bm,bn=0,bj=bl.length;bn<bj;bn++){bm=bo(bl[bn],bn,bk);if(bm!=null){bp[bp.length]=bm}}return bp.concat.apply([],bp)},guid:1,proxy:function(bk,bl,bj){if(arguments.length===2){if(typeof bl==="string"){bj=bk;bk=bj[bl];bl=aA}else{if(bl&&!bh.isFunction(bl)){bj=bl;bl=aA}}}if(!bl&&bk){bl=function(){return bk.apply(bj||this,arguments)}}if(bk){bl.guid=bk.guid=bk.guid||bl.guid||bh.guid++}return bl},access:function(bl,bo,bk,bq,bm,bn){var bj=bl.length;if(typeof bo==="object"){for(var bp in bo){bh.access(bl,bp,bo[bp],bq,bm,bk)}return bl}if(bk!==aA){bq=!bn&&bq&&bh.isFunction(bk);for(bp=0;bp<bj;bp++){bm(bl[bp],bo,bq?bk.call(bl[bp],bp,bm(bl[bp],bo)):bk,bn)}return bl}return bj?bm(bl[0],bo):aA},now:function(){return(new Date).getTime()},uaMatch:function(bj){bj=bj.toLowerCase();bj=P.exec(bj)||bd.exec(bj)||bb.exec(bj)||bj.indexOf("compatible")<0&&a7.exec(bj)||[];return{browser:bj[1]||"",resumen_accversion:bj[2]||"0"}},browser:{}});bh.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(bj,bk){c["[object "+bk+"]"]=bk.toLowerCase()});a8=bh.uaMatch(a8);if(a8.browser){bh.browser[a8.browser]=true;bh.browser.version=a8.version}if(bh.browser.webkit){bh.browser.safari=true}if(Z){bh.inArray=function(bj,bk){return Z.call(bk,bj)}}if(!/\s/.test("\u00a0")){ba=/^[\s\xA0]+/;a6=/[\s\xA0]+$/}be=bh(H);if(H.addEventListener){Y=function(){H.removeEventListener("DOMContentLoaded",Y,false);bh.ready()}}else{if(H.attachEvent){Y=function(){if(H.readyState==="complete"){H.detachEvent("onreadystatechange",Y);bh.ready()}}}}return aw.jQuery=aw.$=bh}();(function(){Q.support={};var X=H.documentElement,V=H.createElement("script"),U=H.createElement("div"),T="script"+Q.now();U.style.display="none";U.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var S=U.getElementsByTagName("*"),P=U.getElementsByTagName("a")[0],B=H.createElement("select"),E=B.appendChild(H.createElement("option"));if(!(!S||!S.length||!P)){Q.support={leadingWhitespace:U.firstChild.nodeType===3,tbody:!U.getElementsByTagName("tbody").length,htmlSerialize:!!U.getElementsByTagName("link").length,style:/red/.test(P.getAttribute("style")),hrefNormalized:P.getAttribute("href")==="/a",opacity:/^0.55$/.test(P.style.opacity),cssFloat:!!P.style.cssFloat,checkOn:U.getElementsByTagName("input")[0].value==="on",optSelected:E.selected,deleteExpando:true,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};B.disabled=true;Q.support.optDisabled=!E.disabled;V.type="text/javascript";try{V.appendChild(H.createTextNode("window."+T+"=1;"))}catch(t){}X.insertBefore(V,X.firstChild);if(aw[T]){Q.support.scriptEval=true;delete aw[T]}try{delete V.test}catch(W){Q.support.deleteExpando=false}X.removeChild(V);if(U.attachEvent&&U.fireEvent){U.attachEvent("onclick",function c(){Q.support.noCloneEvent=false;U.detachEvent("onclick",c)});U.cloneNode(true).fireEvent("onclick")}U=H.createElement("div");U.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";X=H.createDocumentFragment();X.appendChild(U.firstChild);Q.support.checkClone=X.cloneNode(true).cloneNode(true).lastChild.checked;Q(function(){var Z=H.createElement("div");Z.style.width=Z.style.paddingLeft="1px";H.body.appendChild(Z);Q.boxModel=Q.support.boxModel=Z.offsetWidth===2;if("zoom" in Z.style){Z.style.display="inline";Z.style.zoom=1;Q.support.inlineBlockNeedsLayout=Z.offsetWidth===2;Z.style.display="";Z.innerHTML="<div style='width:4px;'></div>";Q.support.shrinkWrapBlocks=Z.offsetWidth!==2}Z.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var Y=Z.getElementsByTagName("td");Q.support.reliableHiddenOffsets=Y[0].offsetHeight===0;Y[0].style.display="";Y[1].style.display="none";Q.support.reliableHiddenOffsets=Q.support.reliableHiddenOffsets&&Y[0].offsetHeight===0;Z.innerHTML="";H.body.removeChild(Z).style.display="none"});X=function(Z){var Y=H.createElement("div");Z="on"+Z;var aa=Z in Y;if(!aa){Y.setAttribute(Z,"return;");aa=typeof Y[Z]==="function"}return aa};Q.support.submitBubbles=X("submit");Q.support.changeBubbles=X("change");X=V=U=S=P=null}})();var a1={},R=/^(?:\{.*\}|\[.*\])$/;Q.extend({cache:{},uuid:0,expando:"jQuery"+Q.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(t,c,S){if(Q.acceptData(t)){t=t==aw?a1:t;var P=t.nodeType,E=P?t[Q.expando]:null,B=Q.cache;if(!(P&&!E&&typeof c==="string"&&S===aA)){if(P){E||(t[Q.expando]=E=++Q.uuid)}else{B=t}if(typeof c==="object"){if(P){B[E]=Q.extend(B[E],c)}else{Q.extend(B,c)}}else{if(P&&!B[E]){B[E]={}}}t=P?B[E]:B;if(S!==aA){t[c]=S}return typeof c==="string"?t[c]:t}}},removeData:function(B,c){if(Q.acceptData(B)){B=B==aw?a1:B;var T=B.nodeType,S=T?B[Q.expando]:B,P=Q.cache,E=T?P[S]:S;if(c){if(E){delete E[c];T&&Q.isEmptyObject(E)&&Q.removeData(B)}}else{if(T&&Q.support.deleteExpando){delete B[Q.expando]}else{if(B.removeAttribute){B.removeAttribute(Q.expando)}else{if(T){delete P[S]}else{for(var t in B){delete B[t]}}}}}}},acceptData:function(t){if(t.nodeName){var c=Q.noData[t.nodeName.toLowerCase()];if(c){return !(c===true||t.getAttribute("classid")!==c)}}return true}});Q.fn.extend({data:function(B,c){var U=null;if(typeof B==="undefined"){if(this.length){var T=this[0].attributes,S;U=Q.data(this[0]);for(var P=0,t=T.length;P<t;P++){S=T[P].name;if(S.indexOf("data-")===0){S=S.substr(5);j(this[0],S,U[S])}}}return U}else{if(typeof B==="object"){return this.each(function(){Q.data(this,B)})}}var E=B.split(".");E[1]=E[1]?"."+E[1]:"";if(c===aA){U=this.triggerHandler("getData"+E[1]+"!",[E[0]]);if(U===aA&&this.length){U=Q.data(this[0],B);U=j(this[0],B,U)}return U===aA&&E[1]?this.data(E[0]):U}else{return this.each(function(){var W=Q(this),V=[E[0],c];W.triggerHandler("setData"+E[1]+"!",V);Q.data(this,B,c);W.triggerHandler("changeData"+E[1]+"!",V)})}},removeData:function(c){return this.each(function(){Q.removeData(this,c)})}});Q.extend({queue:function(t,c,E){if(t){c=(c||"fx")+"queue";var B=Q.data(t,c);if(!E){return B||[]}if(!B||Q.isArray(E)){B=Q.data(t,c,Q.makeArray(E))}else{B.push(E)}return B}},dequeue:function(t,c){c=c||"fx";var E=Q.queue(t,c),B=E.shift();if(B==="inprogress"){B=E.shift()}if(B){c==="fx"&&E.unshift("inprogress");B.call(t,function(){Q.dequeue(t,c)})}}});Q.fn.extend({queue:function(t,c){if(typeof t!=="string"){c=t;t="fx"}if(c===aA){return Q.queue(this[0],t)}return this.each(function(){var B=Q.queue(this,t,c);t==="fx"&&B[0]!=="inprogress"&&Q.dequeue(this,t)})},dequeue:function(c){return this.each(function(){Q.dequeue(this,c)})},delay:function(t,c){t=Q.fx?Q.fx.speeds[t]||t:t;c=c||"fx";return this.queue(c,function(){var B=this;setTimeout(function(){Q.dequeue(B,c)},t)})},clearQueue:function(c){return this.queue(c||"fx",[])}});var aP=/[\n\t]/g,at=/\s+/,d=/\r/g,aS=/^(?:href|src|style)$/,aF=/^(?:button|input)$/i,ag=/^(?:button|input|object|select|textarea)$/i,G=/^a(?:rea)?$/i,aC=/^(?:radio|checkbox)$/i;Q.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};Q.fn.extend({attr:function(t,c){return Q.access(this,t,c,true,Q.attr)},removeAttr:function(c){return this.each(function(){Q.attr(this,c,"");this.nodeType===1&&this.removeAttribute(c)})},addClass:function(V){if(Q.isFunction(V)){return this.each(function(W){var X=Q(this);X.addClass(V.call(this,W,X.attr("class")))})}if(V&&typeof V==="string"){for(var U=(V||"").split(at),T=0,S=this.length;T<S;T++){var P=this[T];if(P.nodeType===1){if(P.className){for(var E=" "+P.className+" ",t=P.className,B=0,c=U.length;B<c;B++){if(E.indexOf(" "+U[B]+" ")<0){t+=" "+U[B]}}P.className=Q.trim(t)}else{P.className=V}}}}return this},removeClass:function(B){if(Q.isFunction(B)){return this.each(function(W){var V=Q(this);V.removeClass(B.call(this,W,V.attr("class")))})}if(B&&typeof B==="string"||B===aA){for(var c=(B||"").split(at),U=0,T=this.length;U<T;U++){var S=this[U];if(S.nodeType===1&&S.className){if(B){for(var P=(" "+S.className+" ").replace(aP," "),t=0,E=c.length;t<E;t++){P=P.replace(" "+c[t]+" "," ")}S.className=Q.trim(P)}else{S.className=""}}}}return this},toggleClass:function(t,c){var E=typeof t,B=typeof c==="boolean";if(Q.isFunction(t)){return this.each(function(S){var P=Q(this);P.toggleClass(t.call(this,S,P.attr("class"),c),c)})}return this.each(function(){if(E==="string"){for(var U,T=0,P=Q(this),S=c,V=t.split(at);U=V[T++];){S=B?S:!P.hasClass(U);P[S?"addClass":"removeClass"](U)}}else{if(E==="undefined"||E==="boolean"){this.className&&Q.data(this,"__className__",this.className);this.className=this.className||t===false?"":Q.data(this,"__className__")||""}}})},hasClass:function(t){t=" "+t+" ";for(var c=0,B=this.length;c<B;c++){if((" "+this[c].className+" ").replace(aP," ").indexOf(t)>-1){return true}}return false},val:function(B){if(!arguments.length){var c=this[0];if(c){if(Q.nodeName(c,"option")){var U=c.attributes.value;return !U||U.specified?c.value:c.text}if(Q.nodeName(c,"select")){var T=c.selectedIndex;U=[];var S=c.options;c=c.type==="select-one";if(T<0){return null}var P=c?T:0;for(T=c?T+1:S.length;P<T;P++){var t=S[P];if(t.selected&&(Q.support.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!Q.nodeName(t.parentNode,"optgroup"))){B=Q(t).val();if(c){return B}U.push(B)}}return U}if(aC.test(c.type)&&!Q.support.checkOn){return c.getAttribute("value")===null?"on":c.value}return(c.value||"").replace(d,"")}return aA}var E=Q.isFunction(B);return this.each(function(Y){var W=Q(this),X=B;if(this.nodeType===1){if(E){X=B.call(this,Y,W.val())}if(X==null){X=""}else{if(typeof X==="number"){X+=""}else{if(Q.isArray(X)){X=Q.map(X,function(Z){return Z==null?"":Z+""})}}}if(Q.isArray(X)&&aC.test(this.type)){this.checked=Q.inArray(W.val(),X)>=0}else{if(Q.nodeName(this,"select")){var V=Q.makeArray(X);Q("option",this).each(function(){this.selected=Q.inArray(Q(this).val(),V)>=0});if(!V.length){this.selectedIndex=-1}}else{this.value=X}}}})}});Q.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(t,c,S,P){if(!t||t.nodeType===3||t.nodeType===8){return aA}if(P&&c in Q.attrFn){return Q(t)[c](S)}P=t.nodeType!==1||!Q.isXMLDoc(t);var E=S!==aA;c=P&&Q.props[c]||c;var B=aS.test(c);if((c in t||t[c]!==aA)&&P&&!B){if(E){c==="type"&&aF.test(t.nodeName)&&t.parentNode&&Q.error("type property can't be changed");if(S===null){t.nodeType===1&&t.removeAttribute(c)}else{t[c]=S}}if(Q.nodeName(t,"form")&&t.getAttributeNode(c)){return t.getAttributeNode(c).nodeValue}if(c==="tabIndex"){return(c=t.getAttributeNode("tabIndex"))&&c.specified?c.value:ag.test(t.nodeName)||G.test(t.nodeName)&&t.href?0:aA}return t[c]}if(!Q.support.style&&P&&c==="style"){if(E){t.style.cssText=""+S}return t.style.cssText}E&&t.setAttribute(c,""+S);if(!t.attributes[c]&&t.hasAttribute&&!t.hasAttribute(c)){return aA}t=!Q.support.hrefNormalized&&P&&B?t.getAttribute(c,2):t.getAttribute(c);return t===null?aA:t}});var ai=/\.(.*)$/,L=/^(?:textarea|input|select)$/i,n=/\./g,a2=/ /g,r=/[^\w\s.|`]/g,e=function(c){return c.replace(r,"\\$&")},ad={focusin:0,focusout:0};Q.event={add:function(Z,X,W,V){if(!(Z.nodeType===3||Z.nodeType===8)){if(Q.isWindow(Z)&&Z!==aw&&!Z.frameElement){Z=aw}if(W===false){W=al}else{if(!W){return}}var U,T;if(W.handler){U=W;W=U.handler}if(!W.guid){W.guid=Q.guid++}if(T=Q.data(Z)){var P=Z.nodeType?"events":"__events__",S=T[P],E=T.handle;if(typeof S==="function"){E=S.handle;S=S.events}else{if(!S){Z.nodeType||(T[P]=T=function(){});T.events=S={}}}if(!E){T.handle=E=function(){return typeof Q!=="undefined"&&!Q.event.triggered?Q.event.handle.apply(E.elem,arguments):aA}}E.elem=Z;X=X.split(" ");for(var Y=0,c;P=X[Y++];){T=U?Q.extend({},U):{handler:W,data:V};if(P.indexOf(".")>-1){c=P.split(".");P=c.shift();T.namespace=c.slice(0).sort().join(".")}else{c=[];T.namespace=""}T.type=P;if(!T.guid){T.guid=W.guid}var B=S[P],t=Q.event.special[P]||{};if(!B){B=S[P]=[];if(!t.setup||t.setup.call(Z,V,c,E)===false){if(Z.addEventListener){Z.addEventListener(P,E,false)}else{Z.attachEvent&&Z.attachEvent("on"+P,E)}}}if(t.add){t.add.call(Z,T);if(!T.handler.guid){T.handler.guid=W.guid}}B.push(T);Q.event.global[P]=true}Z=null}}},global:{},remove:function(aa,X,W,V){if(!(aa.nodeType===3||aa.nodeType===8)){if(W===false){W=al}var U,T,P=0,S,E,Z,c,B,t,Y=aa.nodeType?"events":"__events__",a3=Q.data(aa),ab=a3&&a3[Y];if(a3&&ab){if(typeof ab==="function"){a3=ab;ab=ab.events}if(X&&X.type){W=X.handler;X=X.type}if(!X||typeof X==="string"&&X.charAt(0)==="."){X=X||"";for(U in ab){Q.event.remove(aa,U+X)}}else{for(X=X.split(" ");U=X[P++];){c=U;S=U.indexOf(".")<0;E=[];if(!S){E=U.split(".");U=E.shift();Z=RegExp("(^|\\.)"+Q.map(E.slice(0).sort(),e).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=ab[U]){if(W){c=Q.event.special[U]||{};for(T=V||0;T<B.length;T++){t=B[T];if(W.guid===t.guid){if(S||Z.test(t.namespace)){V==null&&B.splice(T--,1);c.remove&&c.remove.call(aa,t)}if(V!=null){break}}}if(B.length===0||V!=null&&B.length===1){if(!c.teardown||c.teardown.call(aa,E)===false){Q.removeEvent(aa,U,a3.handle)}delete ab[U]}}else{for(T=0;T<B.length;T++){t=B[T];if(S||Z.test(t.namespace)){Q.event.remove(aa,c,t.handler,T);B.splice(T--,1)}}}}}if(Q.isEmptyObject(ab)){if(X=a3.handle){X.elem=null}delete a3.events;delete a3.handle;if(typeof a3==="function"){Q.removeData(aa,Y)}else{Q.isEmptyObject(a3)&&Q.removeData(aa)}}}}}},trigger:function(X,V,U,T){var S=X.type||X;if(!T){X=typeof X==="object"?X[Q.expando]?X:Q.extend(Q.Event(S),X):Q.Event(S);if(S.indexOf("!")>=0){X.type=S=S.slice(0,-1);X.exclusive=true}if(!U){X.stopPropagation();Q.event.global[S]&&Q.each(Q.cache,function(){this.events&&this.events[S]&&Q.event.trigger(X,V,this.handle.elem)})}if(!U||U.nodeType===3||U.nodeType===8){return aA}X.result=aA;X.target=U;V=Q.makeArray(V);V.unshift(X)}X.currentTarget=U;(T=U.nodeType?Q.data(U,"handle"):(Q.data(U,"__events__")||{}).handle)&&T.apply(U,V);T=U.parentNode||U.ownerDocument;try{if(!(U&&U.nodeName&&Q.noData[U.nodeName.toLowerCase()])){if(U["on"+S]&&U["on"+S].apply(U,V)===false){X.result=false;X.preventDefault()}}}catch(P){}if(!X.isPropagationStopped()&&T){Q.event.trigger(X,V,T,true)}else{if(!X.isDefaultPrevented()){var B;T=X.target;var E=S.replace(ai,""),t=Q.nodeName(T,"a")&&E==="click",W=Q.event.special[E]||{};if((!W._default||W._default.call(U,X)===false)&&!t&&!(T&&T.nodeName&&Q.noData[T.nodeName.toLowerCase()])){try{if(T[E]){if(B=T["on"+E]){T["on"+E]=null}Q.event.triggered=true;T[E]()}}catch(c){}if(B){T["on"+E]=B}Q.event.triggered=false}}}},handle:function(B){var c,U,T,S;U=[];var P=Q.makeArray(arguments);B=P[0]=Q.event.fix(B||aw.event);B.currentTarget=this;c=B.type.indexOf(".")<0&&!B.exclusive;if(!c){T=B.type.split(".");B.type=T.shift();U=T.slice(0).sort();T=RegExp("(^|\\.)"+U.join("\\.(?:.*\\.)?")+"(\\.|$)")}B.namespace=B.namespace||U.join(".");S=Q.data(this,this.nodeType?"events":"__events__");if(typeof S==="function"){S=S.events}U=(S||{})[B.type];if(S&&U){U=U.slice(0);S=0;for(var t=U.length;S<t;S++){var E=U[S];if(c||T.test(E.namespace)){B.handler=E.handler;B.data=E.data;B.handleObj=E;E=E.handler.apply(this,P);if(E!==aA){B.result=E;if(E===false){B.preventDefault();B.stopPropagation()}}if(B.isImmediatePropagationStopped()){break}}}}return B.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(t){if(t[Q.expando]){return t}var c=t;t=Q.Event(c);for(var E=this.props.length,B;E;){B=this.props[--E];t[B]=c[B]}if(!t.target){t.target=t.srcElement||H}if(t.target.nodeType===3){t.target=t.target.parentNode}if(!t.relatedTarget&&t.fromElement){t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement}if(t.pageX==null&&t.clientX!=null){c=H.documentElement;E=H.body;t.pageX=t.clientX+(c&&c.scrollLeft||E&&E.scrollLeft||0)-(c&&c.clientLeft||E&&E.clientLeft||0);t.pageY=t.clientY+(c&&c.scrollTop||E&&E.scrollTop||0)-(c&&c.clientTop||E&&E.clientTop||0)}if(t.which==null&&(t.charCode!=null||t.keyCode!=null)){t.which=t.charCode!=null?t.charCode:t.keyCode}if(!t.metaKey&&t.ctrlKey){t.metaKey=t.ctrlKey}if(!t.which&&t.button!==aA){t.which=t.button&1?1:t.button&2?3:t.button&4?2:0}return t},guid:100000000,proxy:Q.proxy,special:{ready:{setup:Q.bindReady,teardown:Q.noop},live:{add:function(c){Q.event.add(this,ah(c.origType,c.selector),Q.extend({},c,{handler:A,guid:c.handler.guid}))},remove:function(c){Q.event.remove(this,ah(c.origType,c.selector),c)}},beforeunload:{setup:function(t,c,B){if(Q.isWindow(this)){this.onbeforeunload=B}},teardown:function(t,c){if(this.onbeforeunload===c){this.onbeforeunload=null}}}}};Q.removeEvent=H.removeEventListener?function(t,c,B){t.removeEventListener&&t.removeEventListener(c,B,false)}:function(t,c,B){t.detachEvent&&t.detachEvent("on"+c,B)};Q.Event=function(c){if(!this.preventDefault){return new Q.Event(c)}if(c&&c.type){this.originalEvent=c;this.type=c.type}else{this.type=c}this.timeStamp=Q.now();this[Q.expando]=true};Q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var c=this.originalEvent;if(c){if(c.preventDefault){c.preventDefault()}else{c.returnValue=false}}},stopPropagation:function(){this.isPropagationStopped=J;var c=this.originalEvent;if(c){c.stopPropagation&&c.stopPropagation();c.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:al,isPropagationStopped:al,isImmediatePropagationStopped:al};var D=function(t){var c=t.relatedTarget;try{for(;c&&c!==this;){c=c.parentNode}if(c!==this){t.type=t.data;Q.event.handle.apply(this,arguments)}}catch(B){}},p=function(c){c.type=c.data;Q.event.handle.apply(this,arguments)};Q.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,c){Q.event.special[t]={setup:function(B){Q.event.add(this,c,B&&B.selector?p:D,t)},teardown:function(B){Q.event.remove(this,c,B&&B.selector?p:D)}}});if(!Q.support.submitBubbles){Q.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){Q.event.add(this,"click.specialSubmit",function(t){var c=t.target,B=c.type;if((B==="submit"||B==="image")&&Q(c).closest("form").length){t.liveFired=aA;return aY("submit",this,arguments)}});Q.event.add(this,"keypress.specialSubmit",function(t){var c=t.target,B=c.type;if((B==="text"||B==="password")&&Q(c).closest("form").length&&t.keyCode===13){t.liveFired=aA;return aY("submit",this,arguments)}})}else{return false}},teardown:function(){Q.event.remove(this,".specialSubmit")}}}if(!Q.support.changeBubbles){var ak,b=function(t){var c=t.type,B=t.value;if(c==="radio"||c==="checkbox"){B=t.checked}else{if(c==="select-multiple"){B=t.selectedIndex>-1?Q.map(t.options,function(E){return E.selected}).join("-"):""}else{if(t.nodeName.toLowerCase()==="select"){B=t.selectedIndex}}}return B},af=function(t,c){var P=t.target,E,B;if(!(!L.test(P.nodeName)||P.readOnly)){E=Q.data(P,"_change_data");B=b(P);if(t.type!=="focusout"||P.type!=="radio"){Q.data(P,"_change_data",B)}if(!(E===aA||B===E)){if(E!=null||B){t.type="change";t.liveFired=aA;return Q.event.trigger(t,c,P)}}}};Q.event.special.change={filters:{focusout:af,beforedeactivate:af,click:function(t){var c=t.target,B=c.type;if(B==="radio"||B==="checkbox"||c.nodeName.toLowerCase()==="select"){return af.call(this,t)}},keydown:function(t){var c=t.target,B=c.type;if(t.keyCode===13&&c.nodeName.toLowerCase()!=="textarea"||t.keyCode===32&&(B==="checkbox"||B==="radio")||B==="select-multiple"){return af.call(this,t)}},beforeactivate:function(c){c=c.target;Q.data(c,"_change_data",b(c))}},setup:function(){if(this.type==="file"){return false}for(var c in ak){Q.event.add(this,c+".specialChange",ak[c])}return L.test(this.nodeName)},teardown:function(){Q.event.remove(this,".specialChange");return L.test(this.nodeName)}};ak=Q.event.special.change.filters;ak.focus=ak.beforeactivate}H.addEventListener&&Q.each({focus:"focusin",blur:"focusout"},function(t,c){function B(E){E=Q.event.fix(E);E.type=c;return Q.event.trigger(E,null,E.target)}Q.event.special[c]={setup:function(){ad[c]++===0&&H.addEventListener(t,B,true)},teardown:function(){--ad[c]===0&&H.removeEventListener(t,B,true)}}});Q.each(["bind","one"],function(t,c){Q.fn[c]=function(U,T,S){if(typeof U==="object"){for(var P in U){this[c](P,T,U[P],S)}return this}if(Q.isFunction(T)||T===false){S=T;T=aA}var B=c==="one"?Q.proxy(S,function(V){Q(this).unbind(V,B);return S.apply(this,arguments)}):S;if(U==="unload"&&c!=="one"){this.one(U,T,S)}else{P=0;for(var E=this.length;P<E;P++){Q.event.add(this[P],U,B,T)}}return this}});Q.fn.extend({unbind:function(t,c){if(typeof t==="object"&&!t.preventDefault){for(var E in t){this.unbind(E,t[E])}}else{E=0;for(var B=this.length;E<B;E++){Q.event.remove(this[E],t,c)}}return this},delegate:function(t,c,E,B){return this.live(c,E,B,t)},undelegate:function(t,c,B){return arguments.length===0?this.unbind("live"):this.die(c,null,B,t)},trigger:function(t,c){return this.each(function(){Q.event.trigger(t,c,this)})},triggerHandler:function(t,c){if(this[0]){var B=Q.Event(t);B.preventDefault();B.stopPropagation();Q.event.trigger(B,c,this[0]);return B.result}},toggle:function(t){for(var c=arguments,B=1;B<c.length;){Q.proxy(t,c[B++])}return this.click(Q.proxy(t,function(P){var E=(Q.data(this,"lastToggle"+t.guid)||0)%B;Q.data(this,"lastToggle"+t.guid,E+1);P.preventDefault();return c[E].apply(this,arguments)||false}))},hover:function(t,c){return this.mouseenter(t).mouseleave(c||t)}});var aR={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};Q.each(["live","die"],function(t,c){Q.fn[c]=function(X,W,V,U){var S,T=0,P,Y,B=U||this.selector;U=U?this:Q(this.context);if(typeof X==="object"&&!X.preventDefault){for(S in X){U[c](S,W,X[S],B)}return this}if(Q.isFunction(W)){V=W;W=aA}for(X=(X||"").split(" ");(S=X[T++])!=null;){P=ai.exec(S);Y="";if(P){Y=P[0];S=S.replace(ai,"")}if(S==="hover"){X.push("mouseenter"+Y,"mouseleave"+Y)}else{P=S;if(S==="focus"||S==="blur"){X.push(aR[S]+Y);S+=Y}else{S=(aR[S]||S)+Y}if(c==="live"){Y=0;for(var E=U.length;Y<E;Y++){Q.event.add(U[Y],"live."+ah(S,B),{data:W,selector:B,handler:V,origType:S,origHandler:V,preType:P})}}else{U.unbind("live."+ah(S,B),V)}}}return this}});Q.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(t,c){Q.fn[c]=function(E,B){if(B==null){B=E;E=null}return arguments.length>0?this.bind(c,E,B):this.trigger(c)};if(Q.attrFn){Q.attrFn[c]=true}});aw.attachEvent&&!aw.addEventListener&&Q(aw).bind("unload",function(){for(var t in Q.cache){if(Q.cache[t].handle){try{Q.event.remove(Q.cache[t].handle.elem)}catch(c){}}}});(function(){function ab(ba,a9,a7,a8,a6,a5){a6=0;for(var bc=a8.length;a6<bc;a6++){var bb=a8[a6];if(bb){var bd=false;for(bb=bb[ba];bb;){if(bb.sizcache===a7){bd=a8[bb.sizset];break}if(bb.nodeType===1&&!a5){bb.sizcache=a7;bb.sizset=a6}if(bb.nodeName.toLowerCase()===a9){bd=bb;break}bb=bb[ba]}a8[a6]=bd}}}function Y(ba,a9,a7,a8,a6,a5){a6=0;for(var bc=a8.length;a6<bc;a6++){var bb=a8[a6];if(bb){var bd=false;for(bb=bb[ba];bb;){if(bb.sizcache===a7){bd=a8[bb.sizset];break}if(bb.nodeType===1){if(!a5){bb.sizcache=a7;bb.sizset=a6}if(typeof a9!=="string"){if(bb===a9){bd=true;break}}else{if(S.filter(a9,[bb]).length>0){bd=bb;break}}}bb=bb[ba]}a8[a6]=bd}}}var W=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,V=0,U=Object.prototype.toString,T=false,P=true;[0,0].sort(function(){P=false;return 0});var S=function(bc,bb,a8,a9){a8=a8||[];var a7=bb=bb||H;if(bb.nodeType!==1&&bb.nodeType!==9){return[]}if(!bc||typeof bc!=="string"){return a8}var a6,bh,bg,bi,bf,be=true,bd=S.isXML(bb),a5=[],ba=bc;do{W.exec("");if(a6=W.exec(ba)){ba=a6[3];a5.push(a6[1]);if(a6[2]){bi=a6[3];break}}}while(a6);if(a5.length>1&&aa.exec(bc)){if(a5.length===2&&E.relative[a5[0]]){bh=X(a5[0]+a5[1],bb)}else{for(bh=E.relative[a5[0]]?[bb]:S(a5.shift(),bb);a5.length;){bc=a5.shift();if(E.relative[bc]){bc+=a5.shift()}bh=X(bc,bh)}}}else{if(!a9&&a5.length>1&&bb.nodeType===9&&!bd&&E.match.ID.test(a5[0])&&!E.match.ID.test(a5[a5.length-1])){a6=S.find(a5.shift(),bb,bd);bb=a6.expr?S.filter(a6.expr,a6.set)[0]:a6.set[0]}if(bb){a6=a9?{expr:a5.pop(),set:t(a9)}:S.find(a5.pop(),a5.length===1&&(a5[0]==="~"||a5[0]==="+")&&bb.parentNode?bb.parentNode:bb,bd);bh=a6.expr?S.filter(a6.expr,a6.set):a6.set;if(a5.length>0){bg=t(bh)}else{be=false}for(;a5.length;){a6=bf=a5.pop();if(E.relative[bf]){a6=a5.pop()}else{bf=""}if(a6==null){a6=bb}E.relative[bf](bg,a6,bd)}}else{bg=[]}}bg||(bg=bh);bg||S.error(bf||bc);if(U.call(bg)==="[object Array]"){if(be){if(bb&&bb.nodeType===1){for(bc=0;bg[bc]!=null;bc++){if(bg[bc]&&(bg[bc]===true||bg[bc].nodeType===1&&S.contains(bb,bg[bc]))){a8.push(bh[bc])}}}else{for(bc=0;bg[bc]!=null;bc++){bg[bc]&&bg[bc].nodeType===1&&a8.push(bh[bc])}}}else{a8.push.apply(a8,bg)}}else{t(bg,a8)}if(bi){S(bi,a7,a8,a9);S.uniqueSort(a8)}return a8};S.uniqueSort=function(a6){if(a4){T=P;a6.sort(a4);if(T){for(var a5=1;a5<a6.length;a5++){a6[a5]===a6[a5-1]&&a6.splice(a5--,1)}}}return a6};S.matches=function(a6,a5){return S(a6,null,null,a5)};S.matchesSelector=function(a6,a5){return S(a5,null,null,[a6]).length>0};S.find=function(ba,a9,a7){var a8;if(!ba){return[]}for(var a6=0,a5=E.order.length;a6<a5;a6++){var bc,bb=E.order[a6];if(bc=E.leftMatch[bb].exec(ba)){var bd=bc[1];bc.splice(1,1);if(bd.substr(bd.length-1)!=="\\"){bc[1]=(bc[1]||"").replace(/\\/g,"");a8=E.find[bb](bc,a9,a7);if(a8!=null){ba=ba.replace(E.match[bb],"");break}}}}a8||(a8=a9.getElementsByTagName("*"));return{set:a8,expr:ba}};S.filter=function(bd,bc,a8,a9){for(var a7,a6,bi=bd,bh=[],bj=bc,bg=bc&&bc[0]&&S.isXML(bc[0]);bd&&bc.length;){for(var bf in E.filter){if((a7=E.leftMatch[bf].exec(bd))!=null&&a7[2]){var be,a5,bb=E.filter[bf];a5=a7[1];a6=false;a7.splice(1,1);if(a5.substr(a5.length-1)!=="\\"){if(bj===bh){bh=[]}if(E.preFilter[bf]){if(a7=E.preFilter[bf](a7,bj,a8,bh,a9,bg)){if(a7===true){continue}}else{a6=be=true}}if(a7){for(var ba=0;(a5=bj[ba])!=null;ba++){if(a5){be=bb(a5,a7,ba,bj);var bk=a9^!!be;if(a8&&be!=null){if(bk){a6=true}else{bj[ba]=false}}else{if(bk){bh.push(a5);a6=true}}}}}if(be!==aA){a8||(bj=bh);bd=bd.replace(E.match[bf],"");if(!a6){return[]}break}}}}if(bd===bi){if(a6==null){S.error(bd)}else{break}}bi=bd}return bj};S.error=function(a5){throw"Syntax error, unrecognized expression: "+a5};var E=S.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a5){return a5.getAttribute("href")}},relative:{"+":function(a7,a6){var ba=typeof a6==="string",a5=ba&&!/\W/.test(a6);ba=ba&&!a5;if(a5){a6=a6.toLowerCase()}a5=0;for(var a9=a7.length,a8;a5<a9;a5++){if(a8=a7[a5]){for(;(a8=a8.previousSibling)&&a8.nodeType!==1;){}a7[a5]=ba||a8&&a8.nodeName.toLowerCase()===a6?a8||false:a8===a6}}ba&&S.filter(a6,a7,true)},">":function(a7,a6){var ba,a5=typeof a6==="string",a9=0,a8=a7.length;if(a5&&!/\W/.test(a6)){for(a6=a6.toLowerCase();a9<a8;a9++){if(ba=a7[a9]){ba=ba.parentNode;a7[a9]=ba.nodeName.toLowerCase()===a6?ba:false}}}else{for(;a9<a8;a9++){if(ba=a7[a9]){a7[a9]=a5?ba.parentNode:ba.parentNode===a6}}a5&&S.filter(a6,a7,true)}},"":function(a7,a6,ba){var a5,a9=V++,a8=Y;if(typeof a6==="string"&&!/\W/.test(a6)){a5=a6=a6.toLowerCase();a8=ab}a8("parentNode",a6,a9,a7,a5,ba)},"~":function(a7,a6,ba){var a5,a9=V++,a8=Y;if(typeof a6==="string"&&!/\W/.test(a6)){a5=a6=a6.toLowerCase();a8=ab}a8("previousSibling",a6,a9,a7,a5,ba)}},find:{ID:function(a6,a5,a7){if(typeof a5.getElementById!=="undefined"&&!a7){return(a6=a5.getElementById(a6[1]))&&a6.parentNode?[a6]:[]}},NAME:function(a7,a6){if(typeof a6.getElementsByName!=="undefined"){for(var ba=[],a5=a6.getElementsByName(a7[1]),a9=0,a8=a5.length;a9<a8;a9++){a5[a9].getAttribute("name")===a7[1]&&ba.push(a5[a9])}return ba.length===0?null:ba}},TAG:function(a6,a5){return a5.getElementsByTagName(a6[1])}},preFilter:{CLASS:function(a8,a7,bb,a5,ba,a9){a8=" "+a8[1].replace(/\\/g,"")+" ";if(a9){return a8}a9=0;for(var a6;(a6=a7[a9])!=null;a9++){if(a6){if(ba^(a6.className&&(" "+a6.className+" ").replace(/[\t\n]/g," ").indexOf(a8)>=0)){bb||a5.push(a6)}else{if(bb){a7[a9]=false}}}}return false},ID:function(a5){return a5[1].replace(/\\/g,"")},TAG:function(a5){return a5[1].toLowerCase()},CHILD:function(a6){if(a6[1]==="nth"){var a5=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(a6[2]==="even"&&"2n"||a6[2]==="odd"&&"2n+1"||!/\D/.test(a6[2])&&"0n+"+a6[2]||a6[2]);a6[2]=a5[1]+(a5[2]||1)-0;a6[3]=a5[3]-0}a6[0]=V++;return a6},ATTR:function(a7,a6,ba,a5,a9,a8){a6=a7[1].replace(/\\/g,"");if(!a8&&E.attrMap[a6]){a7[1]=E.attrMap[a6]}if(a7[2]==="~="){a7[4]=" "+a7[4]+" "}return a7},PSEUDO:function(a7,a6,a9,a5,a8){if(a7[1]==="not"){if((W.exec(a7[3])||"").length>1||/^\w/.test(a7[3])){a7[3]=S(a7[3],null,null,a6)}else{a7=S.filter(a7[3],a6,a9,true^a8);a9||a5.push.apply(a5,a7);return false}}else{if(E.match.POS.test(a7[0])||E.match.CHILD.test(a7[0])){return true}}return a7},POS:function(a5){a5.unshift(true);return a5}},filters:{enabled:function(a5){return a5.disabled===false&&a5.type!=="hidden"},disabled:function(a5){return a5.disabled===true},checked:function(a5){return a5.checked===true},selected:function(a5){return a5.selected===true},parent:function(a5){return !!a5.firstChild},empty:function(a5){return !a5.firstChild},has:function(a6,a5,a7){return !!S(a7[3],a6).length},header:function(a5){return/h\d/i.test(a5.nodeName)},text:function(a5){return"text"===a5.type},radio:function(a5){return"radio"===a5.type},checkbox:function(a5){return"checkbox"===a5.type},file:function(a5){return"file"===a5.type},password:function(a5){return"password"===a5.type},submit:function(a5){return"submit"===a5.type},image:function(a5){return"image"===a5.type},reset:function(a5){return"reset"===a5.type},button:function(a5){return"button"===a5.type||a5.nodeName.toLowerCase()==="button"},input:function(a5){return/input|select|textarea|button/i.test(a5.nodeName)}},setFilters:{first:function(a6,a5){return a5===0},last:function(a7,a6,a8,a5){return a6===a5.length-1},even:function(a6,a5){return a5%2===0},odd:function(a6,a5){return a5%2===1},lt:function(a6,a5,a7){return a5<a7[3]-0},gt:function(a6,a5,a7){return a5>a7[3]-0},nth:function(a6,a5,a7){return a7[3]-0===a5},eq:function(a6,a5,a7){return a7[3]-0===a5}},filter:{PSEUDO:function(a7,a6,ba,a5){var a9=a6[1],a8=E.filters[a9];if(a8){return a8(a7,ba,a6,a5)}else{if(a9==="contains"){return(a7.textContent||a7.innerText||S.getText([a7])||"").indexOf(a6[3])>=0}else{if(a9==="not"){a6=a6[3];ba=0;for(a5=a6.length;ba<a5;ba++){if(a6[ba]===a7){return false}}return true}else{S.error("Syntax error, unrecognized expression: "+a9)}}}},CHILD:function(a8,a7){var bc=a7[1],a5=a8;switch(bc){case"only":case"first":for(;a5=a5.previousSibling;){if(a5.nodeType===1){return false}}if(bc==="first"){return true}a5=a8;case"last":for(;a5=a5.nextSibling;){if(a5.nodeType===1){return false}}return true;case"nth":bc=a7[2];var ba=a7[3];if(bc===1&&ba===0){return true}var a9=a7[0],a6=a8.parentNode;if(a6&&(a6.sizcache!==a9||!a8.nodeIndex)){var bb=0;for(a5=a6.firstChild;a5;a5=a5.nextSibling){if(a5.nodeType===1){a5.nodeIndex=++bb}}a6.sizcache=a9}a5=a8.nodeIndex-ba;return bc===0?a5===0:a5%bc===0&&a5/bc>=0}},ID:function(a6,a5){return a6.nodeType===1&&a6.getAttribute("id")===a5},TAG:function(a6,a5){return a5==="*"&&a6.nodeType===1||a6.nodeName.toLowerCase()===a5},CLASS:function(a6,a5){return(" "+(a6.className||a6.getAttribute("class"))+" ").indexOf(a5)>-1},ATTR:function(a7,a6){var ba=a6[1];ba=E.attrHandle[ba]?E.attrHandle[ba](a7):a7[ba]!=null?a7[ba]:a7.getAttribute(ba);var a5=ba+"",a9=a6[2],a8=a6[4];return ba==null?a9==="!=":a9==="="?a5===a8:a9==="*="?a5.indexOf(a8)>=0:a9==="~="?(" "+a5+" ").indexOf(a8)>=0:!a8?a5&&ba!==false:a9==="!="?a5!==a8:a9==="^="?a5.indexOf(a8)===0:a9==="$="?a5.substr(a5.length-a8.length)===a8:a9==="|="?a5===a8||a5.substr(0,a8.length+1)===a8+"-":false},POS:function(a7,a6,a9,a5){var a8=E.setFilters[a6[2]];if(a8){return a8(a7,a9,a6,a5)}}}},aa=E.match.POS,c=function(a6,a5){return"\\"+(a5-0+1)},B;for(B in E.match){E.match[B]=RegExp(E.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);E.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+E.match[B].source.replace(/\\(\d+)/g,c))}var t=function(a6,a5){a6=Array.prototype.slice.call(a6,0);if(a5){a5.push.apply(a5,a6);return a5}return a6};try{Array.prototype.slice.call(H.documentElement.childNodes,0)}catch(Z){t=function(a7,a6){var a9=0,a5=a6||[];if(U.call(a7)==="[object Array]"){Array.prototype.push.apply(a5,a7)}else{if(typeof a7.length==="number"){for(var a8=a7.length;a9<a8;a9++){a5.push(a7[a9])}}else{for(;a7[a9];a9++){a5.push(a7[a9])}}}return a5}}var a4,a3;if(H.documentElement.compareDocumentPosition){a4=function(a6,a5){if(a6===a5){T=true;return 0}if(!a6.compareDocumentPosition||!a5.compareDocumentPosition){return a6.compareDocumentPosition?-1:1}return a6.compareDocumentPosition(a5)&4?-1:1}}else{a4=function(a8,a7){var bb,a5,ba=[],a9=[];bb=a8.parentNode;a5=a7.parentNode;var a6=bb;if(a8===a7){T=true;return 0}else{if(bb===a5){return a3(a8,a7)}else{if(bb){if(!a5){return 1}}else{return -1}}}for(;a6;){ba.unshift(a6);a6=a6.parentNode}for(a6=a5;a6;){a9.unshift(a6);a6=a6.parentNode}bb=ba.length;a5=a9.length;for(a6=0;a6<bb&&a6<a5;a6++){if(ba[a6]!==a9[a6]){return a3(ba[a6],a9[a6])}}return a6===bb?a3(a8,a9[a6],-1):a3(ba[a6],a7,1)};a3=function(a6,a5,a7){if(a6===a5){return a7}for(a6=a6.nextSibling;a6;){if(a6===a5){return -1}a6=a6.nextSibling}return 1}}S.getText=function(a7){for(var a6="",a8,a5=0;a7[a5];a5++){a8=a7[a5];if(a8.nodeType===3||a8.nodeType===4){a6+=a8.nodeValue}else{if(a8.nodeType!==8){a6+=S.getText(a8.childNodes)}}}return a6};(function(){var a6=H.createElement("div"),a5="script"+(new Date).getTime(),a7=H.documentElement;a6.innerHTML="<a name='"+a5+"'/>";a7.insertBefore(a6,a7.firstChild);if(H.getElementById(a5)){E.find.ID=function(a8,ba,a9){if(typeof ba.getElementById!=="undefined"&&!a9){return(ba=ba.getElementById(a8[1]))?ba.id===a8[1]||typeof ba.getAttributeNode!=="undefined"&&ba.getAttributeNode("id").nodeValue===a8[1]?[ba]:aA:[]}};E.filter.ID=function(a8,ba){var a9=typeof a8.getAttributeNode!=="undefined"&&a8.getAttributeNode("id");return a8.nodeType===1&&a9&&a9.nodeValue===ba}}a7.removeChild(a6);a7=a6=null})();(function(){var a5=H.createElement("div");a5.appendChild(H.createComment(""));if(a5.getElementsByTagName("*").length>0){E.find.TAG=function(a7,ba){var a6=ba.getElementsByTagName(a7[1]);if(a7[1]==="*"){for(var a9=[],a8=0;a6[a8];a8++){a6[a8].nodeType===1&&a9.push(a6[a8])}a6=a9}return a6}}a5.innerHTML="<a href='#'></a>";if(a5.firstChild&&typeof a5.firstChild.getAttribute!=="undefined"&&a5.firstChild.getAttribute("href")!=="#"){E.attrHandle.href=function(a6){return a6.getAttribute("href",2)}}a5=null})();H.querySelectorAll&&function(){var a6=S,a5=H.createElement("div");a5.innerHTML="<p class='TEST'></p>";if(!(a5.querySelectorAll&&a5.querySelectorAll(".TEST").length===0)){S=function(a8,bc,bb,a9){bc=bc||H;a8=a8.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!a9&&!S.isXML(bc)){if(bc.nodeType===9){try{return t(bc.querySelectorAll(a8),bb)}catch(bf){}}else{if(bc.nodeType===1&&bc.nodeName.toLowerCase()!=="object"){var ba=bc.getAttribute("id"),be=ba||"__sizzle__";ba||bc.setAttribute("id",be);try{return t(bc.querySelectorAll("#"+be+" "+a8),bb)}catch(bd){}finally{ba||bc.removeAttribute("id")}}}}return a6(a8,bc,bb,a9)};for(var a7 in a6){S[a7]=a6[a7]}a5=null}}();(function(){var a7=H.documentElement,a6=a7.matchesSelector||a7.mozMatchesSelector||a7.webkitMatchesSelector||a7.msMatchesSelector,a8=false;try{a6.call(H.documentElement,"[test!='']:sizzle")}catch(a5){a8=true}if(a6){S.matchesSelector=function(bb,ba){ba=ba.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!S.isXML(bb)){try{if(a8||!E.match.PSEUDO.test(ba)&&!/!=/.test(ba)){return a6.call(bb,ba)}}catch(a9){}}return S(ba,null,null,[bb]).length>0}}})();(function(){var a5=H.createElement("div");a5.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!a5.getElementsByClassName||a5.getElementsByClassName("e").length===0)){a5.lastChild.className="e";if(a5.getElementsByClassName("e").length!==1){E.order.splice(1,0,"CLASS");E.find.CLASS=function(a7,a8,a6){if(typeof a8.getElementsByClassName!=="undefined"&&!a6){return a8.getElementsByClassName(a7[1])}};a5=null}}})();S.contains=H.documentElement.contains?function(a6,a5){return a6!==a5&&(a6.contains?a6.contains(a5):true)}:H.documentElement.compareDocumentPosition?function(a6,a5){return !!(a6.compareDocumentPosition(a5)&16)}:function(){return false};S.isXML=function(a5){return(a5=(a5?a5.ownerDocument||a5:0).documentElement)?a5.nodeName!=="HTML":false};var X=function(a8,a7){for(var bb,a5=[],ba="",a9=a7.nodeType?[a7]:a7;bb=E.match.PSEUDO.exec(a8);){ba+=bb[0];a8=a8.replace(E.match.PSEUDO,"")}a8=E.relative[a8]?a8+"*":a8;bb=0;for(var a6=a9.length;bb<a6;bb++){S(a8,a9[bb],a5)}return S.filter(ba,a5)};Q.find=S;Q.expr=S.selectors;Q.expr[":"]=Q.expr.filters;Q.unique=S.uniqueSort;Q.text=S.getText;Q.isXMLDoc=S.isXML;Q.contains=S.contains})();var aT=/Until$/,az=/^(?:parents|prevUntil|prevAll)/,aG=/,/,aQ=/^.[^:#\[\.,]*$/,ao=Array.prototype.slice,I=Q.expr.match.POS;Q.fn.extend({find:function(B){for(var c=this.pushStack("","find",B),T=0,S=0,P=this.length;S<P;S++){T=c.length;Q.find(B,this[S],c);if(S>0){for(var E=T;E<c.length;E++){for(var t=0;t<T;t++){if(c[t]===c[E]){c.splice(E--,1);break}}}}}return c},has:function(t){var c=Q(t);return this.filter(function(){for(var E=0,B=c.length;E<B;E++){if(Q.contains(this,c[E])){return true}}})},not:function(c){return this.pushStack(aL(this,c,false),"not",c)},filter:function(c){return this.pushStack(aL(this,c,true),"filter",c)},is:function(c){return !!c&&Q.filter(c,this).length>0},closest:function(V,U){var T=[],S,P,E=this[0];if(Q.isArray(V)){var t,B={},c=1;if(E&&V.length){S=0;for(P=V.length;S<P;S++){t=V[S];B[t]||(B[t]=Q.expr.match.POS.test(t)?Q(t,U||this.context):t)}for(;E&&E.ownerDocument&&E!==U;){for(t in B){S=B[t];if(S.jquery?S.index(E)>-1:Q(E).is(S)){T.push({selector:t,elem:E,level:c})}}E=E.parentNode;c++}}return T}t=I.test(V)?Q(V,U||this.context):null;S=0;for(P=this.length;S<P;S++){for(E=this[S];E;){if(t?t.index(E)>-1:Q.find.matchesSelector(E,V)){T.push(E);break}else{E=E.parentNode;if(!E||!E.ownerDocument||E===U){break}}}}T=T.length>1?Q.unique(T):T;return this.pushStack(T,"closest",V)},index:function(c){if(!c||typeof c==="string"){return Q.inArray(this[0],c?Q(c):this.parent().children())}return Q.inArray(c.jquery?c[0]:c,this)},add:function(t,c){var E=typeof t==="string"?Q(t,c||this.context):Q.makeArray(t),B=Q.merge(this.get(),E);return this.pushStack(!E[0]||!E[0].parentNode||E[0].parentNode.nodeType===11||!B[0]||!B[0].parentNode||B[0].parentNode.nodeType===11?B:Q.unique(B))},andSelf:function(){return this.add(this.prevObject)}});Q.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return Q.dir(c,"parentNode")},parentsUntil:function(t,c,B){return Q.dir(t,"parentNode",B)},next:function(c){return Q.nth(c,2,"nextSibling")},prev:function(c){return Q.nth(c,2,"previousSibling")},nextAll:function(c){return Q.dir(c,"nextSibling")},prevAll:function(c){return Q.dir(c,"previousSibling")},nextUntil:function(t,c,B){return Q.dir(t,"nextSibling",B)},prevUntil:function(t,c,B){return Q.dir(t,"previousSibling",B)},siblings:function(c){return Q.sibling(c.parentNode.firstChild,c)},children:function(c){return Q.sibling(c.firstChild)},contents:function(c){return Q.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:Q.makeArray(c.childNodes)}},function(t,c){Q.fn[t]=function(P,E){var B=Q.map(this,c,P);aT.test(t)||(E=P);if(E&&typeof E==="string"){B=Q.filter(E,B)}B=this.length>1?Q.unique(B):B;if((this.length>1||aG.test(E))&&az.test(t)){B=B.reverse()}return this.pushStack(B,t,ao.call(arguments).join(","))}});Q.extend({filter:function(t,c,B){if(B){t=":not("+t+")"}return c.length===1?Q.find.matchesSelector(c[0],t)?[c[0]]:[]:Q.find.matches(t,c)},dir:function(t,c,E){var B=[];for(t=t[c];t&&t.nodeType!==9&&(E===aA||t.nodeType!==1||!Q(t).is(E));){t.nodeType===1&&B.push(t);t=t[c]}return B},nth:function(t,c,E){c=c||1;for(var B=0;t;t=t[E]){if(t.nodeType===1&&++B===c){break}}return t},sibling:function(t,c){for(var B=[];t;t=t.nextSibling){t.nodeType===1&&t!==c&&B.push(t)}return B}});var aE=/ jQuery\d+="(?:\d+|null)"/g,aN=/^\s+/,aW=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,aJ=/<([\w:]+)/,s=/<tbody/i,f=/<|&#?\w+;/,au=/<(?:script|object|embed|option|style)/i,M=/checked\s*(?:[^=]|=\s*.checked.)/i,aU=/\=([^="'>\s]+\/)>/g,ap={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,"",""]};ap.optgroup=ap.option;ap.tbody=ap.tfoot=ap.colgroup=ap.caption=ap.thead;ap.th=ap.td;if(!Q.support.htmlSerialize){ap._default=[1,"div<div>","</div>"]}Q.fn.extend({text:function(c){if(Q.isFunction(c)){return this.each(function(t){var B=Q(this);B.text(c.call(this,t,B.text()))})}if(typeof c!=="object"&&c!==aA){return this.empty().append((this[0]&&this[0].ownerDocument||H).createTextNode(c))}return Q.text(this)},wrapAll:function(t){if(Q.isFunction(t)){return this.each(function(B){Q(this).wrapAll(t.call(this,B))})}if(this[0]){var c=Q(t,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&c.insertBefore(this[0]);c.map(function(){for(var B=this;B.firstChild&&B.firstChild.nodeType===1;){B=B.firstChild}return B}).append(this)}return this},wrapInner:function(c){if(Q.isFunction(c)){return this.each(function(t){Q(this).wrapInner(c.call(this,t))})}return this.each(function(){var t=Q(this),B=t.contents();B.length?B.wrapAll(c):t.append(c)})},wrap:function(c){return this.each(function(){Q(this).wrapAll(c)})},unwrap:function(){return this.parent().each(function(){Q.nodeName(this,"body")||Q(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(t){this.parentNode.insertBefore(t,this)})}else{if(arguments.length){var c=Q(arguments[0]);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(t){this.parentNode.insertBefore(t,this.nextSibling)})}else{if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,Q(arguments[0]).toArray());return c}}},remove:function(t,c){for(var E=0,B;(B=this[E])!=null;E++){if(!t||Q.filter(t,[B]).length){if(!c&&B.nodeType===1){Q.cleanData(B.getElementsByTagName("*"));Q.cleanData([B])}B.parentNode&&B.parentNode.removeChild(B)}}return this},empty:function(){for(var t=0,c;(c=this[t])!=null;t++){for(c.nodeType===1&&Q.cleanData(c.getElementsByTagName("*"));c.firstChild;){c.removeChild(c.firstChild)}}return this},clone:function(t){var c=this.map(function(){if(!Q.support.noCloneEvent&&!Q.isXMLDoc(this)){var E=this.outerHTML,B=this.ownerDocument;if(!E){E=B.createElement("div");E.appendChild(this.cloneNode(true));E=E.innerHTML}return Q.clean([E.replace(aE,"").replace(aU,'="$1">').replace(aN,"")],B)[0]}else{return this.cloneNode(true)}});if(t===true){ax(this,c);ax(this.find("*"),c.find("*"))}return c},html:function(t){if(t===aA){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(aE,""):null}else{if(typeof t==="string"&&!au.test(t)&&(Q.support.leadingWhitespace||!aN.test(t))&&!ap[(aJ.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(aW,"<$1></$2>");try{for(var c=0,E=this.length;c<E;c++){if(this[c].nodeType===1){Q.cleanData(this[c].getElementsByTagName("*"));this[c].innerHTML=t}}}catch(B){this.empty().append(t)}}else{Q.isFunction(t)?this.each(function(S){var P=Q(this);P.html(t.call(this,S,P.html()))}):this.empty().append(t)}}return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(Q.isFunction(c)){return this.each(function(t){var E=Q(this),B=E.html();E.replaceWith(c.call(this,t,B))})}if(typeof c!=="string"){c=Q(c).detach()}return this.each(function(){var t=this.nextSibling,B=this.parentNode;Q(this).remove();t?Q(t).before(c):Q(B).append(c)})}else{return this.pushStack(Q(Q.isFunction(c)?c():c),"replaceWith",c)}},detach:function(c){return this.remove(c,true)},domManip:function(V,U,T){var S,P,E,t=V[0],B=[];if(!Q.support.checkClone&&arguments.length===3&&typeof t==="string"&&M.test(t)){return this.each(function(){Q(this).domManip(V,U,T,true)})}if(Q.isFunction(t)){return this.each(function(W){var X=Q(this);V[0]=t.call(this,W,U?X.html():aA);X.domManip(V,U,T)})}if(this[0]){S=t&&t.parentNode;S=Q.support.parentNode&&S&&S.nodeType===11&&S.childNodes.length===this.length?{fragment:S}:Q.buildFragment(V,this,B);E=S.fragment;if(P=E.childNodes.length===1?E=E.firstChild:E.firstChild){U=U&&Q.nodeName(P,"tr");P=0;for(var c=this.length;P<c;P++){T.call(U?Q.nodeName(this[P],"table")?this[P].getElementsByTagName("tbody")[0]||this[P].appendChild(this[P].ownerDocument.createElement("tbody")):this[P]:this[P],P>0||S.cacheable||this.length>1?E.cloneNode(true):E)}}B.length&&Q.each(B,aD)}return this}});Q.buildFragment=function(t,c,S){var P,E,B;c=c&&c[0]?c[0].ownerDocument||c[0]:H;if(t.length===1&&typeof t[0]==="string"&&t[0].length<512&&c===H&&!au.test(t[0])&&(Q.support.checkClone||!M.test(t[0]))){E=true;if(B=Q.fragments[t[0]]){if(B!==1){P=B}}}if(!P){P=c.createDocumentFragment();Q.clean(t,c,P,S)}if(E){Q.fragments[t[0]]=B?P:1}return{fragment:P,cacheable:E}};Q.fragments={};Q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,c){Q.fn[t]=function(T){var S=[];T=Q(T);var P=this.length===1&&this[0].parentNode;if(P&&P.nodeType===11&&P.childNodes.length===1&&T.length===1){T[c](this[0]);return this}else{P=0;for(var E=T.length;P<E;P++){var B=(P>0?this.clone(true):this).get();Q(T[P])[c](B);S=S.concat(B)}return this.pushStack(S,t,T.selector)}}});Q.extend({clean:function(X,V,U,T){V=V||H;if(typeof V.createElement==="undefined"){V=V.ownerDocument||V[0]&&V[0].ownerDocument||H}for(var S=[],P=0,B;(B=X[P])!=null;P++){if(typeof B==="number"){B+=""}if(B){if(typeof B==="string"&&!f.test(B)){B=V.createTextNode(B)}else{if(typeof B==="string"){B=B.replace(aW,"<$1></$2>");var E=(aJ.exec(B)||["",""])[1].toLowerCase(),t=ap[E]||ap._default,W=t[0],c=V.createElement("div");for(c.innerHTML=t[1]+B+t[2];W--;){c=c.lastChild}if(!Q.support.tbody){W=s.test(B);E=E==="table"&&!W?c.firstChild&&c.firstChild.childNodes:t[1]==="<table>"&&!W?c.childNodes:[];for(t=E.length-1;t>=0;--t){Q.nodeName(E[t],"tbody")&&!E[t].childNodes.length&&E[t].parentNode.removeChild(E[t])}}!Q.support.leadingWhitespace&&aN.test(B)&&c.insertBefore(V.createTextNode(aN.exec(B)[0]),c.firstChild);B=c.childNodes}}if(B.nodeType){S.push(B)}else{S=Q.merge(S,B)}}}if(U){for(P=0;S[P];P++){if(T&&Q.nodeName(S[P],"script")&&(!S[P].type||S[P].type.toLowerCase()==="text/javascript")){T.push(S[P].parentNode?S[P].parentNode.removeChild(S[P]):S[P])}else{S[P].nodeType===1&&S.splice.apply(S,[P+1,0].concat(Q.makeArray(S[P].getElementsByTagName("script"))));U.appendChild(S[P])}}}return S},cleanData:function(V){for(var U,T,S=Q.cache,P=Q.event.special,E=Q.support.deleteExpando,t=0,B;(B=V[t])!=null;t++){if(!(B.nodeName&&Q.noData[B.nodeName.toLowerCase()])){if(T=B[Q.expando]){if((U=S[T])&&U.events){for(var c in U.events){P[c]?Q.event.remove(B,c):Q.removeEvent(B,c,U.handle)}}if(E){delete B[Q.expando]}else{B.removeAttribute&&B.removeAttribute(Q.expando)}delete S[T]}}}}});var x=/alpha\([^)]*\)/i,aI=/opacity=([^)]*)/,ar=/-([a-z])/ig,K=/([A-Z])/g,k=/^-?\d+(?:px)?$/i,v=/^-?\d/,h={position:"absolute",visibility:"hidden",display:"block"},ae=["Left","Right"],F=["Top","Bottom"],aj,aZ,aH,aX=function(t,c){return c.toUpperCase()};Q.fn.css=function(t,c){if(arguments.length===2&&c===aA){return this}return Q.access(this,t,c,true,function(P,E,B){return B!==aA?Q.style(P,E,B):Q.css(P,E)})};Q.extend({cssHooks:{opacity:{get:function(t,c){if(c){var B=aj(t,"opacity","opacity");return B===""?"1":B}else{return t.style.opacity}}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":Q.support.cssFloat?"cssFloat":"styleFloat"},style:function(V,U,T,S){if(!(!V||V.nodeType===3||V.nodeType===8||!V.style)){var P,E=Q.camelCase(U),t=V.style,B=Q.cssHooks[E];U=Q.cssProps[E]||E;if(T!==aA){if(!(typeof T==="number"&&isNaN(T)||T==null)){if(typeof T==="number"&&!Q.cssNumber[E]){T+="px"}if(!B||!("set" in B)||(T=B.set(V,T))!==aA){try{t[U]=T}catch(c){}}}}else{if(B&&"get" in B&&(P=B.get(V,false,S))!==aA){return P}return t[U]}}},css:function(t,c,S){var P,E=Q.camelCase(c),B=Q.cssHooks[E];c=Q.cssProps[E]||E;if(B&&"get" in B&&(P=B.get(t,true,S))!==aA){return P}else{if(aj){return aj(t,c,E)}}},swap:function(t,c,P){var E={},B;for(B in c){E[B]=t.style[B];t.style[B]=c[B]}P.call(t);for(B in c){t.style[B]=E[B]}},camelCase:function(c){return c.replace(ar,aX)}});Q.curCSS=Q.css;Q.each(["height","width"],function(t,c){Q.cssHooks[c]={get:function(S,P,E){var B;if(P){if(S.offsetWidth!==0){B=O(S,c,E)}else{Q.swap(S,h,function(){B=O(S,c,E)})}if(B<=0){B=aj(S,c,c);if(B==="0px"&&aH){B=aH(S,c,c)}if(B!=null){return B===""||B==="auto"?"0px":B}}if(B<0||B==null){B=S.style[c];return B===""||B==="auto"?"0px":B}return typeof B==="string"?B:B+"px"}},set:function(E,B){if(k.test(B)){B=parseFloat(B);if(B>=0){return B+"px"}}else{return B}}}});if(!Q.support.opacity){Q.cssHooks.opacity={get:function(t,c){return aI.test((c&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100+"":c?"1":""},set:function(t,c){var P=t.style;P.zoom=1;var E=Q.isNaN(c)?"":"alpha(opacity="+c*100+")",B=P.filter||"";P.filter=x.test(B)?B.replace(x,E):P.filter+" "+E}}}if(H.defaultView&&H.defaultView.getComputedStyle){aZ=function(t,c,E){var B;E=E.replace(K,"-$1").toLowerCase();if(!(c=t.ownerDocument.defaultView)){return aA}if(c=c.getComputedStyle(t,null)){B=c.getPropertyValue(E);if(B===""&&!Q.contains(t.ownerDocument.documentElement,t)){B=Q.style(t,E)}}return B}}if(H.documentElement.currentStyle){aH=function(t,c){var S,P,E=t.currentStyle&&t.currentStyle[c],B=t.style;if(!k.test(E)&&v.test(E)){S=B.left;P=t.runtimeStyle.left;t.runtimeStyle.left=t.currentStyle.left;B.left=c==="fontSize"?"1em":E||0;E=B.pixelLeft+"px";B.left=S;t.runtimeStyle.left=P}return E===""?"auto":E}}aj=aZ||aH;if(Q.expr&&Q.expr.filters){Q.expr.filters.hidden=function(t){var c=t.offsetHeight;return t.offsetWidth===0&&c===0||!Q.support.reliableHiddenOffsets&&(t.style.display||Q.css(t,"display"))==="none"};Q.expr.filters.visible=function(c){return !Q.expr.filters.hidden(c)}}var aK=Q.now(),av=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,N=/^(?:select|textarea)/i,y=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,l=/^(?:GET|HEAD)$/,q=/\[\]$/,am=/\=\?(&|$)/,w=/\?/,a0=/([?&])_=[^&]*/,aO=/^(\w+:)?\/\/([^\/?#]+)/,aB=/%20/g,ac=/#.*$/,aM=Q.fn.load;Q.fn.extend({load:function(t,c,S){if(typeof t!=="string"&&aM){return aM.apply(this,arguments)}else{if(!this.length){return this}}var P=t.indexOf(" ");if(P>=0){var E=t.slice(P,t.length);t=t.slice(0,P)}P="GET";if(c){if(Q.isFunction(c)){S=c;c=null}else{if(typeof c==="object"){c=Q.param(c,Q.ajaxSettings.traditional);P="POST"}}}var B=this;Q.ajax({url:t,type:P,dataType:"html",data:c,complete:function(T,U){if(U==="success"||U==="notmodified"){B.html(E?Q("<div>").append(T.responseText.replace(av,"")).find(E):T.responseText)}S&&B.each(S,[T.responseText,U,T])}});return this},serialize:function(){return Q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||N.test(this.nodeName)||y.test(this.type))}).map(function(t,c){var B=Q(this).val();return B==null?null:Q.isArray(B)?Q.map(B,function(E){return{name:c.name,value:E}}):{name:c.name,value:B}}).get()}});Q.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(t,c){Q.fn[c]=function(B){return this.bind(c,B)}});Q.extend({get:function(t,c,E,B){if(Q.isFunction(c)){B=B||E;E=c;c=null}return Q.ajax({type:"GET",url:t,data:c,success:E,dataType:B})},getScript:function(t,c){return Q.get(t,null,c,"script")},getJSON:function(t,c,B){return Q.get(t,c,B,"json")},post:function(t,c,E,B){if(Q.isFunction(c)){B=B||E;E=c;c={}}return Q.ajax({type:"POST",url:t,data:c,success:E,dataType:B})},ajaxSetup:function(c){Q.extend(Q.ajaxSettings,c)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new aw.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a7){var a6=Q.extend(true,{},Q.ajaxSettings,a7),a5,a4,a3,aa=a6.type.toUpperCase(),X=l.test(aa);a6.url=a6.url.replace(ac,"");a6.context=a7&&a7.context!=null?a7.context:a6;if(a6.data&&a6.processData&&typeof a6.data!=="string"){a6.data=Q.param(a6.data,a6.traditional)}if(a6.dataType==="jsonp"){if(aa==="GET"){am.test(a6.url)||(a6.url+=(w.test(a6.url)?"&":"?")+(a6.jsonp||"callback")+"=?")}else{if(!a6.data||!am.test(a6.data)){a6.data=(a6.data?a6.data+"&":"")+(a6.jsonp||"callback")+"=?"}}a6.dataType="json"}if(a6.dataType==="json"&&(a6.data&&am.test(a6.data)||am.test(a6.url))){a5=a6.jsonpCallback||"jsonp"+aK++;if(a6.data){a6.data=(a6.data+"").replace(am,"="+a5+"$1")}a6.url=a6.url.replace(am,"="+a5+"$1");a6.dataType="script";var Y=aw[a5];aw[a5]=function(a8){if(Q.isFunction(Y)){Y(a8)}else{aw[a5]=aA;try{delete aw[a5]}catch(a9){}}a3=a8;Q.handleSuccess(a6,P,a4,a3);Q.handleComplete(a6,P,a4,a3);T&&T.removeChild(U)}}if(a6.dataType==="script"&&a6.cache===null){a6.cache=false}if(a6.cache===false&&X){var V=Q.now(),E=a6.url.replace(a0,"$1_="+V);a6.url=E+(E===a6.url?(w.test(a6.url)?"&":"?")+"_="+V:"")}if(a6.data&&X){a6.url+=(w.test(a6.url)?"&":"?")+a6.data}a6.global&&Q.active++===0&&Q.event.trigger("ajaxStart");V=(V=aO.exec(a6.url))&&(V[1]&&V[1].toLowerCase()!==location.protocol||V[2].toLowerCase()!==location.host);if(a6.dataType==="script"&&aa==="GET"&&V){var T=H.getElementsByTagName("head")[0]||H.documentElement,U=H.createElement("script");if(a6.scriptCharset){U.charset=a6.scriptCharset}U.src=a6.url;if(!a5){var S=false;U.onload=U.onreadystatechange=function(){if(!S&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){S=true;Q.handleSuccess(a6,P,a4,a3);Q.handleComplete(a6,P,a4,a3);U.onload=U.onreadystatechange=null;T&&U.parentNode&&T.removeChild(U)}}}T.insertBefore(U,T.firstChild);return aA}var t=false,P=a6.xhr();if(P){a6.username?P.open(aa,a6.url,a6.async,a6.username,a6.password):P.open(aa,a6.url,a6.async);try{if(a6.data!=null&&!X||a7&&a7.contentType){P.setRequestHeader("Content-Type",a6.contentType)}if(a6.ifModified){Q.lastModified[a6.url]&&P.setRequestHeader("If-Modified-Since",Q.lastModified[a6.url]);Q.etag[a6.url]&&P.setRequestHeader("If-None-Match",Q.etag[a6.url])}V||P.setRequestHeader("X-Requested-With","XMLHttpRequest");P.setRequestHeader("Accept",a6.dataType&&a6.accepts[a6.dataType]?a6.accepts[a6.dataType]+", */*; q=0.01":a6.accepts._default)}catch(B){}if(a6.beforeSend&&a6.beforeSend.call(a6.context,P,a6)===false){a6.global&&Q.active--===1&&Q.event.trigger("ajaxStop");P.abort();return false}a6.global&&Q.triggerGlobal(a6,"ajaxSend",[P,a6]);var c=P.onreadystatechange=function(a8){if(!P||P.readyState===0||a8==="abort"){t||Q.handleComplete(a6,P,a4,a3);t=true;if(P){P.onreadystatechange=Q.noop}}else{if(!t&&P&&(P.readyState===4||a8==="timeout")){t=true;P.onreadystatechange=Q.noop;a4=a8==="timeout"?"timeout":!Q.httpSuccess(P)?"error":a6.ifModified&&Q.httpNotModified(P,a6.url)?"notmodified":"success";var ba;if(a4==="success"){try{a3=Q.httpData(P,a6.dataType,a6)}catch(a9){a4="parsererror";ba=a9}}if(a4==="success"||a4==="notmodified"){a5||Q.handleSuccess(a6,P,a4,a3)}else{Q.handleError(a6,P,a4,ba)}a5||Q.handleComplete(a6,P,a4,a3);a8==="timeout"&&P.abort();if(a6.async){P=null}}}};try{var ab=P.abort;P.abort=function(){P&&Function.prototype.call.call(ab,P);c("abort")}}catch(Z){}a6.async&&a6.timeout>0&&setTimeout(function(){P&&!t&&c("timeout")},a6.timeout);try{P.send(X||a6.data==null?null:a6.data)}catch(W){Q.handleError(a6,P,null,W);Q.handleComplete(a6,P,a4,a3)}a6.async||c();return P}},param:function(t,c){var P=[],E=function(T,S){S=Q.isFunction(S)?S():S;P[P.length]=encodeURIComponent(T)+"="+encodeURIComponent(S)};if(c===aA){c=Q.ajaxSettings.traditional}if(Q.isArray(t)||t.jquery){Q.each(t,function(){E(this.name,this.value)})}else{for(var B in t){u(B,t[B],c,E)}}return P.join("&").replace(aB,"+")}});Q.extend({active:0,lastModified:{},etag:{},handleError:function(t,c,E,B){t.error&&t.error.call(t.context,c,E,B);t.global&&Q.triggerGlobal(t,"ajaxError",[c,t,B])},handleSuccess:function(t,c,E,B){t.success&&t.success.call(t.context,B,E,c);t.global&&Q.triggerGlobal(t,"ajaxSuccess",[c,t])},handleComplete:function(t,c,B){t.complete&&t.complete.call(t.context,c,B);t.global&&Q.triggerGlobal(t,"ajaxComplete",[c,t]);t.global&&Q.active--===1&&Q.event.trigger("ajaxStop")},triggerGlobal:function(t,c,B){(t.context&&t.context.url==null?Q(t.context):Q.event).trigger(c,B)},httpSuccess:function(t){try{return !t.status&&location.protocol==="file:"||t.status>=200&&t.status<300||t.status===304||t.status===1223}catch(c){}return false},httpNotModified:function(t,c){var E=t.getResponseHeader("Last-Modified"),B=t.getResponseHeader("Etag");if(E){Q.lastModified[c]=E}if(B){Q.etag[c]=B}return t.status===304},httpData:function(t,c,P){var E=t.getResponseHeader("content-type")||"",B=c==="xml"||!c&&E.indexOf("xml")>=0;t=B?t.responseXML:t.responseText;B&&t.documentElement.nodeName==="parsererror"&&Q.error("parsererror");if(P&&P.dataFilter){t=P.dataFilter(t,c)}if(typeof t==="string"){if(c==="json"||!c&&E.indexOf("json")>=0){t=Q.parseJSON(t)}else{if(c==="script"||!c&&E.indexOf("javascript")>=0){Q.globalEval(t)}}}return t}});if(aw.ActiveXObject){Q.ajaxSettings.xhr=function(){if(aw.location.protocol!=="file:"){try{return new aw.XMLHttpRequest}catch(t){}}try{return new aw.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}Q.support.ajax=!!Q.ajaxSettings.xhr();var g={},C=/^(?:toggle|show|hide)$/,o=/^([+\-]=)?([\d+.\-]+)(.*)$/,aq,z=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];Q.fn.extend({show:function(t,c,E){if(t||t===0){return this.animate(an("show",3),t,c,E)}else{E=0;for(var B=this.length;E<B;E++){t=this[E];c=t.style.display;if(!Q.data(t,"olddisplay")&&c==="none"){c=t.style.display=""}c===""&&Q.css(t,"display")==="none"&&Q.data(t,"olddisplay",m(t.nodeName))}for(E=0;E<B;E++){t=this[E];c=t.style.display;if(c===""||c==="none"){t.style.display=Q.data(t,"olddisplay")||""}}return this}},hide:function(t,c,B){if(t||t===0){return this.animate(an("hide",3),t,c,B)}else{t=0;for(c=this.length;t<c;t++){B=Q.css(this[t],"display");B!=="none"&&Q.data(this[t],"olddisplay",B)}for(t=0;t<c;t++){this[t].style.display="none"}return this}},_toggle:Q.fn.toggle,toggle:function(t,c,E){var B=typeof t==="boolean";if(Q.isFunction(t)&&Q.isFunction(c)){this._toggle.apply(this,arguments)}else{t==null||B?this.each(function(){var P=B?t:Q(this).is(":hidden");Q(this)[P?"show":"hide"]()}):this.animate(an("toggle",3),t,c,E)}return this},fadeTo:function(t,c,E,B){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:c},t,E,B)},animate:function(t,c,P,E){var B=Q.speed(c,P,E);if(Q.isEmptyObject(t)){return this.each(B.complete)}return this[B.queue===false?"each":"queue"](function(){var V=Q.extend({},B),T,U=this.nodeType===1,X=U&&Q(this).is(":hidden"),S=this;for(T in t){var W=Q.camelCase(T);if(T!==W){t[W]=t[T];delete t[T];T=W}if(t[T]==="hide"&&X||t[T]==="show"&&!X){return V.complete.call(this)}if(U&&(T==="height"||T==="width")){V.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(Q.css(this,"display")==="inline"&&Q.css(this,"float")==="none"){if(Q.support.inlineBlockNeedsLayout){if(m(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.display="inline";this.style.zoom=1}}else{this.style.display="inline-block"}}}if(Q.isArray(t[T])){(V.specialEasing=V.specialEasing||{})[T]=t[T][1];t[T]=t[T][0]}}if(V.overflow!=null){this.style.overflow="hidden"}V.curAnim=Q.extend({},t);Q.each(t,function(Z,a5){var ab=new Q.fx(S,V,Z);if(C.test(a5)){ab[a5==="toggle"?X?"show":"hide":a5](t)}else{var aa=o.exec(a5),a3=ab.cur()||0;if(aa){var Y=parseFloat(aa[2]),a4=aa[3]||"px";if(a4!=="px"){Q.style(S,Z,(Y||1)+a4);a3=(Y||1)/ab.cur()*a3;Q.style(S,Z,a3+a4)}if(aa[1]){Y=(aa[1]==="-="?-1:1)*Y+a3}ab.custom(a3,Y,a4)}else{ab.custom(a3,a5,"")}}});return true})},stop:function(t,c){var B=Q.timers;t&&this.queue([]);this.each(function(){for(var E=B.length-1;E>=0;E--){if(B[E].elem===this){c&&B[E](true);B.splice(E,1)}}});c||this.dequeue();return this}});Q.each({slideDown:an("show",1),slideUp:an("hide",1),slideToggle:an("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,c){Q.fn[t]=function(P,E,B){return this.animate(c,P,E,B)}});Q.extend({speed:function(t,c,E){var B=t&&typeof t==="object"?Q.extend({},t):{complete:E||!E&&c||Q.isFunction(t)&&t,duration:t,easing:E&&c||c&&!Q.isFunction(c)&&c};B.duration=Q.fx.off?0:typeof B.duration==="number"?B.duration:B.duration in Q.fx.speeds?Q.fx.speeds[B.duration]:Q.fx.speeds._default;B.old=B.complete;B.complete=function(){B.queue!==false&&Q(this).dequeue();Q.isFunction(B.old)&&B.old.call(this)};return B},easing:{linear:function(t,c,E,B){return E+B*t},swing:function(t,c,E,B){return(-Math.cos(t*Math.PI)/2+0.5)*B+E}},timers:[],fx:function(t,c,B){this.options=c;this.elem=t;this.prop=B;if(!c.orig){c.orig={}}}});Q.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(Q.fx.step[this.prop]||Q.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 c=parseFloat(Q.css(this.elem,this.prop));return c&&c>-10000?c:0},custom:function(t,c,S){function P(T){return E.step(T)}var E=this,B=Q.fx;this.startTime=Q.now();this.start=t;this.end=c;this.unit=S||this.unit||"px";this.now=this.start;this.pos=this.state=0;P.elem=this.elem;if(P()&&Q.timers.push(P)&&!aq){aq=setInterval(B.tick,B.interval)}},show:function(){this.options.orig[this.prop]=Q.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());Q(this.elem).show()},hide:function(){this.options.orig[this.prop]=Q.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(B){var c=Q.now(),T=true;if(B||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var S in this.options.curAnim){if(this.options.curAnim[S]!==true){T=false}}if(T){if(this.options.overflow!=null&&!Q.support.shrinkWrapBlocks){var P=this.elem,E=this.options;Q.each(["","X","Y"],function(U,V){P.style["overflow"+V]=E.overflow[U]})}this.options.hide&&Q(this.elem).hide();if(this.options.hide||this.options.show){for(var t in this.options.curAnim){Q.style(this.elem,t,this.options.orig[t])}}this.options.complete.call(this.elem)}return false}else{B=c-this.startTime;this.state=B/this.options.duration;c=this.options.easing||(Q.easing.swing?"swing":"linear");this.pos=Q.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||c](this.state,B,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};Q.extend(Q.fx,{tick:function(){for(var t=Q.timers,c=0;c<t.length;c++){t[c]()||t.splice(c--,1)}t.length||Q.fx.stop()},interval:13,stop:function(){clearInterval(aq);aq=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){Q.style(c.elem,"opacity",c.now)},_default:function(c){if(c.elem.style&&c.elem.style[c.prop]!=null){c.elem.style[c.prop]=(c.prop==="width"||c.prop==="height"?Math.max(0,c.now):c.now)+c.unit}else{c.elem[c.prop]=c.now}}}});if(Q.expr&&Q.expr.filters){Q.expr.filters.animated=function(c){return Q.grep(Q.timers,function(t){return c===t.elem}).length}}var a=/^t(?:able|d|h)$/i,ay=/^(?:body|html)$/i;Q.fn.offset="getBoundingClientRect" in H.documentElement?function(t){var c=this[0],S;if(t){return this.each(function(T){Q.offset.setOffset(this,t,T)})}if(!c||!c.ownerDocument){return null}if(c===c.ownerDocument.body){return Q.offset.bodyOffset(c)}try{S=c.getBoundingClientRect()}catch(P){}var E=c.ownerDocument,B=E.documentElement;if(!S||!Q.contains(B,c)){return S||{top:0,left:0}}c=E.body;E=aV(E);return{top:S.top+(E.pageYOffset||Q.support.boxModel&&B.scrollTop||c.scrollTop)-(B.clientTop||c.clientTop||0),left:S.left+(E.pageXOffset||Q.support.boxModel&&B.scrollLeft||c.scrollLeft)-(B.clientLeft||c.clientLeft||0)}}:function(V){var U=this[0];if(V){return this.each(function(W){Q.offset.setOffset(this,V,W)})}if(!U||!U.ownerDocument){return null}if(U===U.ownerDocument.body){return Q.offset.bodyOffset(U)}Q.offset.initialize();var T,S=U.offsetParent,P=U.ownerDocument,E=P.documentElement,t=P.body;T=(P=P.defaultView)?P.getComputedStyle(U,null):U.currentStyle;for(var B=U.offsetTop,c=U.offsetLeft;(U=U.parentNode)&&U!==t&&U!==E;){if(Q.offset.supportsFixedPosition&&T.position==="fixed"){break}T=P?P.getComputedStyle(U,null):U.currentStyle;B-=U.scrollTop;c-=U.scrollLeft;if(U===S){B+=U.offsetTop;c+=U.offsetLeft;if(Q.offset.doesNotAddBorder&&!(Q.offset.doesAddBorderForTableAndCells&&a.test(U.nodeName))){B+=parseFloat(T.borderTopWidth)||0;c+=parseFloat(T.borderLeftWidth)||0}S=U.offsetParent}if(Q.offset.subtractsBorderForOverflowNotVisible&&T.overflow!=="visible"){B+=parseFloat(T.borderTopWidth)||0;c+=parseFloat(T.borderLeftWidth)||0}T=T}if(T.position==="relative"||T.position==="static"){B+=t.offsetTop;c+=t.offsetLeft}if(Q.offset.supportsFixedPosition&&T.position==="fixed"){B+=Math.max(E.scrollTop,t.scrollTop);c+=Math.max(E.scrollLeft,t.scrollLeft)}return{top:B,left:c}};Q.offset={initialize:function(){var t=H.body,c=H.createElement("div"),S,P,E,B=parseFloat(Q.css(t,"marginTop"))||0;Q.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});c.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";t.insertBefore(c,t.firstChild);S=c.firstChild;P=S.firstChild;E=S.nextSibling.firstChild.firstChild;this.doesNotAddBorder=P.offsetTop!==5;this.doesAddBorderForTableAndCells=E.offsetTop===5;P.style.position="fixed";P.style.top="20px";this.supportsFixedPosition=P.offsetTop===20||P.offsetTop===15;P.style.position=P.style.top="";S.style.overflow="hidden";S.style.position="relative";this.subtractsBorderForOverflowNotVisible=P.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=t.offsetTop!==B;t.removeChild(c);Q.offset.initialize=Q.noop},bodyOffset:function(t){var c=t.offsetTop,B=t.offsetLeft;Q.offset.initialize();if(Q.offset.doesNotIncludeMarginInBodyOffset){c+=parseFloat(Q.css(t,"marginTop"))||0;B+=parseFloat(Q.css(t,"marginLeft"))||0}return{top:c,left:B}},setOffset:function(W,U,T){var S=Q.css(W,"position");if(S==="static"){W.style.position="relative"}var P=Q(W),E=P.offset(),t=Q.css(W,"top"),B=Q.css(W,"left"),c=S==="absolute"&&Q.inArray("auto",[t,B])>-1;S={};var V={};if(c){V=P.position()}t=c?V.top:parseInt(t,10)||0;B=c?V.left:parseInt(B,10)||0;if(Q.isFunction(U)){U=U.call(W,T,E)}if(U.top!=null){S.top=U.top-E.top+t}if(U.left!=null){S.left=U.left-E.left+B}"using" in U?U.using.call(W,S):P.css(S)}};Q.fn.extend({position:function(){if(!this[0]){return null}var t=this[0],c=this.offsetParent(),E=this.offset(),B=ay.test(c[0].nodeName)?{top:0,left:0}:c.offset();E.top-=parseFloat(Q.css(t,"marginTop"))||0;E.left-=parseFloat(Q.css(t,"marginLeft"))||0;B.top+=parseFloat(Q.css(c[0],"borderTopWidth"))||0;B.left+=parseFloat(Q.css(c[0],"borderLeftWidth"))||0;return{top:E.top-B.top,left:E.left-B.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||H.body;c&&!ay.test(c.nodeName)&&Q.css(c,"position")==="static";){c=c.offsetParent}return c})}});Q.each(["Left","Top"],function(t,c){var B="scroll"+c;Q.fn[B]=function(S){var P=this[0],E;if(!P){return null}if(S!==aA){return this.each(function(){if(E=aV(this)){E.scrollTo(!t?S:Q(E).scrollLeft(),t?S:Q(E).scrollTop())}else{this[B]=S}})}else{return(E=aV(P))?"pageXOffset" in E?E[t?"pageYOffset":"pageXOffset"]:Q.support.boxModel&&E.document.documentElement[B]||E.document.body[B]:P[B]}}});Q.each(["Height","Width"],function(t,c){var B=c.toLowerCase();Q.fn["inner"+c]=function(){return this[0]?parseFloat(Q.css(this[0],B,"padding")):null};Q.fn["outer"+c]=function(E){return this[0]?parseFloat(Q.css(this[0],B,E?"margin":"border")):null};Q.fn[B]=function(S){var P=this[0];if(!P){return S==null?null:this}if(Q.isFunction(S)){return this.each(function(T){var U=Q(this);U[B](S.call(this,T,U[B]()))})}if(Q.isWindow(P)){return P.document.compatMode==="CSS1Compat"&&P.document.documentElement["client"+c]||P.document.body["client"+c]}else{if(P.nodeType===9){return Math.max(P.documentElement["client"+c],P.body["scroll"+c],P.documentElement["scroll"+c],P.body["offset"+c],P.documentElement["offset"+c])}else{if(S===aA){P=Q.css(P,B);var E=parseFloat(P);return Q.isNaN(E)?P:E}else{return this.css(B,typeof S==="string"?S:S+"px")}}}}})})(window);(function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(e){return e};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(m,g){var c={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var b=a(m).attr("autocomplete","off").addClass(g.inputClass);var k;var q="";var n=a.Autocompleter.Cache(g);var e=0;var v;var y={mouseDownOnSelect:false};var s=a.Autocompleter.Select(g,m,d,y);var x;a.browser.opera&&a(m.form).bind("submit.autocomplete",function(){if(x){x=false;return false}});b.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(z){e=1;v=z.keyCode;switch(z.keyCode){case c.UP:z.preventDefault();if(s.visible()){s.prev()}else{u(0,true)}break;case c.DOWN:z.preventDefault();if(s.visible()){s.next()}else{u(0,true)}break;case c.PAGEUP:z.preventDefault();if(s.visible()){s.pageUp()}else{u(0,true)}break;case c.PAGEDOWN:z.preventDefault();if(s.visible()){s.pageDown()}else{u(0,true)}break;case g.multiple&&a.trim(g.multipleSeparator)==","&&c.COMMA:case c.TAB:case c.RETURN:if(d()){z.preventDefault();x=true;return false}break;case c.ESC:s.hide();break;default:clearTimeout(k);k=setTimeout(u,g.delay);break}}).focus(function(){e++}).blur(function(){e=0;if(!y.mouseDownOnSelect){t()}}).click(function(){if(e++>1&&!s.visible()){u(0,true)}}).bind("search",function(){var z=(arguments.length>1)?arguments[1]:null;function A(E,D){var B;if(D&&D.length){for(var C=0;C<D.length;C++){if(D[C].result.toLowerCase()==E.toLowerCase()){B=D[C];break}}}if(typeof z=="function"){z(B)}else{b.trigger("result",B&&[B.data,B.value])}}a.each(h(b.val()),function(B,C){f(C,A,A)})}).bind("flushCache",function(){n.flush()}).bind("setOptions",function(){a.extend(g,arguments[1]);if("data" in arguments[1]){n.populate()}}).bind("unautocomplete",function(){s.unbind();b.unbind();a(m.form).unbind(".autocomplete")});function d(){var C=s.selected();if(!C){return false}var z=C.result;q=z;if(g.multiple){var F=h(b.val());if(F.length>1){var B=g.multipleSeparator.length;var E=a(m).selection().start;var D,A=0;a.each(F,function(G,H){A+=H.length;if(E<=A){D=G;return false}A+=B});F[D]=z;z=F.join(g.multipleSeparator)}z+=g.multipleSeparator}b.val(z);w();b.trigger("result",[C.data,C.value]);return true}function u(B,A){if(v==c.DEL){s.hide();return}var z=b.val();if(!A&&z==q){return}q=z;z=j(z);if(z.length>=g.minChars){b.addClass(g.loadingClass);if(!g.matchCase){z=z.toLowerCase()}f(z,l,w)}else{o();s.hide()}}function h(z){if(!z){return[""]}if(!g.multiple){return[a.trim(z)]}return a.map(z.split(g.multipleSeparator),function(A){return a.trim(z).length?a.trim(A):null})}function j(z){if(!g.multiple){return z}var B=h(z);if(B.length==1){return B[0]}var A=a(m).selection().start;if(A==z.length){B=h(z)}else{B=h(z.replace(z.substring(A),""))}return B[B.length-1]}function r(z,A){if(g.autoFill&&(j(b.val()).toLowerCase()==z.toLowerCase())&&v!=c.BACKSPACE){b.val(b.val()+A.substring(j(q).length));a(m).selection(q.length,q.length+A.length)}}function t(){clearTimeout(k);k=setTimeout(w,200)}function w(){var z=s.visible();s.hide();clearTimeout(k);o();if(g.mustMatch){b.search(function(A){if(!A){if(g.multiple){var B=h(b.val()).slice(0,-1);b.val(B.join(g.multipleSeparator)+(B.length?g.multipleSeparator:""))}else{b.val("");b.trigger("result",null)}}})}}function l(A,z){if(z&&z.length&&e){o();s.display(z,A);r(A,z[0].value);s.show()}else{w()}}function f(A,C,z){if(!g.matchCase){A=A.toLowerCase()}var B=n.load(A);if(B&&B.length){C(A,B)}else{if((typeof g.url=="string")&&(g.url.length>0)){var D={timestamp:+new Date()};a.each(g.extraParams,function(E,F){D[E]=typeof F=="function"?F():F});a.ajax({mode:"abort",port:"autocomplete"+m.name,dataType:g.dataType,url:g.url,data:a.extend({q:j(A),limit:g.max},D),success:function(F){var E=g.parse&&g.parse(F)||p(F);n.add(A,E);C(A,E)}})}else{s.emptyList();z(A)}}}function p(C){var z=[];var B=C.split("\n");for(var A=0;A<B.length;A++){var D=a.trim(B[A]);if(D){D=D.split("|");z[z.length]={data:D,value:D[0],result:g.formatResult&&g.formatResult(D,D[0])||D[0]}}}return z}function o(){b.removeClass(g.loadingClass)}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){var f={};var d=0;function h(l,k){if(!c.matchCase){l=l.toLowerCase()}var j=l.indexOf(k);if(c.matchContains=="word"){j=l.toLowerCase().search("\\b"+k.toLowerCase())}if(j==-1){return false}return j==0||c.matchContains}function g(k,j){if(d>c.cacheLength){b()}if(!f[k]){d++}f[k]=j}function e(){if(!c.data){return false}var k={},j=0;if(!c.url){c.cacheLength=1}k[""]=[];for(var m=0,l=c.data.length;m<l;m++){var p=c.data[m];p=(typeof p=="string")?[p]:p;var o=c.formatMatch(p,m+1,c.data.length);if(o===false){continue}var n=o.charAt(0).toLowerCase();if(!k[n]){k[n]=[]}var q={value:o,data:p,result:c.formatResult&&c.formatResult(p)||o};k[n].push(q);if(j++<c.max){k[""].push(q)}}a.each(k,function(r,s){c.cacheLength++;g(r,s)})}setTimeout(e,25);function b(){f={};d=0}return{flush:b,add:g,populate:e,load:function(n){if(!c.cacheLength||!d){return null}if(!c.url&&c.matchContains){var m=[];for(var j in f){if(j.length>0){var o=f[j];a.each(o,function(p,k){if(h(k.value,n)){m.push(k)}})}}return m}else{if(f[n]){return f[n]}else{if(c.matchSubset){for(var l=n.length-1;l>=c.minChars;l--){var o=f[n.substr(0,l)];if(o){var m=[];a.each(o,function(p,k){if(h(k.value,n)){m[m.length]=k}});return m}}}}}return null}}};a.Autocompleter.Select=function(e,k,m,q){var j={ACTIVE:"ac_over"};var l,f=-1,s,n="",t=true,c,p;function o(){if(!t){return}c=a("<div/>").hide().addClass(e.resultsClass).css("position","absolute").appendTo(document.body);p=a("<ul/>").appendTo(c).mouseover(function(u){if(r(u).nodeName&&r(u).nodeName.toUpperCase()=="LI"){f=a("li",p).removeClass(j.ACTIVE).index(r(u));a(r(u)).addClass(j.ACTIVE)}}).click(function(u){a(r(u)).addClass(j.ACTIVE);m();k.focus();return false}).mousedown(function(){q.mouseDownOnSelect=true}).mouseup(function(){q.mouseDownOnSelect=false});if(e.width>0){c.css("width",e.width)}t=false}function r(v){var u=v.target;while(u&&u.tagName!="LI"){u=u.parentNode}if(!u){return[]}return u}function h(u){l.slice(f,f+1).removeClass(j.ACTIVE);g(u);var w=l.slice(f,f+1).addClass(j.ACTIVE);if(e.scroll){var v=0;l.slice(0,f).each(function(){v+=this.offsetHeight});if((v+w[0].offsetHeight-p.scrollTop())>p[0].clientHeight){p.scrollTop(v+w[0].offsetHeight-p.innerHeight())}else{if(v<p.scrollTop()){p.scrollTop(v)}}}}function g(u){f+=u;if(f<0){f=l.size()-1}else{if(f>=l.size()){f=0}}}function b(u){return e.max&&e.max<u?e.max:u}function d(){p.empty();var v=b(s.length);for(var w=0;w<v;w++){if(!s[w]){continue}var x=e.formatItem(s[w].data,w+1,v,s[w].value,n);if(x===false){continue}var u=a("<li/>").html(e.highlight(x,n)).addClass(w%2==0?"ac_even":"ac_odd").appendTo(p)[0];a.data(u,"ac_data",s[w])}l=p.find("li");if(e.selectFirst){l.slice(0,1).addClass(j.ACTIVE);f=0}if(a.fn.bgiframe){p.bgiframe()}}return{display:function(v,u){o();s=v;n=u;d()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(f!=0&&f-8<0){h(-f)}else{h(-8)}},pageDown:function(){if(f!=l.size()-1&&f+8>l.size()){h(l.size()-1-f)}else{h(8)}},hide:function(){c&&c.hide();l&&l.removeClass(j.ACTIVE);f=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(l.filter("."+j.ACTIVE)[0]||e.selectFirst&&l[0])},show:function(){var w=a(k).offset();c.css({width:typeof e.width=="string"||e.width>0?e.width:a(k).width(),top:w.top+k.offsetHeight,left:w.left}).show();if(e.scroll){p.scrollTop(0);p.css({maxHeight:e.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var u=0;l.each(function(){u+=this.offsetHeight});var v=u>e.scrollHeight;p.css("height",v?e.scrollHeight:u);if(!v){l.width(p.width()-parseInt(l.css("padding-left"))-parseInt(l.css("padding-right")))}}}},selected:function(){var u=l&&l.filter("."+j.ACTIVE).removeClass(j.ACTIVE);return u&&u.length&&a.data(u[0],"ac_data")},emptyList:function(){p&&p.empty()},unbind:function(){c&&c.remove()}}};a.fn.selection=function(j,b){if(j!==undefined){return this.each(function(){if(this.createTextRange){var k=this.createTextRange();if(b===undefined||j==b){k.move("character",j);k.select()}else{k.collapse(true);k.moveStart("character",j);k.moveEnd("character",b);k.select()}}else{if(this.setSelectionRange){this.setSelectionRange(j,b)}else{if(this.selectionStart){this.selectionStart=j;this.selectionEnd=b}}}})}var g=this[0];if(g.createTextRange){var c=document.selection.createRange(),h=g.value,f="<->",d=c.text.length;c.text=f;var e=g.value.indexOf(f);g.value=h;this.selection(e,e+d);return{start:e,end:e+d}}else{if(g.selectionStart!==undefined){return{start:g.selectionStart,end:g.selectionEnd}}}}})(jQuery);(function(a9,aK){var aR="none",aq="LoadedContent",a8=false,aP="resize.",aW="y",aU="auto",a6=true,ar="nofollow",aY="x";function a5(b,d){b=b?' id="'+a2+b+'"':"";d=d?' style="'+d+'"':"";return a9("<div"+b+d+"/>")}function aV(d,c){c=c===aY?aX.width():aX.height();return typeof d==="string"?Math.round(/%/.test(d)?c/100*parseInt(d,10):parseInt(d,10)):d}function ai(a){return ba.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function aI(b){for(var d in b){if(a9.isFunction(b[d])&&d.substring(0,2)!=="on"){b[d]=b[d].call(aZ)}}b.rel=b.rel||aZ.rel||ar;b.href=b.href||a9(aZ).attr("href");b.title=b.title||aZ.title;return b}function aO(d,b){b&&b.call(aZ);a9.event.trigger(d)}function aH(){var a,h=a2+"Slideshow_",j="click."+a2,g,d;if(ba.slideshow&&a3[1]){g=function(){ay.text(ba.slideshowStop).unbind(j).bind(ah,function(){if(a4<a3.length-1||ba.loop){a=setTimeout(a7.next,ba.slideshowSpeed)}}).bind(ag,function(){clearTimeout(a)}).one(j+" "+ap,d);a1.removeClass(h+"off").addClass(h+"on");a=setTimeout(a7.next,ba.slideshowSpeed)};d=function(){clearTimeout(a);ay.text(ba.slideshowStart).unbind([ah,ag,ap,j].join(" ")).one(j,g);a1.removeClass(h+"on").addClass(h+"off")};ba.slideshowAuto?g():d()}}function aF(b){if(!ao){aZ=b;ba=aI(a9.extend({},a9.data(aZ,aT)));a3=a9(aZ);a4=0;if(ba.rel!==ar){a3=a9("."+ax).filter(function(){return(a9.data(this,aT).rel||this.rel)===ba.rel});a4=a3.index(aZ);if(a4===-1){a3=a3.add(aZ);a4=a3.length-1}}if(!aQ){aQ=az=a6;a1.show();if(ba.returnFocus){try{aZ.blur();a9(aZ).one(aa,function(){try{this.focus()}catch(c){}})}catch(a){}}aN.css({opacity:+ba.opacity,cursor:ba.overlayClose?"pointer":aU}).show();ba.w=aV(ba.initialWidth,aY);ba.h=aV(ba.initialHeight,aW);a7.position(0);af&&aX.bind(aP+an+" scroll."+an,function(){aN.css({width:aX.width(),height:aX.height(),top:aX.scrollTop(),left:aX.scrollLeft()})}).trigger("scroll."+an);aO(aJ,ba.onOpen);ae.add(aw).add(av).add(ay).add(ad).hide();aD.html(ba.close).show()}a7.load(a6)}}var aG={transition:"elastic",speed:300,width:a8,initialWidth:"600",innerWidth:a8,maxWidth:a8,height:a8,initialHeight:"450",innerHeight:a8,maxHeight:a8,scalePhotos:a6,scrolling:a6,inline:a8,html:a8,iframe:a8,photo:a8,href:a8,title:a8,rel:a8,opacity:0.9,preloading:a6,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:a8,returnFocus:a6,loop:a6,slideshow:a8,slideshowAuto:a6,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:a8,onLoad:a8,onComplete:a8,onCleanup:a8,onClosed:a8,overlayClose:a6,escKey:a6,arrowKey:a6},aT="colorbox",a2="cbox",aJ=a2+"_open",ag=a2+"_load",ah=a2+"_complete",ap=a2+"_cleanup",aa=a2+"_closed",am=a2+"_purge",ac=a2+"_loaded",aE=a9.browser.msie&&!a9.support.opacity,af=aE&&a9.browser.version<7,an=a2+"_IE6",aN,a1,aC,aS,bc,aj,al,ak,a3,aX,a0,au,at,ad,ae,ay,av,aw,aD,aB,aA,aM,aL,aZ,a4,ba,aQ,az,ao=a8,a7,ax=a2+"Element";a7=a9.fn[aT]=a9[aT]=function(h,e){var b=this,g;if(!b[0]&&b.selector){return b}h=h||{};if(e){h.onComplete=e}if(!b[0]||b.selector===undefined){b=a9("<a/>");h.open=a6}b.each(function(){a9.data(this,aT,a9.extend({},a9.data(this,aT)||aG,h));a9(this).addClass(ax)});g=h.open;if(a9.isFunction(g)){g=g.call(b)}g&&aF(b[0]);return b};a7.init=function(){var b="hover",a="clear:left";aX=a9(aK);a1=a5().attr({id:aT,"class":aE?a2+"IE":""});aN=a5("Overlay",af?"position:absolute":"").hide();aC=a5("Wrapper");aS=a5("Content").append(a0=a5(aq,"width:0; height:0; overflow:hidden"),at=a5("LoadingOverlay").add(a5("LoadingGraphic")),ad=a5("Title"),ae=a5("Current"),av=a5("Next"),aw=a5("Previous"),ay=a5("Slideshow").bind(aJ,aH),aD=a5("Close"));aC.append(a5().append(a5("TopLeft"),bc=a5("TopCenter"),a5("TopRight")),a5(a8,a).append(aj=a5("MiddleLeft"),aS,al=a5("MiddleRight")),a5(a8,a).append(a5("BottomLeft"),ak=a5("BottomCenter"),a5("BottomRight"))).children().children().css({"float":"left"});au=a5(a8,"position:absolute; width:9999px; visibility:hidden; display:none");a9("body").prepend(aN,a1.append(aC,au));aS.children().hover(function(){a9(this).addClass(b)},function(){a9(this).removeClass(b)}).addClass(b);aB=bc.height()+ak.height()+aS.outerHeight(a6)-aS.height();aA=aj.width()+al.width()+aS.outerWidth(a6)-aS.width();aM=a0.outerHeight(a6);aL=a0.outerWidth(a6);a1.css({"padding-bottom":aB,"padding-right":aA}).hide();av.click(a7.next);aw.click(a7.prev);aD.click(a7.close);aS.children().removeClass(b);a9("."+ax).live("click",function(c){if(!(c.button!==0&&typeof c.button!=="undefined"||c.ctrlKey||c.shiftKey||c.altKey)){c.preventDefault();aF(this)}});aN.click(function(){ba.overlayClose&&a7.close()});a9(document).bind("keydown",function(c){if(aQ&&ba.escKey&&c.keyCode===27){c.preventDefault();a7.close()}if(aQ&&ba.arrowKey&&!az&&a3[1]){if(c.keyCode===37&&(a4||ba.loop)){c.preventDefault();aw.click()}else{if(c.keyCode===39&&(a4<a3.length-1||ba.loop)){c.preventDefault();av.click()}}}})};a7.remove=function(){a1.add(aN).remove();a9("."+ax).die("click").removeData(aT).removeClass(ax)};a7.position=function(k,m){function a(b){bc[0].style.width=ak[0].style.width=aS[0].style.width=b.style.width;at[0].style.height=at[1].style.height=aS[0].style.height=aj[0].style.height=al[0].style.height=b.style.height}var l,c=Math.max(document.documentElement.clientHeight-ba.h-aM-aB,0)/2+aX.scrollTop(),j=Math.max(aX.width()-ba.w-aL-aA,0)/2+aX.scrollLeft();l=a1.width()===ba.w+aL&&a1.height()===ba.h+aM?0:k;aC[0].style.width=aC[0].style.height="9999px";a1.dequeue().animate({width:ba.w+aL,height:ba.h+aM,top:c,left:j},{duration:l,complete:function(){a(this);az=a8;aC[0].style.width=ba.w+aL+aA+"px";aC[0].style.height=ba.h+aM+aB+"px";m&&m()},step:function(){a(this)}})};a7.resize=function(a){if(aQ){a=a||{};if(a.width){ba.w=aV(a.width,aY)-aL-aA}if(a.innerWidth){ba.w=aV(a.innerWidth,aY)}a0.css({width:ba.w});if(a.height){ba.h=aV(a.height,aW)-aM-aB}if(a.innerHeight){ba.h=aV(a.innerHeight,aW)}if(!a.innerHeight&&!a.height){a=a0.wrapInner("<div style='overflow:auto'></div>").children();ba.h=a.height();a.replaceWith(a.children())}a0.css({height:ba.h});a7.position(ba.transition===aR?0:ba.speed)}};a7.prep=function(f){var d="hidden";function a(h){var l,k,p,n,g=a3.length,j=ba.loop;a7.position(h,function(){if(aQ){aE&&c&&a0.fadeIn(100);a0.show();aO(ac);ad.show().html(ba.title);if(g>1){typeof ba.current==="string"&&ae.html(ba.current.replace(/\{current\}/,a4+1).replace(/\{total\}/,g)).show();av[j||a4<g-1?"show":"hide"]().html(ba.next);aw[j||a4?"show":"hide"]().html(ba.previous);l=a4?a3[a4-1]:a3[g-1];p=a4<g-1?a3[a4+1]:a3[0];ba.slideshow&&ay.show();if(ba.preloading){n=a9.data(p,aT).href||p.href;k=a9.data(l,aT).href||l.href;n=a9.isFunction(n)?n.call(p):n;k=a9.isFunction(k)?k.call(l):k;if(ai(n)){a9("<img/>")[0].src=n}if(ai(k)){a9("<img/>")[0].src=k}}}at.hide();if(ba.transition==="fade"){a1.fadeTo(b,1,function(){if(aE){a1[0].style.filter=a8}})}else{if(aE){a1[0].style.filter=a8}}aX.bind(aP+a2,function(){a7.position(0)});aO(ah,ba.onComplete)}})}if(aQ){var c,b=ba.transition===aR?0:ba.speed;aX.unbind(aP+a2);a0.remove();a0=a5(aq).html(f);a0.hide().appendTo(au.show()).css({width:function(){ba.w=ba.w||a0.width();ba.w=ba.mw&&ba.mw<ba.w?ba.mw:ba.w;return ba.w}(),overflow:ba.scrolling?aU:d}).css({height:function(){ba.h=ba.h||a0.height();ba.h=ba.mh&&ba.mh<ba.h?ba.mh:ba.h;return ba.h}()}).prependTo(aS);au.hide();a9("#"+a2+"Photo").css({cssFloat:aR,marginLeft:aU,marginRight:aU});af&&a9("select").not(a1.find("select")).filter(function(){return this.style.visibility!==d}).css({visibility:d}).one(ap,function(){this.style.visibility="inherit"});ba.transition==="fade"?a1.fadeTo(b,0,function(){a(0)}):a(b)}};a7.load=function(a){var f,e,b,d=a7.prep;az=a6;aZ=a3[a4];a||(ba=aI(a9.extend({},a9.data(aZ,aT))));aO(am);aO(ag,ba.onLoad);ba.h=ba.height?aV(ba.height,aW)-aM-aB:ba.innerHeight&&aV(ba.innerHeight,aW);ba.w=ba.width?aV(ba.width,aY)-aL-aA:ba.innerWidth&&aV(ba.innerWidth,aY);ba.mw=ba.w;ba.mh=ba.h;if(ba.maxWidth){ba.mw=aV(ba.maxWidth,aY)-aL-aA;ba.mw=ba.w&&ba.w<ba.mw?ba.w:ba.mw}if(ba.maxHeight){ba.mh=aV(ba.maxHeight,aW)-aM-aB;ba.mh=ba.h&&ba.h<ba.mh?ba.h:ba.mh}f=ba.href;at.show();if(ba.inline){a5().hide().insertBefore(a9(f)[0]).one(am,function(){a9(this).replaceWith(a0.children())});d(a9(f))}else{if(ba.iframe){a1.one(ac,function(){var g=a9("<iframe name='"+(new Date).getTime()+"' frameborder=0"+(ba.scrolling?"":" scrolling='no'")+(aE?" allowtransparency='true'":"")+" style='width:100%; height:100%; border:0; display:block;'/>");g[0].src=ba.href;g.appendTo(a0).one(am,function(){g[0].src="//about:blank"})});d(" ")}else{if(ba.html){d(ba.html)}else{if(ai(f)){e=new Image;e.onload=function(){var c;e.onload=null;e.id=a2+"Photo";a9(e).css({border:aR,display:"block",cssFloat:"left"});if(ba.scalePhotos){b=function(){e.height-=e.height*c;e.width-=e.width*c};if(ba.mw&&e.width>ba.mw){c=(e.width-ba.mw)/e.width;b()}if(ba.mh&&e.height>ba.mh){c=(e.height-ba.mh)/e.height;b()}}if(ba.h){e.style.marginTop=Math.max(ba.h-e.height,0)/2+"px"}a3[1]&&(a4<a3.length-1||ba.loop)&&a9(e).css({cursor:"pointer"}).click(a7.next);if(aE){e.style.msInterpolationMode="bicubic"}setTimeout(function(){d(e)},1)};setTimeout(function(){e.src=f},1)}else{f&&au.load(f,function(h,j,g){d(j==="error"?"Request unsuccessful: "+g.statusText:a9(this).children())})}}}}};a7.next=function(){if(!az){a4=a4<a3.length-1?a4+1:0;a7.load()}};a7.prev=function(){if(!az){a4=a4?a4-1:a3.length-1;a7.load()}};a7.close=function(){if(aQ&&!ao){ao=a6;aQ=a8;aO(ap,ba.onCleanup);aX.unbind("."+a2+" ."+an);aN.fadeTo("fast",0);a1.stop().fadeTo("fast",0,function(){aO(am);a0.remove();a1.add(aN).css({opacity:1,cursor:aU}).hide();setTimeout(function(){ao=a8;aO(aa,ba.onClosed)},1)})}};a7.element=function(){return a9(aZ)};a7.settings=aG;a9(a7.init)})(jQuery,this);(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(e){return e&&e.constructor==Number?e+"px":e},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":d(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}return this}})(jQuery);(function(a){a.alerts={verticalOffset:-75,horizontalOffset:0,repositionOnResize:true,overlayOpacity:0.01,overlayColor:"#FFF",draggable:true,okButton:"&nbsp;OK&nbsp;",cancelButton:"&nbsp;Cancel&nbsp;",dialogClass:null,alert:function(b,c,d){if(c==null){c="Alert"}a.alerts._show(c,b,null,"alert",function(e){if(d){d(e)}})},confirm:function(b,c,d){if(c==null){c="Confirm"}a.alerts._show(c,b,null,"confirm",function(e){if(d){d(e)}})},prompt:function(b,c,d,e){if(d==null){d="Prompt"}a.alerts._show(d,b,c,"prompt",function(f){if(e){e(f)}})},_show:function(g,f,c,b,j){a.alerts._hide();a.alerts._overlay("show");a("BODY").append('<div id="popup_container"><h1 id="popup_title"></h1><div id="popup_content"><div id="popup_message"></div></div></div>');if(a.alerts.dialogClass){a("#popup_container").addClass(a.alerts.dialogClass)}var h=(a.browser.msie&&parseInt(a.browser.version)<=6)?"absolute":"fixed";a("#popup_container").css({position:h,zIndex:99999,padding:0,margin:0});a("#popup_title").text(g);a("#popup_content").addClass(b);a("#popup_message").text(f);a("#popup_message").html(a("#popup_message").text().replace(/\n/g,"<br />"));a("#popup_container").css({minWidth:a("#popup_container").outerWidth(),maxWidth:a("#popup_container").outerWidth()});a.alerts._reposition();a.alerts._maintainPosition(true);switch(b){case"alert":a("#popup_message").after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /></div>');a("#popup_ok").click(function(){a.alerts._hide();j(true)});a("#popup_ok").focus().keypress(function(k){if(k.keyCode==13||k.keyCode==27){a("#popup_ok").trigger("click")}});break;case"confirm":a("#popup_message").after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /> <input type="button" value="'+a.alerts.cancelButton+'" id="popup_cancel" /></div>');a("#popup_ok").click(function(){a.alerts._hide();if(j){j(true)}});a("#popup_cancel").click(function(){a.alerts._hide();if(j){j(false)}});a("#popup_ok").focus();a("#popup_ok, #popup_cancel").keypress(function(k){if(k.keyCode==13){a("#popup_ok").trigger("click")}if(k.keyCode==27){a("#popup_cancel").trigger("click")}});break;case"prompt":a("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /> <input type="button" value="'+a.alerts.cancelButton+'" id="popup_cancel" /></div>');a("#popup_prompt").width(a("#popup_message").width());a("#popup_ok").click(function(){var e=a("#popup_prompt").val();a.alerts._hide();if(j){j(e)}});a("#popup_cancel").click(function(){a.alerts._hide();if(j){j(null)}});a("#popup_prompt, #popup_ok, #popup_cancel").keypress(function(k){if(k.keyCode==13){a("#popup_ok").trigger("click")}if(k.keyCode==27){a("#popup_cancel").trigger("click")}});if(c){a("#popup_prompt").val(c)}a("#popup_prompt").focus().select();break}if(a.alerts.draggable){try{a("#popup_container").draggable({handle:a("#popup_title")});a("#popup_title").css({cursor:"move"})}catch(d){}}},_hide:function(){a("#popup_container").remove();a.alerts._overlay("hide");a.alerts._maintainPosition(false)},_overlay:function(b){switch(b){case"show":a.alerts._overlay("hide");a("BODY").append('<div id="popup_overlay"></div>');a("#popup_overlay").css({position:"absolute",zIndex:99998,top:"0px",left:"0px",width:"100%",height:a(document).height(),background:a.alerts.overlayColor,opacity:a.alerts.overlayOpacity});break;case"hide":a("#popup_overlay").remove();break}},_reposition:function(){var c=((a(window).height()/2)-(a("#popup_container").outerHeight()/2))+a.alerts.verticalOffset;var b=((a(window).width()/2)-(a("#popup_container").outerWidth()/2))+a.alerts.horizontalOffset;if(c<0){c=0}if(b<0){b=0}if(a.browser.msie&&parseInt(a.browser.version)<=6){c=c+a(window).scrollTop()}a("#popup_container").css({top:c+"px",left:b+"px"});a("#popup_overlay").height(a(document).height())},_maintainPosition:function(b){if(a.alerts.repositionOnResize){switch(b){case true:a(window).bind("resize",a.alerts._reposition);break;case false:a(window).unbind("resize",a.alerts._reposition);break}}}};jAlert=function(b,c,d){a.alerts.alert(b,c,d)};jConfirm=function(b,c,d){a.alerts.confirm(b,c,d)};jPrompt=function(b,c,d,e){a.alerts.prompt(b,c,d,e)}})(jQuery);(function(a){a.fn.extend({elastic:function(){var b=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight"];return this.each(function(){if(this.type!="textarea"){return false}var g=a(this),c=a("<div />").css({position:"absolute",display:"none"}),h=parseInt(g.css("lineHeight"),10)||parseInt(g.css("fontSize"),"10"),k=parseInt(g.css("height"),10)||h*3,j=parseInt(g.css("max-height"),10)||Number.MAX_VALUE,d=0,f=0;c.appendTo(g.parent());var f=b.length;while(f--){c.css(b[f].toString(),g.css(b[f].toString()))}function l(m,n){curratedHeight=Math.floor(parseInt(m,10));if(g.height()!=curratedHeight){g.css({height:curratedHeight+"px",overflow:n})}}function e(){var o=g.val().replace(/<|>/g," ").replace(/\n/g,"<br />").replace(/&/g,"&amp;");var m=c.html();if(o+"&nbsp;"!=m){c.html(o+"&nbsp;");if(Math.abs(c.height()+h-g.height())>3){var n=c.height()+h;if(n>=j){l(j,"auto")}else{if(n<=k){l(k,"hidden")}else{l(n,"hidden")}}}}}g.css({overflow:"hidden"}).bind("focus",function(){self.periodicalUpdater=window.setInterval(function(){e()},50)}).bind("blur",function(){clearInterval(self.periodicalUpdater)});e()})}})})(jQuery);jQuery.effects||(function(j){j.effects={version:"1.7.2",save:function(b,a){for(var c=0;c<a.length;c++){if(a[c]!==null){b.data("ec.storage."+a[c],b[0].style[a[c]])}}},restore:function(b,a){for(var c=0;c<a.length;c++){if(a[c]!==null){b.css(a[c],b.data("ec.storage."+a[c]))}}},setMode:function(b,a){if(a=="toggle"){a=b.is(":hidden")?"show":"hide"}return a},getBaseline:function(c,b){var a,d;switch(c[0]){case"top":a=0;break;case"middle":a=0.5;break;case"bottom":a=1;break;default:a=c[0]/b.height}switch(c[1]){case"left":d=0;break;case"center":d=0.5;break;case"right":d=1;break;default:d=c[1]/b.width}return{x:d,y:a}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper")){return e.parent()}var d={width:e.outerWidth(true),height:e.outerHeight(true),"float":e.css("float")};e.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var a=e.parent();if(e.css("position")=="static"){a.css({position:"relative"});e.css({position:"relative"})}else{var b=e.css("top");if(isNaN(parseInt(b,10))){b="auto"}var c=e.css("left");if(isNaN(parseInt(c,10))){c="auto"}a.css({position:e.css("position"),top:b,left:c,zIndex:e.css("z-index")}).show();e.css({position:"relative",top:0,left:0})}a.css(d);return a},removeWrapper:function(a){if(a.parent().is(".ui-effects-wrapper")){return a.parent().replaceWith(a)}return a},setTransition:function(c,a,d,b){b=b||{};j.each(a,function(e,l){unit=c.cssUnit(l);if(unit[0]>0){b[l]=unit[0]*d+unit[1]}});return b},animateClass:function(d,c,a,b){var l=(typeof a=="function"?a:(b?b:null));var e=(typeof a=="string"?a:null);return this.each(function(){var u={};var w=j(this);var v=w.attr("style")||"";if(typeof v=="object"){v=v.cssText}if(d.toggle){w.hasClass(d.toggle)?d.remove=d.toggle:d.add=d.toggle}var s=j.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(d.add){w.addClass(d.add)}if(d.remove){w.removeClass(d.remove)}var n=j.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(d.add){w.removeClass(d.add)}if(d.remove){w.addClass(d.remove)}for(var t in n){if(typeof n[t]!="function"&&n[t]&&t.indexOf("Moz")==-1&&t.indexOf("length")==-1&&n[t]!=s[t]&&(t.match(/color/i)||(!t.match(/color/i)&&!isNaN(parseInt(n[t],10))))&&(s.position!="static"||(s.position=="static"&&!t.match(/left|top|bottom|right/)))){u[t]=n[t]}}w.animate(u,c,e,function(){if(typeof j(this).attr("style")=="object"){j(this).attr("style")["cssText"]="";j(this).attr("style")["cssText"]=v}else{j(this).attr("style",v)}if(d.add){j(this).addClass(d.add)}if(d.remove){j(this).removeClass(d.remove)}if(l){l.apply(this,arguments)}})})}};function k(d,e){var b=d[1]&&d[1].constructor==Object?d[1]:{};if(e){b.mode=e}var c=d[1]&&d[1].constructor!=Object?d[1]:(b.duration?b.duration:d[2]);c=j.fx.off?0:typeof c==="number"?c:j.fx.speeds[c]||j.fx.speeds._default;var a=b.callback||(j.isFunction(d[1])&&d[1])||(j.isFunction(d[2])&&d[2])||(j.isFunction(d[3])&&d[3]);return[d[0],b,c,a]}j.fn.extend({_show:j.fn.show,_hide:j.fn.hide,__toggle:j.fn.toggle,_addClass:j.fn.addClass,_removeClass:j.fn.removeClass,_toggleClass:j.fn.toggleClass,effect:function(c,d,b,a){return j.effects[c]?j.effects[c].call(this,{method:c,options:d||{},duration:b,callback:a}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,k(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,k(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(j.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,k(arguments,"toggle"))}},addClass:function(c,d,a,b){return d?j.effects.animateClass.apply(this,[{add:c},d,a,b]):this._addClass(c)},removeClass:function(c,d,a,b){return d?j.effects.animateClass.apply(this,[{remove:c},d,a,b]):this._removeClass(c)},toggleClass:function(c,d,a,b){return((typeof d!=="boolean")&&d)?j.effects.animateClass.apply(this,[{toggle:c},d,a,b]):this._toggleClass(c,d)},morph:function(e,c,d,a,b){return j.effects.animateClass.apply(this,[{add:c,remove:e},d,a,b])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(c){var b=this.css(c),a=[];j.each(["em","px","%","pt"],function(e,d){if(b.indexOf(d)>0){a=[parseFloat(b),d]}});return a}});j.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(a,b){j.fx.step[b]=function(c){if(c.state==0){c.start=h(c.elem,b);c.end=f(c.end)}c.elem.style[b]="rgb("+[Math.max(Math.min(parseInt((c.pos*(c.end[0]-c.start[0]))+c.start[0],10),255),0),Math.max(Math.min(parseInt((c.pos*(c.end[1]-c.start[1]))+c.start[1],10),255),0),Math.max(Math.min(parseInt((c.pos*(c.end[2]-c.start[2]))+c.start[2],10),255),0)].join(",")+")"}});function f(a){var b;if(a&&a.constructor==Array&&a.length==3){return a}if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a)){return[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10)]}if(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a)){return[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55]}if(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a)){return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]}if(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a)){return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]}if(b=/rgba\(0, 0, 0, 0\)/.exec(a)){return g.transparent}return g[j.trim(a).toLowerCase()]}function h(a,c){var b;do{b=j.curCSS(a,c);if(b!=""&&b!="transparent"||j.nodeName(a,"body")){break}c="backgroundColor"}while(a=a.parentNode);return f(b)}var g={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};j.easing.jswing=j.easing.swing;j.extend(j.easing,{def:"easeOutQuad",swing:function(d,c,e,a,b){return j.easing[j.easing.def](d,c,e,a,b)},easeInQuad:function(d,c,e,a,b){return a*(c/=b)*c+e},easeOutQuad:function(d,c,e,a,b){return -a*(c/=b)*(c-2)+e},easeInOutQuad:function(d,c,e,a,b){if((c/=b/2)<1){return a/2*c*c+e}return -a/2*((--c)*(c-2)-1)+e},easeInCubic:function(d,c,e,a,b){return a*(c/=b)*c*c+e},easeOutCubic:function(d,c,e,a,b){return a*((c=c/b-1)*c*c+1)+e},easeInOutCubic:function(d,c,e,a,b){if((c/=b/2)<1){return a/2*c*c*c+e}return a/2*((c-=2)*c*c+2)+e},easeInQuart:function(d,c,e,a,b){return a*(c/=b)*c*c*c+e},easeOutQuart:function(d,c,e,a,b){return -a*((c=c/b-1)*c*c*c-1)+e},easeInOutQuart:function(d,c,e,a,b){if((c/=b/2)<1){return a/2*c*c*c*c+e}return -a/2*((c-=2)*c*c*c-2)+e},easeInQuint:function(d,c,e,a,b){return a*(c/=b)*c*c*c*c+e},easeOutQuint:function(d,c,e,a,b){return a*((c=c/b-1)*c*c*c*c+1)+e},easeInOutQuint:function(d,c,e,a,b){if((c/=b/2)<1){return a/2*c*c*c*c*c+e}return a/2*((c-=2)*c*c*c*c+2)+e},easeInSine:function(d,c,e,a,b){return -a*Math.cos(c/b*(Math.PI/2))+a+e},easeOutSine:function(d,c,e,a,b){return a*Math.sin(c/b*(Math.PI/2))+e},easeInOutSine:function(d,c,e,a,b){return -a/2*(Math.cos(Math.PI*c/b)-1)+e},easeInExpo:function(d,c,e,a,b){return(c==0)?e:a*Math.pow(2,10*(c/b-1))+e},easeOutExpo:function(d,c,e,a,b){return(c==b)?e+a:a*(-Math.pow(2,-10*c/b)+1)+e},easeInOutExpo:function(d,c,e,a,b){if(c==0){return e}if(c==b){return e+a}if((c/=b/2)<1){return a/2*Math.pow(2,10*(c-1))+e}return a/2*(-Math.pow(2,-10*--c)+2)+e},easeInCirc:function(d,c,e,a,b){return -a*(Math.sqrt(1-(c/=b)*c)-1)+e},easeOutCirc:function(d,c,e,a,b){return a*Math.sqrt(1-(c=c/b-1)*c)+e},easeInOutCirc:function(d,c,e,a,b){if((c/=b/2)<1){return -a/2*(Math.sqrt(1-c*c)-1)+e}return a/2*(Math.sqrt(1-(c-=2)*c)+1)+e},easeInElastic:function(o,e,p,a,b){var d=1.70158;var c=0;var n=a;if(e==0){return p}if((e/=b)==1){return p+a}if(!c){c=b*0.3}if(n<Math.abs(a)){n=a;var d=c/4}else{var d=c/(2*Math.PI)*Math.asin(a/n)}return -(n*Math.pow(2,10*(e-=1))*Math.sin((e*b-d)*(2*Math.PI)/c))+p},easeOutElastic:function(o,e,p,a,b){var d=1.70158;var c=0;var n=a;if(e==0){return p}if((e/=b)==1){return p+a}if(!c){c=b*0.3}if(n<Math.abs(a)){n=a;var d=c/4}else{var d=c/(2*Math.PI)*Math.asin(a/n)}return n*Math.pow(2,-10*e)*Math.sin((e*b-d)*(2*Math.PI)/c)+a+p},easeInOutElastic:function(o,e,p,a,b){var d=1.70158;var c=0;var n=a;if(e==0){return p}if((e/=b/2)==2){return p+a}if(!c){c=b*(0.3*1.5)}if(n<Math.abs(a)){n=a;var d=c/4}else{var d=c/(2*Math.PI)*Math.asin(a/n)}if(e<1){return -0.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e*b-d)*(2*Math.PI)/c))+p}return n*Math.pow(2,-10*(e-=1))*Math.sin((e*b-d)*(2*Math.PI)/c)*0.5+a+p},easeInBack:function(e,d,l,a,b,c){if(c==undefined){c=1.70158}return a*(d/=b)*d*((c+1)*d-c)+l},easeOutBack:function(e,d,l,a,b,c){if(c==undefined){c=1.70158}return a*((d=d/b-1)*d*((c+1)*d+c)+1)+l},easeInOutBack:function(e,d,l,a,b,c){if(c==undefined){c=1.70158}if((d/=b/2)<1){return a/2*(d*d*(((c*=(1.525))+1)*d-c))+l}return a/2*((d-=2)*d*(((c*=(1.525))+1)*d+c)+2)+l},easeInBounce:function(d,c,e,a,b){return a-j.easing.easeOutBounce(d,b-c,0,a,b)+e},easeOutBounce:function(d,c,e,a,b){if((c/=b)<(1/2.75)){return a*(7.5625*c*c)+e}else{if(c<(2/2.75)){return a*(7.5625*(c-=(1.5/2.75))*c+0.75)+e}else{if(c<(2.5/2.75)){return a*(7.5625*(c-=(2.25/2.75))*c+0.9375)+e}else{return a*(7.5625*(c-=(2.625/2.75))*c+0.984375)+e}}}},easeInOutBounce:function(d,c,e,a,b){if(c<b/2){return j.easing.easeInBounce(d,c*2,0,a,b)*0.5+e}return j.easing.easeOutBounce(d,c*2-b,0,a,b)*0.5+a*0.5+e}})})(jQuery);(function(b){b.effects.highlight=function(a){return this.queue(function(){var m=b(this),n=["backgroundImage","backgroundColor","opacity"];var j=b.effects.setMode(m,a.options.mode||"show");var o=a.options.color||"#ffff99";var k=m.css("backgroundColor");b.effects.save(m,n);m.show();m.css({backgroundImage:"none",backgroundColor:o});var l={backgroundColor:k};if(j=="hide"){l.opacity=0}m.animate(l,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(j=="hide"){m.hide()}b.effects.restore(m,n);if(j=="show"&&b.browser.msie){this.style.removeAttribute("filter")}if(a.callback){a.callback.apply(this,arguments)}m.dequeue()}})})}})(jQuery);var position_suggest=-1;var searching=0;var tb_pathToImage="http://images.motofan.com/css/images/loadingAnimation.gif";var vaciado="";var destacado_home=0;$(document).ready(function(){jQuery.fn.reset=function(){$(this).each(function(){if(!$(this).is(":hidden")){this.reset()}})};$(".textarea_coment").elastic();$("#item_moteros").mouseover(function(){$(this).children(".contenedor_subopciones").show()});$("#item_moteros").mouseout(function(){$(this).children(".contenedor_subopciones").hide()});$("#item_magazine").mouseover(function(){$(this).children(".contenedor_subopciones").show()});$("#item_magazine").mouseout(function(){$(this).children(".contenedor_subopciones").hide()});$("#item_actualidad").mouseover(function(){$(this).children(".contenedor_subopciones").show()});$("#item_actualidad").mouseout(function(){$(this).children(".contenedor_subopciones").hide()});$("#item_anuncios").mouseover(function(){$(this).children(".contenedor_subopciones").show()});$("#item_anuncios").mouseout(function(){$(this).children(".contenedor_subopciones").hide()});$("#item_plus").mouseover(function(){$(this).children(".contenedor_subopciones").show()});$("#item_plus").mouseout(function(){$(this).children(".contenedor_subopciones").hide()});$(".subcats li").bgiframe();$(".categoria").mouseover(function(){$(this).children(".subcats").show()});$(".categoria").mouseout(function(){$(this).children(".subcats").hide()});$("#item_accesorios").mouseover(function(){$(this).children(".contenedor_subopciones").show()});$("#item_accesorios").mouseout(function(){$(this).children(".contenedor_subopciones").hide()});$("a.thickbox").colorbox({transition:"elastic",height:"90%",scrolling:"false",opacity:"0.6",current:"{current}/{total}"});$("a.thickbox_iframe").colorbox({iframe:true,transition:"elastic",innerHeight:620,innerWidth:850,scrolling:"false",opacity:"0.6",current:""});$("a.thickbox_iframe_peque").colorbox({iframe:true,transition:"elastic",innerHeight:302,innerWidth:330,scrolling:"false",opacity:"0.6",current:""});$("a.thickbox_nosize").colorbox({transition:"elastic",scrolling:"false",opacity:"0.6",current:"{current}/{total}"});$("a.thickbox_upload").colorbox({transition:"elastic",scrolling:"false",opacity:"0.6",current:"{current}/{total}",innerWidth:600,innerHeight:350});imgLoader=new Image();imgLoader.src=tb_pathToImage;$(".pestanas_buscador li div").click(function(){if(!($(this).parent().hasClass("activo"))){var p=$(this).closest("li").attr("rel");if($("#"+p).length>0){$(".pestanas_buscador li").removeClass("activo");$(this).closest("li").addClass("activo");$(".buscador_rapido form").hide();$("#"+p).show()}}});$("ul.suggest li").click(function(){var p=$(this).html();if($.browser.msie==true&&$.browser.version<7){$(this).parent().parent().prev("input").attr("value",p)}else{$(this).parent().prev("input").attr("value",p)}});var n=$("ul.suggest");for(actual=0;actual<n.length;actual++){var k=parseInt($(n[actual]).prev("input").css("width"));k=k+4;k=k+"px";$(n[actual]).css("width",k)}if(typeof url_video!="undefined"){$.colorbox({href:url_video})}$(".modelosuggest").blur(function(){setTimeout('$(".suggest").empty();$(".suggest").hide()',200);searching=0});$(".modelosuggest").keypress(function(q){if((q.keyCode==9||q.keyCode==13)&&position_suggest!=-1){var p=$(".suggest li:eq("+position_suggest+")").html();if($.browser.msie==true&&$.browser.version<7){$(".suggest li:eq("+position_suggest+")").parent().parent().prev("input").attr("value",p)}else{$(".suggest li:eq("+position_suggest+")").parent().prev("input").attr("value",p)}if($("input#id_marca").length!=0&&$(this).attr("name")!="modelo"){$("input#id_marca").val($(".suggest li:eq("+position_suggest+")").attr("rel"))}$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();searching=0;position_suggest=-1;return false}});$(".botones_destacados_home span").click(function(){b=$(this).attr("id");pos=parseInt(b.replace("destacado",""))-1;destacado_home=pos;cambio_destacado();clearInterval(auto_play)});if($("#destacado_cabecera_1").length!=0){destacado_home++;auto_play=setInterval("cambio_destacado()",10000)}function l(p){var q=$(p).offset().top;$("html,body").animate({scrollTop:q},500)}$("a.respuesta_rapida").click(function(){var p=$(this).attr("href");l(p)});var h=$("table.foros_y_posts td.col_6 .contenido img");for(img_post_actual=0;img_post_actual<h.length;img_post_actual++){var f=$(h[img_post_actual]).attr("width");var o=$(h[img_post_actual]).attr("height");if(f>735){nuevo_alto=o*735/f;$(h[img_post_actual]).attr("width","735");$(h[img_post_actual]).attr("height",nuevo_alto)}}var j=$("#thumbnails_ficha ul li").length;var e=false;var d=0;$("body[class!='raw'] #sig_foto").click(function(){if(d<j-1&&!e){d++;m(d)}});$("body[class!='raw'] #ant_foto").click(function(){if(d>0&&!e){d--;m(d)}});$("body[class!='raw'] #thumbnails_ficha ul li a").click(function(){actual_foto_temp=$(this).parent().prevAll().length;if(d!=actual_foto_temp){d=actual_foto_temp;m(d)}return false});$("body[class!='raw'] #foto_actual").click(function(){d++;m(d%j);return false});if(typeof(lanzar_contacto)!="undefined"){clonar_contacto()}$(".loading_popup").click(function(){$(".contenedor_img_anuncio>img").fadeOut("slow").parent().append("<img src='http://images.motofan.com/css/images/loadingAnimation.gif' style='position:absolute;top:300px;left:275px;'/>")});var c=true;$(".thumbnails_wrapper .desplegar").click(function(){if(c){$("#thumbnails_wrapper1").animate({marginRight:"-=120"});c=false}else{$("#thumbnails_wrapper1").animate({marginRight:"+=120"});c=true}});function m(p){if(p==1||p==0){var_temp=0}else{if(p<=j-2){var_temp=(-94)*(p-1)}else{var_temp=(-94)*(j-2)}}e=true;$("#thumbnails_ficha ul").animate({marginTop:var_temp},200,function(){e=false;$("#thumbnails_ficha ul li").removeClass("li_actual").eq(p).addClass("li_actual")});img=$("#thumbnails_ficha ul li").eq(p).children("a").attr("href");pic1=new Image();pic1.src=img;nextimg=$("#thumbnails_ficha ul li").eq((p+1)%j).children("a").attr("href");$("#foto_actual").attr("href",nextimg).children("img").fadeOut(300,function(){$(this).attr("src",img).fadeIn(300)});$(".ampliaciones a").hide();$("#ampliar-"+p).show()}if($("#slideshow_anuncio ul li").length>0){$("#slideshow_anuncio ul").css("width",parseInt($("#slideshow_anuncio ul li").length)*200)}$("a#ctrl_slideshow_anuncio_izq").click(function(){if(!($("#slideshow_anuncio ul li.activo").prev("li").html()==null)){var q=$("#slideshow_anuncio li.activo").prev("li").find("img").attr("width");var q=q+2+7;var q=parseInt($("#slideshow_anuncio ul").css("right"))-q;var p=false;var r=-1;while(p!=true){r++;if($("#slideshow_anuncio ul li").eq(r).hasClass("activo")){p=true}}pasa_thumb(q,"-",r-1)}return false});$("a#ctrl_slideshow_anuncio_der").click(function(){if(!($("#slideshow_anuncio ul li.activo").next("li").html()==null)){var q=$("#slideshow_anuncio li.activo img").attr("width");var q=q+2+7;var q=parseInt($("#slideshow_anuncio ul").css("right"))+q;var p=false;var r=-1;while(p!=true){r++;if($("#slideshow_anuncio ul li").eq(r).hasClass("activo")){p=true}}var s=r+1;pasa_thumb(q,"+",s)}return false});$("#slideshow_anuncio ul li a").click(function(){$(this).parent().attr("rel","clicado");var p=false;var s=-1;while(p!=true){s++;if($("#slideshow_anuncio ul li").eq(s).attr("rel")=="clicado"){p=true;$("#slideshow_anuncio ul li").eq(s).removeAttr("rel")}}var p=false;var r=-1;while(p!=true){r++;if($("#slideshow_anuncio ul li").eq(r).hasClass("activo")){p=true}}var q=parseInt($("#slideshow_anuncio ul").css("right"));if(r<s){for(conta=r;conta<s;conta++){q=q+$("#slideshow_anuncio ul li").eq(conta).find("img").attr("width")+2+7}pasa_thumb(q,"+",s)}else{for(conta=s;conta<r;conta++){q=q+$("#slideshow_anuncio ul li").eq(conta).find("img").attr("width")+2+7}pasa_thumb(q,"-",s)}return false});$("td.celda_msg_interesado .info").mouseover(function(){var p={display:"block",zIndex:"2",width:"200px"};$(this).parent().find(".ventana_dinamica.prod").css(p)});$("td.celda_msg_interesado .info").mouseout(function(){$(this).parent().find(".ventana_dinamica.prod").css("display","none")});$(".ventana_dinamica .cerrar").click(function(){$(this).parent().css("display","none")});$(function(){if($("#thumbnails").length==1&&$("#thumbnails li").length>0){$("#thumbnails").sortable();$("#thumbnails").disableSelection();$("#thumbnails").bind("sortstop",function(p,r){var q=$("#thumbnails").sortable("serialize");$.post("/ajax/ordenar/"+$("#id").val(),q,function(s){if(s=="1"){actualizar_foto_preview()}})})}});if(document.location.pathname=="/"&&document.cookie.indexOf("motofan_location")==-1&&document.location.host=="www.motofan.com"){getLocation()}if($("#filtros_busq").length>0){getRefinadoresAjax($("#filtro_id").html())}if($("#filtros_busq_acc").length>0){getRefinadoresAccAjax($("#filtro_id").html())}$(".check").change(function(){if($.browser.webkit){setTimeout('$("#refinadores").submit();',50)}else{$("#refinadores").submit()}capa_reload()});if($(".destacados").length>0){$(".destacados").each(function(p,q){if($(q).attr("rel")!=undefined){getDestacados($(q).attr("rel"),q,p)}})}if($("#tipo_optimizado").length>0){viewgenericTracking()}if($("#acc_hueco_destacado").length>0){acccountDestacado()}if($("#acc_tienda_destacada_click").length>0){var b=$("#acc_tienda_destacada_click").html();countTiendasDestacadas(b)}if($("#acc_related_ads").length>0){acccountRelatedPrints()}if($("#c_hueco_optimizado").length>0){contactaDestacado()}if($("#acc_hueco_contacto").length>0){acccontactaDestacado()}if($("#ids_tragaperras").length>0){countTragaperrasDestacado()}if($(".optimizado_impresion").length>0){countOptimizadoImpresion(".optimizado_impresion")}$().maxlength();setTimeout('$(".desaparecer").slideUp();',5000);$("#id_parent").autocomplete("/accesorios/categorias/suggest-search/",{delay:1,minchars:0,max:50,cacheLength:1,scroll:true,selectFirst:false});$("#getaccmarca").live("click",function(){$("#getaccmarca").autocomplete("/accesorios/marcas/suggest-search/",{delay:1,minchars:2,max:50,cacheLength:1,scroll:true,selectFirst:false});$("#getaccmarca").die("click",function(){})});$("#getaccmodelo").live("click",function(){if($("#marca").length>0){var p=$("#marca").val()}else{var p=$("#getaccmarca").val()}$("#getaccmodelo").autocomplete("/accesorios/modelos/suggest-search/",{delay:1,minchars:0,max:50,cacheLength:1,scroll:true,selectFirst:false,extraParams:{marca:p}});$("#getaccmodelo").die("click",function(){})});$("#solomotoes").click(function(){var p=window.open("http://www.solomoto.es?utm_source=motofan&utm_medium=web&utm_campaign=sponsoresBy","_blank");p.focus();return false});$("#id_marca_acc").change(function(){var p=$(this).val();$("#id_model_acc").html('<option value="null">...cargando datos...</option>');var q=$.get("/accesorios/getmodelos/"+p,function(r){$("#id_model_acc").html(r)})});$("a[class^='show-envio_form_']").click(function(){var r=$(this).attr("class");var q=r.split("-");var p=q["1"];$("#"+p+" input#submit").attr("disabled","disabled");$("#"+p).slideToggle(750,function(){if($("#"+p).is(":visible")){$("#"+p+" input#submit").attr("disabled","")}else{$("#"+p+" input#submit").attr("disabled","")}})});$("[id^='agregarallenvio_']").click(function(){var y=$(this);var v=y.html();var z=y.attr("href");var s=y.attr("id");var x=$("<img />");x.attr("src","http://images.motofan.com/css/images/loading_animation.gif");x.attr("border","0");x.insertAfter(y);y.hide();var t=s.split("_");var u=t[1];var p="/agregar-envio-allprods";var q=0;var A=null;var w=1000;var B="";var r="";while((q<A)||A==null){$.ajax({url:p,data:{id:u,start:q,ending:w},success:function(C){if(C.title!="ERR"){q=q+1000;w=w+1000;if(A==null){A=C.max}if(A<w){w=A}$("#progresstext").remove();var D=$("<span></span>");D.attr("id","progresstext");D.html("  "+w+" / "+A);D.insertAfter(x);B=C.message;r=C.title}},type:"POST",async:false,dataType:"json"})}x.remove();$("#progresstext").remove();y.attr("id",s);y.html(v);y.show();alert(B,r)});$(".ordenacion").click(function(){val=location.href;if(val.indexOf("?")!=-1){arr_temp=val.split("&");if(arr_temp.length==1){str_temp=arr_temp[0];arr_temp2=str_temp.split("?");str_temp=arr_temp2[1];if(str_temp.substring(0,2)=="o="){location.href="?o="+$(this).attr("rel")}else{location.href=val+"&o="+$(this).attr("rel")}}else{tot=arr_temp.length;i=0;encontrado=false;while(i<tot&&!encontrado){str_temp=arr_temp[i];if(str_temp.substring(0,2)=="o="){arr_temp[i]="o="+$(this).attr("rel");encontrado=true}i++}if(encontrado){params=arr_temp.join("&")}else{params=val+"&o="+$(this).attr("rel")}location.href=params}}else{location.href=location.href+"?o="+$(this).attr("rel")}});$("#id_marca").change(function(){getModelosAjax($(this).val())});$("#id_marca_fts").change(function(){getModelosAjax($(this).val(),true)});$("#id_modelo").change(function(){getCategoriaAjax($(this).val())});$("select#provincia").change(function(){if($("#ciudad").is("select")){$.getJSON("/ajax/localidades?region="+$(this).val(),function(p){$("select#ciudad option").remove();$.each(p,function(q,r){var s='<option value="'+q+'">'+r+"</option>";$(s).appendTo("#ciudad")})})}});$(".trackintegracion").mousedown(function(q){if(this.getAttribute("rev")){$.get("/ajax/tracking-externallink/"+this.getAttribute("rev"))}if(this.getAttribute("rev2")){var r="";if($("#acc_fila_destacado").length>0){var p=$("#acc_fila_destacado").html();var s=$("#acc_hueco_destacado").html();r+="?fila="+p+"&hueco="+s}$.get("/ajax/tracking-externallink-prod/"+this.getAttribute("rev2")+r)}});$(".spanlink").mousedown(function(t){if(t.which!=3){var q=this.getAttribute("rel");if(typeof(q)!="undefined"&&q!==null){var r=q.split(".");if(r[1].indexOf("motofan")<0){var s=window.location.pathname;var p=$("<form>").attr("method","post").attr("action","/ajax/extv").attr("target","_blank");$.each({url_o:s,url_d:q},function(u,v){$("<input type='hidden'>").attr("name",u).attr("value",v).appendTo(p)});p.appendTo("body");p.submit()}else{if($(this).hasClass("samew")&&t.which!=2){window.location=q}else{window.open(q,"_blank")}}}}});$(".spanlink_intern").click(function(){var p=this.getAttribute("rel");if(typeof(p)!="undefined"&&p!==null){location.href=this.getAttribute("rel")}});$(".removeparent").live("click",function(){$(this).parent().parent().remove()});$("#tabla_envios tr td").click(function(){calcularPrecio($(this),false)});$(".tabla_envios select#quantity").change(function(){calcularPrecio($(this),true)});$(".status_form #usertext").focus(function(){$(this).css("border-color","#666")});setTimeout('$("#medallas_popup").slideUp();',5000);$(".listado_amigos_usuario li").mouseover(function(){$(this).children(".info_user_popup").show()});$(".listado_amigos_usuario li").mouseout(function(){$(this).children(".info_user_popup").hide()});if(typeof(uri2)!="undefined"){$("#destacado_cabecera_2 img").attr("src",uri2)}if(typeof(uri3)!="undefined"){$("#destacado_cabecera_3 img").attr("src",uri3)}if(typeof(uri4)!="undefined"){$("#destacado_cabecera_4 img").attr("src",uri4)}if($("#hads").length>0){$("#hads div").each(function(){b=$(this).attr("id").split("_");$("#"+b[1]).html($(this).children(":not(script)"));$("#"+b[1]).addClass("none")})}var g;$(".popup_acc_list").hover(function(){g=$(this);time_acc=750;setTimeout(function(){if(g!=null){if(!g.parent().next().is(":visible")){$(".popup_accesorio").fadeOut();g.parent().next().fadeIn();g.parent().next().css("display","block")}}},time_acc)});$(".popup_acc_list").mouseleave(function(){g=null});$(".popup_accesorio").mouseleave(function(){g=null;$(this).fadeOut("slow",function(){$(this).css("display","none")})});$("form input#cp").change(function(){val=$(this).val();$.get("/ajax/locationcp?cp="+val,function(p){if(p!=null){if(p.ciudad&&p.ciudad!="null"){if($("#ciudad").length==1){$("#ciudad").val(p.ciudad);$("#ciudad_match").hide()}else{if($("#zona").length==1){$("#zona").val(p.ciudad);$("#ciudad_match").hide()}else{$("#ciudad_match").show()}}}else{$("#ciudad_match").show()}if(p.provincia&&p.provincia!="null"){if($("#region").length==1){$("#region").val(p.provincia);$("#provincia_match").hide()}else{if($("#provincia").length==1){$("#provincia").val(p.provincia_uri);$("#provincia_match").hide()}else{$("#provincia_match").show()}}}else{$("#provincia_match").show()}}else{$("#ciudad_match").show();$("#provincia_match").show()}},"json")});$("#mas_info").click(function(){$("#anuncios").hide();$("#info").show();$("#pestana_selected").removeClass("selected");$(this).parent().addClass("selected");return false});if(typeof(getvisitas_id)!="undefined"){$.get("/ajax/getvisitas/"+getvisitas_id,function(p){$("#num_visitas").html(p)})}if(typeof(getvisitasacc_id)!="undefined"){$.get("/ajax/getvisitasacc/"+getvisitasacc_id,function(p){$(".num_visitas_acc").html(p)})}if(typeof(setvisitasmodelo_id)!="undefined"){$.get("/ajax/setvisitasmodelo/"+setvisitasmodelo_id)}$(".destacado_cabecera").click(function(){uri=$(this).attr("longdesc");location.href=uri});if($("#bloque_moteros").length!=0){$.get("/ajax/getmoteros",function(p){$("#bloque_moteros").append(p)})}if($("#bloque_fotos").length!=0){$.get("/ajax/getfotos",function(p){$("#bloque_fotos").append(p)})}if($("#bloque_videos").length!=0){$.get("/ajax/getvideos",function(p){$("#bloque_videos").append(p)})}if($(".galeria_express_acc").length!=0){$(".galeria_express_acc").each(function(){var s=$(this);var q=s;var r=$(q).find(".fila_destacado").html();var p="";$(q).find("li").each(function(){if($(this).attr("id").length>0){p+=$(this).attr("id")+"-"}});if(p.length>1){p=p.substring(0,p.length-1);countViewsAccDestacados(p,r)}})}if($(".tiendas_destacadas").length!=0){$(".tiendas_destacadas").each(function(){var p=$(this);var q="";p.find("li").each(function(){if($(this).attr("id").length>0){var r=$(this).attr("id");q+=r+"-"}});if(q.length>1){q=q.substring(0,q.length-1);countViewsTiendasDestacadas(q)}})}if($("#cntview").length!=0){$.get("/ajax/countview?target="+$("#cntview").html())}if($("#sumar_visita_foto").length!=0){$.get("/ajax/countfotoview?id_foto="+$("#sumar_visita_foto").html())}if($("#sumar_visita_video").length!=0){$.get("/ajax/countvideoview?id_video="+$("#sumar_visita_video").html())}if($("#galeria_express_home").length!=0){var a="";$("#galeria_express_home").find("li").each(function(){a+=$(this).attr("id")+"-"});if(a.length>2){a=a.substring(0,a.length-1);countViewsAccDestacados(a,0)}}$(".pestanas_taller span").click(function(){var p=$(this).attr("rel");if($("#"+p).css("display")!=undefined){$(this).parent().parent().find("li").removeClass("selected");$(this).parent().addClass("selected");$(".pestana_group").removeClass("active");$("#"+p).addClass("active")}});$("#votepoll").click(function(){var q=$("#pollanswers").find("input:checked");var p=q.attr("id");p=p.split("_");var r=p[1];$.get("/ajax/votepoll?id="+r,function(s){if(s.error==0){$("#pollanswers").fadeOut(100,function(){$(this).html("");$(this).html(s.html);$(this).fadeIn(100)})}alert(s.msg,s.title)},"json")});$("input[name=packmotos], input[name=packaccs], input[name=packdirs]").change(function(){packs_selected=$("input[name=packmotos]:checked, input[name=packaccs]:checked, input[name=packdirs]:checked");packs=new Array();i=0;packs_selected.each(function(p,q){packs[i]=$(q).val();++i});$.ajax({url:"/ajax/packs-prices",data:{id_packs:packs.join("_")},type:"POST",async:false,dataType:"json",success:function(p){actualizar_precios_packs(p)}})});$("#summaries").mouseover(function(){$(".flechas_sumario").css("display","block")});$("#summaries").mouseout(function(){$(".flechas_sumario").css("display","none")});fichamoto=$(".ficha_anuncio");if(fichamoto){$("body").delegate("#form_contacta #submit","click",function(p){p.preventDefault();contactacheck($(this).parents("#form_contacta").serialize())})}$("input[name=packs]").change(function(){if($(this).parent().parent().attr("exportacion")!=1){if($("input[name=packs").is(":checked")&&$("input[name=packs]:checked").parent().parent().attr("exportacion")!=1){$("[exportacion=1] input").removeAttr("disabled")}else{$("[exportacion=1] input").attr("checked",false);$("[exportacion=1] input").attr("disabled","disabled")}}total=0;html="";$("input[name=packs]").each(function(){if($(this).is(":checked")){precio=$(this).parent().parent().attr("rel");precio_real=parseFloat($(this).parent().parent().attr("rev"));nombre=$(this).parent().text();total+=precio_real;html+="<span class='pack-contratado'>"+nombre+"</span><span class='importe' rel='"+precio_real+"'>"+precio+"</span>"}});$("#resumen_moto").effect("highlight",{},500);$("#resumen_moto").html(html);$(".total .importe").html(Math.round(total*100)/100)});if(typeof(sumario)!="undefined"){lanzar_sumario()}$(".ofertas li").hover(function(){$(this).toggleClass("base especial")},function(){$(this).toggleClass("base especial")});$("#form_comentar").bind("submit",function(p){p.preventDefault();$.post("/ajax/comentar",$("#form_comentar").serialize(),function(q){if(q.error==0){if(0<$(".form_comentar_usuario").length){$(".actividad_usuario").prepend(q.comentario);$("#comentario").val("");$("#username_input").remove();$("#comentario_"+q.id).slideDown("slow");if(q.medalla){$("#medallas_popup p").html("has conseguido la medalla "+q.medalla);$("#medallas_popup").slideDown();setTimeout('$("#medallas_popup").slideUp();',3000)}}else{$("#lista_comentarios").append(q.comentario);$("#comentario").val("");$("#comentario_"+q.id).slideDown("slow");$("#sin_comentario").html(q.label);$("#username").remove()}}else{alert(q.msg)}},"json")});$("body").delegate("#form_set_username_ajax #submit","click",function(p){p.preventDefault();$.post("/ajax/setusername",$("#form_set_username_ajax").serialize(),function(q){if(q.error==0){$.fn.colorbox.close()}else{$("#form_set_username_ajax .messages").html(q.msg)}},"json")})});jQuery.fn.maxlength=function(){$("textarea").keyup(function(e){var c=e.which;if(c>=33||c==13){var b=$(this).attr("maxlength");if(b>0&&b!=undefined){var d=this.value.length;if(d>=b){var f=$(this).val();$(this).val(f.substring(0,b))}}}});var a=null};function cambio_destacado(){$(".destacados_slide").animate({opacity:"0.1"},300);$(".destacados_slide").animate({marginTop:(destacado_home*-200)+"px"},500);$(".destacados_slide").animate({opacity:"1"},300);$(".botones_destacados_home span").removeClass("selected");$("#destacado"+(destacado_home+1)).addClass("selected");destacado_home=(destacado_home+1)%$("ul.botones_destacados_home li").length}function recomendar(a){$.get("/taller/recomendar?id_taller="+a,function(b){if(b.error==0){$(".recomendar").remove()}alert(b.msg,b.title)},"json")}function getModelosAjax(c,b){if(b==undefined){b=false}if($("#id_modelo").is("select")){var a="";if(!b){a="/ajax/modelos?marca="+c}else{a="/ajax/modelos?marca="+c+"&ft=1"}$.getJSON(a,function(d){$("select#id_modelo option").remove();$.each(d,function(f,e){var g='<option value="'+e.id+'">'+e.modelo+"</option>";$(g).appendTo("#id_modelo")})})}}function getCategoriaAjax(a){$.get("/ajax/categoria?modelo="+a,function(b){$("#id_categoria option:selected").removeAttr("selected");if(b!=""){$("#id_categoria option").each(function(){if($(this).attr("value")==b){$(this).attr("selected","selected")}});$("#id_categoria").attr("disabled",true);$("#categoria").val(b);return}$("#id_categoria").removeAttr("disabled",false);$("#categoria").val("")})}function add_modelo(a){$("#id_modelo").before('<input type="text" name="modelo" id="modelo" class="text" />').remove();$("#id_categoria").removeAttr("disabled");$(a).remove()}var oAlert=alert;function alert(a,c){try{jAlert(a,c)}catch(b){oAlert(a)}}var oConfirm=confirm;function confirm(a,d,b){try{jConfirm(a,d,b)}catch(c){if(oConfirm(a,d)){b()}}}var oPrompt=prompt;function prompt(a,b,f,c){try{jPrompt(a,b,f,c)}catch(d){c(prompt(a,b,f))}}function ilumina(a){$("li.estrellas_puntua").each(function(b){if(b<=a){$(this).children("a").addClass("on")}else{$(this).children("a").removeClass("on")}})}function mascomentarios(c,e,b,d,a){$.post("/ajax/mascomentarios",{id_parent:e,parent_tipo:b,offset:d,limit:a},function(f){$(c).parent().remove();$("#lista_comentarios").append(f.html)},"json")}function addamigo(a){$.get("/amigo/"+a,function(b){if(b.error==0){$(".acciones_usuario li a.amigo").parent().remove();alert(b.msg,b.title)}else{if(b.error==1){alert(b.msg,b.title)}else{if(b.error==2){alert(b.msg,b.title)}}}},"json")}function addamigo_input(b,a){$.get("/amigo/"+b,function(c){if(c.error==0){$(a).remove();alert(c.msg,c.title)}else{if(c.error==1){alert(c.msg,c.title)}else{if(c.error==2){alert(c.msg,c.title)}}}},"json")}function vaciar(a){if(vaciado==""){vaciado=$(a).val();$(a).val("")}}function rellenar(a){if(vaciado!=""&&$(a).val()==""){$(a).val(vaciado);vaciado=""}}function getRefinadoresAjax(a){$.get("/ajax/getrefinador",{id:a},function(b){$("#filtros_busq").remove();$("#nueva_busq").remove();$("#lateral_izquierda_190").prepend(b)})}function getRefinadoresAccAjax(a){$.get("/ajax/getrefinadoracc",{id:a},function(b){$("#filtros_busq_acc").remove();$("#nueva_busq").remove();$(b).insertAfter($("#busqueda_abierta"))})}function getDestacados(c,b,a){if(c==""){return}$.get("/destacados?hash="+c,function(h){$(b).html(h);$(".destacados .contenedor_destacado").mouseover(function(){$(this).find(".info_extra").show()});$(".destacados .contenedor_destacado").mouseout(function(){$(this).find(".info_extra").hide()});a++;var k=1;var d="destacados";var e="";var f="";var j="";var g="";$("#destacados_f_"+a+" .contenedor_destacado .id_dest").each(function(l){e+=$(this).html()+":";j+=a+":";g+=k+":";f+=d+":";k++});e=e.substring(0,(e.length-1));j=j.substring(0,(j.length-1));g=g.substring(0,(g.length-1));f=f.substring(0,(f.length-1));$.get("/tracking-impresiones-multi?id="+e+"&fila="+j+"&tipo="+f+"&hueco="+g)})}function viewgenericTracking(){var a=$("#tipo_optimizado").html();var b=$("#fila_optimizado").html();var d=$("#hueco_optimizado").html();var c=$("#anuncio_optimizado").html();$.get("/tracking-view?tipo="+a+"&fila="+b+"&hueco="+d+"&id="+c)}function countViewsAccDestacados(a,b){$.get("/accdestacados/views?ids="+a+"&fila="+b)}function countViewsTiendasDestacadas(a){$.get("/acctiendas/views?ids="+a)}function countTiendasDestacadas(a){$.get("/acctiendas/count?ids="+a)}function acccountDestacado(){var a=$("#acc_fila_destacado").html();var c=$("#acc_hueco_destacado").html();var b=$("#acc_anuncio_destacado").html();$.get("/accdestacados/count?fila="+a+"&hueco="+c+"&id="+b)}function countDestacado(){var a=$("#fila_destacado").html();var c=$("#hueco_destacado").html();var b=$("#anuncio_destacado").html();$.get("/destacados/count?fila="+a+"&hueco="+c+"&id="+b)}function acccountRelatedPrints(){var a=$("#acc_related_ads").html();$.get("/relatedacc/views?ids="+a)}function countTragaperrasDestacado(){var a=10;var b=$("#ids_tragaperras").html();$.get("/tracking-impresiones?fila="+a+"&ids="+b+"&tipo=tragaperras")}function countOptimizadoImpresion(a){var b="";var c="";var e="";var d="";$(a).each(function(){b+=$(this).html()+":";e+=$(this).attr("fila")+":";d+=$(this).attr("hueco")+":";c+=$(this).attr("tipo")+":"});b=b.substring(0,(b.length-1));e=e.substring(0,(e.length-1));d=d.substring(0,(d.length-1));c=c.substring(0,(c.length-1));$.get("/tracking-impresiones-multi?id="+b+"&fila="+e+"&tipo="+c+"&hueco="+d)}function contactaDestacado(){var b=$("#c_fila_optimizado").html();var d=$("#c_hueco_optimizado").html();var c=$("#c_anuncio_optimizado").html();var a=$("#c_tipo_optimizado").html();$.get("/destacados/contacta?fila="+b+"&hueco="+d+"&id="+c+"&tipo="+a)}function acccountTragaperrasDestacado(){var a=10;var b=$("#ids_tragaperras").html();$.get("/accdestacados/views?fila="+a+"&ids="+b)}function acccontactaDestacado(){var a=$("#acc_fila_contacto").html();var c=$("#acc_hueco_contacto").html();var b=$("#acc_anuncio_contacto").html();$.get("/accdestacados/contacta?fila="+a+"&hueco="+c+"&id="+b)}function getLocation(){script=document.createElement("script");apikey="e99e331fd5e579389369b5fd39520ef8cd06a862429800319aabada0cef2808b";script.src="http://api.ipinfodb.com/v3/ip-country/?key="+apikey+unescape("%26")+"format=json"+unescape("%26")+"callback=initializeLocation";document.body.appendChild(script)}function initializeLocation(a){if((a.countryName=="FRANCE"&&document.location.host!="www.motofan.fr")){$.colorbox({href:"/popup_fr_motofan.html",innerWidth:250,innerHeight:150,title:"Motofan International"})}else{if(a.countryName=="ITALY"&&document.location.host!="it.motofan.com"){$.colorbox({href:"/popup_it_motofan.html",innerWidth:250,innerHeight:150,title:"Motofan International"})}else{if(a.countryName=="PORTUGAL"&&document.location.host!="www.motofan.com.pt"){$.colorbox({href:"/popup_pt_motofan.html",innerWidth:250,innerHeight:150,title:"Motofan International"})}else{if(a.countryName=="SPAIN"&&document.location.host!="www.motofan.com"){$.colorbox({href:"/popup_es_motofan.html",innerWidth:250,innerHeight:150,title:"Motofan International"})}else{if(a.countryName=="BELGIUM"&&document.location.host!="www.motofan.be"){$.colorbox({href:"/popup_be_motofan.html",innerWidth:250,innerHeight:150,title:"Motofan International"})}else{if(a.countryName=="BRAZIL"&&document.location.host!="www.motofan.com.br"){$.colorbox({href:"/popup_br_motofan.html",innerWidth:250,innerHeight:150,title:"Motofan International"})}}}}}}}function scrollA(a){var b=$(a).offset().top;$("html,body").animate({scrollTop:b},500)}function setLocation(a){date_exp=new Date("December 31, 2020");if(a=="es"){document.cookie="motofan_location="+a+";expires="+date_exp+";path=/;domain=www.motofan.com"}else{if(a=="fr"){document.cookie="motofan_location="+a+";expires="+date_exp+";path=/;domain=www.motofan.fr"}else{if(a=="pt"){document.cookie="motofan_location="+a+";expires="+date_exp+";path=/;domain=www.motofan.com.pt"}else{if(a=="br"){document.cookie="motofan_location="+a+";expires="+date_exp+";path=/;domain=www.motofan.com.br"}else{if(a=="be"){document.cookie="motofan_location="+a+";expires="+date_exp+";path=/;domain=www.motofan.be"}else{document.cookie="motofan_location="+a+";expires="+date_exp+";path=/;domain=it.motofan.com"}}}}}return true}function borrar_feed(a){confirm(confirma_borrado,confirma_title,function(b){if(b==1){$.get("/ajax/borrar-mensaje-feed/"+a,function(c){if(c=="1"){window.location.reload()}})}});return false}function suggest(c,b,a){if(c.keyCode==27){$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();position_suggest=-1;searching=0;return}if((c.keyCode>=96&&c.keyCode<=109)||(c.keyCode>=48&&c.keyCode<=57)||(c.keyCode>=65&&c.keyCode<=90)||c.keyCode==8||c.keyCode==46||c.keyCode==32){position_suggest=-1;var d=$(b).val();if(d.length>=1&&d.length<=5){searching++;var e=searching;$.getJSON("/suggest-modelo/"+d+"/"+$("#"+a).val(),"",function(j){if(searching==e){$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();if($.browser.msie==true&&$.browser.version<7){var h=$(b).next(".suggest_wrapper").children("ul.suggest")}else{var h=$(b).parent().children("ul.suggest")}var g="";$.each(j,function(k,l){g+="<li rel='"+k+"'>"+l+"</li>"});g+="";$(g).appendTo(h);if($.browser.msie==true&&$.browser.version<7){$(h).parent(".suggest_wrapper").show()}$(h).show();$("ul.suggest li").click(function(){var k=$(this).html();if($.browser.msie==true&&$.browser.version<7){$(this).parent().parent().prev("input").attr("value",k)}else{$(this).parent().prev("input").attr("value",k)}$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();searching=0});var f=$(h).parents("form:eq(0)")}})}}else{if(c.keyCode==38){if(position_suggest<=-1){return false}$(".suggest li:eq("+position_suggest+")").removeClass("activo");position_suggest--;$(".suggest li:eq("+position_suggest+")").addClass("activo");$(b).val($(".suggest li.activo").html())}if(c.keyCode==40){if(position_suggest>=$(".suggest li").length-1){return false}$(".suggest li:eq("+position_suggest+")").removeClass("activo");position_suggest++;$(".suggest li:eq("+position_suggest+")").addClass("activo");$(b).val($(".suggest li.activo").html())}}}function suggestmarca(b,a){if(b.keyCode==27){$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();position_suggest=-1;searching=0;return}if((b.keyCode>=96&&b.keyCode<=109)||(b.keyCode>=48&&b.keyCode<=57)||(b.keyCode>=65&&b.keyCode<=90)||b.keyCode==8||b.keyCode==46||b.keyCode==32){position_suggest=-1;var c=$(a).val();if(c.length>=2&&c.length<=5){searching++;var d=searching;$.getJSON("/suggest-marca/"+c+"/","",function(g){if(searching==d){$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();if($.browser.msie==true&&$.browser.version<7){var f=$(a).next(".suggest_wrapper").children("ul.suggest")}else{var f=$(a).parent().children("ul.suggest")}var e="";$.each(g,function(h,j){e+="<li rel='"+h+"'>"+j+"</li>"});$(e).appendTo(f);if($.browser.msie==true&&$.browser.version<7){$(f).parent(".suggest_wrapper").show()}$(f).show();$("ul.suggest li").click(function(){var h=$(this).html();if($.browser.msie==true&&$.browser.version<7){$(this).parent().parent().prev("input").attr("value",h)}else{$(this).parent().prev("input").attr("value",h)}if($("input#id_marca").length!=0){$("input#id_marca").val($(this).attr("rel"))}searching=0;$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide()})}else{}})}}else{if(b.keyCode==38){if(position_suggest<=-1){return false}$(".suggest li:eq("+position_suggest+")").removeClass("activo");position_suggest--;$(".suggest li:eq("+position_suggest+")").addClass("activo")}if(b.keyCode==40){if(position_suggest>=$(".suggest li").length-1){return false}$(".suggest li:eq("+position_suggest+")").removeClass("activo");position_suggest++;$(".suggest li:eq("+position_suggest+")").addClass("activo")}}}function suggestusername(b,a){if(b.keyCode==27){$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();position_suggest=-1;searching=0;return}if((b.keyCode>=96&&b.keyCode<=109)||(b.keyCode>=48&&b.keyCode<=57)||(b.keyCode>=65&&b.keyCode<=90)||b.keyCode==8||b.keyCode==46||b.keyCode==32){position_suggest=-1;var c=$(a).val();if(c.length>=2&&c.length<=5){searching++;var d=searching;$.getJSON("/suggest-usuario/"+c,"",function(g){if(searching==d){$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();if($.browser.msie==true&&$.browser.version<7){var f=$(a).next(".suggest_wrapper").children("ul.suggest")}else{var f=$(a).parent().children("ul.suggest")}var e="";$.each(g,function(h,j){e+="<li rel='"+j.id+"'>";e+='<img src="'+j.img+'" width="25" height="25"/>';e+="<strong>"+j.username+"</strong>";e+="</li>"});$(e).appendTo(f);if($.browser.msie==true&&$.browser.version<7){$(f).parent(".suggest_wrapper").show()}$(f).show();$("ul.suggest li").click(function(){var j=$(this).children("strong").html();var h=$(this).attr("rel");$("#username").val(j);$("#id_usuario_para").val(h);searching=0;$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide()})}else{}})}}if(b.keyCode==38){if(position_suggest<=-1){return false}$(".suggest li:eq("+position_suggest+")").removeClass("activo");position_suggest--;$(".suggest li:eq("+position_suggest+")").addClass("activo")}if(b.keyCode==40){if(position_suggest>=$(".suggest li").length-1){return false}$(".suggest li:eq("+position_suggest+")").removeClass("activo");position_suggest++;$(".suggest li:eq("+position_suggest+")").addClass("activo")}}function suggesttab(b){if(b.keyCode==9||b.keyCode==13){if(position_suggest!=-1){var c=$(".suggest li:eq("+position_suggest+")").children("strong").html();var a=$(".suggest li:eq("+position_suggest+")").attr("rel");$("#username").val(c);$("#id_usuario_para").val(a);searching=0;$(".suggest").empty();if($.browser.msie==true&&$.browser.version<7){$(".suggest_wrapper").hide()}$(".suggest").hide();position_suggest=-1}if(b.keyCode==9){return true}else{return false}}else{return true}}function var_dump(a){if(typeof a=="object"){return"Type: "+typeof(a)+((a.constructor)?"\nConstructor: "+a.constructor:"")+"\nValue: "+a}else{return"Type: "+typeof(a)+"\nValue: "+a}}function mas_refinador(b){var a="#"+b;$.colorbox({html:$(a).html(),title:$(a).find("h1:eq(0)").html(),innerWidth:720,innerHeight:400})}function mas_refinador_nueva(a){selected="";$("input[id^='"+a+"']:checked").each(function(){selected+="&selected[]="+this.value});if(a=="modelo"){$("input[id^='marca']:checked").each(function(){selected+="&marca[]="+this.value})}$.get("/motos/vermas/"+a,selected,function(b){if(b!=""){$("#mas_"+a).html(b);$.colorbox({href:"#mas_"+a,inline:true,innerWidth:720,innerHeight:400,onCleanup:function(){$(".refinador_box").html("")}});$("#cboxContent .refinador_box").show()}})}function capa_reload(){tope=$(window).scrollTop();width=$(document).width();height=$(document).height();$("body").prepend("<div id='layer'><span><img src='http://images.motofan.com/css/images/loading.gif' width='48' height='48'/></span></div>");$("#layer").width(width).height(height);$("#layer span").css("top",tope+($(window).height()/2)-24).css("left",(width/2)-24)}function enviavermas(a){$("#"+a).html("");$(".check2:checked").each(function(c,b){$("#"+a).prepend("<li><input type='checkbox' class='check' checked='checked' value='"+$(b).val()+"' id='"+$(b).attr("id")+"' name='"+$(b).attr("name")+"'>"+$(b).parent().text()+"</li>")});capa_reload();$("#refinadores").submit()}function enviarContacto(f,d,e,a,b){var c=$("#form_"+f).serialize();if($("#form_"+f+" textarea").val()==""){alert(b);return false}$.post("/ajax/contacta",c,function(h){var j=10;var l=$("#c_hueco_optimizado").html();var k=$("#c_anuncio_optimizado").html();var g="tragaperras";$.get("/destacados/contacta?fila="+j+"&hueco="+e+"&id="+f+"&tipo="+g);if(h=="1"){$("#form_"+f).empty().html('<p style="margin:100px 10px;">'+d+'</p><center><img src="http://images.motofan.com/css/images/loading_animation.gif"/></center>');setTimeout("reload_tragaperras("+e+","+f+', "'+a+'")',"2000")}})}function intercambia_destacado(b,a){$("#destacado_cabecera_"+b).removeClass("destacado_visible");$("#destacado_cabecera_"+b).fadeOut(500,function(){$("#destacado_cabecera_"+b).hide()});$("#destacado_cabecera_"+a).addClass("destacado_visible");$("#destacado_cabecera_"+a).fadeIn(1500)}function pasa_thumb(b,c,a){$("#slideshow_anuncio ul").animate({right:b+"px"},100,function(){if(a==undefined){if(c=="+"){var e=$("#slideshow_anuncio li.activo");var h=$("#slideshow_anuncio li.activo").next("li");h.addClass("activo");h.prev().removeClass("activo")}else{var e=$("#slideshow_anuncio li.activo");var g=$("#slideshow_anuncio li.activo").prev("li");g.addClass("activo");g.next().removeClass("activo")}}else{var e=$("#slideshow_anuncio li.activo");$("#slideshow_anuncio ul li").removeClass("activo");$("#slideshow_anuncio ul li").eq(a).addClass("activo")}var f=$(e).find("img").attr("rel");var d=$("#slideshow_anuncio ul li.activo a img").attr("rel");$("#"+f).fadeOut(100,function(){$("a#"+d).fadeIn(100);$("a#"+d).css("display","block")})})}function next_foto(d){var a=$(d).parent().children(".moto_user_thumbs").children("ul");var f=$(a).children("li.activo");var b=$(d).parent().find("a.foto_activa");var c=0;var e=true;if($(f).next().length!=0){$(f).next().addClass("activo").prev().removeClass("activo");$(a).children("li").each(function(){if(!$(this).is(".activo")&&e){c-=$(this).width()+5}else{e=false}});$(a).animate({marginLeft:c+"px"});$(b).fadeOut(100,function(){$(b).hide();$(b).removeClass("foto_activa");$(b).next().fadeIn(100,function(){$(this).addClass("foto_activa")})})}}function prev_foto(d){var a=$(d).parent().children(".moto_user_thumbs").children("ul");var f=$(a).children("li.activo");var b=$(d).parent().find("a.foto_activa");var c=0;var e=true;if($(f).prev().length!=0){$(f).prev().addClass("activo").next().removeClass("activo");$(a).children("li").each(function(){if(!$(this).is(".activo")&&e){c-=$(this).width()+5}else{e=false}});$(a).animate({marginLeft:c+"px"});$(b).fadeOut(100,function(){$(b).hide();$(b).removeClass("foto_activa");$(this).prev().fadeIn(100,function(){$(this).addClass("foto_activa")})})}}function this_foto(e){var a=$(e).parents("ul:eq(0)");var g=$(a).children("li.activo");var c=$(a).parent().parent().find("a.foto_activa");var d=0;var f=true;var b=0;$(g).removeClass("activo");$(e).parent().addClass("activo");$(a).children("li").each(function(h){if(!$(this).is(".activo")&&f){d-=$(this).width()+5;b++}else{f=false}});$(a).animate({marginLeft:d+"px"});$(c).fadeOut(100,function(){$(c).hide();$(c).removeClass("foto_activa");$(this).parent().children().eq(b).addClass("foto_activa").fadeIn(100)});return false}function next_moto(id){eval("i = i_"+id+"");eval("max = max_"+id+"");i++;if(i<max){$("#"+id).animate({marginLeft:-(inc*i)},500,function(){$("#total_"+id).html(i+1)})}else{i=0;$("#"+id).animate({marginLeft:-(inc*i)},500,function(){$("#total_"+id).html(i+1)})}$(".ver_mas_desc").show().prev().hide().parent().css("height","48px");eval("i_"+id+" = i")}function next_moto_ajax(id){eval("i = i_"+id+"");eval("max = max_"+id+"");i++;if(i>=max){i=0}$("#mis_motos").html("");$.get("/ajax/next_moto?i="+i,function(data){$("#mis_motos").html(data);$("#total_"+id).html(i+1);$("a.thickbox").colorbox({transition:"elastic",height:"90%",scrolling:"false",opacity:"0.6",current:"{current}/{total}"})});eval("i_"+id+" = i")}function prev_moto(id){eval("i = i_"+id+"");eval("max = max_"+id+"");i--;if(i>=0){$("#"+id).animate({marginLeft:-(inc*i)},500,function(){$("#total_"+id).html(i+1)})}else{i=max-1;$("#"+id).animate({marginLeft:-(inc*i)},500,function(){$("#total_"+id).html(i+1)})}$(".ver_mas_desc").show().prev().hide().parent().css("height","48px");eval("i_"+id+" = i")}function prev_moto_ajax(id){eval("i = i_"+id+"");eval("max = max_"+id+"");i--;if(i<0){i=max-1}$("#mis_motos").html("");$.get("/ajax/next_moto?i="+i,function(data){$("#mis_motos").html(data);$("#total_"+id).html(i+1);$("a.thickbox").colorbox({transition:"elastic",height:"90%",scrolling:"false",opacity:"0.6",current:"{current}/{total}"})});eval("i_"+id+" = i")}function play(a){if(auto_play){clearInterval(auto_play);auto_play=false}else{auto_play=setInterval("next_moto('"+a+"')",2000)}}function laquiero(a,c,b,d){$.get(a,function(e){if(e=="1"){$(c).remove();alert(d)}else{alert(b)}})}function show_input(a){$(a).parent().find(":submit").show()}function hide_input(a){$(a).parent().find(":submit").hide()}function save_status(a){$.getJSON("/guardar-status",{status:$("#usertext").val()},function(b){if(b.error==0){$("#usertext").css("border","1px solid #ddd").val(b.status);$(".status_form #submit").hide()}});return false}function getTelefono(b,a){$.get("/ajax/telefono?id="+b+"&usuario="+a,function(d){if(d.error==0){showTelefono(d.info)}else{var c=d.url_callback;$.colorbox({href:c,iframe:true,transition:"elastic",innerHeight:220,innerWidth:320,scrolling:"false",opacity:"0.6",current:""})}},"json")}function showTelefono(a){$("#show_telefono").html(a);if($("#hueco_optimizado").length>0){var c=$("#fila_optimizado").html();var e=$("#hueco_optimizado").html();var d=$("#anuncio_optimizado").html();var b=$("#tipo_optimizado").html();$.get("/destacados/telefono?fila="+c+"&hueco="+e+"&id="+d+"&tipo="+b)}}function getTelefonoTaller(b,a){$.get("/ajax/telefonotaller?usuario="+b,function(c){$(a).before(c);$(a).remove()})}function getTelefonoAccesorios(d,b,a,c){$.get("/ajax/telefono-accesorios?id="+d+"&tipo="+b+"&usuario="+a,function(e){$("#show_telefono").html(e);if($("#acc_hueco_destacado").length>0){var f=$("#acc_fila_destacado").html();var h=$("#acc_hueco_destacado").html();var g=$("#acc_anuncio_destacado").html();$.get("/accdestacados/telefono?fila="+f+"&hueco="+h+"&id="+g)}})}function clonar_contacto(){$("#ventana_contacto").clone().appendTo("body").attr("id","ventana_contacto2").attr("class","");var a=$("#ventana_contacto2 h3").html();$("#ventana_contacto2 h3").remove();$("#ventana_contacto2 [rel='ads']").remove();$.colorbox({inline:true,href:"#ventana_contacto2",innerHeight:360,innerWidth:350,title:a,onCleanup:function(){$("#ventana_contacto2").remove()}})}function alerta(c,a){var b=$("#form_alerta").serialize();if($("#form_alerta .text").val()!=""&&validarEmail($("#form_alerta .text").val())){$.post("/ajax/alerta",b,function(d){$("#form_alerta").empty().html("<p>"+c+"</p>")})}else{alert(a)}return false}function actualizar_foto_preview(){if(top===window){thumbnailsLi=$("#thumbnails li");fotoPreviewPlace=$(".caja_foto img")}else{thumbnailsLi=$("#thumbnails li",top.document.body);fotoPreviewPlace=$(".caja_foto img",top.document.body)}if(thumbnailsLi.length>0){foto=thumbnailsLi.eq(0).children("img").attr("src")}else{foto="http://images.motofan.com/C/generic/misc.noimage_64x48.gif"}fotoPreviewPlace.attr("src",foto.replace("_td","_tl"))}function borrar_foto(a){$.get("/ajax/borrar-foto?id="+a,function(b){if(b=="1"){$("#li_foto_"+a).parent().remove();$("#lis_"+a).remove();actualizar_foto_preview()}})}function borrar_foto_mimoto(a){$.get("/ajax/borrar-foto-mimoto?id="+a,function(b){if(b=="1"){$("#li_foto_"+a).parent().remove()}})}function borrar_foto_tmp(a){$.get("/ajax/borrar-foto-tmp?id="+a,function(b){if(b=="1"){$("#foto_"+a).parent().remove()}})}function borrar_foto_tmp2(a){$.get("/ajax/borrar-foto-tmp2?id="+a,function(b){if(b=="1"){$("#foto_"+a).parent().remove()}})}function denunciar(b,a){$.post("/denunciar/"+b+"/"+a,$("#form_denunciar").serialize(),function(c){if(c=="1"){$("#form_denunciar").slideUp("slow");$("#mensaje_respuesta_ok").slideDown("slow")}else{if(c=="0"){$("#form_denunciar").slideUp("slow");$("#mensaje_respuesta_error").slideDown("slow")}else{tb_remove()}}})}function cambiar_pendiente(c,g,e,d,b){var f=$(c).parent();var a="/ajax/pendiente/"+g+"/"+e;$.get(a,function(h){if(h=="0"){$(f).children().children("img.estado_msg").attr("src","http://images.motofan.com/css/images/ico.mail.plus.png");$(c).parent().parent().toggleClass("bold");$(c).attr("title",d)}else{if(h=="1"){$(f).children().children("img.estado_msg").attr("src","http://images.motofan.com/css/images/ico.email.png");$(c).parent().parent().toggleClass("bold");$(c).attr("title",b)}}})}function destacar_mensaje(a,d,b){var c=$(a).parent();$.get("/ajax/destacar-mensaje/"+d+"/"+b,function(e){if(e=="0"){$(c).children().children("img.destacado_msg").attr("src","http://images.motofan.com/css/images/ico.estrella_off.png")}else{if(e=="1"){$(c).children().children("img.destacado_msg").attr("src","http://images.motofan.com/css/images/ico.estrella_on.png")}}})}function leer_mensaje(a,c,b){$.get("/ajax/marcar-leido/"+c,function(d){if(d=="1"){$(a).parent().parent().parent().find(".ventana_dinamica:last").toggle();$(a).parent().parent().parent().parent().removeClass("bold");$(a).parent().parent().parent().parent().find("img.estado_msg").attr("src","http://images.motofan.com/css/images/ico.email.png");$(a).parent().parent().parent().parent().find("a").attr("title",b)}});return false}function borrar_mensaje(a,c,b){confirm(confirma_borrado,confirma_title,function(d){if(d==1){$.get("/ajax/borrar-mensaje/"+c+"/"+b,function(e){$(a).parent().parent().hide()})}});return false}function reenviar_mensaje(a){confirm(confirma_reenvio,reenvio_title,function(b){if(b==1){$.get("/ajax/reenviar-mensaje/"+a,function(c){if(c=="1"){alert(reenvio_ok,reenvio_title)}else{alert(reenvio_fail,reenvio_title)}})}});return false}function recuperar_mensaje(a,b){confirm(confirma_recuperar,recuperar_title,function(c){if(c==1){$.get("/ajax/recuperar-mensaje/"+b,function(d){if(d==1){$(a).parent().parent().hide()}})}});return false}function validarEmail(a){if(/^\w+([\.+-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(a)){return(true)}else{return(false)}}function show_advance(){if(abierto){$("#img_advance").attr("src","http://images.motofan.com/css/images/misc.flechita_abajo.png");html=$("#buscador_listado li.submit2").html();$("#buscador_listado li.submit2 input").fadeOut("normal",function(){$(this).html("");$("#buscador_listado li.submit").hide().html(html).fadeIn("normal");$("#buscador_listado").css("height","296px")})}else{$("#img_advance").attr("src","http://images.motofan.com/css/images/misc.flechita_arriba.png");html=$("#buscador_listado li.submit").html();$("#buscador_listado li.submit input").fadeOut("normal",function(){$(this).html("");$("#buscador_listado li.submit2").html(html).fadeIn("normal")})}$("#avanzada").toggle(function(){abierto=!abierto})}function poner(){vals=$("#marcas").val();i=0;while(i<vals.length){elem=$("#marcas option[value="+vals[i]+"]");$("#mismarcas").append(elem);i++}}function quitar(){vals=$("#mismarcas").val();i=0;while(i<vals.length){elem=$("#mismarcas option[value="+vals[i]+"]");$("#marcas").append(elem);i++}}function rellenar_marcas_taller(){var a=$("#mismarcas option");var b="";i=0;while(i<a.length){b+=$(a[i]).val()+",";i++}$("#mismarcas_input").val(b)}function centrar_street(a){panoClient.getNearestPanorama(a,showPanoData);$("#lat").val(a.y);$("#long").val(a.x);$("#yaw").val(0);$("#pitch").val(0)}function showPanoData(a){if(a.code!=200){$("#edit_mapa_street").hide();$("#no_edit_mapa_street").show()}else{$("#no_edit_mapa_street").hide();$("#edit_mapa_street").show();myPOV={yaw:0,pitch:0};pano_edit_mapa_street.setLocationAndPOV(a.location.latlng,myPOV)}}function moveMap(){pos=map_map.getCenter();map_map2=new google.maps.Map2(document.getElementById("main_streetview"),{size:new GSize(300,200)});map_map2.setCenter(pos,15);map_map2.addOverlay(new GMarker(pos));$("#map").remove()}function updateYaw(a){$("#yaw").val(a)}function updatePitch(a){$("#pitch").val(a)}function updatePosition(a){$("#lat").val(a.lat);$("#long").val(a.lng)}function filtro_marca(d){var a=d.value;var b=$("#oficial:checked").val();var c="";if(b){c="&oficial=1"}if(a!=0){uri="/st?marca="+a+c;location.href=uri}else{uri="/st?"+c;location.href=uri}}function filtro_provincia(e){var b=e.value;var a=$("#combo_marcas").val();var c=$("#oficial:checked").val();var d="";if(c){d="&oficial=1"}if(a){marca="&marca="+a}else{marca=""}if(b!=0){uri="/st?provincia="+b+marca+d;location.href=uri}else{uri="/st?"+marca+d;location.href=uri}}function filtro_localidad(f){var d=f.value;var b=$("#combo_marcas").val();var a=$("#combo_provincias").val();var c=$("#oficial:checked").val();var e="";if(c){e="&oficial=1"}if(b){marca="&marca="+b}else{marca=""}if(a&&marca){provincia="&provincia="+a}else{provincia=""}if(d!=0){uri="/st?ciudad="+d+marca+provincia+e;location.href=uri}else{uri="/st?"+marca+provincia+e;location.href=uri}}function filtro_oficial(d){var c=$("#combo_ciudades").val();var b=$("#combo_marcas").val();var a=$("#combo_provincias").val();if(b){marca="&marca="+b}else{marca=""}if(a){provincia="&provincia="+a}else{provincia=""}if(c){ciudad="&ciudad="+c}else{ciudad=""}if($("#oficial:checked").val()){oficia="1"}else{oficia="0"}uri="/st?oficial="+oficia+ciudad+marca+provincia;location.href=uri}function cargaMarcasTaller(){$.get("/talleres/refinador/marca",function(a){if(a){jQuery.each(a,function(b,c){$("#combo_marcas").append("<option value='"+c.id+"'>"+c.marca+" ("+c.cnt+")</option>")})}},"json")}function cargaProvinciasTaller(a){$.get("/talleres/refinador/provincia?marca="+a,function(b){if(b){jQuery.each(b,function(c,d){$("#combo_marcas").append("<option value='"+d.id+"'>"+d.marca+" ("+d.cnt+")</option>")})}},"json")}function subir_anuncio(b,d,c,a){url="/subir-anuncio/"+d+"/"+a+"/"+c;elemento=$(b).parent();$(elemento).html("<img src='http://images.motofan.com/css/images/loading_animation.gif'/>");$.getJSON(url,function(e){if(e.error==1){alert(e.msg,e.title);$(elemento).html("")}else{$(elemento).html(e.msg)}})}function alta_notificacion(a){$.get(a,"",function(){$(".mensaje_respuesta").slideUp()})}function filtro_sinresultados(a){var b=$(a);if(b.attr("rel")){location.href=b.attr("rel")}}function reload_tragaperras(g,a,b){var f=$("#telefono").val();var e=$("#nombre").val();var d=$("#email").val();var c=$("#texto").val();$.post("/ajax/gettragaperras",{id:a,tipo:b,index:g,telefono:f,nombre:e,text:c,email:d},function(j){var h=g%3;if(h==0){h=3}if(j.error==0){$("#tragaperras-"+h).html(j.content);$.get("/tracking-impresiones?id="+j.rel_id+"&fila=10&hueco="+j.pos+"&tipo=tragaperras")}else{$("#tragaperras-"+h).remove()}},"json")}function show_anuncios(a){$("#anuncios").show();$("#info").hide();$("#pestana_selected").addClass("selected");$("#mas_info").parent().removeClass("selected")}function borrar_mimoto(a){$.get("/mis-motos/eliminar/"+a,{},function(b){if(b=="1"){$("#mimoto"+a).remove()}})}function cleanHTML(a){lleno=false;texto=$.ajax({url:"/ajax/cleanhtml",type:"POST",async:false,data:"html="+escape(a)}).responseText;return texto}function recortarImagen(a,b){if($("img.photo").length>0){$("#avatarholder img").css({width:Math.round((90/190)*500),height:Math.round((90/190)*374),marginLeft:0,marginTop:0});$("#w").val(190);$("#h").val(190);$("#x1").val(0);$("#y1").val(0);$("img.photo").imgAreaSelect({x1:0,y1:0,x2:190,y2:190,aspectRatio:"1:1",minWidth:190,minHeight:190,handles:true,persistent:true,onSelectEnd:function(c,d){$("#w").val(d.width);$("#h").val(d.height);$("#x1").val(d.x1);$("#y1").val(d.y1)},onSelectChange:function(d,f){var e=90/f.width;var c=90/f.height;$("#avatarholder img").css({width:Math.round(e*a),height:Math.round(c*b),marginLeft:-Math.round(e*f.x1),marginTop:-Math.round(c*f.y1)})}})}}function cambio_home(b,a){$(".container_home").hide();$("#container_"+b).show();$(a).parent().children("li").removeClass("selected");$(a).addClass("selected")}function aparcar(b,a,c){aparcadas=parseInt($("#parking_contador").html());$.get(a,{ajax:1},function(){$("#desparking_"+c).show();$("#parking_"+c).hide();$("#parking_contador").html(aparcadas+1)})}function desaparcar(c,b,d,a){aparcadas=parseInt($("#parking_contador").html());$.get(b,{ajax:1},function(){$("#desparking_"+d).hide();$("#parking_"+d).show();$("#parking_contador").html(aparcadas-1);if(a=="reload"){location.href=location.href}})}function goToContacts(a){location.href=a.value}function cambio_tab(b,c){var e=$(".tab-destacados").find("li.selected");var a=e.attr("id");var d="container_"+a;var f="container_"+b;if(b==a){return}else{e.removeClass("selected");$("#"+b).addClass("selected");$("#"+d+" li").fadeOut(0,function(){$("#"+f).show();$("#"+d).hide();$("#"+f+" li").fadeIn(0)})}}function cambiar_metodo(a){if(a.value=="DB"){$("#inputs_entidad_bancaria").slideDown();$("#inputs_tarjeta").slideUp()}else{if(a.value=="TC"){$("#inputs_entidad_bancaria").slideUp();$("#inputs_tarjeta").slideDown()}}}function show_cvv2(){$.colorbox({inline:true,href:"#cvv2",innerHeight:205,innerWidth:500,onCleanup:function(){$("#cvv2").hide()}});$("#cvv2").show()}function clickcommand(a){$.get(a);return true}function sumar_total(){total=0;if($("#resumen_moto span.importe").length==1){total+=parseFloat($("#resumen_moto span.importe").attr("rel"))}if($("#resumen_acc span.importe").length==1){total+=parseFloat($("#resumen_acc span.importe").attr("rel"))}if($("#resumen_dirs span.importe").length==1){total+=parseFloat($("#resumen_dirs span.importe").attr("rel"))}return total.toFixed(2)}function actualizar_precios_packs(a){$(".preu .old").html("");jQuery.each(a,function(b,c){if(0<$("#preu-"+b).length){$("#preu-"+b+" .final").html(c.toString()+"&nbsp;"+a.currency_symbol);$("#preu-"+b).siblings(".pack").attr("rev",c.toString());$("#preu-"+b).siblings(".pack").attr("rel",c.toString()+" "+a.currency_symbol)}});if(typeof a.old!="undefined"){jQuery.each(a.old,function(b,c){if(0<$("#preu-"+b+" .old").length){$("#preu-"+b+" .old").html(c.toString()+"&nbsp;"+a.currency_symbol)}})}$(".preu .old, .preu .final").effect("highlight",{},2000);pack_motos=$("input[name=packmotos]:checked");if(0<pack_motos.length){nombre=$(pack_motos).parent().text();precio=$(pack_motos).parent().parent().attr("rel");precioreal=$(pack_motos).parent().parent().attr("rev");$("#resumen_moto").effect("highlight",{},2000);$("#resumen_moto").html('<span class="pack-contratado">'+nombre+'</span><span class="importe" rel="'+precioreal+'">'+precio+"</span>")}pack_accs=$("input[name=packaccs]:checked");if(0<pack_accs.length){nombre=$(pack_accs).parent().text();precio=$(pack_accs).parent().parent().attr("rel");precioreal=$(pack_accs).parent().parent().attr("rev");$("#resumen_acc").effect("highlight",{},2000);$("#resumen_acc").html('<span class="pack-contratado">'+nombre+'</span><span class="importe" rel="'+precioreal+'">'+precio+"</span>")}pack_dirs=$("input[name=packdirs]:checked");if(0<pack_dirs.length){nombre=$(pack_dirs).parent().text();precio=$(pack_dirs).parent().parent().attr("rel");precioreal=$(pack_dirs).parent().parent().attr("rev");$("#resumen_dirs").effect("highlight",{},2000);$("#resumen_dirs").html('<span class="pack-contratado">'+nombre+'</span><span class="importe" rel="'+precioreal+'">'+precio+"</span>")}$("#resumen_packs .total .importe").html(sumar_total())}function unselect_packs(a,b){$("input[name="+a+"]").attr("checked",false);$("#"+b).html("");$("#resumen_packs .total .importe").html(sumar_total())}function contactacheck(a){$("#form_contacta #submit").hide();$("#form_contacta li.submit").append('<div id="submit_loading"><center><img src="http://images.motofan.com/css/images/loading_animation.gif"/></center></div>');$.post("/ajax/contacta-multi",a,function(b){if(b.error==0&&b.related==1){$("body").append('<div id="ventana_multilead">'+b.html+"</div>");onloadFunction=function(){$("#cboxClose").remove()};height=370;if(b.motonueva==0){width=700}else{width=860;$("body").delegate("#ventana_multilead #lead_motonueva","click",function(){if($("#lead_motonueva").is(":checked")){$("#form_multilead_all #motonueva, #form_multilead_single #motonueva").val("1")}else{$("#form_multilead_all #motonueva, #form_multilead_single #motonueva").val("0")}})}$.colorbox({inline:true,href:"#ventana_multilead",innerHeight:height,innerWidth:width,overlayClose:false,escKey:false,onLoad:onloadFunction})}else{$("#form_contacta #submit").remove();$("#form_contacta").submit()}},"json")}function replace_summary(a,e,d){var c="ajax/getsummary?site="+d+"&place="+a;var g=$("#summaryholder div.summary").attr("id").split("_");var b=parseInt(g[1])+1;var f=parseInt(g[1])-1;if(a==b){show_summary(1,e,d)}else{if(a==f){show_summary(-1,e,d)}else{$.getJSON(c,function(h){if(h.ok){$("#summaryholder").fadeOut(1000,function(){$("#summaryholder").html(h.html);$("#summaryholder").fadeIn(1000)});update_summary(a,h)}})}}}function show_summary(e,f,d){var g=$("#summaryholder div.summary").attr("id").split("_");var a=g[1];var b=parseInt(a)+e;if(b>f){b=1}else{if(b<1){b=f}}var c="ajax/getsummary?site="+d+"&place="+b;$.getJSON(c,function(h){if(h.ok){var j=$(h.html);if(e>0){$("#summaryholder").append(j);$("#summaryholder div.summary:eq(0)").animate({marginLeft:"-625px"},500,"linear",function(){$("#summaryholder div:eq(0)").remove()})}else{$("#summaryholder").css("marginLeft","-625px");$("#summaryholder").prepend(j);$("#summaryholder").animate({marginLeft:"0"},500,"linear",function(){$("#summaryholder div.summary:eq(1)").remove()})}update_summary(b,h)}})}function update_summary(a,b){$("#summary_changer a.current").removeClass("current");$("#summaryholder a.thickbox").colorbox({transition:"elastic",height:"90%",scrolling:"false",opacity:"0.6",current:"{current}/{total}"});$("#changer_"+a).addClass("current");$("#summary_link").attr("href",b.href).attr("title",b.title).html(b.title)}function ver_todos_modelos(b,a){$("#"+b+" .hide").slideToggle("normal")}function check_all(){$("input[name='id_categoria[]']").attr("checked","checked")}function uncheck_all(){$("input[name='id_categoria[]']").removeAttr("checked")}function poner_motos(){params=$("#form_motosnuevas").serialize();if($("input[name='id_categoria[]']:checked").length==$("input[name='id_categoria[]']").length){params="id_marca="+$("#id_marca").val()+"&id_categoria[]=0"}$.get("/moto-nueva/poner",params,function(a){if(a.error=="0"){$(".holder").html(a.html);$("#form_motosnuevas").reset()}else{alert(a.errortxt)}},"json")}function quitar_motos(){if($("input[name=idmarca]:checked").length==1){params="id_marca="+$("input[name=idmarca]:checked").val();$.get("/moto-nueva/quitar",params,function(a){if(a.error=="0"){$(".holder").html(a.html);$("#form_motosnuevas").reset()}else{alert(a.errortxt)}},"json")}}function votar(c,b,a){url="/ajax/valorar";if("U"==a){url="/ajax/votar"}$.post(url,{id:c,voto:b,tipo:a},function(f){if(f.error==0){if("U"==a){var e=0;var d="";while(e<b){d+='<li class="estrellas_puntua" style="width:16px;"><img src="http://images.motofan.com/css/images/ico.estrella_on.gif"/></li>';e++}while(e<5){d+='<li class="estrellas_puntua" style="width:16px;"><img src="http://images.motofan.com/css/images/ico.estrella_off.gif"/></li>';e++}$("#rate .estrellas_puntua").remove();$("#rate").append(d)}else{$("#megusta").html(f.html);$("span.megustacount").html("("+f.megusta+")");$("span.nomegustacount").html("("+f.nomegusta+")")}}else{if(f.error==5){onLoadFunction=function(){$("#cboxClose").remove()};onCleanupFunction=function(){votar(c,b,a)};$.getJSON("/ajax/setusername",function(g){$.colorbox({html:g.html,title:f.msg,innerWidth:320,innerHeight:100,overlayClose:false,escKey:false,scrolling:false,onLoad:onLoadFunction,onCleanup:onCleanupFunction})})}}if(f.error!=5){alert(f.msg,f.msgtitle)}},"json")}function resetCropImage(){$("img.photo").imgAreaSelect({remove:true})};
