﻿/* DarcySoft Combined API - 21/02/2012 18:11:49 */
/*
 * jQuery JavaScript Library v1.4.1
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Mon Jan 25 19:43:33 2010 -0500
 */
(function(aP,aM){var F=function(aV,aU){return new F.fn.init(aV,aU);},b=aP.jQuery,a=aP.$,l=aP.document,ak,M=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,E=/^.[^:#\[\.,]*$/,ah=/\S/,az=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,au=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,aN=navigator.userAgent,d,T=false,U=[],m,aK=Object.prototype.toString,B=Object.prototype.hasOwnProperty,L=Array.prototype.push,aG=Array.prototype.slice,C=Array.prototype.indexOf;
F.fn=F.prototype={init:function(aZ,aU){var aX,aW,aY,aV;if(!aZ){return this;}if(aZ.nodeType){this.context=this[0]=aZ;this.length=1;return this;}if(typeof aZ==="string"){aX=M.exec(aZ);if(aX&&(aX[1]||!aU)){if(aX[1]){aV=(aU?aU.ownerDocument||aU:l);aY=au.exec(aZ);if(aY){if(F.isPlainObject(aU)){aZ=[l.createElement(aY[1])];F.fn.attr.call(aZ,aU,true);}else{aZ=[aV.createElement(aY[1])];}}else{aY=e([aX[1]],[aV]);aZ=(aY.cacheable?aY.fragment.cloneNode(true):aY.fragment).childNodes;}}else{aW=l.getElementById(aX[2]);
if(aW){if(aW.id!==aX[2]){return ak.find(aZ);}this.length=1;this[0]=aW;}this.context=l;this.selector=aZ;return this;}}else{if(!aU&&/^\w+$/.test(aZ)){this.selector=aZ;this.context=l;aZ=l.getElementsByTagName(aZ);}else{if(!aU||aU.jquery){return(aU||ak).find(aZ);}else{return F(aU).find(aZ);}}}}else{if(F.isFunction(aZ)){return ak.ready(aZ);}}if(aZ.selector!==aM){this.selector=aZ.selector;this.context=aZ.context;}return F.isArray(aZ)?this.setArray(aZ):F.makeArray(aZ,this);},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length;
},toArray:function(){return aG.call(this,0);},get:function(aU){return aU==null?this.toArray():(aU<0?this.slice(aU)[0]:this[aU]);},pushStack:function(aU,aV,aX){var aW=F(aU||null);aW.prevObject=this;aW.context=this.context;if(aV==="find"){aW.selector=this.selector+(this.selector?" ":"")+aX;}else{if(aV){aW.selector=this.selector+"."+aV+"("+aX+")";}}return aW;},setArray:function(aU){this.length=0;L.apply(this,aU);return this;},each:function(aV,aU){return F.each(this,aV,aU);},ready:function(aU){F.bindReady();
if(F.isReady){aU.call(l,F);}else{if(U){U.push(aU);}}return this;},eq:function(aU){return aU===-1?this.slice(aU):this.slice(aU,+aU+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(aG.apply(this,arguments),"slice",aG.call(arguments).join(","));},map:function(aU){return this.pushStack(F.map(this,function(aV,aW){return aU.call(aV,aW,aV);}));},end:function(){return this.prevObject||F(null);},push:L,sort:[].sort,splice:[].splice};F.fn.init.prototype=F.fn;
F.extend=F.fn.extend=function(){var a2=arguments[0]||{},aX=1,aY=arguments.length,aW=false,a0,aZ,a1,aV;if(typeof a2==="boolean"){aW=a2;a2=arguments[1]||{};aX=2;}if(typeof a2!=="object"&&!F.isFunction(a2)){a2={};}if(aY===aX){a2=this;--aX;}for(;aX<aY;aX++){if((a0=arguments[aX])!=null){for(aZ in a0){a1=a2[aZ];aV=a0[aZ];if(a2===aV){continue;}if(aW&&aV&&(F.isPlainObject(aV)||F.isArray(aV))){var aU=a1&&(F.isPlainObject(a1)||F.isArray(a1))?a1:F.isArray(aV)?[]:{};a2[aZ]=F.extend(aW,aU,aV);}else{if(aV!==aM){a2[aZ]=aV;
}}}}}return a2;};F.extend({noConflict:function(aU){aP.$=a;if(aU){aP.jQuery=b;}return F;},isReady:false,ready:function(){if(!F.isReady){if(!l.body){return setTimeout(F.ready,13);}F.isReady=true;if(U){var aU,aV=0;while((aU=U[aV++])){aU.call(l,F);}U=null;}if(F.fn.triggerHandler){F(l).triggerHandler("ready");}}},bindReady:function(){if(T){return;}T=true;if(l.readyState==="complete"){return F.ready();}if(l.addEventListener){l.addEventListener("DOMContentLoaded",m,false);aP.addEventListener("load",F.ready,false);
}else{if(l.attachEvent){l.attachEvent("onreadystatechange",m);aP.attachEvent("onload",F.ready);var aV=false;try{aV=aP.frameElement==null;}catch(aU){}if(l.documentElement.doScroll&&aV){n();}}}},isFunction:function(aU){return aK.call(aU)==="[object Function]";},isArray:function(aU){return aK.call(aU)==="[object Array]";},isPlainObject:function(aV){if(!aV||aK.call(aV)!=="[object Object]"||aV.nodeType||aV.setInterval){return false;}if(aV.constructor&&!B.call(aV,"constructor")&&!B.call(aV.constructor.prototype,"isPrototypeOf")){return false;
}var aU;for(aU in aV){}return aU===aM||B.call(aV,aU);},isEmptyObject:function(aV){for(var aU in aV){return false;}return true;},error:function(aU){throw aU;},parseJSON:function(aU){if(typeof aU!=="string"||!aU){return null;}if(/^[\],:{}\s]*$/.test(aU.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return aP.JSON&&aP.JSON.parse?aP.JSON.parse(aU):(new Function("return "+aU))();}else{F.error("Invalid JSON: "+aU);
}},noop:function(){},globalEval:function(aU){if(aU&&ah.test(aU)){var aV=l.getElementsByTagName("head")[0]||l.documentElement,aW=l.createElement("script");aW.type="text/javascript";if(F.support.scriptEval){aW.appendChild(l.createTextNode(aU));}else{aW.text=aU;}aV.insertBefore(aW,aV.firstChild);aV.removeChild(aW);}},nodeName:function(aU,aV){return aU.nodeName&&aU.nodeName.toUpperCase()===aV.toUpperCase();},each:function(a0,aV,aU){var aZ,aW=0,aY=a0.length,aX=aY===aM||F.isFunction(a0);if(aU){if(aX){for(aZ in a0){if(aV.apply(a0[aZ],aU)===false){break;
}}}else{for(;aW<aY;){if(aV.apply(a0[aW++],aU)===false){break;}}}}else{if(aX){for(aZ in a0){if(aV.call(a0[aZ],aZ,a0[aZ])===false){break;}}}else{for(var a1=a0[0];aW<aY&&aV.call(a1,aW,a1)!==false;a1=a0[++aW]){}}}return a0;},trim:function(aU){return(aU||"").replace(az,"");},makeArray:function(aU,aV){var aW=aV||[];if(aU!=null){if(aU.length==null||typeof aU==="string"||F.isFunction(aU)||(typeof aU!=="function"&&aU.setInterval)){L.call(aW,aU);}else{F.merge(aW,aU);}}return aW;},inArray:function(aV,aU){if(aU.indexOf){return aU.indexOf(aV);
}for(var aW=0,aX=aU.length;aW<aX;aW++){if(aU[aW]===aV){return aW;}}return -1;},merge:function(aU,aY){var aV=aU.length,aW=0;if(typeof aY.length==="number"){for(var aX=aY.length;aW<aX;aW++){aU[aV++]=aY[aW];}}else{while(aY[aW]!==aM){aU[aV++]=aY[aW++];}}aU.length=aV;return aU;},grep:function(aV,aU,aX){var aZ=[];for(var aW=0,aY=aV.length;aW<aY;aW++){if(!aX!==!aU(aV[aW],aW)){aZ.push(aV[aW]);}}return aZ;},map:function(aW,aV,aU){var aZ=[],a0;for(var aX=0,aY=aW.length;aX<aY;aX++){a0=aV(aW[aX],aX,aU);if(a0!=null){aZ[aZ.length]=a0;
}}return aZ.concat.apply([],aZ);},guid:1,proxy:function(aU,aV,aW){if(arguments.length===2){if(typeof aV==="string"){aW=aU;aU=aW[aV];aV=aM;}else{if(aV&&!F.isFunction(aV)){aW=aV;aV=aM;}}}if(!aV&&aU){aV=function(){return aU.apply(aW||this,arguments);};}if(aU){aV.guid=aU.guid=aU.guid||aV.guid||F.guid++;}return aV;},uaMatch:function(aV){aV=aV.toLowerCase();var aU=/(webkit)[ \/]([\w.]+)/.exec(aV)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(aV)||/(msie) ([\w.]+)/.exec(aV)||!/compatible/.test(aV)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(aV)||[];
return{browser:aU[1]||"",version:aU[2]||"0"};},browser:{}});d=F.uaMatch(aN);if(d.browser){F.browser[d.browser]=true;F.browser.version=d.version;}if(F.browser.webkit){F.browser.safari=true;}if(C){F.inArray=function(aV,aU){return C.call(aU,aV);};}ak=F(l);if(l.addEventListener){m=function(){l.removeEventListener("DOMContentLoaded",m,false);F.ready();};}else{if(l.attachEvent){m=function(){if(l.readyState==="complete"){l.detachEvent("onreadystatechange",m);F.ready();}};}}function n(){if(F.isReady){return;
}try{l.documentElement.doScroll("left");}catch(aU){setTimeout(n,1);return;}F.ready();}function q(aV,aU){if(aU.src){F.ajax({url:aU.src,async:false,dataType:"script"});}else{F.globalEval(aU.text||aU.textContent||aU.innerHTML||"");}if(aU.parentNode){aU.parentNode.removeChild(aU);}}function c(aU,aZ,a2,aV,aW,a1){var a0=aU.length;if(typeof aZ==="object"){for(var aY in aZ){c(aU,aY,aZ[aY],aV,aW,a2);}return aU;}if(a2!==aM){aV=!a1&&aV&&F.isFunction(a2);for(var aX=0;aX<a0;aX++){aW(aU[aX],aZ,aV?a2.call(aU[aX],aX,aW(aU[aX],aZ)):a2,a1);
}return aU;}return a0?aW(aU[0],aZ):null;}function K(){return(new Date).getTime();}(function(){F.support={};var a2=l.documentElement,a3=l.createElement("script"),aX=l.createElement("div"),a1="script"+K();aX.style.display="none";aX.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var aV=aX.getElementsByTagName("*"),aU=aX.getElementsByTagName("a")[0];if(!aV||!aV.length||!aU){return;}F.support={leadingWhitespace:aX.firstChild.nodeType===3,tbody:!aX.getElementsByTagName("tbody").length,htmlSerialize:!!aX.getElementsByTagName("link").length,style:/red/.test(aU.getAttribute("style")),hrefNormalized:aU.getAttribute("href")==="/a",opacity:/^0.55$/.test(aU.style.opacity),cssFloat:!!aU.style.cssFloat,checkOn:aX.getElementsByTagName("input")[0].value==="on",optSelected:l.createElement("select").appendChild(l.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
a3.type="text/javascript";try{a3.appendChild(l.createTextNode("window."+a1+"=1;"));}catch(aY){}a2.insertBefore(a3,a2.firstChild);if(aP[a1]){F.support.scriptEval=true;delete aP[a1];}a2.removeChild(a3);if(aX.attachEvent&&aX.fireEvent){aX.attachEvent("onclick",function aW(){F.support.noCloneEvent=false;aX.detachEvent("onclick",aW);});aX.cloneNode(true).fireEvent("onclick");}aX=l.createElement("div");aX.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var a0=l.createDocumentFragment();
a0.appendChild(aX.firstChild);F.support.checkClone=a0.cloneNode(true).cloneNode(true).lastChild.checked;F(function(){var a4=l.createElement("div");a4.style.width=a4.style.paddingLeft="1px";l.body.appendChild(a4);F.boxModel=F.support.boxModel=a4.offsetWidth===2;l.body.removeChild(a4).style.display="none";a4=null;});var aZ=function(a5){var a4=l.createElement("div");a5="on"+a5;var a6=(a5 in a4);if(!a6){a4.setAttribute(a5,"return;");a6=typeof a4[a5]==="function";}a4=null;return a6;};F.support.submitBubbles=aZ("submit");
F.support.changeBubbles=aZ("change");a2=a3=aX=aV=aU=null;})();F.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var r="jQuery"+K(),aO=0,aQ={};var p={};F.extend({cache:{},expando:r,noData:{"embed":true,"object":true,"applet":true},data:function(aW,aY,aV){if(aW.nodeName&&F.noData[aW.nodeName.toLowerCase()]){return;}aW=aW==aP?aQ:aW;var aX=aW[r],aU=F.cache,aZ;
if(!aY&&!aX){return null;}if(!aX){aX=++aO;}if(typeof aY==="object"){aW[r]=aX;aZ=aU[aX]=F.extend(true,{},aY);}else{if(aU[aX]){aZ=aU[aX];}else{if(typeof aV==="undefined"){aZ=p;}else{aZ=aU[aX]={};}}}if(aV!==aM){aW[r]=aX;aZ[aY]=aV;}return typeof aY==="string"?aZ[aY]:aZ;},removeData:function(aW,aY){if(aW.nodeName&&F.noData[aW.nodeName.toLowerCase()]){return;}aW=aW==aP?aQ:aW;var aX=aW[r],aU=F.cache,aZ=aU[aX];if(aY){if(aZ){delete aZ[aY];if(F.isEmptyObject(aZ)){F.removeData(aW);}}}else{try{delete aW[r];}catch(aV){if(aW.removeAttribute){aW.removeAttribute(r);
}}delete aU[aX];}}});F.fn.extend({data:function(aV,aX){if(typeof aV==="undefined"&&this.length){return F.data(this[0]);}else{if(typeof aV==="object"){return this.each(function(){F.data(this,aV);});}}var aW=aV.split(".");aW[1]=aW[1]?"."+aW[1]:"";if(aX===aM){var aU=this.triggerHandler("getData"+aW[1]+"!",[aW[0]]);if(aU===aM&&this.length){aU=F.data(this[0],aV);}return aU===aM&&aW[1]?this.data(aW[0]):aU;}else{return this.trigger("setData"+aW[1]+"!",[aW[0],aX]).each(function(){F.data(this,aV,aX);});}},removeData:function(aU){return this.each(function(){F.removeData(this,aU);
});}});F.extend({queue:function(aV,aX,aU){if(!aV){return;}aX=(aX||"fx")+"queue";var aW=F.data(aV,aX);if(!aU){return aW||[];}if(!aW||F.isArray(aU)){aW=F.data(aV,aX,F.makeArray(aU));}else{aW.push(aU);}return aW;},dequeue:function(aU,aX){aX=aX||"fx";var aW=F.queue(aU,aX),aV=aW.shift();if(aV==="inprogress"){aV=aW.shift();}if(aV){if(aX==="fx"){aW.unshift("inprogress");}aV.call(aU,function(){F.dequeue(aU,aX);});}}});F.fn.extend({queue:function(aV,aU){if(typeof aV!=="string"){aU=aV;aV="fx";}if(aU===aM){return F.queue(this[0],aV);
}return this.each(function(aX,aW){var aY=F.queue(this,aV,aU);if(aV==="fx"&&aY[0]!=="inprogress"){F.dequeue(this,aV);}});},dequeue:function(aU){return this.each(function(){F.dequeue(this,aU);});},delay:function(aU,aV){aU=F.fx?F.fx.speeds[aU]||aU:aU;aV=aV||"fx";return this.queue(aV,function(){var aW=this;setTimeout(function(){F.dequeue(aW,aV);},aU);});},clearQueue:function(aU){return this.queue(aU||"fx",[]);}});var Q=/[\n\t]/g,av=/\s+/,ap=/\r/g,aw=/href|src|style/,aB=/(button|input)/i,Z=/(button|input|object|select|textarea)/i,R=/^(a|area)$/i,ao=/radio|checkbox/;
F.fn.extend({attr:function(aU,aV){return c(this,aU,aV,true,F.attr);},removeAttr:function(aV,aU){return this.each(function(){F.attr(this,aV,"");if(this.nodeType===1){this.removeAttribute(aV);}});},addClass:function(a1){if(F.isFunction(a1)){return this.each(function(a2){var a3=F(this);a3.addClass(a1.call(this,a2,a3.attr("class")));});}if(a1&&typeof a1==="string"){var aX=(a1||"").split(av);for(var aZ=0,a0=this.length;aZ<a0;aZ++){var aY=this[aZ];if(aY.nodeType===1){if(!aY.className){aY.className=a1;}else{var aW=" "+aY.className+" ";
for(var aU=0,aV=aX.length;aU<aV;aU++){if(aW.indexOf(" "+aX[aU]+" ")<0){aY.className+=" "+aX[aU];}}}}}}return this;},removeClass:function(a1){if(F.isFunction(a1)){return this.each(function(a2){var a3=F(this);a3.removeClass(a1.call(this,a2,a3.attr("class")));});}if((a1&&typeof a1==="string")||a1===aM){var aX=(a1||"").split(av);for(var aZ=0,a0=this.length;aZ<a0;aZ++){var aY=this[aZ];if(aY.nodeType===1&&aY.className){if(a1){var aW=(" "+aY.className+" ").replace(Q," ");for(var aU=0,aV=aX.length;aU<aV;
aU++){aW=aW.replace(" "+aX[aU]+" "," ");}aY.className=aW.substring(1,aW.length-1);}else{aY.className="";}}}}return this;},toggleClass:function(aX,aV){var aW=typeof aX,aU=typeof aV==="boolean";if(F.isFunction(aX)){return this.each(function(aY){var aZ=F(this);aZ.toggleClass(aX.call(this,aY,aZ.attr("class"),aV),aV);});}return this.each(function(){if(aW==="string"){var aY,a0=0,a1=F(this),a2=aV,aZ=aX.split(av);while((aY=aZ[a0++])){a2=aU?a2:!a1.hasClass(aY);a1[a2?"addClass":"removeClass"](aY);}}else{if(aW==="undefined"||aW==="boolean"){if(this.className){F.data(this,"__className__",this.className);
}this.className=this.className||aX===false?"":F.data(this,"__className__")||"";}}});},hasClass:function(aX){var aU=" "+aX+" ";for(var aV=0,aW=this.length;aV<aW;aV++){if((" "+this[aV].className+" ").replace(Q," ").indexOf(aU)>-1){return true;}}return false;},val:function(a2){if(a2===aM){var aU=this[0];if(aU){if(F.nodeName(aU,"option")){return(aU.attributes.value||{}).specified?aU.value:aU.text;}if(F.nodeName(aU,"select")){var aW=aU.selectedIndex,a3=[],a1=aU.options,aZ=aU.type==="select-one";if(aW<0){return null;
}for(var aV=aZ?aW:0,aY=aZ?aW+1:a1.length;aV<aY;aV++){var a0=a1[aV];if(a0.selected){a2=F(a0).val();if(aZ){return a2;}a3.push(a2);}}return a3;}if(ao.test(aU.type)&&!F.support.checkOn){return aU.getAttribute("value")===null?"on":aU.value;}return(aU.value||"").replace(ap,"");}return aM;}var aX=F.isFunction(a2);return this.each(function(a4){var a5=F(this),a6=a2;if(this.nodeType!==1){return;}if(aX){a6=a2.call(this,a4,a5.val());}if(typeof a6==="number"){a6+="";}if(F.isArray(a6)&&ao.test(this.type)){this.checked=F.inArray(a5.val(),a6)>=0;
}else{if(F.nodeName(this,"select")){var a7=F.makeArray(a6);F("option",this).each(function(){this.selected=F.inArray(F(this).val(),a7)>=0;});if(!a7.length){this.selectedIndex=-1;}}else{this.value=a6;}}});}});F.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(aW,aX,a3,a0){if(!aW||aW.nodeType===3||aW.nodeType===8){return aM;}if(a0&&aX in F.attrFn){return F(aW)[aX](a3);}var aY=aW.nodeType!==1||!F.isXMLDoc(aW),a1=a3!==aM;aX=aY&&F.props[aX]||aX;
if(aW.nodeType===1){var a2=aw.test(aX);if(aX==="selected"&&!F.support.optSelected){var aZ=aW.parentNode;if(aZ){aZ.selectedIndex;if(aZ.parentNode){aZ.parentNode.selectedIndex;}}}if(aX in aW&&aY&&!a2){if(a1){if(aX==="type"&&aB.test(aW.nodeName)&&aW.parentNode){F.error("type property can't be changed");}aW[aX]=a3;}if(F.nodeName(aW,"form")&&aW.getAttributeNode(aX)){return aW.getAttributeNode(aX).nodeValue;}if(aX==="tabIndex"){var aV=aW.getAttributeNode("tabIndex");return aV&&aV.specified?aV.value:Z.test(aW.nodeName)||R.test(aW.nodeName)&&aW.href?0:aM;
}return aW[aX];}if(!F.support.style&&aY&&aX==="style"){if(a1){aW.style.cssText=""+a3;}return aW.style.cssText;}if(a1){aW.setAttribute(aX,""+a3);}var aU=!F.support.hrefNormalized&&aY&&a2?aW.getAttribute(aX,2):aW.getAttribute(aX);return aU===null?aM:aU;}return F.style(aW,aX,a3);}});var t=function(aU){return aU.replace(/[^\w\s\.\|`]/g,function(aV){return"\\"+aV;});};F.event={add:function(aV,a7,a0,aU){if(aV.nodeType===3||aV.nodeType===8){return;}if(aV.setInterval&&(aV!==aP&&!aV.frameElement)){aV=aP;}if(!a0.guid){a0.guid=F.guid++;
}if(aU!==aM){var aY=a0;a0=F.proxy(aY);a0.data=aU;}var aX=F.data(aV,"events")||F.data(aV,"events",{}),aZ=F.data(aV,"handle"),aW;if(!aZ){aW=function(){return typeof F!=="undefined"&&!F.event.triggered?F.event.handle.apply(aW.elem,arguments):aM;};aZ=F.data(aV,"handle",aW);}if(!aZ){return;}aZ.elem=aV;a7=a7.split(/\s+/);var a6,a2=0;while((a6=a7[a2++])){var a4=a6.split(".");a6=a4.shift();if(a2>1){a0=F.proxy(a0);if(aU!==aM){a0.data=aU;}}a0.type=a4.slice(0).sort().join(".");var a1=aX[a6],a5=this.special[a6]||{};
if(!a1){a1=aX[a6]={};if(!a5.setup||a5.setup.call(aV,aU,a4,a0)===false){if(aV.addEventListener){aV.addEventListener(a6,aZ,false);}else{if(aV.attachEvent){aV.attachEvent("on"+a6,aZ);}}}}if(a5.add){var a3=a5.add.call(aV,a0,aU,a4,a1);if(a3&&F.isFunction(a3)){a3.guid=a3.guid||a0.guid;a3.data=a3.data||a0.data;a3.type=a3.type||a0.type;a0=a3;}}a1[a0.guid]=a0;this.global[a6]=true;}aV=null;},global:{},remove:function(aW,a7,a0){if(aW.nodeType===3||aW.nodeType===8){return;}var aX=F.data(aW,"events"),a4,a6,aY;
if(aX){if(a7===aM||(typeof a7==="string"&&a7.charAt(0)===".")){for(a6 in aX){this.remove(aW,a6+(a7||""));}}else{if(a7.type){a0=a7.handler;a7=a7.type;}a7=a7.split(/\s+/);var a1=0;while((a6=a7[a1++])){var a3=a6.split(".");a6=a3.shift();var aU=!a3.length,aV=F.map(a3.slice(0).sort(),t),a2=new RegExp("(^|\\.)"+aV.join("\\.(?:.*\\.)?")+"(\\.|$)"),a5=this.special[a6]||{};if(aX[a6]){if(a0){aY=aX[a6][a0.guid];delete aX[a6][a0.guid];}else{for(var aZ in aX[a6]){if(aU||a2.test(aX[a6][aZ].type)){delete aX[a6][aZ];
}}}if(a5.remove){a5.remove.call(aW,a3,aY);}for(a4 in aX[a6]){break;}if(!a4){if(!a5.teardown||a5.teardown.call(aW,a3)===false){if(aW.removeEventListener){aW.removeEventListener(a6,F.data(aW,"handle"),false);}else{if(aW.detachEvent){aW.detachEvent("on"+a6,F.data(aW,"handle"));}}}a4=null;delete aX[a6];}}}}for(a4 in aX){break;}if(!a4){var aZ=F.data(aW,"handle");if(aZ){aZ.elem=null;}F.removeData(aW,"events");F.removeData(aW,"handle");}}},trigger:function(aY,aV,aX){var a4=aY.type||aY,aU=arguments[3];if(!aU){aY=typeof aY==="object"?aY[r]?aY:F.extend(F.Event(a4),aY):F.Event(a4);
if(a4.indexOf("!")>=0){aY.type=a4=a4.slice(0,-1);aY.exclusive=true;}if(!aX){aY.stopPropagation();if(this.global[a4]){F.each(F.cache,function(){if(this.events&&this.events[a4]){F.event.trigger(aY,aV,this.handle.elem);}});}}if(!aX||aX.nodeType===3||aX.nodeType===8){return aM;}aY.result=aM;aY.target=aX;aV=F.makeArray(aV);aV.unshift(aY);}aY.currentTarget=aX;var aZ=F.data(aX,"handle");if(aZ){aZ.apply(aX,aV);}var a2=aX.parentNode||aX.ownerDocument;try{if(!(aX&&aX.nodeName&&F.noData[aX.nodeName.toLowerCase()])){if(aX["on"+a4]&&aX["on"+a4].apply(aX,aV)===false){aY.result=false;
}}}catch(aW){}if(!aY.isPropagationStopped()&&a2){F.event.trigger(aY,aV,a2,true);}else{if(!aY.isDefaultPrevented()){var a3=aY.target,a1,a0=F.nodeName(a3,"a")&&a4==="click";if(!a0&&!(a3&&a3.nodeName&&F.noData[a3.nodeName.toLowerCase()])){try{if(a3[a4]){a1=a3["on"+a4];if(a1){a3["on"+a4]=null;}this.triggered=true;a3[a4]();}}catch(aW){}if(a1){a3["on"+a4]=a1;}this.triggered=false;}}}},handle:function(aV){var aU,aX;aV=arguments[0]=F.event.fix(aV||aP.event);aV.currentTarget=this;var a0=aV.type.split(".");
aV.type=a0.shift();aU=!a0.length&&!aV.exclusive;var aZ=new RegExp("(^|\\.)"+a0.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");aX=(F.data(this,"events")||{})[aV.type];for(var aY in aX){var aW=aX[aY];if(aU||aZ.test(aW.type)){aV.handler=aW;aV.data=aW.data;var a1=aW.apply(this,arguments);if(a1!==aM){aV.result=a1;if(a1===false){aV.preventDefault();aV.stopPropagation();}}if(aV.isImmediatePropagationStopped()){break;}}}return aV.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 originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(aW){if(aW[r]){return aW;
}var aY=aW;aW=F.Event(aY);for(var aX=this.props.length,aZ;aX;){aZ=this.props[--aX];aW[aZ]=aY[aZ];}if(!aW.target){aW.target=aW.srcElement||l;}if(aW.target.nodeType===3){aW.target=aW.target.parentNode;}if(!aW.relatedTarget&&aW.fromElement){aW.relatedTarget=aW.fromElement===aW.target?aW.toElement:aW.fromElement;}if(aW.pageX==null&&aW.clientX!=null){var aV=l.documentElement,aU=l.body;aW.pageX=aW.clientX+(aV&&aV.scrollLeft||aU&&aU.scrollLeft||0)-(aV&&aV.clientLeft||aU&&aU.clientLeft||0);aW.pageY=aW.clientY+(aV&&aV.scrollTop||aU&&aU.scrollTop||0)-(aV&&aV.clientTop||aU&&aU.clientTop||0);
}if(!aW.which&&((aW.charCode||aW.charCode===0)?aW.charCode:aW.keyCode)){aW.which=aW.charCode||aW.keyCode;}if(!aW.metaKey&&aW.ctrlKey){aW.metaKey=aW.ctrlKey;}if(!aW.which&&aW.button!==aM){aW.which=(aW.button&1?1:(aW.button&2?3:(aW.button&4?2:0)));}return aW;},guid:100000000,proxy:F.proxy,special:{ready:{setup:F.bindReady,teardown:F.noop},live:{add:function(aX,aU,aW,aV){F.extend(aX,aU||{});aX.guid+=aU.selector+aU.live;aU.liveProxy=aX;F.event.add(this,aU.live,J,aU);},remove:function(aV){if(aV.length){var aW=0,aU=new RegExp("(^|\\.)"+aV[0]+"(\\.|$)");
F.each((F.data(this,"events").live||{}),function(){if(aU.test(this.type)){aW++;}});if(aW<1){F.event.remove(this,aV[0],J);}}},special:{}},beforeunload:{setup:function(aU,aW,aV){if(this.setInterval){this.onbeforeunload=aV;}return false;},teardown:function(aV,aU){if(this.onbeforeunload===aU){this.onbeforeunload=null;}}}}};F.Event=function(aU){if(!this.preventDefault){return new F.Event(aU);}if(aU&&aU.type){this.originalEvent=aU;this.type=aU.type;}else{this.type=aU;}this.timeStamp=K();this[r]=true;};
function V(){return false;}function W(){return true;}F.Event.prototype={preventDefault:function(){this.isDefaultPrevented=W;var aU=this.originalEvent;if(!aU){return;}if(aU.preventDefault){aU.preventDefault();}aU.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=W;var aU=this.originalEvent;if(!aU){return;}if(aU.stopPropagation){aU.stopPropagation();}aU.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=W;this.stopPropagation();},isDefaultPrevented:V,isPropagationStopped:V,isImmediatePropagationStopped:V};
var aS=function(aV){var aW=aV.relatedTarget;while(aW&&aW!==this){try{aW=aW.parentNode;}catch(aU){break;}}if(aW!==this){aV.type=aV.data;F.event.handle.apply(this,arguments);}},k=function(aU){aU.type=aU.data;F.event.handle.apply(this,arguments);};F.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(aV,aU){F.event.special[aV]={setup:function(aW){F.event.add(this,aU,aW&&aW.selector?k:aS,aV);},teardown:function(aW){F.event.remove(this,aU,aW&&aW.selector?k:aS);}};});if(!F.support.submitBubbles){F.event.special.submit={setup:function(aU,aW,aV){if(this.nodeName.toLowerCase()!=="form"){F.event.add(this,"click.specialSubmit."+aV.guid,function(aX){var aY=aX.target,aZ=aY.type;
if((aZ==="submit"||aZ==="image")&&F(aY).closest("form").length){return aL("submit",this,arguments);}});F.event.add(this,"keypress.specialSubmit."+aV.guid,function(aX){var aY=aX.target,aZ=aY.type;if((aZ==="text"||aZ==="password")&&F(aY).closest("form").length&&aX.keyCode===13){return aL("submit",this,arguments);}});}else{return false;}},remove:function(aV,aU){F.event.remove(this,"click.specialSubmit"+(aU?"."+aU.guid:""));F.event.remove(this,"keypress.specialSubmit"+(aU?"."+aU.guid:""));}};}if(!F.support.changeBubbles){var v=/textarea|input|select/i;
function z(aU){var aV=aU.type,aW=aU.value;if(aV==="radio"||aV==="checkbox"){aW=aU.checked;}else{if(aV==="select-multiple"){aW=aU.selectedIndex>-1?F.map(aU.options,function(aX){return aX.selected;}).join("-"):"";}else{if(aU.nodeName.toLowerCase()==="select"){aW=aU.selectedIndex;}}}return aW;}function aI(aV){var aW=aV.target,aU,aX;if(!v.test(aW.nodeName)||aW.readOnly){return;}aU=F.data(aW,"_change_data");aX=z(aW);if(aV.type!=="focusout"||aW.type!=="radio"){F.data(aW,"_change_data",aX);}if(aU===aM||aX===aU){return;
}if(aU!=null||aX){aV.type="change";return F.event.trigger(aV,arguments[1],aW);}}F.event.special.change={filters:{focusout:aI,click:function(aU){var aV=aU.target,aW=aV.type;if(aW==="radio"||aW==="checkbox"||aV.nodeName.toLowerCase()==="select"){return aI.call(this,aU);}},keydown:function(aU){var aV=aU.target,aW=aV.type;if((aU.keyCode===13&&aV.nodeName.toLowerCase()!=="textarea")||(aU.keyCode===32&&(aW==="checkbox"||aW==="radio"))||aW==="select-multiple"){return aI.call(this,aU);}},beforeactivate:function(aU){var aV=aU.target;
if(aV.nodeName.toLowerCase()==="input"&&aV.type==="radio"){F.data(aV,"_change_data",z(aV));}}},setup:function(aU,aW,aV){for(var aX in f){F.event.add(this,aX+".specialChange."+aV.guid,f[aX]);}return v.test(this.nodeName);},remove:function(aV,aU){for(var aW in f){F.event.remove(this,aW+".specialChange"+(aU?"."+aU.guid:""),f[aW]);}return v.test(this.nodeName);}};var f=F.event.special.change.filters;}function aL(aW,aV,aU){aU[0].type=aW;return F.event.handle.apply(aV,aU);}if(l.addEventListener){F.each({focus:"focusin",blur:"focusout"},function(aW,aU){F.event.special[aU]={setup:function(){this.addEventListener(aW,aV,true);
},teardown:function(){this.removeEventListener(aW,aV,true);}};function aV(aX){aX=F.event.fix(aX);aX.type=aU;return F.event.handle.call(this,aX);}});}F.each(["bind","one"],function(aU,aV){F.fn[aV]=function(a0,aW,aX){if(typeof a0==="object"){for(var aZ in a0){this[aV](aZ,aW,a0[aZ],aX);}return this;}if(F.isFunction(aW)){aX=aW;aW=aM;}var aY=aV==="one"?F.proxy(aX,function(a1){F(this).unbind(a1,aY);return aX.apply(this,arguments);}):aX;return a0==="unload"&&aV!=="one"?this.one(a0,aW,aX):this.each(function(){F.event.add(this,a0,aY,aW);
});};});F.fn.extend({unbind:function(aW,aU){if(typeof aW==="object"&&!aW.preventDefault){for(var aV in aW){this.unbind(aV,aW[aV]);}return this;}return this.each(function(){F.event.remove(this,aW,aU);});},trigger:function(aV,aU){return this.each(function(){F.event.trigger(aV,aU,this);});},triggerHandler:function(aW,aU){if(this[0]){var aV=F.Event(aW);aV.preventDefault();aV.stopPropagation();F.event.trigger(aV,aU,this[0]);return aV.result;}},toggle:function(aV){var aU=arguments,aW=1;while(aW<aU.length){F.proxy(aV,aU[aW++]);
}return this.click(F.proxy(aV,function(aX){var aY=(F.data(this,"lastToggle"+aV.guid)||0)%aW;F.data(this,"lastToggle"+aV.guid,aY+1);aX.preventDefault();return aU[aY].apply(this,arguments)||false;}));},hover:function(aV,aU){return this.mouseenter(aV).mouseleave(aU||aV);}});F.each(["live","die"],function(aU,aV){F.fn[aV]=function(a0,aW,aX){var aZ,aY=0;if(F.isFunction(aW)){aX=aW;aW=aM;}a0=(a0||"").split(/\s+/);while((aZ=a0[aY++])!=null){aZ=aZ==="focus"?"focusin":aZ==="blur"?"focusout":aZ==="hover"?a0.push("mouseleave")&&"mouseenter":aZ;
if(aV==="live"){F(this.context).bind(I(aZ,this.selector),{data:aW,selector:this.selector,live:aZ},aX);}else{F(this.context).unbind(I(aZ,this.selector),aX?{guid:aX.guid+this.selector+aZ}:null);}}return this;};});function J(aY){var a7,aX=[],a6=[],aU=arguments,a5,a4,aZ,aW,a1,a0,a2,aV,a3=F.extend({},F.data(this,"events").live);if(aY.button&&aY.type==="click"){return;}for(a1 in a3){aZ=a3[a1];if(aZ.live===aY.type||aZ.altLive&&F.inArray(aY.type,aZ.altLive)>-1){aV=aZ.data;if(!(aV.beforeFilter&&aV.beforeFilter[aY.type]&&!aV.beforeFilter[aY.type](aY))){a6.push(aZ.selector);
}}else{delete a3[a1];}}a4=F(aY.target).closest(a6,aY.currentTarget);for(a0=0,a2=a4.length;a0<a2;a0++){for(a1 in a3){aZ=a3[a1];aW=a4[a0].elem;a5=null;if(a4[a0].selector===aZ.selector){if(aZ.live==="mouseenter"||aZ.live==="mouseleave"){a5=F(aY.relatedTarget).closest(aZ.selector)[0];}if(!a5||a5!==aW){aX.push({elem:aW,fn:aZ});}}}}for(a0=0,a2=aX.length;a0<a2;a0++){a4=aX[a0];aY.currentTarget=a4.elem;aY.data=a4.fn.data;if(a4.fn.apply(a4.elem,aU)===false){a7=false;break;}}return a7;}function I(aV,aU){return"live."+(aV?aV+".":"")+aU.replace(/\./g,"`").replace(/ /g,"&");
}F.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(aU,aV){F.fn[aV]=function(aW){return aW?this.bind(aV,aW):this.trigger(aV);};if(F.attrFn){F.attrFn[aV]=true;}});if(aP.attachEvent&&!aP.addEventListener){aP.attachEvent("onunload",function(){for(var aV in F.cache){if(F.cache[aV].handle){try{F.event.remove(F.cache[aV].handle.elem);
}catch(aU){}}}});
/*
 * Sizzle CSS Selector Engine - v1.0
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
}(function(){var aV=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,aZ=0,ba=Object.prototype.toString,a3=false,aU=true;[0,0].sort(function(){aU=false;return 0;});var a8=function(bq,bd,bn,bp){bn=bn||[];var bj=bd=bd||l;if(bd.nodeType!==1&&bd.nodeType!==9){return[];
}if(!bq||typeof bq!=="string"){return bn;}var bk=[],bi,br,bc,bg,bm=true,be=a4(bd),bs=bq;while((aV.exec(""),bi=aV.exec(bs))!==null){bs=bi[3];bk.push(bi[1]);if(bi[2]){bg=bi[3];break;}}if(bk.length>1&&a6.exec(bq)){if(bk.length===2&&a1.relative[bk[0]]){br=a7(bk[0]+bk[1],bd);}else{br=a1.relative[bk[0]]?[bd]:a8(bk.shift(),bd);while(bk.length){bq=bk.shift();if(a1.relative[bq]){bq+=bk.shift();}br=a7(bq,br);}}}else{if(!bp&&bk.length>1&&bd.nodeType===9&&!be&&a1.match.ID.test(bk[0])&&!a1.match.ID.test(bk[bk.length-1])){var bo=a8.find(bk.shift(),bd,be);
bd=bo.expr?a8.filter(bo.expr,bo.set)[0]:bo.set[0];}if(bd){var bo=bp?{expr:bk.pop(),set:a5(bp)}:a8.find(bk.pop(),bk.length===1&&(bk[0]==="~"||bk[0]==="+")&&bd.parentNode?bd.parentNode:bd,be);br=bo.expr?a8.filter(bo.expr,bo.set):bo.set;if(bk.length>0){bc=a5(br);}else{bm=false;}while(bk.length){var bf=bk.pop(),bl=bf;if(!a1.relative[bf]){bf="";}else{bl=bk.pop();}if(bl==null){bl=bd;}a1.relative[bf](bc,bl,be);}}else{bc=bk=[];}}if(!bc){bc=br;}if(!bc){a8.error(bf||bq);}if(ba.call(bc)==="[object Array]"){if(!bm){bn.push.apply(bn,bc);
}else{if(bd&&bd.nodeType===1){for(var bh=0;bc[bh]!=null;bh++){if(bc[bh]&&(bc[bh]===true||bc[bh].nodeType===1&&aW(bd,bc[bh]))){bn.push(br[bh]);}}}else{for(var bh=0;bc[bh]!=null;bh++){if(bc[bh]&&bc[bh].nodeType===1){bn.push(br[bh]);}}}}}else{a5(bc,bn);}if(bg){a8(bg,bj,bn,bp);a8.uniqueSort(bn);}return bn;};a8.uniqueSort=function(bd){if(a9){a3=aU;bd.sort(a9);if(a3){for(var bc=1;bc<bd.length;bc++){if(bd[bc]===bd[bc-1]){bd.splice(bc--,1);}}}}return bd;};a8.matches=function(bc,bd){return a8(bc,null,null,bd);
};a8.find=function(bd,bc,bf){var bj,bi;if(!bd){return[];}for(var be=0,bg=a1.order.length;be<bg;be++){var bk=a1.order[be],bi;if((bi=a1.leftMatch[bk].exec(bd))){var bh=bi[1];bi.splice(1,1);if(bh.substr(bh.length-1)!=="\\"){bi[1]=(bi[1]||"").replace(/\\/g,"");bj=a1.find[bk](bi,bc,bf);if(bj!=null){bd=bd.replace(a1.match[bk],"");break;}}}}if(!bj){bj=bc.getElementsByTagName("*");}return{set:bj,expr:bd};};a8.filter=function(be,br,bi,bn){var bo=be,bq=[],bd=br,bm,bc,bj=br&&br[0]&&a4(br[0]);while(be&&br.length){for(var bs in a1.filter){if((bm=a1.leftMatch[bs].exec(be))!=null&&bm[2]){var bf=a1.filter[bs],bg,bk,bl=bm[1];
bc=false;bm.splice(1,1);if(bl.substr(bl.length-1)==="\\"){continue;}if(bd===bq){bq=[];}if(a1.preFilter[bs]){bm=a1.preFilter[bs](bm,bd,bi,bq,bn,bj);if(!bm){bc=bg=true;}else{if(bm===true){continue;}}}if(bm){for(var bh=0;(bk=bd[bh])!=null;bh++){if(bk){bg=bf(bk,bm,bh,bd);var bp=bn^!!bg;if(bi&&bg!=null){if(bp){bc=true;}else{bd[bh]=false;}}else{if(bp){bq.push(bk);bc=true;}}}}}if(bg!==aM){if(!bi){bd=bq;}be=be.replace(a1.match[bs],"");if(!bc){return[];}break;}}}if(be===bo){if(bc==null){a8.error(be);}else{break;
}}bo=be;}return bd;};a8.error=function(bc){throw"Syntax error, unrecognized expression: "+bc;};var a1=a8.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(bc){return bc.getAttribute("href");
}},relative:{"+":function(bc,bj){var bf=typeof bj==="string",bh=bf&&!/\W/.test(bj),bg=bf&&!bh;if(bh){bj=bj.toLowerCase();}for(var be=0,bi=bc.length,bd;be<bi;be++){if((bd=bc[be])){while((bd=bd.previousSibling)&&bd.nodeType!==1){}bc[be]=bg||bd&&bd.nodeName.toLowerCase()===bj?bd||false:bd===bj;}}if(bg){a8.filter(bj,bc,true);}},">":function(bc,bi){var bf=typeof bi==="string";if(bf&&!/\W/.test(bi)){bi=bi.toLowerCase();for(var be=0,bg=bc.length;be<bg;be++){var bd=bc[be];if(bd){var bh=bd.parentNode;bc[be]=bh.nodeName.toLowerCase()===bi?bh:false;
}}}else{for(var be=0,bg=bc.length;be<bg;be++){var bd=bc[be];if(bd){bc[be]=bf?bd.parentNode:bd.parentNode===bi;}}if(bf){a8.filter(bi,bc,true);}}},"":function(bd,bh,bf){var be=aZ++,bc=aX;if(typeof bh==="string"&&!/\W/.test(bh)){var bg=bh=bh.toLowerCase();bc=aY;}bc("parentNode",bh,be,bd,bg,bf);},"~":function(bd,bh,bf){var be=aZ++,bc=aX;if(typeof bh==="string"&&!/\W/.test(bh)){var bg=bh=bh.toLowerCase();bc=aY;}bc("previousSibling",bh,be,bd,bg,bf);}},find:{ID:function(bf,bc,bd){if(typeof bc.getElementById!=="undefined"&&!bd){var be=bc.getElementById(bf[1]);
return be?[be]:[];}},NAME:function(bf,bc){if(typeof bc.getElementsByName!=="undefined"){var bh=[],bg=bc.getElementsByName(bf[1]);for(var bd=0,be=bg.length;bd<be;bd++){if(bg[bd].getAttribute("name")===bf[1]){bh.push(bg[bd]);}}return bh.length===0?null:bh;}},TAG:function(bd,bc){return bc.getElementsByTagName(bd[1]);}},preFilter:{CLASS:function(bh,bc,bf,bj,bi,bg){bh=" "+bh[1].replace(/\\/g,"")+" ";if(bg){return bh;}for(var be=0,bd;(bd=bc[be])!=null;be++){if(bd){if(bi^(bd.className&&(" "+bd.className+" ").replace(/[\t\n]/g," ").indexOf(bh)>=0)){if(!bf){bj.push(bd);
}}else{if(bf){bc[be]=false;}}}}return false;},ID:function(bc){return bc[1].replace(/\\/g,"");},TAG:function(bd,bc){return bd[1].toLowerCase();},CHILD:function(bc){if(bc[1]==="nth"){var bd=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(bc[2]==="even"&&"2n"||bc[2]==="odd"&&"2n+1"||!/\D/.test(bc[2])&&"0n+"+bc[2]||bc[2]);bc[2]=(bd[1]+(bd[2]||1))-0;bc[3]=bd[3]-0;}bc[0]=aZ++;return bc;},ATTR:function(bf,bc,bd,bi,bh,be){var bg=bf[1].replace(/\\/g,"");if(!be&&a1.attrMap[bg]){bf[1]=a1.attrMap[bg];}if(bf[2]==="~="){bf[4]=" "+bf[4]+" ";
}return bf;},PSEUDO:function(be,bc,bd,bg,bf){if(be[1]==="not"){if((aV.exec(be[3])||"").length>1||/^\w/.test(be[3])){be[3]=a8(be[3],null,null,bc);}else{var bh=a8.filter(be[3],bc,bd,true^bf);if(!bd){bg.push.apply(bg,bh);}return false;}}else{if(a1.match.POS.test(be[0])||a1.match.CHILD.test(be[0])){return true;}}return be;},POS:function(bc){bc.unshift(true);return bc;}},filters:{enabled:function(bc){return bc.disabled===false&&bc.type!=="hidden";},disabled:function(bc){return bc.disabled===true;},checked:function(bc){return bc.checked===true;
},selected:function(bc){bc.parentNode.selectedIndex;return bc.selected===true;},parent:function(bc){return !!bc.firstChild;},empty:function(bc){return !bc.firstChild;},has:function(bc,bd,be){return !!a8(be[3],bc).length;},header:function(bc){return/h\d/i.test(bc.nodeName);},text:function(bc){return"text"===bc.type;},radio:function(bc){return"radio"===bc.type;},checkbox:function(bc){return"checkbox"===bc.type;},file:function(bc){return"file"===bc.type;},password:function(bc){return"password"===bc.type;
},submit:function(bc){return"submit"===bc.type;},image:function(bc){return"image"===bc.type;},reset:function(bc){return"reset"===bc.type;},button:function(bc){return"button"===bc.type||bc.nodeName.toLowerCase()==="button";},input:function(bc){return/input|select|textarea|button/i.test(bc.nodeName);}},setFilters:{first:function(bc,bd){return bd===0;},last:function(bd,be,bf,bc){return be===bc.length-1;},even:function(bc,bd){return bd%2===0;},odd:function(bc,bd){return bd%2===1;},lt:function(bc,bd,be){return bd<be[3]-0;
},gt:function(bc,bd,be){return bd>be[3]-0;},nth:function(bc,bd,be){return be[3]-0===bd;},eq:function(bc,bd,be){return be[3]-0===bd;}},filter:{PSEUDO:function(bd,bh,bf,bc){var bi=bh[1],be=a1.filters[bi];if(be){return be(bd,bf,bh,bc);}else{if(bi==="contains"){return(bd.textContent||bd.innerText||a2([bd])||"").indexOf(bh[3])>=0;}else{if(bi==="not"){var bj=bh[3];for(var bf=0,bg=bj.length;bf<bg;bf++){if(bj[bf]===bd){return false;}}return true;}else{a8.error("Syntax error, unrecognized expression: "+bi);
}}}},CHILD:function(bf,bi){var bl=bi[1],bj=bf;switch(bl){case"only":case"first":while((bj=bj.previousSibling)){if(bj.nodeType===1){return false;}}if(bl==="first"){return true;}bj=bf;case"last":while((bj=bj.nextSibling)){if(bj.nodeType===1){return false;}}return true;case"nth":var bg=bi[2],bh=bi[3];if(bg===1&&bh===0){return true;}var be=bi[0],bk=bf.parentNode;if(bk&&(bk.sizcache!==be||!bf.nodeIndex)){var bc=0;for(bj=bk.firstChild;bj;bj=bj.nextSibling){if(bj.nodeType===1){bj.nodeIndex=++bc;}}bk.sizcache=be;
}var bd=bf.nodeIndex-bh;if(bg===0){return bd===0;}else{return(bd%bg===0&&bd/bg>=0);}}},ID:function(bc,bd){return bc.nodeType===1&&bc.getAttribute("id")===bd;},TAG:function(bc,bd){return(bd==="*"&&bc.nodeType===1)||bc.nodeName.toLowerCase()===bd;},CLASS:function(bc,bd){return(" "+(bc.className||bc.getAttribute("class"))+" ").indexOf(bd)>-1;},ATTR:function(bd,be){var bf=be[1],bg=a1.attrHandle[bf]?a1.attrHandle[bf](bd):bd[bf]!=null?bd[bf]:bd.getAttribute(bf),bi=bg+"",bh=be[2],bc=be[4];return bg==null?bh==="!=":bh==="="?bi===bc:bh==="*="?bi.indexOf(bc)>=0:bh==="~="?(" "+bi+" ").indexOf(bc)>=0:!bc?bi&&bg!==false:bh==="!="?bi!==bc:bh==="^="?bi.indexOf(bc)===0:bh==="$="?bi.substr(bi.length-bc.length)===bc:bh==="|="?bi===bc||bi.substr(0,bc.length+1)===bc+"-":false;
},POS:function(bd,bg,bf,bc){var bh=bg[2],be=a1.setFilters[bh];if(be){return be(bd,bf,bg,bc);}}}};var a6=a1.match.POS;for(var bb in a1.match){a1.match[bb]=new RegExp(a1.match[bb].source+/(?![^\[]*\])(?![^\(]*\))/.source);a1.leftMatch[bb]=new RegExp(/(^(?:.|\r|\n)*?)/.source+a1.match[bb].source.replace(/\\(\d+)/g,function(bc,bd){return"\\"+(bd-0+1);}));}var a5=function(bc,bd){bc=Array.prototype.slice.call(bc,0);if(bd){bd.push.apply(bd,bc);return bd;}return bc;};try{Array.prototype.slice.call(l.documentElement.childNodes,0);
}catch(a0){a5=function(bc,bf){var bg=bf||[];if(ba.call(bc)==="[object Array]"){Array.prototype.push.apply(bg,bc);}else{if(typeof bc.length==="number"){for(var bd=0,be=bc.length;bd<be;bd++){bg.push(bc[bd]);}}else{for(var bd=0;bc[bd];bd++){bg.push(bc[bd]);}}}return bg;};}var a9;if(l.documentElement.compareDocumentPosition){a9=function(bc,bd){if(!bc.compareDocumentPosition||!bd.compareDocumentPosition){if(bc==bd){a3=true;}return bc.compareDocumentPosition?-1:1;}var be=bc.compareDocumentPosition(bd)&4?-1:bc===bd?0:1;
if(be===0){a3=true;}return be;};}else{if("sourceIndex" in l.documentElement){a9=function(bc,bd){if(!bc.sourceIndex||!bd.sourceIndex){if(bc==bd){a3=true;}return bc.sourceIndex?-1:1;}var be=bc.sourceIndex-bd.sourceIndex;if(be===0){a3=true;}return be;};}else{if(l.createRange){a9=function(bc,be){if(!bc.ownerDocument||!be.ownerDocument){if(bc==be){a3=true;}return bc.ownerDocument?-1:1;}var bd=bc.ownerDocument.createRange(),bf=be.ownerDocument.createRange();bd.setStart(bc,0);bd.setEnd(bc,0);bf.setStart(be,0);
bf.setEnd(be,0);var bg=bd.compareBoundaryPoints(Range.START_TO_END,bf);if(bg===0){a3=true;}return bg;};}}}function a2(bd){var bf="",bc;for(var be=0;bd[be];be++){bc=bd[be];if(bc.nodeType===3||bc.nodeType===4){bf+=bc.nodeValue;}else{if(bc.nodeType!==8){bf+=a2(bc.childNodes);}}}return bf;}(function(){var bc=l.createElement("div"),bd="script"+(new Date).getTime();bc.innerHTML="<a name='"+bd+"'/>";var be=l.documentElement;be.insertBefore(bc,be.firstChild);if(l.getElementById(bd)){a1.find.ID=function(bi,bf,bg){if(typeof bf.getElementById!=="undefined"&&!bg){var bh=bf.getElementById(bi[1]);
return bh?bh.id===bi[1]||typeof bh.getAttributeNode!=="undefined"&&bh.getAttributeNode("id").nodeValue===bi[1]?[bh]:aM:[];}};a1.filter.ID=function(bf,bg){var bh=typeof bf.getAttributeNode!=="undefined"&&bf.getAttributeNode("id");return bf.nodeType===1&&bh&&bh.nodeValue===bg;};}be.removeChild(bc);be=bc=null;})();(function(){var bc=l.createElement("div");bc.appendChild(l.createComment(""));if(bc.getElementsByTagName("*").length>0){a1.find.TAG=function(bf,bd){var bg=bd.getElementsByTagName(bf[1]);if(bf[1]==="*"){var bh=[];
for(var be=0;bg[be];be++){if(bg[be].nodeType===1){bh.push(bg[be]);}}bg=bh;}return bg;};}bc.innerHTML="<a href='#'></a>";if(bc.firstChild&&typeof bc.firstChild.getAttribute!=="undefined"&&bc.firstChild.getAttribute("href")!=="#"){a1.attrHandle.href=function(bd){return bd.getAttribute("href",2);};}bc=null;})();if(l.querySelectorAll){(function(){var bd=a8,bc=l.createElement("div");bc.innerHTML="<p class='TEST'></p>";if(bc.querySelectorAll&&bc.querySelectorAll(".TEST").length===0){return;}a8=function(bi,bf,bh,bj){bf=bf||l;
if(!bj&&bf.nodeType===9&&!a4(bf)){try{return a5(bf.querySelectorAll(bi),bh);}catch(bg){}}return bd(bi,bf,bh,bj);};for(var be in bd){a8[be]=bd[be];}bc=null;})();}(function(){var bc=l.createElement("div");bc.innerHTML="<div class='test e'></div><div class='test'></div>";if(!bc.getElementsByClassName||bc.getElementsByClassName("e").length===0){return;}bc.lastChild.className="e";if(bc.getElementsByClassName("e").length===1){return;}a1.order.splice(1,0,"CLASS");a1.find.CLASS=function(bf,bd,be){if(typeof bd.getElementsByClassName!=="undefined"&&!be){return bd.getElementsByClassName(bf[1]);
}};bc=null;})();function aY(be,bd,bf,bc,bl,bi){for(var bh=0,bj=bc.length;bh<bj;bh++){var bg=bc[bh];if(bg){bg=bg[be];var bk=false;while(bg){if(bg.sizcache===bf){bk=bc[bg.sizset];break;}if(bg.nodeType===1&&!bi){bg.sizcache=bf;bg.sizset=bh;}if(bg.nodeName.toLowerCase()===bd){bk=bg;break;}bg=bg[be];}bc[bh]=bk;}}}function aX(be,bd,bf,bc,bl,bi){for(var bh=0,bj=bc.length;bh<bj;bh++){var bg=bc[bh];if(bg){bg=bg[be];var bk=false;while(bg){if(bg.sizcache===bf){bk=bc[bg.sizset];break;}if(bg.nodeType===1){if(!bi){bg.sizcache=bf;
bg.sizset=bh;}if(typeof bd!=="string"){if(bg===bd){bk=true;break;}}else{if(a8.filter(bd,[bg]).length>0){bk=bg;break;}}}bg=bg[be];}bc[bh]=bk;}}}var aW=l.compareDocumentPosition?function(bc,bd){return bc.compareDocumentPosition(bd)&16;}:function(bc,bd){return bc!==bd&&(bc.contains?bc.contains(bd):true);};var a4=function(bd){var bc=(bd?bd.ownerDocument||bd:0).documentElement;return bc?bc.nodeName!=="HTML":false;};var a7=function(bi,bc){var bj=[],bf="",bg,bh=bc.nodeType?[bc]:bc;while((bg=a1.match.PSEUDO.exec(bi))){bf+=bg[0];
bi=bi.replace(a1.match.PSEUDO,"");}bi=a1.relative[bi]?bi+"*":bi;for(var bd=0,be=bh.length;bd<be;bd++){a8(bi,bh[bd],bj);}return a8.filter(bf,bj);};F.find=a8;F.expr=a8.selectors;F.expr[":"]=F.expr.filters;F.unique=a8.uniqueSort;F.getText=a2;F.isXMLDoc=a4;F.contains=aW;return;aP.Sizzle=a8;})();var aC=/Until$/,am=/^(?:parents|prevUntil|prevAll)/,ag=/,/,aG=Array.prototype.slice;var aR=function(aU,aX,aW){if(F.isFunction(aX)){return F.grep(aU,function(aY,aZ){return !!aX.call(aY,aZ,aY)===aW;});}else{if(aX.nodeType){return F.grep(aU,function(aY,aZ){return(aY===aX)===aW;
});}else{if(typeof aX==="string"){var aV=F.grep(aU,function(aY){return aY.nodeType===1;});if(E.test(aX)){return F.filter(aX,aV,!aW);}else{aX=F.filter(aX,aV);}}}}return F.grep(aU,function(aY,aZ){return(F.inArray(aY,aX)>=0)===aW;});};F.fn.extend({find:function(a0){var aZ=this.pushStack("","find",a0),aW=0;for(var aU=0,aV=this.length;aU<aV;aU++){aW=aZ.length;F.find(a0,this[aU],aZ);if(aU>0){for(var aX=aW;aX<aZ.length;aX++){for(var aY=0;aY<aW;aY++){if(aZ[aY]===aZ[aX]){aZ.splice(aX--,1);break;}}}}}return aZ;
},has:function(aU){var aV=F(aU);return this.filter(function(){for(var aW=0,aX=aV.length;aW<aX;aW++){if(F.contains(this,aV[aW])){return true;}}});},not:function(aU){return this.pushStack(aR(this,aU,false),"not",aU);},filter:function(aU){return this.pushStack(aR(this,aU,true),"filter",aU);},is:function(aU){return !!aU&&F.filter(aU,this).length>0;},closest:function(a3,aU){if(F.isArray(a3)){var a1=[],aV=this[0],aY,aZ={},a2;if(aV&&a3.length){for(var aW=0,aX=a3.length;aW<aX;aW++){a2=a3[aW];if(!aZ[a2]){aZ[a2]=F.expr.match.POS.test(a2)?F(a2,aU||this.context):a2;
}}while(aV&&aV.ownerDocument&&aV!==aU){for(a2 in aZ){aY=aZ[a2];if(aY.jquery?aY.index(aV)>-1:F(aV).is(aY)){a1.push({selector:a2,elem:aV});delete aZ[a2];}}aV=aV.parentNode;}}return a1;}var a0=F.expr.match.POS.test(a3)?F(a3,aU||this.context):null;return this.map(function(a5,a4){while(a4&&a4.ownerDocument&&a4!==aU){if(a0?a0.index(a4)>-1:F(a4).is(a3)){return a4;}a4=a4.parentNode;}return null;});},index:function(aU){if(!aU||typeof aU==="string"){return F.inArray(this[0],aU?F(aU):this.parent().children());
}return F.inArray(aU.jquery?aU[0]:aU,this);},add:function(aW,aV){var aX=typeof aW==="string"?F(aW,aV||this.context):F.makeArray(aW),aU=F.merge(this.get(),aX);return this.pushStack(D(aX[0])||D(aU[0])?aU:F.unique(aU));},andSelf:function(){return this.add(this.prevObject);}});function D(aU){return !aU||!aU.parentNode||aU.parentNode.nodeType===11;}F.each({parent:function(aU){var aV=aU.parentNode;return aV&&aV.nodeType!==11?aV:null;},parents:function(aU){return F.dir(aU,"parentNode");},parentsUntil:function(aU,aV,aW){return F.dir(aU,"parentNode",aW);
},next:function(aU){return F.nth(aU,2,"nextSibling");},prev:function(aU){return F.nth(aU,2,"previousSibling");},nextAll:function(aU){return F.dir(aU,"nextSibling");},prevAll:function(aU){return F.dir(aU,"previousSibling");},nextUntil:function(aU,aV,aW){return F.dir(aU,"nextSibling",aW);},prevUntil:function(aU,aV,aW){return F.dir(aU,"previousSibling",aW);},siblings:function(aU){return F.sibling(aU.parentNode.firstChild,aU);},children:function(aU){return F.sibling(aU.firstChild);},contents:function(aU){return F.nodeName(aU,"iframe")?aU.contentDocument||aU.contentWindow.document:F.makeArray(aU.childNodes);
}},function(aV,aU){F.fn[aV]=function(aY,aX){var aW=F.map(this,aU,aY);if(!aC.test(aV)){aX=aY;}if(aX&&typeof aX==="string"){aW=F.filter(aX,aW);}aW=this.length>1?F.unique(aW):aW;if((this.length>1||ag.test(aX))&&am.test(aV)){aW=aW.reverse();}return this.pushStack(aW,aV,aG.call(arguments).join(","));};});F.extend({filter:function(aV,aU,aW){if(aW){aV=":not("+aV+")";}return F.find.matches(aV,aU);},dir:function(aW,aV,aY){var aX=[],aU=aW[aV];while(aU&&aU.nodeType!==9&&(aY===aM||aU.nodeType!==1||!F(aU).is(aY))){if(aU.nodeType===1){aX.push(aU);
}aU=aU[aV];}return aX;},nth:function(aU,aY,aV,aW){aY=aY||1;var aX=0;for(;aU;aU=aU[aV]){if(aU.nodeType===1&&++aX===aY){break;}}return aU;},sibling:function(aV,aU){var aW=[];for(;aV;aV=aV.nextSibling){if(aV.nodeType===1&&aV!==aU){aW.push(aV);}}return aW;}});var ad=/ jQuery\d+="(?:\d+|null)"/g,af=/^\s+/,aF=/(<([\w:]+)[^>]*?)\/>/g,at=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,ax=/<([\w:]+)/,ay=/<tbody/i,ac=/<|&\w+;/,P=/checked\s*(?:[^=]|=\s*.checked.)/i,u=function(aU,aV,aW){return at.test(aW)?aU:aV+"></"+aW+">";
},aT={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,"",""]};aT.optgroup=aT.option;aT.tbody=aT.tfoot=aT.colgroup=aT.caption=aT.thead;aT.th=aT.td;if(!F.support.htmlSerialize){aT._default=[1,"div<div>","</div>"];}F.fn.extend({text:function(aU){if(F.isFunction(aU)){return this.each(function(aV){var aW=F(this);
aW.text(aU.call(this,aV,aW.text()));});}if(typeof aU!=="object"&&aU!==aM){return this.empty().append((this[0]&&this[0].ownerDocument||l).createTextNode(aU));}return F.getText(this);},wrapAll:function(aU){if(F.isFunction(aU)){return this.each(function(aW){F(this).wrapAll(aU.call(this,aW));});}if(this[0]){var aV=F(aU,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){aV.insertBefore(this[0]);}aV.map(function(){var aW=this;while(aW.firstChild&&aW.firstChild.nodeType===1){aW=aW.firstChild;
}return aW;}).append(this);}return this;},wrapInner:function(aU){if(F.isFunction(aU)){return this.each(function(aV){F(this).wrapInner(aU.call(this,aV));});}return this.each(function(){var aW=F(this),aV=aW.contents();if(aV.length){aV.wrapAll(aU);}else{aW.append(aU);}});},wrap:function(aU){return this.each(function(){F(this).wrapAll(aU);});},unwrap:function(){return this.parent().each(function(){if(!F.nodeName(this,"body")){F(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(aU){if(this.nodeType===1){this.appendChild(aU);
}});},prepend:function(){return this.domManip(arguments,true,function(aU){if(this.nodeType===1){this.insertBefore(aU,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(aV){this.parentNode.insertBefore(aV,this);});}else{if(arguments.length){var aU=F(arguments[0]);aU.push.apply(aU,this.toArray());return this.pushStack(aU,"before",arguments);}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(aV){this.parentNode.insertBefore(aV,this.nextSibling);
});}else{if(arguments.length){var aU=this.pushStack(this,"after",arguments);aU.push.apply(aU,F(arguments[0]).toArray());return aU;}}},clone:function(aU){var aV=this.map(function(){if(!F.support.noCloneEvent&&!F.isXMLDoc(this)){var aX=this.outerHTML,aY=this.ownerDocument;if(!aX){var aW=aY.createElement("div");aW.appendChild(this.cloneNode(true));aX=aW.innerHTML;}return F.clean([aX.replace(ad,"").replace(af,"")],aY)[0];}else{return this.cloneNode(true);}});if(aU===true){g(this,aV);g(this.find("*"),aV.find("*"));
}return aV;},html:function(aX){if(aX===aM){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ad,""):null;}else{if(typeof aX==="string"&&!/<script/i.test(aX)&&(F.support.leadingWhitespace||!af.test(aX))&&!aT[(ax.exec(aX)||["",""])[1].toLowerCase()]){aX=aX.replace(aF,u);try{for(var aV=0,aW=this.length;aV<aW;aV++){if(this[aV].nodeType===1){F.cleanData(this[aV].getElementsByTagName("*"));this[aV].innerHTML=aX;}}}catch(aU){this.empty().append(aX);}}else{if(F.isFunction(aX)){this.each(function(aY){var a0=F(this),aZ=a0.html();
a0.empty().append(function(){return aX.call(this,aY,aZ);});});}else{this.empty().append(aX);}}}return this;},replaceWith:function(aU){if(this[0]&&this[0].parentNode){if(!F.isFunction(aU)){aU=F(aU).detach();}else{return this.each(function(aV){var aX=F(this),aW=aX.html();aX.replaceWith(aU.call(this,aV,aW));});}return this.each(function(){var aV=this.nextSibling,aW=this.parentNode;F(this).remove();if(aV){F(aV).before(aU);}else{F(aW).append(aU);}});}else{return this.pushStack(F(F.isFunction(aU)?aU():aU),"replaceWith",aU);
}},detach:function(aU){return this.remove(aU,true);},domManip:function(aU,a2,aV){var aZ,aW,a3=aU[0],a1=[];if(!F.support.checkClone&&arguments.length===3&&typeof a3==="string"&&P.test(a3)){return this.each(function(){F(this).domManip(aU,a2,aV,true);});}if(F.isFunction(a3)){return this.each(function(a4){var a5=F(this);aU[0]=a3.call(this,a4,a2?a5.html():aM);a5.domManip(aU,a2,aV);});}if(this[0]){if(aU[0]&&aU[0].parentNode&&aU[0].parentNode.nodeType===11){aZ={fragment:aU[0].parentNode};}else{aZ=e(aU,this,a1);
}aW=aZ.fragment.firstChild;if(aW){a2=a2&&F.nodeName(aW,"tr");for(var aX=0,aY=this.length;aX<aY;aX++){aV.call(a2?a0(this[aX],aW):this[aX],aZ.cacheable||this.length>1||aX>0?aZ.fragment.cloneNode(true):aZ.fragment);}}if(a1){F.each(a1,q);}}return this;function a0(a5,a4){return F.nodeName(a5,"table")?(a5.getElementsByTagName("tbody")[0]||a5.appendChild(a5.ownerDocument.createElement("tbody"))):a5;}}});function g(aV,aW){var aU=0;aW.each(function(){if(this.nodeName!==(aV[aU]&&aV[aU].nodeName)){return;}var a0=F.data(aV[aU++]),aX=F.data(this,a0),aY=a0&&a0.events;
if(aY){delete aX.handle;aX.events={};for(var a1 in aY){for(var aZ in aY[a1]){F.event.add(this,a1,aY[a1][aZ],aY[a1][aZ].data);}}}});}function e(aU,aZ,a0){var aY,aV,aW,aX;if(aU.length===1&&typeof aU[0]==="string"&&aU[0].length<512&&aU[0].indexOf("<option")<0&&(F.support.checkClone||!P.test(aU[0]))){aV=true;aW=F.fragments[aU[0]];if(aW){if(aW!==1){aY=aW;}}}if(!aY){aX=(aZ&&aZ[0]?aZ[0].ownerDocument||aZ[0]:l);aY=aX.createDocumentFragment();F.clean(aU,aX,aY,a0);}if(aV){F.fragments[aU[0]]=aW?aY:1;}return{fragment:aY,cacheable:aV};
}F.fragments={};F.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(aU,aV){F.fn[aU]=function(a1){var a0=[],aY=F(a1);for(var aX=0,aZ=aY.length;aX<aZ;aX++){var aW=(aX>0?this.clone(true):this).get();F.fn[aV].apply(F(aY[aX]),aW);a0=a0.concat(aW);}return this.pushStack(a0,aU,aY.selector);};});F.each({remove:function(aV,aU){if(!aV||F.filter(aV,[this]).length){if(!aU&&this.nodeType===1){F.cleanData(this.getElementsByTagName("*"));F.cleanData([this]);
}if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){if(this.nodeType===1){F.cleanData(this.getElementsByTagName("*"));}while(this.firstChild){this.removeChild(this.firstChild);}}},function(aV,aU){F.fn[aV]=function(){return this.each(aU,arguments);};});F.extend({clean:function(aV,aU,aW,aZ){aU=aU||l;if(typeof aU.createElement==="undefined"){aU=aU.ownerDocument||aU[0]&&aU[0].ownerDocument||l;}var aY=[];F.each(aV,function(a4,a2){if(typeof a2==="number"){a2+="";}if(!a2){return;
}if(typeof a2==="string"&&!ac.test(a2)){a2=aU.createTextNode(a2);}else{if(typeof a2==="string"){a2=a2.replace(aF,u);var a6=(ax.exec(a2)||["",""])[1].toLowerCase(),a8=aT[a6]||aT._default,a0=a8[0],a1=aU.createElement("div");a1.innerHTML=a8[1]+a2+a8[2];while(a0--){a1=a1.lastChild;}if(!F.support.tbody){var a3=ay.test(a2),a7=a6==="table"&&!a3?a1.firstChild&&a1.firstChild.childNodes:a8[1]==="<table>"&&!a3?a1.childNodes:[];for(var a5=a7.length-1;a5>=0;--a5){if(F.nodeName(a7[a5],"tbody")&&!a7[a5].childNodes.length){a7[a5].parentNode.removeChild(a7[a5]);
}}}if(!F.support.leadingWhitespace&&af.test(a2)){a1.insertBefore(aU.createTextNode(af.exec(a2)[0]),a1.firstChild);}a2=F.makeArray(a1.childNodes);}}if(a2.nodeType){aY.push(a2);}else{aY=F.merge(aY,a2);}});if(aW){for(var aX=0;aY[aX];aX++){if(aZ&&F.nodeName(aY[aX],"script")&&(!aY[aX].type||aY[aX].type.toLowerCase()==="text/javascript")){aZ.push(aY[aX].parentNode?aY[aX].parentNode.removeChild(aY[aX]):aY[aX]);}else{if(aY[aX].nodeType===1){aY.splice.apply(aY,[aX+1,0].concat(F.makeArray(aY[aX].getElementsByTagName("script"))));
}aW.appendChild(aY[aX]);}}}return aY;},cleanData:function(aV){for(var aW=0,aU,aX;(aU=aV[aW])!=null;aW++){F.event.remove(aU);F.removeData(aU);}}});var X=/z-?index|font-?weight|opacity|zoom|line-?height/i,O=/alpha\([^)]*\)/,al=/opacity=([^)]*)/,Y=/float/i,S=/-([a-z])/ig,aD=/([A-Z])/g,aj=/^-?\d+(?:px)?$/i,ai=/^-?\d/,i={position:"absolute",visibility:"hidden",display:"block"},j=["Left","Right"],h=["Top","Bottom"],y=l.defaultView&&l.defaultView.getComputedStyle,aH=F.support.cssFloat?"cssFloat":"styleFloat",s=function(aU,aV){return aV.toUpperCase();
};F.fn.css=function(aU,aV){return c(this,aU,aV,true,function(aW,aX,aY){if(aY===aM){return F.curCSS(aW,aX);}if(typeof aY==="number"&&!X.test(aX)){aY+="px";}F.style(aW,aX,aY);});};F.extend({style:function(aU,aW,a0){if(!aU||aU.nodeType===3||aU.nodeType===8){return aM;}if((aW==="width"||aW==="height")&&parseFloat(a0)<0){a0=aM;}var aZ=aU.style||aU,aY=a0!==aM;if(!F.support.opacity&&aW==="opacity"){if(aY){aZ.zoom=1;var aX=parseInt(a0,10)+""==="NaN"?"":"alpha(opacity="+a0*100+")";var aV=aZ.filter||F.curCSS(aU,"filter")||"";
aZ.filter=O.test(aV)?aV.replace(O,aX):aX;}return aZ.filter&&aZ.filter.indexOf("opacity=")>=0?(parseFloat(al.exec(aZ.filter)[1])/100)+"":"";}if(Y.test(aW)){aW=aH;}aW=aW.replace(S,s);if(aY){aZ[aW]=a0;}return aZ[aW];},css:function(aU,aY,aW,aV){if(aY==="width"||aY==="height"){var a0,aZ=i,a1=aY==="width"?j:h;function aX(){a0=aY==="width"?aU.offsetWidth:aU.offsetHeight;if(aV==="border"){return;}F.each(a1,function(){if(!aV){a0-=parseFloat(F.curCSS(aU,"padding"+this,true))||0;}if(aV==="margin"){a0+=parseFloat(F.curCSS(aU,"margin"+this,true))||0;
}else{a0-=parseFloat(F.curCSS(aU,"border"+this+"Width",true))||0;}});}if(aU.offsetWidth!==0){aX();}else{F.swap(aU,aZ,aX);}return Math.max(0,Math.round(a0));}return F.curCSS(aU,aY,aW);},curCSS:function(aX,a1,aZ){var a2,a4=aX.style,aY;if(!F.support.opacity&&a1==="opacity"&&aX.currentStyle){a2=al.test(aX.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return a2===""?"1":a2;}if(Y.test(a1)){a1=aH;}if(!aZ&&a4&&a4[a1]){a2=a4[a1];}else{if(y){if(Y.test(a1)){a1="float";}a1=a1.replace(aD,"-$1").toLowerCase();
var aW=aX.ownerDocument.defaultView;if(!aW){return null;}var aV=aW.getComputedStyle(aX,null);if(aV){a2=aV.getPropertyValue(a1);}if(a1==="opacity"&&a2===""){a2="1";}}else{if(aX.currentStyle){var aU=a1.replace(S,s);a2=aX.currentStyle[a1]||aX.currentStyle[aU];if(!aj.test(a2)&&ai.test(a2)){var a0=a4.left,a3=aX.runtimeStyle.left;aX.runtimeStyle.left=aX.currentStyle.left;a4.left=aU==="fontSize"?"1em":(a2||0);a2=a4.pixelLeft+"px";a4.left=a0;aX.runtimeStyle.left=a3;}}}}return a2;},swap:function(aV,aY,aU){var aX={};
for(var aW in aY){aX[aW]=aV.style[aW];aV.style[aW]=aY[aW];}aU.call(aV);for(var aW in aY){aV.style[aW]=aX[aW];}}});if(F.expr&&F.expr.filters){F.expr.filters.hidden=function(aU){var aX=aU.offsetWidth,aV=aU.offsetHeight,aW=aU.nodeName.toLowerCase()==="tr";return aX===0&&aV===0&&!aW?true:aX>0&&aV>0&&!aW?false:F.curCSS(aU,"display")==="none";};F.expr.filters.visible=function(aU){return !F.expr.filters.hidden(aU);};}var G=K(),aq=/<script(.|\s)*?\/script>/gi,ar=/select|textarea/i,ae=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,H=/=\?(&|$)/,an=/\?/,aA=/(\?|&)_=.*?(&|$)/,aE=/^(\w+:)?\/\/([^\/?#]+)/,N=/%20/g;
F.fn.extend({_load:F.fn.load,load:function(a0,aW,aU){if(typeof a0!=="string"){return this._load(a0);}else{if(!this.length){return this;}}var aV=a0.indexOf(" ");if(aV>=0){var aX=a0.slice(aV,a0.length);a0=a0.slice(0,aV);}var aZ="GET";if(aW){if(F.isFunction(aW)){aU=aW;aW=null;}else{if(typeof aW==="object"){aW=F.param(aW,F.ajaxSettings.traditional);aZ="POST";}}}var aY=this;F.ajax({url:a0,type:aZ,dataType:"html",data:aW,complete:function(a1,a2){if(a2==="success"||a2==="notmodified"){aY.html(aX?F("<div />").append(a1.responseText.replace(aq,"")).find(aX):a1.responseText);
}if(aU){aY.each(aU,[a1.responseText,a2,a1]);}}});return this;},serialize:function(){return F.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?F.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||ar.test(this.nodeName)||ae.test(this.type));}).map(function(aV,aU){var aW=F(this).val();return aW==null?null:F.isArray(aW)?F.map(aW,function(aY,aX){return{name:aU.name,value:aY};}):{name:aU.name,value:aW};
}).get();}});F.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(aU,aV){F.fn[aV]=function(aW){return this.bind(aV,aW);};});F.extend({get:function(aX,aV,aU,aW){if(F.isFunction(aV)){aW=aW||aU;aU=aV;aV=null;}return F.ajax({type:"GET",url:aX,data:aV,success:aU,dataType:aW});},getScript:function(aV,aU){return F.get(aV,null,aU,"script");},getJSON:function(aW,aV,aU){return F.get(aW,aV,aU,"json");},post:function(aX,aV,aU,aW){if(F.isFunction(aV)){aW=aW||aU;aU=aV;aV={};
}return F.ajax({type:"POST",url:aX,data:aV,success:aU,dataType:aW});},ajaxSetup:function(aU){F.extend(F.ajaxSettings,aU);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:aP.XMLHttpRequest&&(aP.location.protocol!=="file:"||!aP.ActiveXObject)?function(){return new aP.XMLHttpRequest();}:function(){try{return new aP.ActiveXObject("Microsoft.XMLHTTP");}catch(aU){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a3){var a8=F.extend(true,{},F.ajaxSettings,a3);
var a0,ba,aW,aU=a3&&a3.context||a8,be=a8.type.toUpperCase();if(a8.data&&a8.processData&&typeof a8.data!=="string"){a8.data=F.param(a8.data,a8.traditional);}if(a8.dataType==="jsonp"){if(be==="GET"){if(!H.test(a8.url)){a8.url+=(an.test(a8.url)?"&":"?")+(a8.jsonp||"callback")+"=?";}}else{if(!a8.data||!H.test(a8.data)){a8.data=(a8.data?a8.data+"&":"")+(a8.jsonp||"callback")+"=?";}}a8.dataType="json";}if(a8.dataType==="json"&&(a8.data&&H.test(a8.data)||H.test(a8.url))){a0=a8.jsonpCallback||("jsonp"+G++);
if(a8.data){a8.data=(a8.data+"").replace(H,"="+a0+"$1");}a8.url=a8.url.replace(H,"="+a0+"$1");a8.dataType="script";aP[a0]=aP[a0]||function(bh){aW=bh;bb();aV();aP[a0]=aM;try{delete aP[a0];}catch(bg){}if(aZ){aZ.removeChild(a9);}};}if(a8.dataType==="script"&&a8.cache===null){a8.cache=false;}if(a8.cache===false&&be==="GET"){var bd=K();var a7=a8.url.replace(aA,"$1_="+bd+"$2");a8.url=a7+((a7===a8.url)?(an.test(a8.url)?"&":"?")+"_="+bd:"");}if(a8.data&&be==="GET"){a8.url+=(an.test(a8.url)?"&":"?")+a8.data;
}if(a8.global&&!F.active++){F.event.trigger("ajaxStart");}var a4=aE.exec(a8.url),a5=a4&&(a4[1]&&a4[1]!==location.protocol||a4[2]!==location.host);if(a8.dataType==="script"&&be==="GET"&&a5){var aZ=l.getElementsByTagName("head")[0]||l.documentElement;var a9=l.createElement("script");a9.src=a8.url;if(a8.scriptCharset){a9.charset=a8.scriptCharset;}if(!a0){var aX=false;a9.onload=a9.onreadystatechange=function(){if(!aX&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){aX=true;
bb();aV();a9.onload=a9.onreadystatechange=null;if(aZ&&a9.parentNode){aZ.removeChild(a9);}}};}aZ.insertBefore(a9,aZ.firstChild);return aM;}var a6=false;var bf=a8.xhr();if(!bf){return;}if(a8.username){bf.open(be,a8.url,a8.async,a8.username,a8.password);}else{bf.open(be,a8.url,a8.async);}try{if(a8.data||a3&&a3.contentType){bf.setRequestHeader("Content-Type",a8.contentType);}if(a8.ifModified){if(F.lastModified[a8.url]){bf.setRequestHeader("If-Modified-Since",F.lastModified[a8.url]);}if(F.etag[a8.url]){bf.setRequestHeader("If-None-Match",F.etag[a8.url]);
}}if(!a5){bf.setRequestHeader("X-Requested-With","XMLHttpRequest");}bf.setRequestHeader("Accept",a8.dataType&&a8.accepts[a8.dataType]?a8.accepts[a8.dataType]+", */*":a8.accepts._default);}catch(aY){}if(a8.beforeSend&&a8.beforeSend.call(aU,bf,a8)===false){if(a8.global&&!--F.active){F.event.trigger("ajaxStop");}bf.abort();return false;}if(a8.global){bc("ajaxSend",[bf,a8]);}var a2=bf.onreadystatechange=function(bi){if(!bf||bf.readyState===0||bi==="abort"){if(!a6){aV();}a6=true;if(bf){bf.onreadystatechange=F.noop;
}}else{if(!a6&&bf&&(bf.readyState===4||bi==="timeout")){a6=true;bf.onreadystatechange=F.noop;ba=bi==="timeout"?"timeout":!F.httpSuccess(bf)?"error":a8.ifModified&&F.httpNotModified(bf,a8.url)?"notmodified":"success";var bh;if(ba==="success"){try{aW=F.httpData(bf,a8.dataType,a8);}catch(bg){ba="parsererror";bh=bg;}}if(ba==="success"||ba==="notmodified"){if(!a0){bb();}}else{F.handleError(a8,bf,ba,bh);}aV();if(bi==="timeout"){bf.abort();}if(a8.async){bf=null;}}}};try{var a1=bf.abort;bf.abort=function(){if(bf){a1.call(bf);
}a2("abort");};}catch(aY){}if(a8.async&&a8.timeout>0){setTimeout(function(){if(bf&&!a6){a2("timeout");}},a8.timeout);}try{bf.send(be==="POST"||be==="PUT"||be==="DELETE"?a8.data:null);}catch(aY){F.handleError(a8,bf,null,aY);aV();}if(!a8.async){a2();}function bb(){if(a8.success){a8.success.call(aU,aW,ba,bf);}if(a8.global){bc("ajaxSuccess",[bf,a8]);}}function aV(){if(a8.complete){a8.complete.call(aU,bf,ba);}if(a8.global){bc("ajaxComplete",[bf,a8]);}if(a8.global&&!--F.active){F.event.trigger("ajaxStop");
}}function bc(bh,bg){(a8.context?F(a8.context):F.event).trigger(bh,bg);}return bf;},handleError:function(aV,aX,aW,aU){if(aV.error){aV.error.call(aV.context||aV,aX,aW,aU);}if(aV.global){(aV.context?F(aV.context):F.event).trigger("ajaxError",[aX,aV,aU]);}},active:0,httpSuccess:function(aV){try{return !aV.status&&location.protocol==="file:"||(aV.status>=200&&aV.status<300)||aV.status===304||aV.status===1223||aV.status===0;}catch(aU){}return false;},httpNotModified:function(aX,aW){var aV=aX.getResponseHeader("Last-Modified"),aU=aX.getResponseHeader("Etag");
if(aV){F.lastModified[aW]=aV;}if(aU){F.etag[aW]=aU;}return aX.status===304||aX.status===0;},httpData:function(aY,aX,aW){var aU=aY.getResponseHeader("content-type")||"",aZ=aX==="xml"||!aX&&aU.indexOf("xml")>=0,aV=aZ?aY.responseXML:aY.responseText;if(aZ&&aV.documentElement.nodeName==="parsererror"){F.error("parsererror");}if(aW&&aW.dataFilter){aV=aW.dataFilter(aV,aX);}if(typeof aV==="string"){if(aX==="json"||!aX&&aU.indexOf("json")>=0){aV=F.parseJSON(aV);}else{if(aX==="script"||!aX&&aU.indexOf("javascript")>=0){F.globalEval(aV);
}}}return aV;},param:function(aU,aZ){var aY=[];if(aZ===aM){aZ=F.ajaxSettings.traditional;}if(F.isArray(aU)||aU.jquery){F.each(aU,function(){aV(this.name,this.value);});}else{for(var aX in aU){aW(aX,aU[aX]);}}return aY.join("&").replace(N,"+");function aW(a1,a0){if(F.isArray(a0)){F.each(a0,function(a2,a3){if(aZ){aV(a1,a3);}else{aW(a1+"["+(typeof a3==="object"||F.isArray(a3)?a2:"")+"]",a3);}});}else{if(!aZ&&a0!=null&&typeof a0==="object"){F.each(a0,function(a2,a3){aW(a1+"["+a2+"]",a3);});}else{aV(a1,a0);
}}}function aV(a0,a1){a1=F.isFunction(a1)?a1():a1;aY[aY.length]=encodeURIComponent(a0)+"="+encodeURIComponent(a1);}}});var o={},ab=/toggle|show|hide/,aa=/^([+-]=)?([\d+-.]+)(.*)$/,aJ,w=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];F.fn.extend({show:function(a3,aU){if(a3||a3===0){return this.animate(x("show",3),a3,aU);}else{for(var aX=0,a0=this.length;aX<a0;aX++){var a2=F.data(this[aX],"olddisplay");
this[aX].style.display=a2||"";if(F.css(this[aX],"display")==="none"){var a1=this[aX].nodeName,aV;if(o[a1]){aV=o[a1];}else{var aW=F("<"+a1+" />").appendTo("body");aV=aW.css("display");if(aV==="none"){aV="block";}aW.remove();o[a1]=aV;}F.data(this[aX],"olddisplay",aV);}}for(var aY=0,aZ=this.length;aY<aZ;aY++){this[aY].style.display=F.data(this[aY],"olddisplay")||"";}return this;}},hide:function(a0,aU){if(a0||a0===0){return this.animate(x("hide",3),a0,aU);}else{for(var aV=0,aY=this.length;aV<aY;aV++){var aZ=F.data(this[aV],"olddisplay");
if(!aZ&&aZ!=="none"){F.data(this[aV],"olddisplay",F.css(this[aV],"display"));}}for(var aW=0,aX=this.length;aW<aX;aW++){this[aW].style.display="none";}return this;}},_toggle:F.fn.toggle,toggle:function(aV,aW){var aU=typeof aV==="boolean";if(F.isFunction(aV)&&F.isFunction(aW)){this._toggle.apply(this,arguments);}else{if(aV==null||aU){this.each(function(){var aX=aU?aV:F(this).is(":hidden");F(this)[aX?"show":"hide"]();});}else{this.animate(x("toggle",3),aV,aW);}}return this;},fadeTo:function(aV,aW,aU){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:aW},aV,aU);
},animate:function(aX,aY,aV,aU){var aW=F.speed(aY,aV,aU);if(F.isEmptyObject(aX)){return this.each(aW.complete);}return this[aW.queue===false?"each":"queue"](function(){var a1=F.extend({},aW),a2,aZ=this.nodeType===1&&F(this).is(":hidden"),a3=this;for(a2 in aX){var a0=a2.replace(S,s);if(a2!==a0){aX[a0]=aX[a2];delete aX[a2];a2=a0;}if(aX[a2]==="hide"&&aZ||aX[a2]==="show"&&!aZ){return a1.complete.call(this);}if((a2==="height"||a2==="width")&&this.style){a1.display=F.css(this,"display");a1.overflow=this.style.overflow;
}if(F.isArray(aX[a2])){(a1.specialEasing=a1.specialEasing||{})[a2]=aX[a2][1];aX[a2]=aX[a2][0];}}if(a1.overflow!=null){this.style.overflow="hidden";}a1.curAnim=F.extend({},aX);F.each(aX,function(a6,ba){var a4=new F.fx(a3,a1,a6);if(ab.test(ba)){a4[ba==="toggle"?aZ?"show":"hide":ba](aX);}else{var a7=aa.exec(ba),a8=a4.cur(true)||0;if(a7){var a5=parseFloat(a7[2]),a9=a7[3]||"px";if(a9!=="px"){a3.style[a6]=(a5||1)+a9;a8=((a5||1)/a4.cur(true))*a8;a3.style[a6]=a8+a9;}if(a7[1]){a5=((a7[1]==="-="?-1:1)*a5)+a8;
}a4.custom(a8,a5,a9);}else{a4.custom(a8,ba,"");}}});return true;});},stop:function(aU,aV){var aW=F.timers;if(aU){this.queue([]);}this.each(function(){for(var aX=aW.length-1;aX>=0;aX--){if(aW[aX].elem===this){if(aV){aW[aX](true);}aW.splice(aX,1);}}});if(!aV){this.dequeue();}return this;}});F.each({slideDown:x("show",1),slideUp:x("hide",1),slideToggle:x("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(aU,aV){F.fn[aU]=function(aX,aW){return this.animate(aV,aX,aW);};});F.extend({speed:function(aX,aU,aV){var aW=aX&&typeof aX==="object"?aX:{complete:aV||!aV&&aU||F.isFunction(aX)&&aX,duration:aX,easing:aV&&aU||aU&&!F.isFunction(aU)&&aU};
aW.duration=F.fx.off?0:typeof aW.duration==="number"?aW.duration:F.fx.speeds[aW.duration]||F.fx.speeds._default;aW.old=aW.complete;aW.complete=function(){if(aW.queue!==false){F(this).dequeue();}if(F.isFunction(aW.old)){aW.old.call(this);}};return aW;},easing:{linear:function(aX,aW,aV,aU){return aV+aU*aX;},swing:function(aX,aW,aV,aU){return((-Math.cos(aX*Math.PI)/2)+0.5)*aU+aV;}},timers:[],fx:function(aU,aV,aW){this.options=aV;this.elem=aU;this.prop=aW;if(!aV.orig){aV.orig={};}}});F.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);
}(F.fx.step[this.prop]||F.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(aU){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}var aV=parseFloat(F.css(this.elem,this.prop,aU));return aV&&aV>-10000?aV:parseFloat(F.curCSS(this.elem,this.prop))||0;},custom:function(aU,aX,aY){this.startTime=K();this.start=aU;this.end=aX;this.unit=aY||this.unit||"px";
this.now=this.start;this.pos=this.state=0;var aV=this;function aW(aZ){return aV.step(aZ);}aW.elem=this.elem;if(aW()&&F.timers.push(aW)&&!aJ){aJ=setInterval(F.fx.tick,13);}},show:function(){this.options.orig[this.prop]=F.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());F(this.elem).show();},hide:function(){this.options.orig[this.prop]=F.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(aW){var a2=K(),aV=true;
if(aW||a2>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var aX in this.options.curAnim){if(this.options.curAnim[aX]!==true){aV=false;}}if(aV){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;var aZ=F.data(this.elem,"olddisplay");this.elem.style.display=aZ?aZ:this.options.display;if(F.css(this.elem,"display")==="none"){this.elem.style.display="block";}}if(this.options.hide){F(this.elem).hide();
}if(this.options.hide||this.options.show){for(var a0 in this.options.curAnim){F.style(this.elem,a0,this.options.orig[a0]);}}this.options.complete.call(this.elem);}return false;}else{var aY=a2-this.startTime;this.state=aY/this.options.duration;var a1=this.options.specialEasing&&this.options.specialEasing[this.prop];var aU=this.options.easing||(F.easing.swing?"swing":"linear");this.pos=F.easing[a1||aU](this.state,aY,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();
}return true;}};F.extend(F.fx,{tick:function(){var aV=F.timers;for(var aU=0;aU<aV.length;aU++){if(!aV[aU]()){aV.splice(aU--,1);}}if(!aV.length){F.fx.stop();}},stop:function(){clearInterval(aJ);aJ=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(aU){F.style(aU.elem,"opacity",aU.now);},_default:function(aU){if(aU.elem.style&&aU.elem.style[aU.prop]!=null){aU.elem.style[aU.prop]=(aU.prop==="width"||aU.prop==="height"?Math.max(0,aU.now):aU.now)+aU.unit;}else{aU.elem[aU.prop]=aU.now;
}}}});if(F.expr&&F.expr.filters){F.expr.filters.animated=function(aU){return F.grep(F.timers,function(aV){return aU===aV.elem;}).length;};}function x(aW,aU){var aV={};F.each(w.concat.apply([],w.slice(0,aU)),function(){aV[this]=aW;});return aV;}if("getBoundingClientRect" in l.documentElement){F.fn.offset=function(a2){var a0=this[0];if(a2){return this.each(function(a4){F.offset.setOffset(this,a2,a4);});}if(!a0||!a0.ownerDocument){return null;}if(a0===a0.ownerDocument.body){return F.offset.bodyOffset(a0);
}var aV=a0.getBoundingClientRect(),aY=a0.ownerDocument,aU=aY.body,aZ=aY.documentElement,aX=aZ.clientTop||aU.clientTop||0,aW=aZ.clientLeft||aU.clientLeft||0,a3=aV.top+(self.pageYOffset||F.support.boxModel&&aZ.scrollTop||aU.scrollTop)-aX,a1=aV.left+(self.pageXOffset||F.support.boxModel&&aZ.scrollLeft||aU.scrollLeft)-aW;return{top:a3,left:a1};};}else{F.fn.offset=function(a2){var aZ=this[0];if(a2){return this.each(function(a6){F.offset.setOffset(this,a2,a6);});}if(!aZ||!aZ.ownerDocument){return null;
}if(aZ===aZ.ownerDocument.body){return F.offset.bodyOffset(aZ);}F.offset.initialize();var a1=aZ.offsetParent,a4=aZ,aX=aZ.ownerDocument,aV,aY=aX.documentElement,aU=aX.body,aW=aX.defaultView,a3=aW?aW.getComputedStyle(aZ,null):aZ.currentStyle,a5=aZ.offsetTop,a0=aZ.offsetLeft;while((aZ=aZ.parentNode)&&aZ!==aU&&aZ!==aY){if(F.offset.supportsFixedPosition&&a3.position==="fixed"){break;}aV=aW?aW.getComputedStyle(aZ,null):aZ.currentStyle;a5-=aZ.scrollTop;a0-=aZ.scrollLeft;if(aZ===a1){a5+=aZ.offsetTop;a0+=aZ.offsetLeft;
if(F.offset.doesNotAddBorder&&!(F.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(aZ.nodeName))){a5+=parseFloat(aV.borderTopWidth)||0;a0+=parseFloat(aV.borderLeftWidth)||0;}a4=a1,a1=aZ.offsetParent;}if(F.offset.subtractsBorderForOverflowNotVisible&&aV.overflow!=="visible"){a5+=parseFloat(aV.borderTopWidth)||0;a0+=parseFloat(aV.borderLeftWidth)||0;}a3=aV;}if(a3.position==="relative"||a3.position==="static"){a5+=aU.offsetTop;a0+=aU.offsetLeft;}if(F.offset.supportsFixedPosition&&a3.position==="fixed"){a5+=Math.max(aY.scrollTop,aU.scrollTop);
a0+=Math.max(aY.scrollLeft,aU.scrollLeft);}return{top:a5,left:a0};};}F.offset={initialize:function(){var aU=l.body,aX=l.createElement("div"),aZ,aW,a0,a1,aV=parseFloat(F.curCSS(aU,"marginTop",true))||0,aY="<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>";F.extend(aX.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});
aX.innerHTML=aY;aU.insertBefore(aX,aU.firstChild);aZ=aX.firstChild;aW=aZ.firstChild;a1=aZ.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(aW.offsetTop!==5);this.doesAddBorderForTableAndCells=(a1.offsetTop===5);aW.style.position="fixed",aW.style.top="20px";this.supportsFixedPosition=(aW.offsetTop===20||aW.offsetTop===15);aW.style.position=aW.style.top="";aZ.style.overflow="hidden",aZ.style.position="relative";this.subtractsBorderForOverflowNotVisible=(aW.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(aU.offsetTop!==aV);
aU.removeChild(aX);aU=aX=aZ=aW=a0=a1=null;F.offset.initialize=F.noop;},bodyOffset:function(aU){var aW=aU.offsetTop,aV=aU.offsetLeft;F.offset.initialize();if(F.offset.doesNotIncludeMarginInBodyOffset){aW+=parseFloat(F.curCSS(aU,"marginTop",true))||0;aV+=parseFloat(F.curCSS(aU,"marginLeft",true))||0;}return{top:aW,left:aV};},setOffset:function(aY,a0,aZ){if(/static/.test(F.curCSS(aY,"position"))){aY.style.position="relative";}var aU=F(aY),aW=aU.offset(),aX=parseInt(F.curCSS(aY,"top",true),10)||0,aV=parseInt(F.curCSS(aY,"left",true),10)||0;
if(F.isFunction(a0)){a0=a0.call(aY,aZ,aW);}var a1={top:(a0.top-aW.top)+aX,left:(a0.left-aW.left)+aV};if("using" in a0){a0.using.call(aY,a1);}else{aU.css(a1);}}};F.fn.extend({position:function(){if(!this[0]){return null;}var aU=this[0],aW=this.offsetParent(),aV=this.offset(),aX=/^body|html$/i.test(aW[0].nodeName)?{top:0,left:0}:aW.offset();aV.top-=parseFloat(F.curCSS(aU,"marginTop",true))||0;aV.left-=parseFloat(F.curCSS(aU,"marginLeft",true))||0;aX.top+=parseFloat(F.curCSS(aW[0],"borderTopWidth",true))||0;
aX.left+=parseFloat(F.curCSS(aW[0],"borderLeftWidth",true))||0;return{top:aV.top-aX.top,left:aV.left-aX.left};},offsetParent:function(){return this.map(function(){var aU=this.offsetParent||l.body;while(aU&&(!/^body|html$/i.test(aU.nodeName)&&F.css(aU,"position")==="static")){aU=aU.offsetParent;}return aU;});}});F.each(["Left","Top"],function(aU,aW){var aV="scroll"+aW;F.fn[aV]=function(aY){var aX=this[0],aZ;if(!aX){return null;}if(aY!==aM){return this.each(function(){aZ=A(this);if(aZ){aZ.scrollTo(!aU?aY:F(aZ).scrollLeft(),aU?aY:F(aZ).scrollTop());
}else{this[aV]=aY;}});}else{aZ=A(aX);return aZ?("pageXOffset" in aZ)?aZ[aU?"pageYOffset":"pageXOffset"]:F.support.boxModel&&aZ.document.documentElement[aV]||aZ.document.body[aV]:aX[aV];}};});function A(aU){return("scrollTo" in aU&&aU.document)?aU:aU.nodeType===9?aU.defaultView||aU.parentWindow:false;}F.each(["Height","Width"],function(aU,aV){var aW=aV.toLowerCase();F.fn["inner"+aV]=function(){return this[0]?F.css(this[0],aW,false,"padding"):null;};F.fn["outer"+aV]=function(aX){return this[0]?F.css(this[0],aW,false,aX?"margin":"border"):null;
};F.fn[aW]=function(aY){var aX=this[0];if(!aX){return aY==null?null:this;}if(F.isFunction(aY)){return this.each(function(aZ){var a0=F(this);a0[aW](aY.call(this,aZ,a0[aW]()));});}return("scrollTo" in aX&&aX.document)?aX.document.compatMode==="CSS1Compat"&&aX.document.documentElement["client"+aV]||aX.document.body["client"+aV]:(aX.nodeType===9)?Math.max(aX.documentElement["client"+aV],aX.body["scroll"+aV],aX.documentElement["scroll"+aV],aX.body["offset"+aV],aX.documentElement["offset"+aV]):aY===aM?F.css(aX,aW):this.css(aW,typeof aY==="string"?aY:aY+"px");
};});aP.jQuery=aP.$=F;})(window);(function($){function toIntegersAtLease(n){return n<10?"0"+n:n;}Date.prototype.toJSON=function(date){return'"'+this.getFullYear()+"-"+toIntegersAtLease(this.getMonth()+1)+"-"+toIntegersAtLease(this.getDate())+'"';};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};$.quoteString=function(string){if(escapeable.test(string)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c;}c=a.charCodeAt();
return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}return'"'+string+'"';};$.toJSON=function(o,compact){var type=typeof(o);if(type=="undefined"){return"undefined";}else{if(type=="number"||type=="boolean"){return o+"";}else{if(o===null){return"null";}}}if(type=="string"){return $.quoteString(o);}if(type=="object"&&typeof o.toJSON=="function"){return o.toJSON(compact);}if(type!="function"&&typeof(o.length)=="number"){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact));
}if(compact){return"["+ret.join(",")+"]";}else{return"["+ret.join(", ")+"]";}}if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}var ret=[];for(var k in o){var name;type=typeof(k);if(type=="number"){name='"'+k+'"';}else{if(type=="string"){name=$.quoteString(k);}else{continue;}}var val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}if(compact){ret.push(name+":"+val);}else{ret.push(name+": "+val);}}return"{"+ret.join(", ")+"}";};$.compactJSON=function(o){return $.toJSON(o,true);
};$.evalJSON=function(src){return eval("("+src+")");};$.secureEvalJSON=function(src){var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,"@");filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+src+")");}else{throw new SyntaxError("Error parsing JSON, source is not valid.");}};})(jQuery);var opera=opera||{postError:function(){}};var DarcySoft=DarcySoft||{ShotWeb:{}};DarcySoft.ServerTimezone=function(b){var c=new Date(b.getFullYear(),2,25);var a=new Date(b.getFullYear(),9,28);if(b>c&&b<=a){return 2;}else{return 1;}};DarcySoft.ServerDate=function(b){var a=new Date(b.getTime());if(!b.isServerDate){a.setHours(a.getHours()+a.getTimezoneOffset()/60+DarcySoft.ServerTimezone(b));a.isServerDate=true;}return a;};DarcySoft.ShotWeb.PersistentParams=[];DarcySoft.ShotWeb.PersistentParamsGroups={};
DarcySoft.ShotWeb.ParamsToPreserve=function(d,a,e){var h=DarcySoft.ShotWeb.PersistentParams;if(e&&DarcySoft.ShotWeb.PersistentParamsGroups[e]){h=DarcySoft.ShotWeb.PersistentParamsGroups[e];}var f=[];if(d){var g=d.split("/");for(var b=0;b<g.length;b++){for(var c=0;c<h.length;c++){if(g[b].indexOf("_")>=0&&g[b].indexOf(h[c])==0){if(!a||a.indexOf("/"+h[c])<0){f.push(g[b]);}break;}}}}return f;};DarcySoft.ShotWeb.UpdateParamsInURL=function(g,d){var e=[];if(g&&d){var f=g.split("/");for(var b=0;b<d.length;
b++){e.push(d[b].split("_")[0]);}for(var c=0;c<d.length;c++){var a=false;for(var b=0;b<f.length;b++){if(f[b].indexOf("_")>=0&&f[b].indexOf(e[c])==0){a=true;f[b]=d[c];}}if(!a){f.push(d[c]);}}g=f.join("/");}return g;};DarcySoft.ShotWeb.Link=function(f,a,d){if(f){if(a){window.location=f;}else{var c=DarcySoft.ShotWeb.ParamsToPreserve(DarcySoft.ShotWeb.Sections.currentSection(),f,d);var e=f.split("/");for(var b=0;b<c.length;b++){e.push(c[b]);}window.location=e.join("/");}}return false;};DarcySoft.ShotWeb.IntegerFromParams=function(c,b){if(!c){c=DarcySoft.ShotWeb.Sections.currentSection();
}if(c){var d=c.split("/");for(var a=0;a<d.length;a++){if(d[a].indexOf(b)>=0){var e=d[a].split("_");if(e.length>1){return parseInt(e[1],10);}}}}return undefined;};DarcySoft.ShotWeb.StringFromParams=function(c,b){if(!c){c=DarcySoft.ShotWeb.Sections.currentSection();}if(c){var d=c.split("/");for(var a=0;a<d.length;a++){if(d[a].indexOf(b)>=0){var e=d[a].split("_");if(e.length>1){return e[1];}}}}return undefined;};DarcySoft.ShotWeb.DateFromParams=function(f,e){if(!f){f=DarcySoft.ShotWeb.Sections.currentSection();
}if(f){var g=f.split("/");for(var b=0;b<g.length;b++){if(g[b].indexOf(e)>=0){var h=g[b].split("_");if(h.length>3){var k=parseInt(parseInt(h[1],10));var c=parseInt(parseInt(h[2],10));var a=parseInt(parseInt(h[3],10));if(!isNaN(k)&&!isNaN(k)&&!isNaN(a)){var j=new Date(k,c-1,a,-(new Date(k,c-1,a).getTimezoneOffset()/60)-DarcySoft.ServerTimezone(new Date(k,c-1,a)),0,0,0);return j;}}}}}return undefined;};String.prototype.replaceLatinChar=function(){return output=this.replace(/á|é|í|ó|ú|ñ|ä|ë|ï|ö|ü/ig,function(c,a,b){var c=c=="á"?"a":c=="é"?"e":c=="í"?"i":c=="ó"?"o":c=="ú"?"u":c=="ñ"?"n":c;
c=c=="Á"?"A":c=="É"?"E":c=="Í"?"I":c=="Ó"?"O":c=="Ú"?"U":c=="Ñ"?"N":c;c=c=="Á"?"A":c=="É"?"E":c=="Í"?"I":c=="Ó"?"O":c=="Ú"?"U":c=="Ñ"?"N":c;c=c=="ä"?"a":c=="ë"?"e":c=="ï"?"i":c=="ö"?"o":c=="ü"?"u":c;c=c=="Ä"?"A":c=="Ë"?"E":c=="Ï"?"I":c=="Ö"?"O":c=="Ü"?"U":c;return(c);});};Date.prototype.toWebServiceString=function(){var c=DarcySoft.ServerDate(this);var e=c.getFullYear();var b=c.getMonth()+1;var a=c.getDate();if(b<10){b="0"+b;}if(a<10){a="0"+a;}return e+"-"+b+"-"+a;};DarcySoft.ShotWeb.setLang=function(c){setlangresult=DarcySoft.ShotWeb.ContentServiceSync("setLang",{lang:c});
if(setlangresult.WasForced){if(setlangresult.WasSubdomainLang){window.location.host=setlangresult.MainDomain;}else{var e=window.location.pathname.split("/");if(e[1]&&e[1].length==2){e.splice(1,1);window.location.pathname=e.join("/");}}}else{var d=window.location.search;var a=d.indexOf("language=");if(a>=0){var b=d.indexOf("&",a+1);if(b<0){b=d.length-1;}d=d.substring(0,a)+d.substring(b+1);if(d.indexOf("=")<0){d="";}window.location.search=d;}else{window.location.reload(false);}}};DarcySoft.ShotWeb.ContentServiceSync=function(a,c,b){var d;
DarcySoft.ShotWeb.ContentService(a,c,function(e){d=e;},true,b);return d;};DarcySoft.parseDotNetDate=function(dotnetdate){if(typeof dotnetdate=="string"){var datestr="new "+dotnetdate;datestr=datestr.replace("/","");datestr=datestr.replace("/","");return eval(datestr);}else{return dotnetdate;}};var AjaxError=function(a){return function(b){if(DarcySoft.ShotWeb.User.Info.Roles&&DarcySoft.ShotWeb.User.Info.Roles.indexOf("Administrators")>=0){jQuery("#errormessage").html("AJAX Error: "+a+"<br/>"+b.status+"<br/> "+b.statusText+"<br/>"+b.responseText);
jQuery("#errormessage").show("slow");}else{jQuery("#errormessage").hide();}};};var parseDarcySoftDataObject=function(a){if(typeof a=="object"){for(key in a){a[key];if(key=="Version"){a[key]=DarcySoft.parseDotNetDate(a[key]);}else{parseDarcySoftDataObject(a[key]);}}}};DarcySoft.ShotWeb.ContentService=function(a,c,e,f,b){c=c||"{}";if(typeof c!=="string"){c=jQuery.toJSON(c);}if(!a){throw"method name must be defined";}var g="/service.asmx/"+a;var d=function(h){parseDarcySoftDataObject(h.d.ResultValue);
if(e){e(h.d.ResultValue);}if(b){b(h.d);}};jQuery.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,data:c,dataType:"json",success:d,error:AjaxError(g),async:!f});};DarcySoft.ShotWeb.ContentServiceGET=function(a,c,e,f,b){c=c||"{}";for(key in c){if(typeof c[key]!=="string"){c[key]=jQuery.toJSON(c[key]);}}if(!a){throw"method name must be defined";}var g="/service_get.asmx/"+a;var d=function(h){parseDarcySoftDataObject(h.d.ResultValue);if(e){e(h.d.ResultValue);}if(b){b(h.d);}};jQuery.ajax({type:"GET",url:g,data:c,dataType:"json",success:d,error:AjaxError(g),async:!f,processData:true});
};DarcySoft.ShotWeb.ValidationImage=function(){var a=function(c,d){var b=function(){DarcySoft.ShotWeb.ContentService("ValidationImage",{},function(e){var f=e;c.attr("src","/ValidationImage/"+f.id+"/validationimg.png");if(d){d(f.id);}});};c.unbind("click");c.click(b);b();return{refresh:b};};return{Assign:a};}();DarcySoft.ShotWeb.QueryParams=function(){var g=[];var f=window.location.search.substring(1);if(!f){var c=window.location.hash.indexOf("?");if(c>=0){f=window.location.hash.substring(c+1);}}var d=f.split("&");
for(var a=0;a<d.length;a++){var e=d[a].indexOf("=");if(e>0){var b=d[a].substring(0,e);var h=d[a].substring(e+1);g[b]=h;g.length=g.length+1;}}return g;}();DarcySoft.ShotWeb.User=function(){var b=function(c){if(c){DarcySoft.ShotWeb.User.Info=c;}else{DarcySoft.ShotWeb.User.Info=DarcySoft.ShotWeb.ContentServiceSync("UserInfo");}if(DarcySoft.ShotWeb.User.Info){DarcySoft.ShotWeb.User.Info.Version=DarcySoft.parseDotNetDate(DarcySoft.ShotWeb.User.Info.Version);}};var a={UserName:"anonymous"};return{UpdateInfo:b,Info:a};
}();DarcySoft.ShotWeb.Sections=function(){var b=[];var l;var y;var v=function(D){clearTimeout(y);var C=function(){var E=jQuery(".sectionClass");for(s in b){E.removeClass(s);}E.addClass(D);};C();y=setTimeout(C,2000);};var a=function(D,C){b[D]=C;};var p=function(){};var g=function(C){if(b[C]){return{run:b[C],found:true};}else{return{run:p,found:false};}};var j=function(){if(DarcySoft.ShotWeb.StatusCode==404){window.location="/#"+l;}g(l).run();};var u=function(C){l=C;};var e=function(C){var E=window.location.hash;
if(E){E=E.substr(1);}if(!E){E=f;}if(C){var D=E.split("/");if(D.length>1){return D[1];}else{return undefined;}}else{return E;}};e.refresh=k;var q=function(C){var E=window.location.hash;if(E){E=E.substr(1);}if(!E){E=f;}var D=E.split("/");if(D.length>C+2){return D[C+2];}else{return undefined;}};var z=function(E){if(E){if(jQuery("#mainContent.sectionClass").length==0){window.location.assign("/#"+E);return false;}var C=E.indexOf("?");if(C>0){E=E.substring(0,C);}var D=E.split("/");if(b[D[1]]){if(DarcySoft.ShotWeb.CondominiumUI.closePopup){DarcySoft.ShotWeb.CondominiumUI.closePopup();
DarcySoft.ShotWeb.CondominiumUI.closePopup=undefined;}if(D[2]){b[D[1]](D.slice(2).join("/"));}else{b[D[1]]();}return true;}else{return false;}}else{return false;}};var x=function(){DarcySoft.ShotWeb.StatusCode=404;v("Error404");jQuery("#mainContent").html('Not found: "'+unescape(DarcySoft.ShotWeb.QueryParams.aspxerrorpath)+'"');return true;};var h=function(){var D;var C=window.location.pathname.split("/");var E=1;if(C){if(C[1]&&C[1].length==2){E=2;}if(C[E]=="section"){C=C.slice(E+1);D="/"+C.join("/");
}}return D;};var k=function(C){if(typeof C!="string"){C=undefined;}if(window.location.pathname=="/Error/404"){return x();}var D;if(C){D=C;window.location.hash=C;}else{D=window.location.hash;if(D){D=D.substr(1);}}if(!D){D=h();}return z(D);};var f="";var i=function(){var C;DarcySoft.ShotWeb.ContentService("CurrentSection","{}",function(D){C=D;},true);f=C;return C;};var m=false;var t=function(C){m=true&&C;};var w=function(E,D){jQuery(".facebook.share.link").attr("href","http://www.facebook.com/sharer.php?u="+encodeURIComponent(D));
jQuery(".twitter.share.link").attr("href","http://twitter.com/home?status="+encodeURIComponent(D));jQuery(".tuenti.share.link").attr("href","http://www.tuenti.com/share?url="+encodeURIComponent(D));var C=jQuery(".gplusone.share.link");if(typeof gapi!="undefined"&&gapi.plusone){gapi.plusone.render(C.get(0),{"size":"small","count":"true",href:D});}};var B=function(D,C){v(D);if(C){D=D+"/"+C;}D="/"+D;window.location.hash=D;n=D;m=false;DarcySoft.ShotWeb.ContentService("UpdateSection","{'section': '"+D+"'}",function(E){document.title=E.Title;
DarcySoft.ShotWeb.Sections.currentTitle=E.Title;DarcySoft.ShotWeb.Sections.currentLink=E.Link;jQuery(".sectionTitle").html(E.Title);w(E.Title,E.Link);});f=D;r=true;};var A=function(E,G){var C=false;if(r){var F=f.split("/");for(var D=0;D<F.length;D++){if(F[D].indexOf(E)==0){F[D]=E+"_"+G;C=true;break;}}if(!C){F.push(E+"_"+G);}f=F.join("/");DarcySoft.ShotWeb.ContentService("UpdateSection","{'section': '"+f+"'}",function(H){document.title=H;});window.location.hash=f;n=f;}};var r;var c=function(C){return(!r||!f||f.split("/")[1]!=C);
};var d=function(C){if(f){var D=f.split("/");return D[1]==C;}else{return false;}};var n=location.hash;var o=window.history.length;setInterval(function(){if(!m&&n!=location.hash.substr(1)){k();}},1000);return{add:a,find:g,goToCurrentSection:k,updateSessionSection:B,currentSection:e,sectionParams:q,setHome:u,goHome:j,changing:c,changingFrom:d,updateSectionParameter:A,setChangingSection:t};}();DarcySoft.ShotWeb.availableEmail=function(a){return DarcySoft.ShotWeb.ContentServiceSync("AvailableEmail",{email:a});
};DarcySoft.ShotWeb.scrollToTop=function(a){document.scrollTop=0;document.body.scrollTop=0;if(document.documentElement){document.documentElement.scrollTop=0;}};DarcySoft.ShotWeb.registerUser=function(g,f,a,b,c,h,i,d){var e={username:g,password:f,email:a,firstname:b,lastname:c,validation:h,validationID:i};return DarcySoft.ShotWeb.ContentServiceSync("RegisterUser",e,d);};var createLoadingDiv=function(){var a=document.createElement("div");jQuery(a).html('<img src="/images/loading.gif" />');return a;
};DarcySoft.ShotWeb.getViewPort=function(){var b;var a;if(typeof window.innerWidth!="undefined"){b=window.innerWidth,a=window.innerHeight;}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){b=document.documentElement.clientWidth,a=document.documentElement.clientHeight;}else{b=document.getElementsByTagName("body")[0].clientWidth,a=document.getElementsByTagName("body")[0].clientHeight;}}return{width:b,height:a};
};DarcySoft.ShotWeb.loggedIn=false;Array.prototype.indexOf=function(a){var b;for(b=0;b<this.length;b++){if(this[b]==a){return b;}}return -1;};DarcySoft.ShotWeb.isArray=function(a){return(a&&typeof a==="object"&&typeof a.length==="number"&&!(a.propertyIsEnumerable("length")));};DarcySoft.ShotWeb.inspectSingleObject=function(c){var d="";var b;for(b in c){if(typeof c[b]=="object"){sa=DarcySoft.ShotWeb.inspectObject(c[b]);}else{sa=""+c[b];}d=d+b+": "+sa+(c.hasOwnProperty(b)?"":" inherited")+"\r\n";}return d;
};DarcySoft.ShotWeb.inspectObject=function(b){var a;var c="[";if(!DarcySoft.ShotWeb.isArray(b)){return DarcySoft.ShotWeb.inspectSingleObject(b);}else{for(a=0;a<b.length;a++){c=c+DarcySoft.ShotWeb.inspectSingleObject(b[a]);if(a<b.length-1){c=c+", ";}}c=c+"]";return c;}};DarcySoft.ShotWeb.getNews=function(){jQuery("#mainContent").html("Hola");};DarcySoft.ShotWeb.AdminServiceSync=function(a,b){var c;DarcySoft.ShotWeb.AdminService(a,b,function(d){c=d;},true);return c;};DarcySoft.ShotWeb.AdminService=function(a,b,c,d){b=b||"{}";
if(typeof b!=="string"){b=jQuery.toJSON(b);}if(!a){throw"method name must be defined";}var e="/AdminService.asmx/"+a;jQuery.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:b,dataType:"json",success:c,error:AjaxError(e),async:!d});};DarcySoft.ShotWeb.populateTable=function(f,e){var d=f.find(".rowtemplate").clone();var g=f.children("tbody");g.empty();d.removeClass("rowtemplate");if(e.length>0){var a={};var c;for(c in e[0]){a[c]=d.children(".campo"+c);}for(var b=0;b<e.length;
b++){for(c in a){a[c].text(e[b][c].toString());}d.attr("databaseid",e[b].Id);d.removeAttr("even");d.removeAttr("odd");d.attr((b%2==0)?"even":"odd","");g.append(d.clone());}}};DarcySoft.ShotWeb.Header=function(){var a=function(){var b=this;jQuery(".SubMenu",b).click(function(){var c=jQuery(this);c.fadeOut("slow",function(){c.css("display","none");setTimeout(function(){c.css("display","");},500);});});};return{init:a};}();var NamedDates;DarcySoft.ShotWeb.NameDates=function(i,g,h){var a=jQuery("select[name=DiaEntradaSelect]",i);
var e=jQuery("select[name=MesEntradaSelect]",i);var b=jQuery("select[name=DiaSalidaSelect]",i);var f=jQuery("select[name=MesSalidaSelect]",i);a.unbind("change");e.unbind("change");b.unbind("change");f.unbind("change");var c=function(r,m){var q;var p=r.val();var n=0;var o;r.empty();for(var l=0;l<NamedDates[m].Days.length;l++){q=jQuery(document.createElement("option"));q.text(NamedDates[m].Days[l].Name);var t=DarcySoft.ServerDate(NamedDates[m].Days[l].Date);o=t.getDate();q.val(o);if(o==p){n=l+1;}r.append(q);
}r.val(p);};a.change(function(){var n=e.val();var l=a.val();for(var m=0;m<NamedDates[n].Days.length;m++){var o=DarcySoft.ServerDate(NamedDates[n].Days[m].Date);if(o.getDate()==l){if(g){g(NamedDates[n].Days[m].Date);}break;}}});b.change(function(){var n=f.val();var l=b.val();for(var m=0;m<NamedDates[n].Days.length;m++){var o=DarcySoft.ServerDate(NamedDates[n].Days[m].Date);if(o.getDate()==l){if(h){h(NamedDates[n].Days[m].Date);}break;}}});e.change(function(){c(a,e.val());a.change();});f.change(function(){c(b,f.val());
b.change();});var k=function(l,m){if(!NamedDates){return;}l=DarcySoft.ServerDate(l);m=DarcySoft.ServerDate(m);for(var n=0;n<NamedDates.length;n++){var o=DarcySoft.ServerDate(NamedDates[n].Date);if(o.getMonth()==l.getMonth()&&o.getFullYear()==l.getFullYear()){e.val(n);c(a,n);a.val(l.getDate());break;}}for(var n=0;n<NamedDates.length;n++){var o=DarcySoft.ServerDate(NamedDates[n].Date);if(o.getMonth()==m.getMonth()&&o.getFullYear()==m.getFullYear()){f.val(n);c(b,n);b.val(m.getDate());break;}}};var j=function(n,l,m){var o=function(){e.empty();
a.empty();b.empty();f.empty();var r;for(var p=0;p<NamedDates.length;p++){for(var q=0;q<NamedDates[p].Days.length;q++){NamedDates[p].Days[q].Date=DarcySoft.parseDotNetDate(NamedDates[p].Days[q].Date);}NamedDates[p].Date=DarcySoft.parseDotNetDate(NamedDates[p].Date);r=jQuery(document.createElement("option"));r.text(NamedDates[p].Name);r.val(p);e.append(r);r=jQuery(document.createElement("option"));r.text(NamedDates[p].Name);r.val(p);f.append(r);}c(a,0);c(b,0);k(l,m);};if(NamedDates){o();}else{DarcySoft.ShotWeb.ContentService("NameDates",{fromDate:n,toDate:null},function(p){NamedDates=p;
o();});}};var d=function(l){if(l){if(l.NamedDates){NamedDates=l.NamedDates;}}};return{updateDateSelectValues:k,setSelectDates:j,Init:d};};DarcySoft.ShotWeb.setScrollLimitFor=function(a){var b=a.offset();var c=parseInt(a.css("top"),10);return function(){var i=a.offset();var h=a.outerHeight();var j=jQuery(document).scrollTop();var k=DarcySoft.ShotWeb.getViewPort();var f=k.height-h-b.top+j;var g=k.height-h-b.top;if(f>0){var d=parseInt(a.css("top"),10);var e=c+f;a.stop();if(g>0){e=c+j;a.animate({"top":e+"px"},500);
}else{a.animate({"top":e+"px"},500);}}else{a.stop();a.animate({"top":c+"px"},500);}};};var DarcySoft=DarcySoft||{ShotWeb:{}};DarcySoft.ShotWeb.Login=function(){var d=function(n,m,k){var l;DarcySoft.ShotWeb.ContentService("Login","{'username': '"+n+"', 'password': '"+m+"'}",function(o){l=o;},true);DarcySoft.ShotWeb.User.UpdateInfo();DarcySoft.ShotWeb.User.loggedIn=l;return l;};var f;var i=function(k){f=k;};var j;var c=function(){var k=DarcySoft.ShotWeb.ContentServiceSync("LoggedIn");DarcySoft.ShotWeb.User.loggedIn=k;return k;};var a=function(k){if(j){clearTimeout(j);j=undefined;}DarcySoft.ShotWeb.ContentService("LoggedIn",{},function(l){DarcySoft.ShotWeb.User.loggedIn=l;
if(!l){jQuery(".logout").hide("slow");jQuery(".login").show("slow");}else{var m=jQuery(".login");m.hide("slow");jQuery(".logout .username").html(DarcySoft.ShotWeb.User.Info.UserName);jQuery(".logout").show("slow");}});if(!k){j=setTimeout(a,10000);}};setTimeout(function(){a();jQuery(".logout .username").html(DarcySoft.ShotWeb.User.Info.UserName);},100);var b=function(){var k=this;var o=jQuery(".login",this);jQuery(this).removeClass("register");jQuery(".logout").hide();jQuery(".login").hide();a();var m=o.find(".loginButton");
m.unbind("click");var n=function(){var p=jQuery(this).parents(".login");var r=p.find("input[name='username']").val();var q=p.find("input[name='password']").val();if(r&&q){p.find("input[name='password']").val("");if(DarcySoft.ShotWeb.Login.login(r,q)){jQuery(".loginfailed").hide();jQuery(".login").hide("slow");jQuery(".logout .username").html(DarcySoft.ShotWeb.User.Info.UserName);jQuery(".logout").show("slow");if(f){window.location=unescape(f);}}else{jQuery(".loginfailed").fadeIn("slow");}}};var l=o.find("input");
l.unbind("keypress");l.keypress(function(p){if(p.which==13){n.call(this);}});m.click(n);jQuery(".logout .logoutButton").unbind("click");jQuery(".logout .logoutButton").click(function(){if(DarcySoft.ShotWeb.ContentServiceSync("LogOut")){jQuery(".logout").hide("slow");jQuery(".login").show("slow");DarcySoft.ShotWeb.Sections.goHome();}DarcySoft.ShotWeb.User.UpdateInfo();});o.mouseover(function(){o.find(".loginRegister").attr("href",window.location.hash);});jQuery(".login .loginRegister").attr("href",window.location.hash).click(function(){jQuery(k).load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Register,null,function(p){jQuery(".cancelbutton",k).click(function(){jQuery(k).load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Login,DarcySoft.ShotWeb.Login.init);
});DarcySoft.ShotWeb.Register.init.apply(this);});});};var g=function(k){if(!k){k=DarcySoft.ShotWeb.QueryParams.ReturnUrl;}f=k;e=e||jQuery("#mainContent");e.load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Login,b);DarcySoft.ShotWeb.Sections.updateSessionSection("NeedLogin",f);};var e;var h=function(k){e=k;};DarcySoft.ShotWeb.Sections.add("NeedLogin",g);return{login:d,init:b,section:g,checklogin:a,setNeedLoginContainer:h,isLoggedInSync:c};}();var DarcySoft=DarcySoft||{ShotWeb:{}};DarcySoft.ShotWeb.Register={init:function(){var h;var a=this;var e=jQuery(".RegisterUser",this);jQuery(this).addClass("register");var g=e.find(".validationImg");var b=DarcySoft.ShotWeb.ValidationImage.Assign(g,function(i){h=i;}).refresh;var f=e.find("input[name = 'username']");f.keyup(function(){DarcySoft.ShotWeb.ContentService("AvailableUsername",{username:this.value},function(i){if(!i){f.addClass("existingusername");}else{f.removeClass("existingusername");}});
});var c=e.find(".registerButton");c.unbind("click");var d=function(){var i={username:e.find("input[name = 'username']").val(),password:e.find("input[name = 'password']").val(),password2:e.find("input[name = 'password2']").val(),email:e.find("input[name = 'email']").val(),firstname:e.find("input[name = 'firstname']").val(),lastname:e.find("input[name = 'lastname']").val(),validation:e.find("input[name = 'validation']").val()};var l=e.find(".registerResponse");if(i.password!=i.password2){l.html("Passwords don't match.");
}else{if(!i.username||!i.password||!i.password2||!i.email||!i.firstname||!i.lastname||!i.validation){l.html("Requided fields must be filled.");}else{var j={username:i.username,password:i.password,email:i.email,firstname:i.firstname,lastname:i.lastname,validation:i.validation,validationID:h};var k=DarcySoft.ShotWeb.ContentServiceSync("RegisterUser",j);e.find("input[name = 'validation']").val("");if(!k.success){b();l.html(k.errorMessage);}else{l.empty();DarcySoft.ShotWeb.Login.login(i.username,i.password);
jQuery(a).load("localize/Login.htm",DarcySoft.ShotWeb.Login.init);}}}};c.click(d);e.find("input").keypress(function(i){if(i.which==13){d();}});}};var DarcySoft=DarcySoft||{ShotWeb:{}};DarcySoft.ShotWeb.Condominium=function(){var Options;var Apartamentos=[];var ApartamentosAll;var getApartamento=function(Id,onlyExistent){if(!Apartamentos[Id]){if(onlyExistent){return undefined;}var apartamento=DarcySoft.ShotWeb.ContentServiceSync("getApartamento",{Id:Id});Apartamentos[Id]=apartamento;return apartamento;}else{return Apartamentos[Id];}};var OfertaInfo=function(Id){return DarcySoft.ShotWeb.ContentServiceSync("OfertaInfo",{Id:Id});};var lastResumenReserva;
var lastReservaParams={};var calculaPrecioReserva=function(ApartmentId,FechaEntrada,FechaSalida,Adultos,MenoresGratis,Bebes,ServiciosIds,OfertasIds){if(lastResumenReserva&&lastReservaParams.ApartmentId==ApartmentId&&lastReservaParams.FechaEntrada.getTime()==FechaEntrada.getTime()&&lastReservaParams.FechaSalida.getTime()==FechaSalida.getTime()&&lastReservaParams.Adultos==Adultos&&lastReservaParams.MenoresGratis==MenoresGratis&&lastReservaParams.Bebes==Bebes&&lastReservaParams.ServiciosIds.length==ServiciosIds.length&&lastReservaParams.OfertasIds.length==OfertasIds.length){var iguales=true;
for(var i=0;iguales&&i<ServiciosIds.length;i++){iguales=lastReservaParams.ServiciosIds[i]==ServiciosIds[i];}for(var i=0;iguales&&i<OfertasIds.length;i++){iguales=lastReservaParams.OfertasIds[i]==OfertasIds[i];}if(iguales){return lastResumenReserva;}}var resumenReserva;resumenReserva=DarcySoft.ShotWeb.ContentServiceSync("calculaReserva",{ApartmentId:ApartmentId,FechaEntrada:FechaEntrada.toWebServiceString(),FechaSalida:FechaSalida.toWebServiceString(),Adultos:Adultos,MenoresGratis:MenoresGratis,Bebes:Bebes,ServiciosIds:ServiciosIds,OfertasIds:OfertasIds,DescuentoManual:0});
if(resumenReserva){resumenReserva.FechaEntrada=DarcySoft.parseDotNetDate(resumenReserva.FechaEntrada);resumenReserva.FechaSalida=DarcySoft.parseDotNetDate(resumenReserva.FechaSalida);resumenReserva.HoraSalida=DarcySoft.parseDotNetDate(resumenReserva.HoraSalida);}lastResumenReserva=resumenReserva;lastReservaParams={ApartmentId:ApartmentId,FechaEntrada:FechaEntrada,FechaSalida:FechaSalida,Adultos:Adultos,MenoresGratis:MenoresGratis,Bebes:Bebes,ServiciosIds:ServiciosIds,OfertasIds:OfertasIds};return resumenReserva;
};var solicitaInfoReserva=function(ApartmentId,FechaEntrada,FechaSalida,Adultos,MenoresGratis,Bebes,ServiciosIds,OfertasIds,Nombre,Asunto,Telefono,Email,Comentario,validation,validationID,OnDarcyResponse){DarcySoft.ShotWeb.ContentServiceSync("solicitaInfoReserva",{ApartmentId:ApartmentId,FechaEntrada:FechaEntrada.toWebServiceString(),FechaSalida:FechaSalida.toWebServiceString(),Adultos:Adultos,MenoresGratis:MenoresGratis,Bebes:Bebes,ServiciosIds:ServiciosIds,OfertasIds:OfertasIds,Nombre:Nombre,Asunto:Asunto,Telefono:Telefono,Email:Email,Comentario:Comentario,validation:validation,validationID:validationID},OnDarcyResponse);
};var calculaPrecioReservaMultiple=function(ApartmentIds,forcedOffer,FechaEntrada,FechaSalida,Adultos,onData){var resumenReserva;var parseDates=function(resumenes){if(resumenes){for(var i=0;i<resumenes.length;i++){if(resumenes[i]){resumenes[i].FechaEntrada=DarcySoft.parseDotNetDate(resumenes[i].FechaEntrada);resumenes[i].FechaSalida=DarcySoft.parseDotNetDate(resumenes[i].FechaSalida);resumenes[i].HoraSalida=DarcySoft.parseDotNetDate(resumenes[i].HoraSalida);}}}onData(resumenes);};if(!FechaEntrada){FechaEntrada=new Date();
}if(!FechaSalida){FechaSalida=new Date();}if(!forcedOffer){forcedOffer=0;}DarcySoft.ShotWeb.ContentServiceGET("calculaReservaMultiple",{ApartmentIds:ApartmentIds,ForcedOffer:forcedOffer,FechaEntrada:FechaEntrada.toWebServiceString(),FechaSalida:FechaSalida.toWebServiceString(),Adultos:Adultos},parseDates);};var Zonas;var getZonas=function(onData){if(onData&&Zonas){onData(Zonas);}else{DarcySoft.ShotWeb.ContentServiceGET("Zonas",{},function(msg){Zonas=msg;if(onData){onData(msg);}});}};var Ciudades;
var getCiudades=function(onData){if(onData&&Ciudades){onData(Ciudades);}else{DarcySoft.ShotWeb.ContentService("Ciudades",{},function(msg){Ciudades=msg;if(onData){onData(msg);}});}};var getNombreCiudad=function(Id,onData){if(onData){if(!Id||Id==1){onData("");}else{getCiudades(function(ciudades){if(!ciudades){onData("");}else{for(var i=0;i<ciudades.length;i++){if(ciudades[i].Id==Id){onData(ciudades[i].Nombre);break;}}}});}}};var getNombreZona=function(Id,onData){if(onData){if(!Id){onData("");}else{getZonas(function(zonas){if(!zonas){onData("");
}else{for(var i=0;i<zonas.length;i++){if(zonas[i].Id==Id){onData(zonas[i].Nombre);break;}}}});}}};var findFreeDate=function(apartment,fromDate,nights){var datestr="new "+DarcySoft.ShotWeb.ContentServiceSync("findFreeDate",{Apartment:apartment,FromDate:fromDate.toWebServiceString(),Nights:nights});datestr=datestr.replace("/","");datestr=datestr.replace("/","");return eval(datestr);};var mapsURLs={};var maps=function(ApartmentId,onData){if(onData&&mapsURLs[ApartmentId]){onData(mapsURLs[ApartmentId]);
}else{DarcySoft.ShotWeb.ContentService("Maps",{ApartmentId:ApartmentId},function(msg){mapsURLs[ApartmentId]=msg;if(onData){onData(msg);}});}};var findFreeApartment=function(fechaEntrada,fechaSalida,filtro,onData){DarcySoft.ShotWeb.ContentServiceGET("findFreeApartment",{FromDate:fechaEntrada.toWebServiceString(),ToDate:fechaSalida.toWebServiceString(),Filtro:filtro},function(msg){var i;for(i=0;i<msg.length;i++){Apartamentos[msg[i].Id]=msg[i];}if(onData){onData(msg);}});};var textoBienvenidaResult;
var textoBienvenida=function(onData){if(onData&&textoBienvenidaResult){onData(textoBienvenidaResult);}else{DarcySoft.ShotWeb.ContentServiceGET("TextoBienvenida",{},function(msg){textoBienvenidaResult=msg;if(onData){onData(msg);}});}};var TiposAlojamiento;var getTiposAlojamiento=function(onData){if(onData&&TiposAlojamiento){onData(TiposAlojamiento);}else{DarcySoft.ShotWeb.ContentService("TiposApartamento",{minVersion:null},function(msg){TiposAlojamiento=msg;if(onData){onData(msg);}});}};var TiposHabitaciones;
var getTiposHabitaciones=function(onData){if(onData&&TiposHabitaciones){onData(TiposHabitaciones);}else{DarcySoft.ShotWeb.ContentService("TiposHabitaciones",{minVersion:null},function(msg){TiposHabitaciones=[];for(var i=0;i<msg.length;i++){TiposHabitaciones[msg[i].Id]=msg[i].Nombre;}if(onData){onData(TiposHabitaciones);}});}};var Habitaciones=[];var getHabitaciones=function(IdApartamento,onData){if(onData&&Habitaciones[IdApartamento]){onData(Habitaciones[IdApartamento]);}else{DarcySoft.ShotWeb.ContentService("Habitaciones",{IdApartamento:IdApartamento,minVersion:null},function(msg){Habitaciones[Habitaciones]=msg;
if(onData){onData(msg);}});}};var ofertasPortada;var ofertaPortada=function(onData){var section=DarcySoft.ShotWeb.Sections.currentSection();var splitted=section.split("/");var id=0;if(splitted[1]=="Offers"){id=parseInt(splitted[2],10);}else{id=DarcySoft.ShotWeb.IntegerFromParams(section,"Offer");}if(id){if(onData){onData(OfertaInfo(id));}return;}var idx=0;if(onData&&ofertasPortada){idx=Math.floor(Math.random()*ofertasPortada.length);onData(ofertasPortada[idx]);}else{DarcySoft.ShotWeb.ContentService("OfertaPortada",{},function(msg){idx=Math.floor(Math.random()*ofertasPortada.length);
ofertasPortada=msg;if(onData){onData(ofertasPortada[idx]);}});}};var ofertasAlojamiento=function(idApartament,fechaEntrada,fechaSalida,onData){DarcySoft.ShotWeb.ContentService("Ofertas",{idApartament:idApartament,fechaEntrada:fechaEntrada.toWebServiceString(),fechaSalida:fechaSalida.toWebServiceString(),tipo:0},function(msg){if(onData){onData(msg);}});};var ofertasTipo=function(tipo,onData,idApartament,fechaEntrada,fechaSalida){if(!tipo){tipo=0;}if(!idApartament){idApartament=0;}if(!fechaEntrada){fechaEntrada=new Date();
}if(!fechaSalida){fechaSalida=new Date();}DarcySoft.ShotWeb.ContentService("Ofertas",{idApartament:idApartament,fechaEntrada:fechaEntrada.toWebServiceString(),fechaSalida:fechaSalida.toWebServiceString(),tipo:tipo},function(msg){if(onData){onData(msg);}});};var Portadas;var lastPortadaTime;var lastPortadaIdx;var Portada=function(onData){if(onData&&Portadas){if(typeof lastPortadaTime=="undefined"||lastPortadaTime.getTime()+60000<new Date().getTime()){lastPortadaIdx=Math.floor(Math.random()*Portadas.length);
lastPortadaTime=new Date();}onData(Portadas[lastPortadaIdx]);}else{DarcySoft.ShotWeb.ContentService("Portadas",{},function(msg){Portadas=msg;if(onData){lastPortadaIdx=Math.floor(Math.random()*Portadas.length);lastPortadaTime=new Date();onData(Portadas[lastPortadaIdx]);}});}};var hasAllApartments=false;var apartamentos=function(onData,filtro){filtro=filtro||null;if(onData&&ApartamentosAll&&!filtro&&hasAllApartments){onData(ApartamentosAll);}else{DarcySoft.ShotWeb.ContentServiceGET("Apartamentos",{Filtro:filtro},function(msg){if(!filtro){ApartamentosAll=msg;
hasAllApartments=true;}for(var i=0;i<msg.length;i++){Apartamentos[msg[i].Id]=msg[i];}if(onData){onData(msg);}});}};var graficoPrecios=function(resumenReserva,onData){DarcySoft.ShotWeb.ContentService("graficoPrecios",{reserva:resumenReserva},onData);};var monthViews={};var getCalendarMonthViews=function(AptId,year,month,count,onData,force){var i;var m=month;var y=year;for(i=0;i<count;i++){force=force||!monthViews[AptId]||!monthViews[AptId][y]||!monthViews[AptId][y][m];if(force){break;}m++;if(m>12){y++;
m=1;}}var requestmonth=m;var requestcount=count-i;var requestyear=y;if(!force&&onData){m=month;y=year;var lista=[];for(i=0;i<count;i++){lista.push(monthViews[AptId][y][m]);m++;if(m>12){y++;m=1;}}onData(lista);}else{DarcySoft.ShotWeb.ContentService("getCalendarMonthViews",{Apartment:AptId,Year:requestyear,StartMonth:requestmonth,Count:requestcount},function(msg){var i;var m=requestmonth;var y=requestyear;if(!monthViews[AptId]){monthViews[AptId]={};}for(i=0;i<msg.length;i++){if(!monthViews[AptId][msg[i].Year]){monthViews[AptId][msg[i].Year]={};
}monthViews[AptId][msg[i].Year][msg[i].Month]=msg[i];}if(onData){var lista=[];m=month;y=year;for(i=0;i<count;i++){lista.push(monthViews[AptId][y][m]);m++;if(m>12){y++;m=1;}}onData(lista);}});}};var DescripcionesLargas={};var getDescripcionLarga=function(AptId,onData){if(DescripcionesLargas[AptId]&&onData){onData(DescripcionesLargas[AptId]);}else{DarcySoft.ShotWeb.ContentServiceGET("getDescripcionLarga",{Apartment:AptId},function(msg){DescripcionesLargas[AptId]=msg;if(onData){onData(msg);}});}};var lastReservationConflict={Id:null,Time:null,fechaEntrada:null,fechaSalida:null,result:false};
var checkReservationConflict=function(ApartmentId,fechaEntrada,fechaSalida){var now=new Date().getTime();var entrada=fechaEntrada.getTime();var salida=fechaSalida.getTime();if(lastReservationConflict.Id=ApartmentId&&lastReservationConflict.Time&&lastReservationConflict.Time+5000<now&&lastReservationConflict.fechaEntrada==entrada&&lastReservationConflict.fechaSalida==salida){return lastReservationConflict.result;}lastReservationConflict={Id:ApartmentId,Time:now,fechaEntrada:entrada,fechaSalida:salida,result:DarcySoft.ShotWeb.ContentServiceSync("checkReservationConflict",{Apartment:ApartmentId,FromDate:fechaEntrada.toWebServiceString(),ToDate:fechaSalida.toWebServiceString()})};
return lastReservationConflict.result;};var reservaPagada=function(IdReserva){return DarcySoft.ShotWeb.ContentServiceSync("reservaPagada",{IdReserva:IdReserva});};var confirmaReserva=function(resumenReserva,tipoPago,HoraLlegada,Phone){if(!HoraLlegada){HoraLlegada=null;}if(!Phone){Phone="";}return DarcySoft.ShotWeb.ContentServiceSync("confirmaReserva",{Resumen:resumenReserva,tPago:tipoPago,HoraLlegada:HoraLlegada,Phone:Phone});};var payReservaTPV=function(idReserva){return DarcySoft.ShotWeb.ContentServiceSync("PayReservaTPV",{IdReserva:idReserva});
};var imgsApartamento={};var getImgsApartamento=function(Id,Category,onData){if(onData&&imgsApartamento[Id+"_"+Category]){onData(imgsApartamento[Id+"_"+Category]);}else{DarcySoft.ShotWeb.ContentServiceGET("getImgsApartamento",{Id:Id,Category:Category},function(msg){imgsApartamento[Id+"_"+Category]=msg;if(onData){onData(msg);}});}};var getTestimonios=function(Id,Max,onData){DarcySoft.ShotWeb.ContentServiceGET("Testimonios",{IdApartment:Id,Max:Max},function(msg){if(onData){onData(msg);}});};var MejoresTestimonios={};
var mejorTestimonio=function(Id,onData){if(MejoresTestimonios[Id]&&onData){onData(MejoresTestimonios[Id]);}else{getTestimonios(Id,1,function(msg){MejoresTestimonios[Id]=msg[0];if(!MejoresTestimonios[Id]){MejoresTestimonios[Id]={Puntuacion:0};}if(onData){onData(MejoresTestimonios[Id]);}});}};var Init=function(InitData){if(InitData){if(InitData.OfertasPortada){ofertasPortada=InitData.OfertasPortada;}if(InitData.MejoresTestimonios){var i;for(i=0;i<InitData.MejoresTestimonios.length;i++){MejoresTestimonios[InitData.MejoresTestimonios[i].IdApartamento]=InitData.MejoresTestimonios[i];
}}if(InitData.Alojamientos){var i;for(i=0;i<InitData.Alojamientos.length;i++){Apartamentos[InitData.Alojamientos[i].Id]=InitData.Alojamientos[i];}if(InitData.HasAllApartments){hasAllApartments=true;ApartamentosAll=InitData.Alojamientos;}}if(InitData.TextoBienvenida){textoBienvenidaResult=InitData.TextoBienvenida;}if(InitData.DescripcionLarga&&InitData.CurrentApartmentId){DescripcionesLargas[InitData.CurrentApartmentId]=InitData.DescripcionLarga;}if(InitData.Zonas){Zonas=InitData.Zonas;}if(InitData.Ciudades){Ciudades=InitData.Ciudades;
}if(InitData.Portadas){Portadas=InitData.Portadas;}if(InitData.setPortadaIdx||InitData.setPortadaIdx===0){if(InitData.lastPortadaTime){lastPortadaTime=DarcySoft.parseDotNetDate(InitData.lastPortadaTime);}lastPortadaTime=new Date();lastPortadaIdx=InitData.setPortadaIdx;}}};var saveBookingInfo=function(IdReserva,H,M,userInfo,onDarcyResponse){userInfo.Version=new Date();DarcySoft.ShotWeb.ContentServiceSync("saveBookingInfo",{IdReserva:IdReserva||0,H:H||0,M:M||0,FirstName:userInfo.FirstName||"",LastName:userInfo.LastName||"",Address:userInfo.Address||"",Email:userInfo.Email||"",Phone1:userInfo.Phone1||"",NIF_CIF:userInfo.NIF_CIF||"",City:userInfo.City||"",Country:userInfo.Country||"",BirthYear:userInfo.BirthYear||0},onDarcyResponse);
};var saveUserInfo=function(userInfo,onDarcyResponse){userInfo.Version=new Date();DarcySoft.ShotWeb.ContentServiceSync("saveUserInfo",{FirstName:userInfo.FirstName,LastName:userInfo.LastName,Address:userInfo.Address,Email:userInfo.Email,Phone1:userInfo.Phone1,NIF_CIF:userInfo.NIF_CIF,City:userInfo.City,Country:userInfo.Country,BirthYear:userInfo.BirthYear},onDarcyResponse);};return{Options:Options,getApartamento:getApartamento,calculaPrecioReserva:calculaPrecioReserva,findFreeDate:findFreeDate,maps:maps,findFreeApartment:findFreeApartment,textoBienvenida:textoBienvenida,ofertaPortada:ofertaPortada,Portada:Portada,apartamentos:apartamentos,graficoPrecios:graficoPrecios,checkReservationConflict:checkReservationConflict,confirmaReserva:confirmaReserva,payReservaTPV:payReservaTPV,getImgsApartamento:getImgsApartamento,getCalendarMonthViews:getCalendarMonthViews,getDescripcionLarga:getDescripcionLarga,getTestimonios:getTestimonios,mejorTestimonio:mejorTestimonio,getZonas:getZonas,Init:Init,ofertasAlojamiento:ofertasAlojamiento,getCiudades:getCiudades,getTiposAlojamiento:getTiposAlojamiento,getTiposHabitaciones:getTiposHabitaciones,getNombreCiudad:getNombreCiudad,getNombreZona:getNombreZona,calculaPrecioReservaMultiple:calculaPrecioReservaMultiple,getHabitaciones:getHabitaciones,solicitaInfoReserva:solicitaInfoReserva,saveUserInfo:saveUserInfo,saveBookingInfo:saveBookingInfo,reservaPagada:reservaPagada,OfertaInfo:OfertaInfo,ofertasTipo:ofertasTipo};
}();var DarcySoft=DarcySoft||{ShotWeb:{}};var namedDates;DarcySoft.ShotWeb.CondominiumUI=DarcySoft.ShotWeb.CondominiumUI||{};DarcySoft.ShotWeb.CondominiumUI.Default=function(q){DarcySoft.ShotWeb.Condominium.Init(q);q=q||{};q.TiposApartament=q.TiposApartament||{Apartamento:1,Estudio:11,AticoDuplex:21,Duplex:31};q.TiposLocalizaciones=q.TiposLocalizaciones||{Baja:1};q.ColorViviendaVacacional=q.ColorViviendaVacacional||{Fondo:"#ffcc33",Letra:"#990000"};q.Templates=q.Templates||{};q.Templates.Register=q.Templates.Register||"/templates/Register.htm";
q.Templates.Login=q.Templates.Login||"/templates/Login.htm";q.Templates.Header=q.Templates.Header||"/templates/Header.htm";q.Templates.ApartamentoReserva=q.Templates.ApartamentoReserva||"/templates/ApartamentoReserva.htm";q.Templates.ColumnaHome=q.Templates.ColumnaHome||"/templates/ColumnaHome.htm";q.Templates.Buscador=q.Templates.Buscador||"/templates/Buscador.htm";q.Templates.ApartamentoMiniatura=q.Templates.ApartamentoMiniatura||"/templates/ApartamentoMiniatura.htm";q.Templates.Client=q.Templates.Client||"/templates/Cliente.htm";
q.Templates.InfoReserva=q.Templates.InfoReserva||"/templates/InfoReserva.htm";q.Templates.OfertaTemplate=q.Templates.OfertaTemplate||"/templates/OfertaMiniatura.htm";q.SectionData=q.SectionData||{};q.SectionData.Contact=q.SectionData.Contact||{About:"/localize/editable/About.htm",WhyUs:"/localize/editable/WhyUs.htm",Business:"/localize/editable/Empresas.htm",MonthlyRental:"/localize/editable/Mensual.htm",Booking:"/localize/editable/Telefonicas.htm",Default:"/localize/editable/Contact.htm"};q.SectionData.Info=q.SectionData.Info||{HowtoBook:"/localize/editable/ComoReservar.htm",TermsConditions:"/localize/editable/NormasCondiciones.htm",FAQ:"/localize/editable/FAQ.htm",Arrival:"/localize/editable/Arrival.htm",Included:"/localize/editable/Included.htm"};
q.ServiciosConocidos=q.ServiciosConocidos||{AlojamientoMascota:1,Parking:2,LimpiezaDiaria:3,LimpiezaSemanal:4,TrasladoAeropuertoIda:5,TrasladoAeropuertoVuelta:6,TrasladoAeropuertoIdaVuelta:7,SillitaBebe:8,EnseresMascota:9,Cuna:18,TVSatelite:10,WiFi:11,AireAcondicionado:12,TV:37};if(q.ResourcesHost){q.ResourcesHost="http://"+q.ResourcesHost;}else{q.ResourcesHost="http://r0.resources.rinconesconluz.com";}DarcySoft.ShotWeb.PersistentParams=["Area","City","State","Beds","People","Arrival","Departure","Type"];
DarcySoft.ShotWeb.PersistentParamsGroups.State=["Beds","People","Arrival","Departure","Type"];DarcySoft.ShotWeb.PersistentParamsGroups.City=["Beds","People","Arrival","Departure","Type"];DarcySoft.ShotWeb.PersistentParamsGroups.Zone=["Beds","People","Arrival","Departure","Type"];DarcySoft.ShotWeb.Condominium.Options=q.Options||{"MinDiasReserva":3,"MinDiasAntelacion":1,"ImagenApartamentoMiniatura":{"Width":160,"Height":120},"ImagenGaleria":{"Width":80,"Height":50},"ImagenGaleriaBigMax":{"Width":385,"Height":235},"ImagenPortadaOferta":{"Width":700,"Height":166},"PreservarAltoBigImage":true,"TextoSobreimpreso":"www.rinconesconluz.com","TextoSobreImpresoSize":18,"DefaultDontPreserveRatio":true,"ApartamentoMapWidth":237,"ApartamentoMapHeight":200,"ApartamentoMapZoom":14,"MenoresGratisEstiloLivingSevilla":false,"PagoAhoraRespectoTotal":true,"DefaultEmails":[{"Language":"es-es","Email":"info@rinconesconluz.com"},{"Language":"en-us","Email":"marie@rinconesconluz.com"},{"Language":"fr-fr","Email":"elise@rinconesconluz.com"}],"EnviarEmailsDiferido":false,"TransferEnAdelanto":false,"AdelantoTransfersCompleto":true,"EmailsConfirmacionesInternas":null};
setTimeout(function(){DarcySoft.ShotWeb.User.UpdateInfo(q.UserInfo);},1000);DarcySoft.ShotWeb.CondominiumUI.InitData=q;var j;var p=function(L){var J=jQuery("#listaContent");var K=DarcySoft.ShotWeb.Sections.currentSection()||"/Home";var P=J.find("input.sectionLoadInfo").val();var O=(!L&&P==K)||(L==P&&L);if(!O){J.empty();}j=L;DarcySoft.ShotWeb.Sections.setHome("Home");DarcySoft.ShotWeb.Login.setNeedLoginContainer(jQuery("#listaContent"));n();var N=function(){var R=this;var S=jQuery(".ZonasMenuBtn .SubMenu",R);
DarcySoft.ShotWeb.Condominium.getZonas(function(T){DarcySoft.ShotWeb.Header.init.call(R);});};var M=jQuery("#headContent").find(".HeaderTemplate");if(M.length==0){jQuery("#headContent").load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Header,N);}else{N.call(M.get(0));}if(!DarcySoft.ShotWeb.Sections.goToCurrentSection(L)){DarcySoft.ShotWeb.Sections.goHome();}else{if(DarcySoft.ShotWeb.Sections.currentSection(true)!="NeedLogin"){setTimeout(function(){if(DarcySoft.ShotWeb.User.loggedIn){E();}else{n();
}},1000);}}jQuery("#loginLink").click(E);var Q=DarcySoft.ShotWeb.setScrollLimitFor(jQuery("#columnaContent"));jQuery(document).scroll(function(){Q();});};var E=function(){jQuery("#userInfo").show();jQuery("#loginLink").hide();};var n=function(){jQuery("#userInfo").hide();jQuery("#loginLink").show();};var w=function(J,L){var M=J;var K=DarcySoft.ShotWeb.IntegerFromParams(M,"BookingID");if(typeof J=="string"){J=J.split("/")[0];}DarcySoft.ShotWeb.Sections.updateSessionSection("PayTPV",M);jQuery("#protectBg").unbind("click");
jQuery("#protectBg").slideDown(function(){var P=jQuery("#tpvDiv");var N=P.find(".tpvDivClose");N.unbind("click");var O=function(){DarcySoft.ShotWeb.CondominiumUI.closePopup=undefined;P.hide(function(){jQuery("#protectBg").slideUp();if(!L&&DarcySoft.ShotWeb.Condominium.reservaPagada(K)){f(["Booking","BookingID_"+K].concat(DarcySoft.ShotWeb.ParamsToPreserve(M)).join("/"));}else{D(M);}});};DarcySoft.ShotWeb.CondominiumUI.closePopup=O;N.click(O);jQuery("#protectBg").click(O);P.fadeIn("slow",function(){var S=DarcySoft.ShotWeb.getViewPort();
var Q=(S.width-P.outerWidth())/2;var R=(S.height-P.outerHeight())/2;P.animate({left:Q+"px",top:R+"px"},500);});});};DarcySoft.ShotWeb.Sections.add("PayTPV",w);var b;var D=function(L,K){DarcySoft.ShotWeb.Sections.setChangingSection(true);var N=L;K=K||jQuery("#listaContent");if(typeof L=="string"){L=L.split("/")[0];}jQuery("#mainContent").fadeTo("slow",0.5);var Q=new Date();var R=Q.getFullYear();var M=Q.getMonth()+1;DarcySoft.ShotWeb.Condominium.getCalendarMonthViews(L,R,M,3);var O=function(){DarcySoft.ShotWeb.Sections.updateSessionSection("ShowApartment",N);
jQuery("#ofertaPrincipal").hide();DarcySoft.ShotWeb.scrollToTop();jQuery("#mainContent").fadeTo("fast",1);var U=this;var T={};T=m.init.call(U,L);var S={};S=d.init.call(U,L,T.onCalculaReserva,N);if(S){S.onCalculaReserva=T.onCalculaReserva;T.cambiaEntrada=S.cambiaEntrada;T.cambiaSalida=S.cambiaSalida;t.init.call(U,L,"3");setTimeout(function(){k.init.call(U,L);h.init.call(U,L);},1);DarcySoft.ShotWeb.Condominium.getTiposHabitaciones(function(V){DarcySoft.ShotWeb.Condominium.getHabitaciones(L,function(Z){var aa=jQuery(".listaHabitaciones",U);
var ab=jQuery(".listaHabitaciones2",U);aa.empty();ab.empty();var Y=[];var X=0;var W=0;var af=0;var ae=0;var ag=0;for(var ac=0;ac<Z.length;ac++){X+=Z[ac].CamasMatrimonio;W+=Z[ac].CamasIndividuales;af+=Z[ac].SofaCamasIndividuales;ae+=Z[ac].SofaCamasDobles;ag+=Z[ac].Supletorias;if(Y[Z[ac].IdTipoHabitacion]){Y[Z[ac].IdTipoHabitacion]++;}else{Y[Z[ac].IdTipoHabitacion]=1;}}var ad=0;for(x in Y){if(Y.hasOwnProperty(x)){if(ab.length>0&&(ad%2!=0)){ab.append('<li style="width:150px;clear:both"><div style="width:150px;float:right;clear:both"><span class="izquierda">'+V[x]+':</span> <span class="derecha">'+Y[x]+"</span></div></li>");
}else{aa.append('<li style="width:150px;clear:both"><div style="width:150px;float:right;clear:both"><span class="izquierda">'+V[x]+':</span> <span class="derecha">'+Y[x]+"</span></div></li>");}ad++;}}jQuery(".campoCamasMatrimonio",U).html(X);jQuery(".campoCamasIndividuales",U).html(W);jQuery(".campoSofaCamasIndividuales",U).html(af);jQuery(".campoSofaCamasDobles",U).html(ae);jQuery(".campoSupletorias",U).html(ag);if(X){jQuery(".CamasMatrimonio").show();}else{jQuery(".CamasMatrimonio").hide();}if(W){jQuery(".CamasIndividuales").show();
}else{jQuery(".CamasIndividuales").hide();}if(af){jQuery(".SofaCamasIndividuales").show();}else{jQuery(".SofaCamasIndividuales").hide();}if(ae){jQuery(".SofaCamasDobles").show();}else{jQuery(".SofaCamasDobles").hide();}if(ag){jQuery(".Supletorias").show();}else{jQuery(".Supletorias").hide();}});});K.fadeIn();setTimeout(function(){DarcySoft.ShotWeb.Condominium.maps(L,function(V){if(V.Small){jQuery(".MapIframe",U).attr("src",V.Small);jQuery(".MapIframe",U).show();}else{jQuery(".MapIframe",U).hide();
}if(V.Big){jQuery(".MapBigLink",U).attr("href",V.Big);jQuery(".MapBigLink",U).show();}else{jQuery(".MapBigLink",U).hide();}});},1000);}};K.empty();var J=jQuery(".ApartamentoReservaTemplate");if(J.length==0){var P;if(!b){b=document.createElement("DIV");jQuery(b).load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.ApartamentoReserva,function(){P=jQuery(b).clone();O.call(P);K.append(P);});}else{P=jQuery(b).clone();O.call(P);K.append(P);}}else{O.call(J.get(0));}};DarcySoft.ShotWeb.Sections.add("ShowApartment",D);
var t=function(){var J=function(L,P){var O=this;var M=function(S){var Q=S.length-S.lastIndexOf(".");var R=S.substr(0,S.length-Q)+"p"+S.substr(S.length-Q);return escape(R);};var K=function(S){var Q=S.length-S.lastIndexOf(".");var R=S.substr(0,S.length-Q)+"b"+S.substr(S.length-Q);return escape(R);};var N=function(Q){var S=function(X){for(var W=0;W<Q.Servicios.length;W++){if(Q.Servicios[W].Id==X){return true;}}return false;};var V=jQuery(".campoImgPortada",O);if(Q.ImgPortada){var U=jQuery(".ImagenSeleccionadaBig",O);
U.find("img").attr("src",DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+K(Q.ImgPortada));U.fadeIn();if(V.is("img")){V.attr("src",DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+M(Q.ImgPortada));}else{V.css("background-image","url("+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+M(Q.ImgPortada)+")");}}else{if(V.is("img")){V.hide();}jQuery(".ImagenSeleccionadaBig",O).hide();}jQuery(".imagenMapa",O).attr("src",Q.MapImageURL);jQuery(".linkMapa",O).attr("href",Q.MapLinkURL);if(S(q.ServiciosConocidos.AireAcondicionado)){jQuery(".campoImgAcondicionado",O).show();
}else{jQuery(".campoImgAcondicionado",O).hide();}if(Q.Minusvalidos){jQuery(".campoImgMinusvalidos",O).show();}else{jQuery(".campoImgMinusvalidos",O).hide();}if(S(q.ServiciosConocidos.TV)){jQuery(".PlasmaTV",O).show();}else{jQuery(".PlasmaTV",O).hide();}if(S(q.ServiciosConocidos.TVSatelite)){jQuery(".PlasmaTV",O).addClass("SAT");}else{jQuery(".PlasmaTV",O).removeClass("SAT");}if(S(q.ServiciosConocidos.WiFi)){jQuery(".WIFI",O).show();}else{jQuery(".WIFI",O).hide();}jQuery(".iconoServicio",O).hide();
if(Q.Servicios){for(var T=0;T<Q.Servicios.length;T++){jQuery(".iconoServicio.s"+Q.Servicios[T].Id,O).show();}}jQuery(".campoNombre",O).html(Q.Nombre);if(Q.TipoLegal==1){jQuery(".tipoLegal",O).html(Language.ViviendaVacacional);if(q.ColorViviendaVacacional.Fondo){jQuery(".bandaMiniatura",O).css("background-color",q.ColorViviendaVacacional.Fondo);}if(q.ColorViviendaVacacional.Letra){jQuery(".tituloBandaMiniatura",O).css("color",q.ColorViviendaVacacional.Letra);jQuery(".euroPrecioMiniatura",O).css("color",q.ColorViviendaVacacional.Letra);
}}else{jQuery(".tipoLegal",O).html(Language.Apartamento);}jQuery(".campoPrecioMinimoPax",O).html(Q.PrecioMinimoPax);jQuery(".campoTipo",O).html(Q.Tipo);if(Q.Superficie>0){jQuery(".campoSuperficie",O).html(Q.Superficie);jQuery(".Superficie",O).show();}else{jQuery(".Superficie",O).hide();}if(Q.Localizacion){jQuery(".campoPlanta",O).html(Q.Localizacion);jQuery(".Planta",O).show();}else{jQuery(".Planta",O).hide();}if(q.SinDormitoriosEsTexto&&Q.NumDormitorios==0){jQuery(".SinDormitorios",O).html(Q.Tipo).show();
jQuery(".Dormitorios",O).hide();}else{jQuery(".SinDormitorios",O).hide();jQuery(".Dormitorios",O).show();}jQuery(".campoDormitorios",O).html(Q.NumDormitorios);var R=jQuery(".Capacidad",O);var T;if(Q.CapacidadPublicitada>0){if(!q.PAXasText){R.empty();for(T=0;T<Q.CapacidadPublicitada;T++){R.append('<div class="PAX"></div>');}}else{R.find(".CapacidadNum").html(Q.CapacidadPublicitada);}R.show();}else{R.hide();}jQuery(".descripcion",O).html(Q.DescripcionCorta);DarcySoft.ShotWeb.Condominium.getNombreCiudad(Q.Ciudad,function(W){jQuery(".campoCiudad",O).html(W);
DarcySoft.ShotWeb.Condominium.getNombreZona(Q.IdZona,function(Y){var X=jQuery(".campoZona",O);X.html(Y);if(Y.toLowerCase().replaceLatinChar()==W.toLowerCase().replaceLatinChar()){X.hide();}else{X.show();}});});P=P||"1";if(!DarcySoft.ShotWeb.CondominiumUI.InitData.NoMiniaturaTestimonio){DarcySoft.ShotWeb.Condominium.mejorTestimonio(Q.Id,function(aa){var Y=jQuery(".puntuacionMiniatura",O);if(aa&&aa.Puntuacion>0){Y.find(".fraseCliente").html(aa.ComentarioWeb);var X=Y.find(".puntuacionCliente");X.empty();
var ab=""+aa.Puntuacion;if(aa.Puntuacion<10&&Math.floor(aa.Puntuacion)==aa.Puntuacion){ab=ab+".0";}X.append("<span>"+ab+"</span>");var W;for(W=1;W<=aa.Puntuacion/2;W++){X.append('<img src="'+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+"/images/iconos/estrella"+P+'.png"/>');}var Z=aa.Puntuacion/2;if(Math.floor(aa.Puntuacion/2)<aa.Puntuacion/2){X.append('<img src="'+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+"/images/iconos/estrella"+P+'_off.png"/>');Z=Z+1;}for(W=aa.Puntuacion/2;
W<=4;W++){X.append('<img src="'+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+'/images/iconos/estrella_off.png"/>');}}else{Y.hide();}});}};if(typeof L=="object"){N(L);}else{N(DarcySoft.ShotWeb.Condominium.getApartamento(L));}};return{init:J};}();var r=function(O,Y,W){var J=jQuery("#columnaContent");var P=jQuery("#menuContainer");var X=function(){var Z=jQuery(".BuscadorBtn");var aa="/section/Search";var ab="";var ae;ae=jQuery("#buscador input[name=inputZonasIdx]").val();if(ae>0){ab=ab+"/Area_"+ae;
}else{ae=jQuery("#buscador select[name=ZonasSelect]").val();if(ae>0){ab=ab+"/Area_"+ae;}}ae=jQuery("#buscador input[name=inputCiudadIdx]").val();if(ae>0){ab=ab+"/City_"+ae;}ae=jQuery("#buscador input[name=inputProvinciaIdx]").val();if(ae>0){ab=ab+"/State_"+ae;}ae=jQuery("#buscador select[name=PersonasSelect]").val();if(ae>0){ab=ab+"/People_"+ae;}ae=jQuery("#buscador select[name=HabitacionesSelect]").val();if(ae>0){ab=ab+"/Beds_"+ae;}ae=jQuery("#buscador select[name=TipoAlojamientoSelect]").val();
if(ae>0){ab=ab+"/Type_"+ae;}var ac=DarcySoft.ServerDate(L);var ad=DarcySoft.ServerDate(M);ab=ab+"/Arrival_"+ac.getFullYear()+"_"+(ac.getMonth()+1)+"_"+ac.getDate();ab=ab+"/Departure_"+ad.getFullYear()+"_"+(ad.getMonth()+1)+"_"+ad.getDate();Z.attr("href",aa+ab);Z.unbind("click");Z.attr("onclick","");Z.click(function(){return DarcySoft.ShotWeb.Link("/#/Search"+ab,true);});};var T=function(Z){L.setTime(Z.getTime());Q.setTime(L.getTime());Q.setDate(Q.getDate()+DarcySoft.ShotWeb.Condominium.Options.MinDiasReserva-1);
if(M<Q){M.setTime(Q);R.updateDateSelectValues(L,M);}X();};var U=function(Z){M.setTime(Z.getTime());if(M<Q){M.setTime(Q);R.updateDateSelectValues(L,M);}X();};var R;var L=new Date();var M=new Date();var Q=new Date();L.setDate(L.getDate()+DarcySoft.ShotWeb.Condominium.Options.MinDiasAntelacion);var V=DarcySoft.ShotWeb.DateFromParams(W,"Arrival");if(V&&V>L){L.setTime(V.getTime());}M.setTime(L.getTime());M.setDate(L.getDate()+DarcySoft.ShotWeb.Condominium.Options.MinDiasReserva-1);Q.setTime(M.getTime());
V=DarcySoft.ShotWeb.DateFromParams(W,"Departure");if(V>M){M.setTime(V.getTime());}var K=function(){var Z=this;DarcySoft.ShotWeb.Condominium.textoBienvenida(function(ac){var ab=jQuery("#descripcionCorta .texto",Z);ab.html(ac);});var aa="3";DarcySoft.ShotWeb.Condominium.getTestimonios(0,3,function(ah){var ag;var ae=jQuery(".puntuacionMiniatura",Z);if(ah){for(ag=0;ag<3;ag++){var ad=ae.eq(ag);if(ah[ag]){ad.find(".fraseCliente").html(ah[ag].ComentarioWeb);var ac=ad.find(".puntuacionCliente");ac.empty();
var ai=""+ah[ag].Puntuacion;if(ah[ag].Puntuacion<10&&Math.floor(ah[ag].Puntuacion)==ah[ag].Puntuacion){ai=ai+".0";}ac.append("<span>"+ai+"</span>");var ab;for(ab=1;ab<=ah[ag].Puntuacion/2;ab++){ac.append('<img src="'+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+"/images/iconos/estrella"+aa+'.png"/>');}var af=ah[ag].Puntuacion/2;if(Math.floor(ah[ag].Puntuacion/2)<ah[ag].Puntuacion/2){ac.append('<img src="'+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+"/images/iconos/estrella"+aa+'_off.png"/>');
af=af+1;}for(ab=ah[ag].Puntuacion/2;ab<=4;ab++){ac.append('<img src="'+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+'/images/iconos/estrella_off.png"/>');}}}}});};if(J.find("#descripcionCorta").length>0){K.apply(J.get(0));}else{J.load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.ColumnaHome,K);}var N=function(){var ah=this;R=DarcySoft.ShotWeb.NameDates(ah,T,U);R.Init(q);R.setSelectDates(null,L,M);var ak=jQuery("select[name=ZonasSelect]",ah);var ai=jQuery("select[name=TipoAlojamientoSelect]",ah);
var ab=jQuery("input[name=inputLugar]",ah);var af=jQuery(".LugarAutocomplete",ah);var ae=jQuery(".listaLugares",ah);var aa=jQuery("input[name=inputCiudadIdx]",ah);var ac=jQuery("input[name=inputProvinciaIdx]",ah);var ad=jQuery("input[name=inputZonasIdx]",ah);var Z=function(al,am,an){return function(){if(am){aa.val(0);ac.val(al.IdProvincia);ab.val(al.Provincia);af.val(al.Provincia);}else{if(an){aa.val(0);ac.val(0);ab.val(al.Nombre);ad.val(al.Id);af.val(al.Nombre);}else{aa.val(al.Id);ac.val(0);ab.val(al.Nombre);
af.val(al.Nombre);}}ae.hide();X();};};DarcySoft.ShotWeb.Condominium.getCiudades(function(al){var an=jQuery("#mapapoblaciones");var am;var ao;for(am=0;am<al.length;am++){ao=an.find(".provincia."+al[am].IdProvincia);ao.click(Z(al[am],true));}});ab.focus(function(){ab.select();});ab.keyup(function(al){if(al.keyCode==13){ab.val(af.val());ae.hide();return;}af.val("");ae.empty();ae.hide();DarcySoft.ShotWeb.Condominium.getZonas(function(am){DarcySoft.ShotWeb.Condominium.getCiudades(function(ap){var au;var an;
var ao=0;var av=0;var ay=[];var ax=0;var aC=0;var aD=[];var ar=ab.val();var aq=[];var aB=function(aF){aF=aF.toLowerCase().replaceLatinChar();for(var aE=0;aE<aq.length;aE++){if(aq[aE].toLowerCase().replaceLatinChar().indexOf(aF)==0){return true;}}return false;};for(au=0;au<ap.length;au++){if(ap[au].Id==1){continue;}var aA=ap[au].Provincia.toLowerCase().replaceLatinChar().indexOf(ar.toLowerCase().replaceLatinChar());if(ar&&aA>=0&&ay.indexOf(ap[au].Provincia)<0){var aw=ap[au].Provincia.substr(0,ar.length);
if(aA==0){if(!an||aw.length<an){af.val(ap[au].Provincia);an=aw;ao=0;ax=ap[au].IdProvincia;aC=0;}}var at=document.createElement("DIV");jQuery(at).html(ap[au].Provincia);jQuery(at).click(Z(ap[au],true));if(av%2==0){jQuery(at).addClass("par");}else{jQuery(at).addClass("impar");}av++;ae.append(at);ae.show();ay.push(ap[au].Provincia);}if(ar&&ap[au].Nombre.toLowerCase().replaceLatinChar().indexOf(ar.toLowerCase().replaceLatinChar())==0){var aw=ap[au].Nombre.substr(0,ar.length);if(!an||aw.length<an){af.val(ap[au].Nombre);
an=aw;ao=ap[au].Id;aC=0;ax=0;}aq.push(ap[au].Nombre);var at=document.createElement("DIV");jQuery(at).html(ap[au].NombreCompuesto);jQuery(at).click(Z(ap[au]));if(av%2==0){jQuery(at).addClass("par");}else{jQuery(at).addClass("impar");}av++;ae.append(at);ae.show();}else{if(ar&&ap[au].Nombre.toLowerCase().replaceLatinChar().indexOf(ar.toLowerCase().replaceLatinChar())>0){aq.push(ap[au].Nombre);var at=document.createElement("DIV");jQuery(at).html(ap[au].NombreCompuesto);jQuery(at).click(Z(ap[au]));if(av%2==0){jQuery(at).addClass("par");
}else{jQuery(at).addClass("impar");}av++;ae.append(at);ae.show();}}}for(au=0;au<am.length;au++){var az=am[au].Nombre.toLowerCase().replaceLatinChar().indexOf(ar.toLowerCase().replaceLatinChar());if(ar&&az>=0&&aD.indexOf(am[au].Nombre)<0&&!aB(am[au].Nombre)){var aw=am[au].Nombre.substr(0,ar.length);if(az==0){if(!an||aw.length<an){af.val(am[au].Nombre);an=aw;ao=0;ax=0;aC=am[au].Id;}}var at=document.createElement("DIV");jQuery(at).html(am[au].Nombre);jQuery(at).click(Z(am[au],false,true));if(av%2==0){jQuery(at).addClass("par");
}else{jQuery(at).addClass("impar");}av++;ae.append(at);ae.show();aD.push(am[au].Nombre);}}aa.val(ao);ac.val(ax);ad.val(aC);ab.val(an);X();});});});DarcySoft.ShotWeb.Condominium.getZonas(function(am){ak.empty();var al;ak.append('<option value="0"> -- </option>');for(al=0;al<am.length;al++){ak.append('<option value="'+am[al].Id+'">'+am[al].Nombre+"</option>");}});DarcySoft.ShotWeb.Condominium.getTiposAlojamiento(function(am){ai.empty();var al;ai.append('<option value="0"> -- </option>');for(al=0;al<am.length;
al++){ai.append('<option value="'+am[al].Id+'">'+am[al].Nombre+"</option>");}});jQuery("input[name=inputZonasIdx]",ah).change(X);jQuery("select[name=ZonasSelect]",ah).change(X);jQuery("input[name=inputCiudadIdx]",ah).change(X);jQuery("input[name=inputProvinciaIdx]",ah).change(X);jQuery("select[name=PersonasSelect]",ah).change(X);jQuery("select[name=HabitacionesSelect]",ah).change(X);jQuery("select[name=TipoAlojamientoSelect]",ah).change(X);var ag=DarcySoft.ShotWeb.IntegerFromParams(W,"People");if(ag){jQuery("select[name=PersonasSelect]",ah).val(ag);
}ag=DarcySoft.ShotWeb.IntegerFromParams(W,"Beds");if(ag){jQuery("select[name=HabitacionesSelect]",ah).val(ag);}ag=DarcySoft.ShotWeb.IntegerFromParams(W,"Type");if(ag){jQuery("select[name=TipoAlojamientoSelect]",ah).val(ag);}var aj=function(){var am;var al;var an;var ao=DarcySoft.ShotWeb.Sections.currentSection(true);var ap=DarcySoft.ShotWeb.Sections.sectionParams(0);al=DarcySoft.ShotWeb.IntegerFromParams(W,"Area");if(!al&&ao=="Zone"){al=ap;}if(al){jQuery("input[name=inputZonasIdx]",ah).val(al);jQuery("select[name=ZonasSelect]",ah).val(al);
jQuery("input[name=inputCiudadIdx]",ah).val(0);jQuery("input[name=inputProvinciaIdx]",ah).val(0);}if(!al){am=DarcySoft.ShotWeb.IntegerFromParams(W,"City");if(!am&&ao=="City"){am=ap;}if(am){jQuery("input[name=inputZonasIdx]",ah).val(0);jQuery("select[name=ZonasSelect]",ah).val(0);jQuery("input[name=inputCiudadIdx]",ah).val(am);jQuery("input[name=inputProvinciaIdx]",ah).val(0);}}if(!al&&!am){an=DarcySoft.ShotWeb.IntegerFromParams(W,"State");if(!an&&ao=="State"){an=ap;}if(an){jQuery("input[name=inputZonasIdx]",ah).val(0);
jQuery("select[name=ZonasSelect]",ah).val(0);jQuery("input[name=inputCiudadIdx]",ah).val(0);jQuery("input[name=inputProvinciaIdx]",ah).val(an);}}DarcySoft.ShotWeb.Condominium.getZonas(function(aq){DarcySoft.ShotWeb.Condominium.getCiudades(function(ar){if(al){for(var at=0;at<aq.length;at++){if(aq[at].Id==al){af.val(aq[at].Nombre);ab.val(aq[at].Nombre);break;}}}else{if(am){for(var at=0;at<ar.length;at++){if(ar[at].Id==am){af.val(ar[at].Nombre);ab.val(ar[at].Nombre);break;}}}else{if(an){for(var at=0;
at<ar.length;at++){if(ar[at].IdProvincia==an){af.val(ar[at].Provincia);ab.val(ar[at].Provincia);break;}}}}}});});X();jQuery(ah).fadeIn();};aj();DarcySoft.ShotWeb.CondominiumUI.updateSelectedPlace=aj;};if(P.find("#buscador").length>0){N.apply(P.get(0));}else{P.load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Buscador,N);}var S=jQuery("#ofertaPrincipal");if(Y){DarcySoft.ShotWeb.Condominium.Portada(function(aa){var Z=jQuery(".ofertaPrincipalBG");if(aa){if(Z.is("img")){Z.attr("src",DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+aa);
}else{if(Z.find("img.ofertaBGImg").length>0){Z.find("img.ofertaBGImg").attr("src",DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+aa);}else{Z.css("background-image","url("+DarcySoft.ShotWeb.CondominiumUI.InitData.ResourcesHost+aa+")");}}S.show();S.find(".NombreOferta").hide();S.find(".DescripcionOferta").hide();S.find(".bandaOfertaPrincipal").hide();S.find("button").hide();DarcySoft.ShotWeb.Condominium.ofertaPortada(function(ac){if(ac){S.find(".NombreOferta").html(ac.Titulo);S.find(".DescripcionOferta").html(ac.Descripcion);
S.find(".NombreOferta").show();S.find(".DescripcionOferta").show();S.find(".bandaOfertaPrincipal").show();var ab=S.find(".ofertaBtn, button");ab.unbind("click");ab.attr("onclick","");ab.click(function(){return DarcySoft.ShotWeb.Link("/#/Offers/"+ac.Id,true);});if(DarcySoft.ShotWeb.Sections.currentSection(true)!="Offers"){ab.show();}else{ab.hide();}}});}else{if(Z.is("img")){Z.hide();}}});}else{S.hide();}if(O){O();}};var y=function(K,J){return function(L){DarcySoft.ShotWeb.scrollToTop();z(L,K,q.CalcPrice,J);
};};var g=[];var i=function(P){var K=DarcySoft.ShotWeb.StringFromParams(P,"FilterBy");var J=jQuery("#listaContent");var O=J.find("ul.listaAlojamientos").eq(0);var N=O.find("li.listaAlojamientos");var L=function(Q){return true;};for(var M=0;M<g.length;M++){if(L(g[M])){N.eq(g[M].SortedIndex).show();}else{N.eq(g[M].SortedIndex).hide();}}};var F=function(Q,N){var O=DarcySoft.ShotWeb.StringFromParams(Q,"OrderBy");var P=DarcySoft.ShotWeb.StringFromParams(Q,"OrderType");var R=[];for(var K=0;K<g.length;K++){R[g[K].SortedIndex]=g[K];
}R.sort(function(S,V){var T=DarcySoft.ShotWeb.Condominium.getApartamento(S.Id,true);var U=DarcySoft.ShotWeb.Condominium.getApartamento(V.Id,true);var X=0;var Y=0;if(S.Resumen){X=S.Resumen.PrecioTotal;}else{if(T){X=T.PrecioMinimoPax*1000;}}if(V.Resumen){Y=V.Resumen.PrecioTotal;}else{if(U){Y=U.PrecioMinimoPax*1000;}}if(X<0){X=-X;}if(Y<0){Y=-Y;}var W=0;if(Y==0||X==0){W=-2;}if(X>Y){W=1;}else{W=-1;}if(P=="DESC"){return(-W);}else{return W;}});if(!N){var J=jQuery("#listaContent");var M=J.find("ul.listaAlojamientos").eq(0);
var L=M.find("li.listaAlojamientos");L.detach();for(var K=0;K<R.length;K++){M.append(L.eq(R[K].SortedIndex));}}for(var K=0;K<R.length;K++){R[K].SortedIndex=K;}g=R;};var z=function(J,V,K,O){var P=0;var Q;var N;var R;var L=jQuery("#listaContent");g=[];var M=DarcySoft.ShotWeb.Sections.currentSection()||"/Home";var U=L.find("input.sectionLoadInfo").val();var T=(!j&&U==M)||(j==U&&j);if(!T){L.empty();if(!DarcySoft.ShotWeb.Sections.currentTitle){L.append('<h2 class="sectionTitle corporateFGColor"></h2>');
}else{L.append('<h2 class="sectionTitle corporateFGColor">'+DarcySoft.ShotWeb.Sections.currentTitle+"</h2>");}}if(J.length==0){if(!T){L.append("<div>"+Language.ApartamentosNoEncontrados+"</div>");}}else{N=DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.ApartamentoMiniatura;R=document.createElement("div");var S=function(){var aq=function(aA){t.init.call(this,aA);jQuery(this).css("cursor","pointer");var aB=jQuery("a",this);aB.attr("onclick","");aB.attr("href","/section/ShowApartment/"+aA);jQuery(this).unbind("click");
jQuery(this).click(function(aC){return function(){var aD=[aC].concat(DarcySoft.ShotWeb.ParamsToPreserve(V)).join("/");D(aD,L);return false;};}(aA));};var ab=DarcySoft.ShotWeb.DateFromParams(V,"Arrival");var ac=DarcySoft.ShotWeb.DateFromParams(V,"Departure");var X=DarcySoft.ShotWeb.IntegerFromParams(V,"People");var ah="/#"+DarcySoft.ShotWeb.UpdateParamsInURL(DarcySoft.ShotWeb.Sections.currentSection(),["FilterBy_Price"]);if(!T){L.append("<div>"+J.length+" "+Language.AlojamientosDisponibles+".</div>");
}var ai;if(!T){ai=jQuery(document.createElement("ul"));ai.addClass("listaAlojamientos");L.append(ai);}else{ai=L.find("ul.listaAlojamientos").eq(0);}var ag;var ak=jQuery(R).html();var aj=[];if(!T){for(ad=0;ad<J.length;ad++){aj.push(['<li class="AptId_',J[ad].Id,' listaAlojamientos">',ak,"</li>"].join(""));}}ai=L.find("ul.listaAlojamientos").eq(0);var W=function(aA){ai.append(aj[aA.HtmlIdx]);var aB=ai.find("li.AptId_"+aA.Id).get(0);if(aB){aq.call(aB,aA.Id);}};var ap=0;for(ad=0;ad<J.length;ad++){var Y={Id:J[ad].Id,Resumen:null,SortedIndex:ad,HtmlIdx:ad};
g.push(Y);}var an=function(){var aA=ap;for(;ap<aA+10&&ap<g.length;ap++){W(g(g[ap]));}if(ap<g.length){setTimeout(an,1);}};if(!K){an();}if(K){var am=0;var ao=0;var at=function(){ar();if(ao<g.length){setTimeout(at,1);}};var au=function(aD,aA,aC){for(var aB=0;aB<aD.length;aB++){aA[aB].Resumen=aD[aB];}am=am-aC;if(am<=0){F(V,true);setTimeout(at,1);}};var ar=function(){for(var aB=ao;aB<g.length&&aB<ao+10;aB++){var aF=g[aB].Resumen;if(!T){ai.append(aj[g[aB].HtmlIdx]);}var aA=jQuery(".AptId_"+g[aB].Id);var aC=ai.find("li.AptId_"+g[aB].Id).get(0);
if(aC){aq.call(aC,g[aB].Id);}var aE=aA.find(".precioReservaBandaMiniatura");if(aF){if(aF.Ofertas&&aF.Ofertas.length>0){aA.find(".ofertaMiniatura").show();aA.find(".ofertaMiniatura .infoOferta").html(aF.Ofertas[0].Nombre);}else{aA.find(".ofertaMiniatura").hide();}var aD=aF.PrecioTotal/aF.Adultos/aF.TotalNoches;aA.find(".campoPrecioMinimoPax").html(Math.round(aD*100)/100);aA.find(".campoPrecioTotal").html(aF.PrecioTotal);aA.find(".campoNumPersonas").html(aF.Adultos+aF.MenoresGratis);aA.find(".campoNumNoches").html(aF.TotalNoches);
if(aE.length>0&&al&&aa&&ax){aA.find(".precioBandaMiniatura").hide();aE.show();}else{aE.hide();aA.find(".precioBandaMiniatura").show();}}else{aA.find(".campoPrecioMinimoPax").css("text-decoration","");aE.hide();}}ao+=10;};am=g.length;var al=X;if(!al){al=0;}var aa=ab;var ax=ac;var aw=[];var Z=[];for(var ad=0;ad<g.length;){var ay=ad;var az=[];var ae=[];for(;ad<g.length&&az.length<50;ad++){var av=g[ad];az.push(av);ae.push(av.Id);}var af=az.length;DarcySoft.ShotWeb.Condominium.calculaPrecioReservaMultiple(ae,O,aa,ax,al,function(aB,aA){return function(aC){au(aC,aB,aA);
};}(az,af));}}};if(!T){jQuery(R).load(N,S);}else{S();}}if(!T){L.append('<div class="divRelleno"></div>');}if(!K){i(V);F(V);}setTimeout(function(){jQuery("#servicios").height(L.height()-20);},2000);};var o=function(J){if(DarcySoft.ShotWeb.Sections.changing("Home")&&DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment")){jQuery("#listaContent").empty();}DarcySoft.ShotWeb.Sections.updateSessionSection("Home",J);if(q.HomeMostrarApartamentosDestacados){r(function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(J),{Destacado:true});
},true,J);}else{r(function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(J));},true,J);}};var C=function(P){var K=jQuery("#listaContent");var L=DarcySoft.ShotWeb.Sections.currentSection()||"/Home";var R=K.find("input.sectionLoadInfo").val();var Q=(!j&&R==L)||(j==R&&j);if(DarcySoft.ShotWeb.Sections.changing("Search")&&DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment")){jQuery("#listaContent").empty();}var O={};var S;S=DarcySoft.ShotWeb.IntegerFromParams(P,"Area");if(S>0){O.Zonas=[S];}S=DarcySoft.ShotWeb.IntegerFromParams(P,"City");
if(S>0){O.Ciudades=[S];}S=DarcySoft.ShotWeb.IntegerFromParams(P,"State");if(S>0){O.Provincias=[S];}S=DarcySoft.ShotWeb.IntegerFromParams(P,"Beds");if(S>0){O.NumDormitorios=S;}S=DarcySoft.ShotWeb.IntegerFromParams(P,"People");if(S>0){O.MinPersonas=S;}S=DarcySoft.ShotWeb.IntegerFromParams(P,"Type");if(S>0){O.Tipos=[S];}var M=DarcySoft.ShotWeb.DateFromParams(P,"Arrival");var N=DarcySoft.ShotWeb.DateFromParams(P,"Departure");var J=DarcySoft.ShotWeb.Sections.changing("Search");DarcySoft.ShotWeb.Sections.updateSessionSection("Search",P);
A(J,function(){if(M&&N){DarcySoft.ShotWeb.Condominium.findFreeApartment(M,N,O,y(P));}else{DarcySoft.ShotWeb.Condominium.apartamentos(y(P),O);}},!Q,P);};var H=function(L){var M=L;if(typeof L=="string"){L=L.split("/")[0];}var J=DarcySoft.ShotWeb.Sections.changing("Type");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("Type",M);if(L=="Studio"){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Tipos:[q.TiposApartament.Estudio]});
},K,M);}else{if(L=="AtticsDuplex"){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Tipos:[q.TiposApartament.AticoDuplex]});},K,M);}else{if(L=="Duplex"){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Tipos:[q.TiposApartament.Duplex]});},K,M);}else{if(!isNaN(L)){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Tipos:[parseInt(L,10)]});},K,M);}else{A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M));},K,M);}}}}};var c=function(L){var M=L;if(typeof L=="string"){L=L.split("/")[0];
}var J=DarcySoft.ShotWeb.Sections.changing("Bedroom");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("Bedroom",M);if(L==1){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{NumDormitorios:1});},K,M);}else{if(L==2){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{NumDormitorios:2});},K,M);}else{if(L==3){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{NumDormitorios:3});},K,M);}else{if(!isNaN(L)){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{NumDormitorios:parseInt(L,10)});
},K,M);}}}}};var a=function(L){var J=DarcySoft.ShotWeb.Sections.changing("Accessible");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("Accessible");A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(params),{Minusvalido:true});},K,L);};var s=function(L){var M=L;if(typeof L=="string"){L=L.split("/")[0];}var J=DarcySoft.ShotWeb.Sections.changing("Location");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("Location",M);
if(L=="Ground"){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Localizacion:[q.TiposLocalizaciones.Baja]});},K,M);}else{if(!isNaN(L)){A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Localizacion:[parseInt(L,10)]});},K,M);}}};var A=function(J,L,K,M,N){if(!J){L();}else{if(K){jQuery("#listaContent").empty();}r(L,N,M);}};var I=function(L){var M=L;if(typeof L=="string"){L=L.split("/")[0];}var J=DarcySoft.ShotWeb.Sections.changing("Zone");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");
DarcySoft.ShotWeb.Sections.updateSessionSection("Zone",M);var N=parseInt(L);A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Zonas:[N]});},K,M);DarcySoft.ShotWeb.CondominiumUI.updateSelectedPlace();};var G=function(L){var M=L;if(typeof L=="string"){L=L.split("/")[0];}var J=DarcySoft.ShotWeb.Sections.changing("State");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("State",M);var N=parseInt(L);A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(M),{Provincias:[N]});
},K,M);DarcySoft.ShotWeb.CondominiumUI.updateSelectedPlace();};var e=function(M){var N=M;if(typeof M=="string"){M=M.split("/")[0];}var J=DarcySoft.ShotWeb.Sections.changing("City");var L=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("City",N);var K=parseInt(M);A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(N),{Ciudades:[K]});},L,N);DarcySoft.ShotWeb.CondominiumUI.updateSelectedPlace();};var l=function(J){return function(M){var N=M;
if(typeof M=="string"){M=M.split("/")[0];}var K=DarcySoft.ShotWeb.Sections.changing(J);var L=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection(J,N);A(K,function(){var O=jQuery("#listaContent");if(q.SectionData[J]){if(q.SectionData[J][M]){O.load(q.SectionData[J][M],function(){DarcySoft.ShotWeb.scrollToTop();});}else{if(q.SectionData[J].Default){O.load(q.SectionData[J].Default,function(){DarcySoft.ShotWeb.scrollToTop();});}}}},L,N);};};var B=function(){var J=function(K,N){var P=this;
DarcySoft.ShotWeb.Login.init.apply(P);var Q=jQuery(".saveUserInfo");Q.unbind("click");jQuery(".bookingIDlabel",P).html(K);jQuery(".saveError",P).hide();jQuery(".saveCompleted",P).show().html("");Q.removeAttr("disabled");var O=function(){DarcySoft.ShotWeb.User.UpdateInfo();jQuery(".DisplayName",P).html(DarcySoft.ShotWeb.User.Info.DisplayName);jQuery(".FirstNameInput",P).val(DarcySoft.ShotWeb.User.Info.FirstName);jQuery(".LastNameInput",P).val(DarcySoft.ShotWeb.User.Info.LastName);jQuery(".EmailInput",P).val(DarcySoft.ShotWeb.User.Info.Email);
jQuery(".PhoneInput",P).val(DarcySoft.ShotWeb.User.Info.Phone1);jQuery(".NIFInput",P).val(DarcySoft.ShotWeb.User.Info.NIF_CIF);jQuery(".BirthYearInput",P).val(DarcySoft.ShotWeb.User.Info.BirthYear);jQuery(".AddressInput",P).val(DarcySoft.ShotWeb.User.Info.Address);jQuery(".CityInput",P).val(DarcySoft.ShotWeb.User.Info.City);jQuery(".CountryInput",P).val(DarcySoft.ShotWeb.User.Info.Country);Q.click(function(){DarcySoft.ShotWeb.User.Info.FirstName=jQuery(".FirstNameInput",P).val();DarcySoft.ShotWeb.User.Info.LastName=jQuery(".LastNameInput",P).val();
DarcySoft.ShotWeb.User.Info.Email=jQuery(".EmailInput",P).val();DarcySoft.ShotWeb.User.Info.Phone1=jQuery(".PhoneInput",P).val();DarcySoft.ShotWeb.User.Info.NIF_CIF=jQuery(".NIFInput",P).val();DarcySoft.ShotWeb.User.Info.BirthYear=jQuery(".BirthYearInput",P).val();DarcySoft.ShotWeb.User.Info.Address=jQuery(".AddressInput",P).val();DarcySoft.ShotWeb.User.Info.City=jQuery(".CityInput",P).val();DarcySoft.ShotWeb.User.Info.Country=jQuery(".CountryInput",P).val();var R=jQuery(".HourSelect",P).val();var S=jQuery(".MinSelect",P).val();
DarcySoft.ShotWeb.Condominium.saveBookingInfo(K,R,S,DarcySoft.ShotWeb.User.Info,function(T){if(T.Error){jQuery(".saveCompleted",P).hide();jQuery(".saveError",P).html("Error: "+T.ErrorMessage).show();}else{jQuery(".saveError",P).hide();jQuery(".saveCompleted",P).show();Q.attr("disabled","disabled");if(N){N();}}});});};var M;var L=function(){if(DarcySoft.ShotWeb.User.loggedIn){clearTimeout(M);O();}else{M=setTimeout(L,1000);}};L();};return{init:J};}();var f=function(M){var N=M;if(typeof M=="string"){M=M.split("/")[0];
}var K=DarcySoft.ShotWeb.Sections.changing("Client");var L=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");var J=DarcySoft.ShotWeb.IntegerFromParams(N,"BookingID");DarcySoft.ShotWeb.Sections.updateSessionSection("Client",N);A(K,function(){DarcySoft.ShotWeb.scrollToTop();var O=jQuery("#listaContent");if(M=="Login"){O.load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Login,DarcySoft.ShotWeb.Login.init);}else{if(M=="Booking"){O.load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.InfoReserva,function(){B.init.call(this,J);
});}else{O.load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.Client,function(){var S=this;DarcySoft.ShotWeb.Login.init.call(S,J);var T=jQuery(".saveUserInfo");T.unbind("click");var R=function(){DarcySoft.ShotWeb.User.UpdateInfo();jQuery(".DisplayName",S).html(DarcySoft.ShotWeb.User.Info.DisplayName);jQuery(".FirstNameInput",S).val(DarcySoft.ShotWeb.User.Info.FirstName);jQuery(".LastNameInput",S).val(DarcySoft.ShotWeb.User.Info.LastName);jQuery(".EmailInput",S).val(DarcySoft.ShotWeb.User.Info.Email);
jQuery(".PhoneInput",S).val(DarcySoft.ShotWeb.User.Info.Phone1);jQuery(".NIFInput",S).val(DarcySoft.ShotWeb.User.Info.NIF_CIF);jQuery(".BirthYearInput",S).val(DarcySoft.ShotWeb.User.Info.BirthYear);jQuery(".AddressInput",S).val(DarcySoft.ShotWeb.User.Info.Address);jQuery(".CityInput",S).val(DarcySoft.ShotWeb.User.Info.City);jQuery(".CountryInput",S).val(DarcySoft.ShotWeb.User.Info.Country);T.click(function(){DarcySoft.ShotWeb.User.Info.FirstName=jQuery(".FirstNameInput",S).val();DarcySoft.ShotWeb.User.Info.LastName=jQuery(".LastNameInput",S).val();
DarcySoft.ShotWeb.User.Info.Email=jQuery(".EmailInput",S).val();DarcySoft.ShotWeb.User.Info.Phone1=jQuery(".PhoneInput",S).val();DarcySoft.ShotWeb.User.Info.NIF_CIF=jQuery(".NIFInput",S).val();DarcySoft.ShotWeb.User.Info.BirthYear=jQuery(".BirthYearInput",S).val();DarcySoft.ShotWeb.User.Info.Address=jQuery(".AddressInput",S).val();DarcySoft.ShotWeb.User.Info.City=jQuery(".CityInput",S).val();DarcySoft.ShotWeb.User.Info.Country=jQuery(".CountryInput",S).val();DarcySoft.ShotWeb.Condominium.saveUserInfo(DarcySoft.ShotWeb.User.Info,function(U){if(U.Error){jQuery(".saveCompleted",S).hide();
jQuery(".saveError",S).html("Error: "+U.ErrorMessage).show();}else{jQuery(".saveError",S).hide();jQuery(".saveCompleted",S).show();}});});};var Q;var P=function(){if(DarcySoft.ShotWeb.User.loggedIn){clearTimeout(Q);R();}else{Q=setTimeout(P,1000);}};P();});}}},L,N);};var v;var u=function(N){var O=N;if(typeof N=="string"){N=N.split("/")[0];}var J=DarcySoft.ShotWeb.Sections.changing("Offers");var K=DarcySoft.ShotWeb.Sections.changingFrom("ShowApartment");DarcySoft.ShotWeb.Sections.updateSessionSection("Offers",N);
var M=parseInt(N,10);var L=function(Q){if(!v){v=document.createElement("DIV");jQuery(v).load(DarcySoft.ShotWeb.CondominiumUI.InitData.Templates.OfertaTemplate,function(){Q();});}else{Q();}};var P=function(R){var S;DarcySoft.ShotWeb.scrollToTop();jQuery("#ofertaPrincipal").hide();var Q=jQuery("#listaContent");Q.empty();if(R){L(function(){for(var U=0;U<R.length;U++){var V=jQuery(v).clone();V.find(".NombreOferta").html(R[U].Titulo);V.find(".DescripcionOferta").html(R[U].Descripcion);var T=V.find(".ofertaBtn");
T.unbind("click");T.attr("onclick","");T.click(function(W){return function(){return DarcySoft.ShotWeb.Link("/#/Offers/"+W,true);};}(R[U].Id));Q.append(V);}});}};if(isNaN(M)){A(J,function(){if(N=="All"){DarcySoft.ShotWeb.Condominium.ofertasTipo(1,P);}else{if(N=="LastMinute"){DarcySoft.ShotWeb.Condominium.ofertasTipo(2,P);}}},K,O,true);}else{A(J,function(){DarcySoft.ShotWeb.Condominium.apartamentos(y(O,M),{Ofertas:[M]});var S=jQuery("#ofertaPrincipal");var R=DarcySoft.ShotWeb.Condominium.OfertaInfo(M);
if(R){S.find(".NombreOferta").html(R.Titulo);S.find(".DescripcionOferta").html(R.Descripcion);S.find(".NombreOferta").show();S.find(".DescripcionOferta").show();S.find(".bandaOfertaPrincipal").show();var Q=S.find(".ofertaBtn, button");Q.unbind("click");Q.attr("onclick","");Q.click(function(){return DarcySoft.ShotWeb.Link("/#/Offers/"+R.Id,true);});if(DarcySoft.ShotWeb.Sections.currentSection(true)!="Offers"){Q.show();}else{Q.hide();}S.show();}else{S.hide();}},K,O,true);}};DarcySoft.ShotWeb.Sections.add("Home",o);
DarcySoft.ShotWeb.Sections.add("Type",H);DarcySoft.ShotWeb.Sections.add("Bedroom",c);DarcySoft.ShotWeb.Sections.add("Accessible",a);DarcySoft.ShotWeb.Sections.add("Location",s);DarcySoft.ShotWeb.Sections.add("Zone",I);DarcySoft.ShotWeb.Sections.add("City",e);DarcySoft.ShotWeb.Sections.add("State",G);DarcySoft.ShotWeb.Sections.add("Offers",u);DarcySoft.ShotWeb.Sections.add("Client",f);DarcySoft.ShotWeb.Sections.add("Search",C);for(sname in q.SectionData){if(q.SectionData.hasOwnProperty(sname)){DarcySoft.ShotWeb.Sections.add(sname,l(sname));
}}var m=function(){var J=function(){var P=this;var O;var K=jQuery(".ColumnasPrecios",P);var L=function(W){var X=W;var Q;var V=0;var U;var Y;var R;var S;if(!X){X=[];}for(S=0;S<X.length;S++){if(V<X[S].PrecioDia){V=X[S].PrecioDia;}X[S].Date=DarcySoft.parseDotNetDate(X[S].Date);}V=2*V;var T=K.find(".leyendaPrecio");for(S=0;S<T.length;S++){T.eq(S).find("span").html(Math.round((T.length-S)*V/T.length));}for(S=1;S<=X.length;S++){Q=K.find(".columnaPrecio."+S);Q.removeClass("reservaActual");Q.removeClass("Mes2");
if(O){if(X[S-1].Date>=O.FechaEntrada&&X[S-1].Date<O.FechaSalida){Q.addClass("reservaActual");}else{if(X[S-1].Date.getMonth()!=O.FechaEntrada.getMonth()){Q.addClass("Mes2");}}}U=parseInt(Q.css("height"));Y=X[S-1].PrecioDia/V;R=Math.round(Y*U);if(Y<=0.5){Q.addClass("PrecioBajo1");}else{Q.removeClass("PrecioBajo1");}Q.find(".barraPrecio").height(R);Q.find(".basePrecio").html(X[S-1].Dia);Q.unbind("click");Q.click(function(Z){return function(){if(O&&Z>O.FechaEntrada){M.cambiaSalida(Z);}else{M.cambiaEntrada(Z);
}};}(X[S-1].Date));}};var N=function(Q){O=Q;if(O){DarcySoft.ShotWeb.Condominium.graficoPrecios(Q,L);}};var M={onCalculaReserva:N};return M;};return{init:J};}();var d=function(){var J=function(ap,aE,aO){var aN=this;var aF=function(aX){aP=!T(aX);};var aG=function(aX){aP=V(aX);};var ay=DarcySoft.ShotWeb.NameDates(aN,aF,aG);ay.Init(q);var aJ=function(aX,aY,a0){aY.find(".year").html(aX.MonthName+" "+aX.Year);var a3;var a2;var a4,a5;for(a4=0;a4<aX.DayNames.length;a4++){aY.find(".dayname."+a4).html(aX.DayLetters[a4]);
}aY.find(".week").hide();for(a4=0;a4<aX.Weeks.length;a4++){a3=aY.find(".week."+a4);a3.show();for(a5=0;a5<aX.Weeks[a4].Days.length;a5++){a2=a3.find(".day."+a5);var aZ=aX.Weeks[a4].Days[a5];if(aZ.Day){aZ.dayDate=DarcySoft.parseDotNetDate(aZ.Date);if(aZ.DayType==1){a2.addClass("reserved");}else{a2.removeClass("reserved");}var ba=aZ.dayDate>=ah&&aZ.dayDate<=aj;var a7=DarcySoft.ServerDate(aZ.dayDate);var a8=DarcySoft.ServerDate(ah);var a9=DarcySoft.ServerDate(aj);var a1=a7.getMonth()==a8.getMonth()&&a7.getFullYear()==a8.getFullYear()&&a7.getDate()==a8.getDate();
var a6=a7.getMonth()==a9.getMonth()&&a7.getFullYear()==a9.getFullYear()&&a7.getDate()==a9.getDate();if(ba){a2.addClass("wanted");}else{a2.removeClass("wanted");}a2.css("cursor","pointer");a2.html(aX.Weeks[a4].Days[a5].Day);if(a1){if(aZ.Ends){a2.html('<div class="wantedfg">'+aX.Weeks[a4].Days[a5].Day+"</div>");a2.append('<div class="entradawantedreservedbg"></div>');}else{if(aZ.DayType!=1){a2.html('<div class="wantedfg">'+aX.Weeks[a4].Days[a5].Day+"</div>");a2.append('<div class="entradawantedbg"></div>');
}}}else{if(a6){if(aZ.DayType!=1){a2.html('<div class="wantedfg">'+aX.Weeks[a4].Days[a5].Day+"</div>");a2.append('<div class="salidawantedbg"></div>');}else{if(aZ.Starts){a2.html('<div class="wantedfg">'+aX.Weeks[a4].Days[a5].Day+"</div>");a2.append('<div class="salidawantedreservedbg"></div>');}}}else{if(!ba){if(aZ.Starts&&!aZ.Ends){a2.html('<div class="wantedfg">'+aX.Weeks[a4].Days[a5].Day+"</div>");a2.append('<div class="reservedentradabg"></div>');}else{if(aZ.Ends&&!aZ.Starts){a2.html('<div class="wantedfg">'+aX.Weeks[a4].Days[a5].Day+"</div>");
a2.append('<div class="reservedsalidabg"></div>');}}}}}a2.unbind("click").click(function(bb){return function(){a0(bb.dayDate);};}(aZ));}else{a2.unbind("click").empty().css("cursor","default").removeClass("wanted").removeClass("reserved");}}aY.fadeTo(0,1);}};var S=jQuery(".calendario",aN);var P=jQuery(".calendario.calendario1",aN);var Q=jQuery(".calendario.calendario2",aN);var R=jQuery(".calendario.calendario3",aN);var ah=new Date();var aj=new Date();var av=new Date();var aw=new Date();var aM=jQuery(".resumenPrecio",aN);
var aq=jQuery(".inforeserva",aN);ah.setHours(0,0,0,0);ah.setDate(ah.getDate()+DarcySoft.ShotWeb.Condominium.Options.MinDiasAntelacion);ah=DarcySoft.ShotWeb.Condominium.findFreeDate(ap,ah,DarcySoft.ShotWeb.Condominium.Options.MinDiasReserva-1);av.setTime(ah.getTime());var aH=DarcySoft.ShotWeb.DateFromParams(aO,"Arrival");if(aH&&aH>ah){ah.setTime(aH.getTime());}aj.setTime(ah.getTime());aj.setDate(ah.getDate()+DarcySoft.ShotWeb.Condominium.Options.MinDiasReserva-1);aw.setTime(aj.getTime());aH=DarcySoft.ShotWeb.DateFromParams(aO,"Departure");
if(aH>aj){aj.setTime(aH.getTime());}ay.setSelectDates(av,ah,aj);var ai=jQuery(".fechaseleccionada",aN);var ak=jQuery(".fechaseleccionada",aN);var aD=[];var N=function(){var a7=Math.floor((aj.getTime()-ah.getTime())/(1000*3600*24));jQuery(".diasreserva",aN).html(a7);jQuery(".diallegada",aN).html(ah.toLocaleDateString());jQuery(".diasalida",aN).html(aj.toLocaleDateString());var a4=DarcySoft.ShotWeb.Condominium.checkReservationConflict(ap,ah,aj);var a3=jQuery(".confirmarBtn",aN);a3.unbind("click");a3.hide();
if(a4){jQuery(".conflicto",aN).show();jQuery(".precioTotal",aN).html("?");jQuery(".precioPersonaNoche",aN).html("?");aM.slideUp();aq.slideUp();jQuery(".userInfo",aN).hide();}else{jQuery(".conflicto",aN).hide();aq.fadeIn();var bh=q.ServiciosConocidos;var bb=false;var a9=false;var ba=false;jQuery(".iconoServicio",aN).hide();if(M.Servicios){for(var bc=0;bc<M.Servicios.length;bc++){if(M.Servicios[bc].Id==bh.Parking){bb=true;}if(M.Servicios[bc].Id==bh.Cuna){a9=true;}if(M.Servicios[bc].Id==bh.AlojamientoMascota){ba=true;
}jQuery(".iconoServicio.s"+M.Servicios[bc].Id,aN).show();}}jQuery(".iconosServiciosBG",aN).css("height",jQuery(".iconosServiciosContainer",aN).height()+"px");if(bb){L.removeAttr("disabled");}else{L.attr("disabled","disabled");}if(a9){ac.removeAttr("disabled");}else{ac.attr("disabled","disabled");}if(ba){K.removeAttr("disabled");}else{K.attr("disabled","disabled");}var aX=parseInt(aA.val(),10);var bf=parseInt(aC.val(),10);var a1=parseInt(aB.val(),10);var a5=ac.is(":checked");var bl=aQ.is(":checked");
var a8=ag.is(":checked");var aZ=K.is(":checked");var a0=L.is(":checked");var bo=aR.val();var be=at.val();var bg;var bj=[];if(a5){bj.push(bh.Cuna);}if(bl){bj.push(bh.SillitaBebe);}if(a8){bj.push(bh.EnseresMascota);}if(aZ){bj.push(bh.AlojamientoMascota);}if(a0){bj.push(bh.Parking);}if(bo==1){bj.push(bh.TrasladoAeropuertoIda);}else{if(bo==2){bj.push(bh.TrasladoAeropuertoVuelta);}else{if(bo==3){bj.push(bh.TrasladoAeropuertoIdaVuelta);}}}if(be==1){bj.push(bh.LimpiezaDiaria);}else{if(be==2){bj.push(bh.LimpiezaSemanal);
}}bg=DarcySoft.ShotWeb.Condominium.calculaPrecioReserva(ap,ah,aj,aX,bf,a1,bj,aD);if(an&&an.onCalculaReserva){an.onCalculaReserva(bg);}if(bg){jQuery(".infoAntelacion",aN).show();var bm=jQuery(".SolicitudInformacionContainer",aN);if(bm.length>0){jQuery(".ConfirmaReservaContainer",aN).show();bm.hide();}ah=bg.FechaEntrada;aj=bg.FechaSalida;jQuery(".campoMinAntelacion",aN).html(bg.MinAntelacion);jQuery(".campoMinNoches",aN).html(bg.MinNoches);ay.updateDateSelectValues(ah,aj);a3.show();if(bg.AhorroOfertas==0){jQuery(".ofertaContainer.activa",aN).hide();
jQuery(".ofertaContainer.inactiva",aN).show();jQuery(".ofertaActual .ahorroOferta",aN).hide();}else{var aY="";if(bg.AhorroOfertas<100){aY="&nbsp;&nbsp;&nbsp;";}else{if(bg.AhorroOfertas<1000){aY="&nbsp;";}}jQuery(".ahorroOferta",aN).html(aY+bg.AhorroOfertas);jQuery(".ofertaActual .ahorroOferta",aN).show();jQuery(".ofertaContainer.inactiva",aN).hide();jQuery(".ofertaContainer.activa",aN).show();var a6=jQuery(".desgloseOfertas",aN);a6.empty();if(bg.Ofertas){for(var bc=0;bc<bg.Ofertas.length;bc++){if(bg.Ofertas[bc].DescuentoPrecio>0){a6.append("<li>"+bg.Ofertas[bc].Nombre+" ("+Math.round(bg.Ofertas[bc].DescuentoPrecio*100)/100+"€)</li>");
}}}}jQuery(".precioTotal",aN).html(bg.PrecioTotal);jQuery(".campoPagoAhora",aN).html(bg.PagoAhora);jQuery(".campoPagoEntrada",aN).html(bg.PagoEntrada);jQuery(".campoFianza",aN).html(bg.Fianza);if(bg.Fianza){jQuery(".liFianza",aN).show();}else{jQuery(".liFianza",aN).hide();}aM.find(".sumaHuespedes").html(bg.Adultos);if(bf+a1>0){aM.find(".menoresGratis").show().find("span").html(bg.MenoresGratis+bg.Bebes);}else{aM.find(".menoresGratis").hide();}aM.find(".totalNoches").html(bg.TotalNoches);aM.find(".diasreserva").html(bg.TotalNoches);
var bi=aM.find(".ServiciosSolicitados>ul");bi.empty();var bk;for(bk=0;bk<bg.Servicios.length;bk++){bi.append("<li>"+' <div class="valorResumenReserva">'+bg.Servicios[bk].Servicio.Precio+" € x "+bg.Servicios[bk].Multiplicador+" = "+bg.Servicios[bk].PrecioTotal+" €</div>"+'<span class="campoServicioResumenReserva">'+bg.Servicios[bk].Servicio.Nombre+":</span>"+"</li>");}if(bg.Servicios.length==0){bi.hide();aM.find(".ServiciosSolicitados").hide();}else{bi.show();aM.find(".ServiciosSolicitados").show();
}jQuery(".precioPersonaNoche",aN).html(bg.PrecioPersonaNoche);aM.find(".precioTotalEstancia").html(bg.PrecioEstancia);aM.fadeIn();var bn=jQuery("input[name='formaPagoRadio']",aN);if(!DarcySoft.ShotWeb.User.loggedIn&&jQuery("input[name='formaPagoRadio']:checked",aN).val()!="telefono"){jQuery(".userInfo",aN).show();}if(jQuery("input[name='formaPagoRadio']:checked",aN).val()=="telefono"){a3.hide();}var a2=jQuery(".closetextoPagoTransferenciaBtn",aN);a2.unbind("click");a2.click(function(){jQuery(".textoPagoTransferencia",aN).hide();
});bn.unbind("change");bn.change(function(bp){jQuery(".textoPagoTransferencia",aN).hide();if(bp.target.value=="telefono"){a3.hide();jQuery(".textoPagoTelefono",aN).show();jQuery(".userInfo",aN).hide();}else{jQuery(".textoPagoTelefono",aN).hide();if(bg){a3.show();}if(!DarcySoft.ShotWeb.User.loggedIn){jQuery(".userInfo",aN).show();}}});a3.unbind("click");a3.click(function(){if(!jQuery(".condicionesaceptadascheck",aN).is(":checked")){alert(Language.DebeAceptarCondiciones);return;}var bq=ae.val();var bv=jQuery(".Password",aN).val();
var by=jQuery("input[name='formaPagoRadio']:checked",aN).val();var bz=1;if(by=="tpv"){bz=1;}else{if(by=="transferencia"){bz=0;}else{return;}}if(!DarcySoft.ShotWeb.User.loggedIn){if(!DarcySoft.ShotWeb.availableEmail(bq)){DarcySoft.ShotWeb.Login.login(bq,bv,true);}else{var br=jQuery(".FirstName",aN).val();var bu=jQuery(".LastName",aN).val();var bA=jQuery(".UserName",aN).val();if(!bA){bA="";}if(!bu){bu="";}var bw=DarcySoft.ShotWeb.registerUser(bA,"",bq,br,bu,jQuery(".ValidationText",aN).val(),aT,function(bB){if(bB.Error){jQuery(".loginError",aN).html("Registration Error: "+bB.ErrorMessage);
}});if(bw){DarcySoft.ShotWeb.Login.login(bq,bw.autoPassword);}}}if(!DarcySoft.ShotWeb.User.loggedIn){jQuery(".userInfo",aN).show();jQuery(".welcomeMessage",aN).hide();jQuery(".loginError",aN).show();am();}else{jQuery(".loginError",aN).hide();jQuery(".welcomeMessage",aN).html(Language.Bienvenido+" "+DarcySoft.ShotWeb.User.Info.DisplayName);jQuery(".welcomeMessage",aN).show();jQuery(".userInfo",aN).hide();var bt=DarcySoft.ShotWeb.Condominium.confirmaReserva(bg,bz,null,jQuery(".PhoneInput",aN).val());
if(bt){var bx=jQuery(".saveBookingInfoDiv",aN);var bs=bx.length>0;var bp=function(){bx.hide();if(by=="tpv"){a3.unbind("click");var bC=document.createElement("div");jQuery(bC).html(DarcySoft.ShotWeb.Condominium.payReservaTPV(bt));aM.append(bC);jQuery(bC).find("form").attr("target","tpvDiv");jQuery(bC).find("form").submit();var bB=[ap,"BookingID_"+bt].concat(DarcySoft.ShotWeb.ParamsToPreserve(aO)).join("/");w(bB,!bs);}else{if(by=="transferencia"){jQuery(".textoPagoTransferencia",aN).show();}else{aK(true);
N();}}};if(bs){B.init.call(aN,bt,bp);bx.show();}else{bp();}}}});}else{jQuery(".infoAntelacion",aN).hide();var bm=jQuery(".SolicitudInformacionContainer",aN);if(bm.length>0){jQuery(".ConfirmaReservaContainer",aN).hide();bm.show();var bd=bm.find(".solicitaInfoBtn");bd.unbind("click");bd.click(function(){DarcySoft.ShotWeb.Condominium.solicitaInfoReserva(ap,ah,aj,aX,bf,a1,bj,aD,bm.find(".NombreSolicidutContacto").val(),bm.find(".AsuntoSolicidutContacto").val(),bm.find(".PhoneSolicitudInformacion").val(),bm.find(".EMailSolicitudInformacion").val(),bm.find(".ComentarioSolicidutContacto").val(),bm.find(".ValidationTextSolicidutContact").val(),aT,function(bp){if(bp.Error){jQuery(".solicitudEnviada",aN).hide();
bm.show();bm.find(".solicitudError").html("Error: "+bp.ErrorMessage).show();}else{bm.hide();bm.find(".solicitudError").hide();jQuery(".solicitudEnviada",aN).show();}});am();});}else{aM.hide();jQuery(".confirmarBtn",aN).hide();jQuery(".userInfo",aN).hide();jQuery(".precioTotal",aN).html("?");jQuery(".precioPersonaNoche",aN).html("?");}}}};var az=function(aX,aY,aZ){ax++;if(ax>12){ax=1;aV++;}aK();};var aL=function(aX,aY,aZ){ax--;if(ax<1){ax=12;aV--;}aK();};S.find(".next").unbind("click").click(function(){az();
});S.find(".prev").unbind("click").click(function(){aL();});var aP=true;var U=function(aX){if(aP){aP=!T(aX);}else{aP=V(aX);}};var T=function(aX){if(aX>=av){ah.setTime(aX.getTime());aw.setTime(ah.getTime());aw.setDate(aw.getDate()+DarcySoft.ShotWeb.Condominium.Options.MinDiasReserva-1);aj.setTime(aw);ay.updateDateSelectValues(ah,aj);if(ah.getMonth()+1>ax+2||ah.getFullYear()!=aV||ah.getMonth()<ax-2){ax=ah.getMonth()+1;aV=ah.getFullYear();}var aY=DarcySoft.ServerDate(ah);var aZ=DarcySoft.ServerDate(aj);
DarcySoft.ShotWeb.Sections.updateSectionParameter("Arrival",aY.getFullYear()+"_"+(aY.getMonth()+1)+"_"+aY.getDate());DarcySoft.ShotWeb.Sections.updateSectionParameter("Departure",aZ.getFullYear()+"_"+(aZ.getMonth()+1)+"_"+aZ.getDate());aK();N();return true;}else{return T(av);}};var V=function(aX){if(aX>=aw){aj.setTime(aX.getTime());ay.updateDateSelectValues(ah,aj);aK();N();var aY=DarcySoft.ServerDate(aj);DarcySoft.ShotWeb.Sections.updateSectionParameter("Departure",aY.getFullYear()+"_"+(aY.getMonth()+1)+"_"+aY.getDate());
return true;}else{return !T(aX);}};var M=DarcySoft.ShotWeb.Condominium.getApartamento(ap);if(!M){DarcySoft.ShotWeb.Sections.goHome();return;}jQuery(".campoNombre",aN).html(M.Nombre);if(M.TipoLegal==1){jQuery(".tipoLegal",aN).html(Language.ViviendaVacacional);}else{jQuery(".tipoLegal",aN).html(Language.Apartamento);}var aA=aq.find(".campoNumeroAdultos");var aC=aq.find(".campoNumeroNinos");var aB=aq.find(".campoNumeroNinosGratis");var ac=aq.find(".inputCuna");var aQ=aq.find(".inputSillitaBebe");var ag=aq.find(".inputEnseresMascota");
var K=aq.find(".inputAlojamientoMascota");var aR=aq.find(".selectTraslados");var at=aq.find(".selectLimpieza");var L=aq.find(".inputAparcamiento");var ao;aA.empty();for(ao=1;ao<=(M.Capacidad+M.CapacidadSupletorias);ao++){aA.append("<option>"+ao+"</option>");}var aI=DarcySoft.ShotWeb.IntegerFromParams(aO,"People");if(aI&&(aI<=M.Capacidad+M.CapacidadSupletorias)){aA.val(aI);}aC.empty();var au=2;if(DarcySoft.ShotWeb.CondominiumUI.InitData.SinLimiteMenores){au=M.Capacidad+M.CapacidadSupletorias-parseInt(aA.val(),10);
}for(ao=0;ao<=au;ao++){aC.append("<option>"+ao+"</option>");}aA.change(function(){var aZ=parseInt(aC.val(),10);var aX=parseInt(aA.val(),10);aC.empty();var aY=2;if(DarcySoft.ShotWeb.CondominiumUI.InitData.SinLimiteMenores){aY=M.Capacidad+M.CapacidadSupletorias-aX;}if(aY>M.Capacidad+M.CapacidadSupletorias-aX){aY=M.Capacidad+M.CapacidadSupletorias-aX;}for(ao=0;ao<=aY;ao++){aC.append("<option>"+ao+"</option>");}if(aZ>aY){aZ=aY;}aC.val(aZ);N();});aA.change();aC.change(N);aB.change(N);ac.click(N);aQ.click(N);
ag.click(N);K.click(N);aR.change(N);at.change(N);L.click(N);var ax=ah.getMonth()+1;var aV=ah.getFullYear();var O;var aK=function(aX){setTimeout(function(){var aZ=aV;var aY=ax;P.fadeTo(0,0.5);Q.fadeTo(0,0.5);R.fadeTo(0,0.5);DarcySoft.ShotWeb.Condominium.getCalendarMonthViews(ap,aZ,aY,3,function(a0){aJ(a0[0],P,U);P.fadeTo("normal",1);aJ(a0[1],Q,U);Q.fadeTo("normal",1);aJ(a0[2],R,U);R.fadeTo("normal",1);},aX);},1);};var an={cambiaEntrada:T,cambiaSalida:V};if(aE){an.onCalculaReserva=aE;}aK();N();var ad=jQuery("select.selectEdad",aN);
ad.empty();if(q.EdadEsYear){var aW=new Date().getFullYear()-18;for(var aU=aW;aU>aW-82;aU--){ad.append("<option>"+aU+"</option>");}}else{for(var aU=18;aU<=80;aU++){ad.append("<option>"+aU+"</option>");}}var ae=jQuery(".EMail",aN);var af=jQuery(".EMailRepeat",aN);var W;var al=false;var Y=function(){if(af.length>0){if(af.val()!=ae.val()){af.css("border-color","Red");}else{af.css("border-color","");}}};var ar;var aa=function(){if(DarcySoft.ShotWeb.User.loggedIn){jQuery(".userInfo",aN).hide();}else{var aX=ae.val();
if(aX&&ar!=aX&&!DarcySoft.ShotWeb.availableEmail(aX)){jQuery(".userInfo",aN).find(".newUser").hide();jQuery(".userInfo",aN).find(".existingUser").show();if(!al){al=true;jQuery(".Password",aN).focus();}}else{al=false;jQuery(".userInfo",aN).find(".newUser").show();jQuery(".userInfo",aN).find(".existingUser").hide();Y();}jQuery(".userInfo",aN).show();}};var ab=function(){aa();W=setTimeout(ab,2000);};DarcySoft.ShotWeb.Login.isLoggedInSync();aa();ae.focus(ab);ae.blur(function(){clearTimeout(W);aa();});
var Z;var X=function(){Y();Z=setTimeout(X,750);};af.focus(X);af.blur(function(){clearTimeout(Z);});var aT;var aS;var am=function(){};aS=jQuery(".validationImg",aN);am=DarcySoft.ShotWeb.ValidationImage.Assign(aS,function(aX){aT=aX;}).refresh;if(DarcySoft.ShotWeb.User.Info.FirstName){jQuery(".FirstName",aN).val(DarcySoft.ShotWeb.User.Info.FirstName);}if(DarcySoft.ShotWeb.User.Info.LastName){jQuery(".LastName",aN).val(DarcySoft.ShotWeb.User.Info.LastName);}return an;};return{init:J};}();var h=function(){var J=function(K){var M=this;
var L=function(N){jQuery(".campoNombre",M).html(N.Nombre);DarcySoft.ShotWeb.Condominium.getDescripcionLarga(N.Id,function(O){jQuery(".campoDescripcion",M).html(O);});};if(typeof K=="object"){L(K);}else{L(DarcySoft.ShotWeb.Condominium.getApartamento(K));}};return{init:J};}();var k=function(){var J=function(K){var N=this;var M=function(){var Q=jQuery(".campoGaleria img",N);var R=0;for(var P=0;P<Q.length;P++){R+=10+Q.eq(P).width();}jQuery(".campoGaleria",N).width(R);};var L=function(T){var S;var U;var P=function(X){var W=X.length-X.lastIndexOf(".");
return X.substr(0,X.length-W)+"b"+X.substr(X.length-W);};jQuery(".ApartamentoMiniatura.Reserva .campoImgPortada",N).unbind("click");var V=jQuery(".ImagenSeleccionadaBig",N).length>0;var Q=function(W,Y){var X;return function(){X=Y;var ah=jQuery(this).offset();var al=DarcySoft.ShotWeb.getViewPort();var ae=P(this.src);var Z=new Image;var ad=new Image;ad.src=this.src;ad.width=this.width;ad.height=this.height;var am=(ah.top-20-jQuery(document).scrollTop());var ac=jQuery("#bigImg");ac.css({left:ah.left+"px",top:am+"px",height:(this.height+38)+"px",width:this.width+"px"});
if(al.height<am+this.height+40){ac.css({top:al.height-this.height-40+"px"});}ac.find("img").replaceWith(ad);jQuery("#protectBg").slideDown(function(){ac.fadeIn("slow");});Z.onload=function(){var an=function(){if(!Z.width){setTimeout(an,100);}else{var ao=(al.width-Z.width-20)/2;var ap=(al.height-Z.height-20)/2;ac.animate({left:ao+"px",top:ap+"px",width:(Z.width)+"px",height:(Z.height+38)+"px"},1000);jQuery(ad).animate({width:Z.width+"px",height:Z.height+"px"},1000,function(){ac.find("img").replaceWith(Z);
});}};an();};Z.src=ae;var ak=function(){var ao=new Image();var an=false;ao.onload=function(){an=true;ac.find("img").replaceWith(ao);Z=ao;jQuery(Z).click(ag);var ap=(al.width-Z.width-20)/2;var aq=(al.height-Z.height-20)/2;ac.animate({left:ap+"px",top:aq+"px",width:(Z.width)+"px",height:(Z.height+38)+"px"},500);};ao.src=P(W[X]);};var ag=function(){if(X+1<W.length){X++;}else{X=0;}ak();};var ab=function(){ac.fadeOut(function(){jQuery("#protectBg").hide();});};var aj=function(){if(X>0){X--;}else{X=W.length-1;
}ak();};jQuery(Z).click(ag);var af=jQuery(".bigImgNext");af.unbind("click");var aa=jQuery(".bigImgClose");aa.unbind("click");var ai=jQuery(".bigImgPrev");ai.unbind("click");jQuery("#protectBg").unbind("click");jQuery("#protectBg").click(ab);jQuery(ad).click(ag);af.click(ag);aa.click(ab);ai.click(aj);};};var R=function(W,Y){var X;return function(){X=Y;var ac=P(this.src);var Z=new Image;var aa=jQuery(".ImagenSeleccionadaBig");var ab=jQuery(".ImagenSeleccionadaBig2");if(ab.length==0){Z.onload=function(){aa.fadeOut(function(){aa.find("img").attr("src",ac);
aa.fadeIn();});};Z.src=ac;aa.fadeOut();}else{Z.onload=function(){ab.find("img").attr("src",ac);ab.fadeIn(function(){ab.removeClass("ImagenSeleccionadaBig2");ab.addClass("ImagenSeleccionadaBig");aa.removeClass("ImagenSeleccionadaBig");aa.addClass("ImagenSeleccionadaBig2");});};Z.src=ac;aa.fadeOut();}};};jQuery(".campoGaleria",N).empty();for(S=0;S<T.length;S++){U=new Image();U.onload=M;U.src=T[S];jQuery(".campoGaleria",N).append(U);setTimeout(M,500);if(!V){jQuery(U).click(Q(T,S));if(S==0){jQuery(".ApartamentoMiniatura.Reserva .campoImgPortada").click(function(W){return function(){Q.apply(W);
};}(U));}}else{jQuery(U).click(R(T,S));}}};var O=jQuery(".galeriaScroller",N);jQuery(".galeriaSiguienteBtn",N).click(function(){O.animate({scrollLeft:O.scrollLeft()+250},750);});jQuery(".galeriaAnteriorBtn",N).click(function(){O.animate({scrollLeft:O.scrollLeft()-250},750);});if(typeof K=="object"){L(K);}else{DarcySoft.ShotWeb.Condominium.getImgsApartamento(K,"",L);}};return{init:J};}();return{init:p,showLogin:E};};
