;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}
$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
options={};options[key]=value;}
$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element
[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+
this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}
(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3 class="tooltip-text"></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);
function esDigito(sChr){var sCod=sChr.charCodeAt(0);return((sCod>47)&&(sCod<58));}
function valSep(oTxt){var bOk=false;bOk=bOk||((oTxt.charAt(2)=="-")&&(oTxt.charAt(5)=="-"));bOk=bOk||((oTxt.charAt(2)=="/")&&(oTxt.charAt(5)=="/"));return bOk;}
function finMes(oTxt){var nMes=parseInt(oTxt.substr(3,2),10);var nAno=parseInt(oTxt.substr(6),10);var nRes=0;switch(nMes){case 1:nRes=31;break;case 2:nRes=28;break;case 3:nRes=31;break;case 4:nRes=30;break;case 5:nRes=31;break;case 6:nRes=30;break;case 7:nRes=31;break;case 8:nRes=31;break;case 9:nRes=30;break;case 10:nRes=31;break;case 11:nRes=30;break;case 12:nRes=31;break;}
return nRes+(((nMes==2)&&(nAno%4)==0)?1:0);}
function valDia(oTxt){var bOk=false;var nDia=parseInt(oTxt.substr(0,2),10);bOk=bOk||((nDia>=1)&&(nDia<=finMes(oTxt)));return bOk;}
function valMes(oTxt){var bOk=false;var nMes=parseInt(oTxt.substr(3,2),10);bOk=bOk||((nMes>=1)&&(nMes<=12));return bOk;}
function valAno(oTxt){var bOk=true;var nAno=oTxt.substr(6);bOk=bOk&&((nAno.length==2)||(nAno.length==4));if(bOk){for(var i=0;i<nAno.length;i++){bOk=bOk&&esDigito(nAno.charAt(i));}}
return bOk;}
function valFecha(oTxt){var bOk=true;if(oTxt!=""){bOk=bOk&&(valAno(oTxt));bOk=bOk&&(valMes(oTxt));bOk=bOk&&(valDia(oTxt));bOk=bOk&&(valSep(oTxt));return bOk;}}
function fechaMayorQue(inicio,fin){var bRes=false;var sDia0=inicio.substr(0,2);var sMes0=inicio.substr(3,2);var sAno0=inicio.substr(6,4);var sDia1=fin.substr(0,2);var sMes1=fin.substr(3,2);var sAno1=fin.substr(6,4);if(sAno0>sAno1)bRes=true;else{if(sAno0==sAno1){if(sMes0>sMes1)bRes=true;else{if(sMes0==sMes1)
if(sDia0>sDia1)bRes=true;}}}
return bRes;}
function valFechas(idia,imes,iany,fdia,fmes,fany){var bOk=false;var inicio=idia+"/"+imes+"/"+iany;var fin=fdia+"/"+fmes+"/"+fany;if(valFecha(inicio)){if(valFecha(fin)){if(fechaMayorQue(fin,inicio)){bOk=true;return true;}else{alert("Rango inválido");return false;}}else{alert("Fecha de salida inválida");return false;}}else{alert("Fecha de llegada inválida");return false;}}
function valFechasLT(idia,imes,iany,fdia,fmes,fany){var bOk=false;var inicio=idia+"/"+imes+"/"+iany;var fin=fdia+"/"+fmes+"/"+fany;var inicio2=iany+"/"+imes+"/"+idia;var fin2=fany+"/"+fmes+"/"+fdia;if(valFecha(inicio)){if(valFecha(fin)){var start=new Date(inicio2);var end=new Date(fin2);start.setDate(start.getDate()+60);if(end>=start){return true;}else{return false;}}else{alert("Fecha de salida inválida");return false;}}else{alert("Fecha de llegada inválida");return false;}}
$(document).ready
(function(){$.getScript(aa_config.STATIC_URL+'/js/ui.datepicker.js',function(){if(aa_config.LANG!='en'){$.getScript(aa_config.STATIC_URL+'/js/ui/i18n/ui.datepicker-'+aa_config.LANG+'.js',function(){loadDatesAP(aa_config.LANG);});}else{loadDatesAP(aa_config.LANG);}});});function cambio(type){if(type=='AP'){$('#pisos,#list-aloja').show();$('#hoteles').hide();$('#varAL_TYPE,#parAL_TYPE,#bisAL_TYPE').val(50);$('#ACTIVETYPE').val(10);}else if(type=='HO'){$('#pisos,#list-aloja').hide();$('#hoteles').show();$('#varAL_TYPE,#parAL_TYPE,#bisAL_TYPE').val(20);$('#ACTIVETYPE').val(20);}
else if(type=='BB'){$('#pisos,#list-aloja').show();$('#hoteles').hide();$('#varAL_TYPE,#parAL_TYPE,#bisAL_TYPE').val(30);$('#ACTIVETYPE').val(30);}}
function searchAlo(message)
{setSearchCacheID();$('#varINI_TOTAL').val('');if(valFechas($('#varR_IDIA').val(),$('#varR_IMES').val(),$('#varR_IANY').val(),$('#varR_FDIA').val(),$('#varR_FMES').val(),$('#varR_FANY').val()))
{var varZONE=$('#varM_ZONE');$('#parCTLPag').val('');$('#parCTLTPag').val('');$('#parCTLOrder').val('');$('#parCTLTOrder').val('');var activo=$('#ACTIVETYPE').val();var tipoProd=$('#varAL_TYPE');varZONEA=$('#M_ZONEA');varZONEA=varZONEA.val();varZONEHH=$('#M_ZONEHH');varZONEHH=varZONEHH.val()
if(activo=='<50'){if($('#varAL_TYPE').val()=='10'){tipoProd.val('50');varZONE.val(varZONEA);}else if($('#varAL_TYPE').val()=='30'){tipoProd.val('30');}else{varZONE.val(varZONEA);ex}}else{if(activo=='40'){varZONE.val(varZONEHH);}
tipoProd.val(activo);}
showWaiter();$("pisos").css({'display':'none'});doSubmit(message);}}
function searchHot(message)
{setSearchCacheID();if(valFechas($('#varR_IDIA').val(),$('#varR_IMES').val(),$('#varR_IANY').val(),$('#varR_FDIA').val(),$('#varR_FMES').val(),$('#varR_FANY').val()))
{$('#varR_HIDIA').val($('#varR_IDIA').val());$('#varR_HIMES').val($('#varR_IMES').val());$('#varR_HIANY').val($('#varR_IANY').val());$('#varR_HFDIA').val($('#varR_FDIA').val());$('#varR_HFMES').val($('#varR_FMES').val());$('#varR_HFANY').val($('#varR_FANY').val());document.OH.parCTLPag.value='';document.OH.parCTLTPag.value='';document.OH.parCTLOrder.value='';document.OH.parCTLTOrder.value='';$('#varAL_TYPE').val($('#ACTIVETYPE').val());showWaiter();doSubmit(message);}}
function searchZona(val,message,container)
{var valor=val.val();$('#varM_ZONE').val(valor);reload('.CM'+message,container,'no');}
function searchZonaAlo(ent){var divCiudad=$('#APTCIUDAD');if(ent.val()!='BAR'){divCiudad.css({'display':'block'});}
if(ent.val()!='BAR'){searchZona(ent,'BUSCADORALO','distritoApartamento');$('#opt-barrio').show();}else{$('#opt-barrio').hide();$('#distritoApartamento').html();}}
function searchZonaHH(ent){var divCiudad=$('#APTCIUDAD');if(ent.val()=='BAR'){divCiudad.css({'display':'none'});}else{divCiudad.css({'display':'block'});}
searchZona(ent,'BUSCADORHH','distritoApartamento');}
function searchZonaH(ent){var divCiudad=$('#HOTCIUDAD');if(ent.val()=='BAR'){divCiudad.css({'display':'none'});}else{divCiudad.css({'display':'block'});}
searchZona(ent,'BUSCADORH','distritosHotel');}
jQuery.fn.highlightFade=function(settings){var o=(settings&&settings.constructor==String)?{start:settings}:settings||{};var d=jQuery.highlightFade.defaults;var i=o['interval']||d['interval'];var a=o['attr']||d['attr'];var ts={'linear':function(s,e,t,c){return parseInt(s+(c/t)*(e-s));},'sinusoidal':function(s,e,t,c){return parseInt(s+Math.sin(((c/t)*90)*(Math.PI/180))*(e-s));},'exponential':function(s,e,t,c){return parseInt(s+(Math.pow(c/t,2))*(e-s));}};var t=(o['iterator']&&o['iterator'].constructor==Function)?o['iterator']:ts[o['iterator']]||ts[d['iterator']]||ts['linear'];if(d['iterator']&&d['iterator'].constructor==Function)t=d['iterator'];return this.each(function(){if(!this.highlighting)this.highlighting={};var e=(this.highlighting[a])?this.highlighting[a].end:jQuery.highlightFade.getBaseValue(this,a)||[255,255,255];var c=jQuery.highlightFade.getRGB(o['start']||o['colour']||o['color']||d['start']||[255,255,128]);var s=jQuery.speed(o['speed']||d['speed']);var r=o['final']||(this.highlighting[a]&&this.highlighting[a].orig)?this.highlighting[a].orig:jQuery.curCSS(this,a);if(o['end']||d['end'])r=jQuery.highlightFade.asRGBString(e=jQuery.highlightFade.getRGB(o['end']||d['end']));if(typeof o['final']!='undefined')r=o['final'];if(this.highlighting[a]&&this.highlighting[a].timer)window.clearInterval(this.highlighting[a].timer);this.highlighting[a]={steps:((s.duration)/i),interval:i,currentStep:0,start:c,end:e,orig:r,attr:a};jQuery.highlightFade(this,a,o['complete'],t);});};jQuery.highlightFade=function(e,a,o,t){e.highlighting[a].timer=window.setInterval(function(){var newR=t(e.highlighting[a].start[0],e.highlighting[a].end[0],e.highlighting[a].steps,e.highlighting[a].currentStep);var newG=t(e.highlighting[a].start[1],e.highlighting[a].end[1],e.highlighting[a].steps,e.highlighting[a].currentStep);var newB=t(e.highlighting[a].start[2],e.highlighting[a].end[2],e.highlighting[a].steps,e.highlighting[a].currentStep);jQuery(e).css(a,jQuery.highlightFade.asRGBString([newR,newG,newB]));if(e.highlighting[a].currentStep++>=e.highlighting[a].steps){jQuery(e).css(a,e.highlighting[a].orig||'');window.clearInterval(e.highlighting[a].timer);e.highlighting[a]=null;if(o&&o.constructor==Function)o.call(e);}},e.highlighting[a].interval);};jQuery.highlightFade.defaults={start:[255,255,128],interval:50,speed:400,attr:'backgroundColor'};jQuery.highlightFade.getRGB=function(c,d){var result;if(c&&c.constructor==Array&&c.length==3)return c;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];else if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];else if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))
return[parseInt("0x"+result[1]),parseInt("0x"+result[2]),parseInt("0x"+result[3])];else if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))
return[parseInt("0x"+result[1]+result[1]),parseInt("0x"+result[2]+result[2]),parseInt("0x"+result[3]+result[3])];else
return jQuery.highlightFade.checkColorName(c)||d||null;};jQuery.highlightFade.asRGBString=function(a){return"rgb("+a.join(",")+")";};jQuery.highlightFade.getBaseValue=function(e,a,b){var s,t;b=b||false;t=a=a||jQuery.highlightFade.defaults['attr'];do{s=jQuery(e).css(t||'backgroundColor');if((s!=''&&s!='transparent')||(e.tagName.toLowerCase()=="body")||(!b&&e.highlighting&&e.highlighting[a]&&e.highlighting[a].end))break;t=false;}while(e=e.parentNode);if(!b&&e.highlighting&&e.highlighting[a]&&e.highlighting[a].end)s=e.highlighting[a].end;if(s==undefined||s==''||s=='transparent')s=[255,255,255];return jQuery.highlightFade.getRGB(s);};jQuery.highlightFade.checkColorName=function(c){if(!c)return null;switch(c.replace(/^\s*|\s*$/g,'').toLowerCase()){case'aqua':return[0,255,255];case'black':return[0,0,0];case'blue':return[0,0,255];case'fuchsia':return[255,0,255];case'gray':return[128,128,128];case'green':return[0,128,0];case'lime':return[0,255,0];case'maroon':return[128,0,0];case'navy':return[0,0,128];case'olive':return[128,128,0];case'purple':return[128,0,128];case'red':return[255,0,0];case'silver':return[192,192,192];case'teal':return[0,128,128];case'white':return[255,255,255];case'yellow':return[255,255,0];}};