/*!
 * jQuery UI 1.8.6
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function($,undefined){$.ui=$.ui||{};if($.ui.version){return}$.extend($.ui,{version:"1.8.6",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,WINDOWS:91}});$.fn.extend({_focus:$.fn.focus,focus:function(delay,fn){return typeof delay==="number"?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus();if(fn){fn.call(elem)}},delay)}):this._focus.apply(this,arguments)},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},zIndex:function(zIndex){if(zIndex!==undefined){return this.css("zIndex",zIndex)}if(this.length){var elem=$(this[0]),position,value;while(elem.length&&elem[0]!==document){position=elem.css("position");if(position==="absolute"||position==="relative"||position==="fixed"){value=parseInt(elem.css("zIndex"),10);if(!isNaN(value)&&value!==0){return value}}elem=elem.parent()}}return 0},disableSelection:function(){return this.bind(($.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(event){event.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});$.each(["Width","Height"],function(i,name){var side=name==="Width"?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};function reduce(elem,size,border,margin){$.each(side,function(){size-=parseFloat($.curCSS(elem,"padding"+this,true))||0;if(border){size-=parseFloat($.curCSS(elem,"border"+this+"Width",true))||0}if(margin){size-=parseFloat($.curCSS(elem,"margin"+this,true))||0}});return size}$.fn["inner"+name]=function(size){if(size===undefined){return orig["inner"+name].call(this)}return this.each(function(){$(this).css(type,reduce(this,size)+"px")})};$.fn["outer"+name]=function(size,margin){if(typeof size!=="number"){return orig["outer"+name].call(this,size)}return this.each(function(){$(this).css(type,reduce(this,size,true,margin)+"px")})}});function visible(element){return !$(element).parents().andSelf().filter(function(){return $.curCSS(this,"visibility")==="hidden"||$.expr.filters.hidden(this)}).length}$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");if("area"===nodeName){var map=element.parentNode,mapName=map.name,img;if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){return false}img=$("img[usemap=#"+mapName+"]")[0];return !!img&&visible(img)}return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&visible(element)},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});$(function(){var body=document.body,div=body.appendChild(div=document.createElement("div"));$.extend(div.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});$.support.minHeight=div.offsetHeight===100;$.support.selectstart="onselectstart" in div;body.removeChild(div).style.display="none"});$.extend($.ui,{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)}})})(jQuery);(function($,undefined){$.extend($.ui,{datepicker:{version:"1.8.6"}});var PROP_NAME="datepicker";var dpuuid=new Date().getTime();function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger imgCalendario";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Hecho",prevText:"Anterior",nextText:"Siguiente",currentText:"Hoy",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado"],dayNamesShort:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],dayNamesMin:["D","L","M","X","J","V","S"],weekHeader:"Se",dateFormat:"dd/mm/yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst)},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateEventCalendar(inst);this._updateDatepicker(inst);this._updateAlternate(inst)},_updateEventCalendar:function(inst){if(inst.settings.eventlist!=null&&$("#"+inst.settings.eventlist).length>0){$(inst.settings.eventsContainer).click(function(ev){ev.stopImmediatePropagation()});$("#"+inst.settings.eventlist).hide();var eventTable={};var days=$("#"+inst.settings.eventlist+" dt");days.each(function(it){var dt=$(this);var dateText=dt.text();var dayLink=$("a",dt).attr("href");var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),dateText,$.datepicker._getFormatConfig(inst));if(inst.settings.minDate==null){inst.settings.minDate=date}else{if(date<inst.settings.minDate){inst.settings.minDate=date}}if(inst.settings.maxDate==null){inst.settings.maxDate=date}else{if(date>inst.settings.maxDate){inst.settings.maxDate=date}}var formattedDate=$.datepicker.formatDate($.datepicker._get(inst,"dateFormat"),date,$.datepicker._getFormatConfig(inst));var events=[];var categories=[];var dayEvents=dt.nextUntil("dt");dayEvents.each(function(){var event=$(this);var category=event.attr("class");if(jQuery.inArray(category,categories)){categories.push(category)}events.push($(this).html())});eventTable[formattedDate]={categories:categories,events:events,dayLink:dayLink}});inst.settings.eventTable=eventTable}},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){this.uuid+=1;var id="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker()}var date=this._getDateDatepicker(target,true);extendRemove(inst.settings,settings);this._attachments($(target),inst);this._autoSize(inst);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass,inst.dpDiv).add($("td."+$.datepicker._currentClass,inst.dpDiv));if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker()}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(event){$.datepicker.log(event)}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!=inst){$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})};inst.dpDiv.zIndex($(input).zIndex()+1);if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim||!duration){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end().find(".ui-datepicker-mousehover").data(PROP_NAME,inst).hover(this._mouseenterDay,this._mouseleaveDay).end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj[isRTL?"previousSibling":"nextSibling"]}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear){setTimeout(function(){inst.input.focus()},0)}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;var formattedDate=this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear);this._selectDate(id,formattedDate);if(inst.settings.eventTable&&inst.settings.eventTable[formattedDate]){document.location=inst.settings.eventTable[formattedDate].dayLink}},_mouseenterDay:function(){var target=$(this);var inst=$.datepicker._getInst(this);var date=$("span",this).attr("id");$.datepicker.showEvents(date,this,inst)},showEvents:function(date,td,inst){var events=inst.settings.eventTable[date].events;var eventsContainer=$(inst.settings.eventsContainer);eventsContainer.offset({left:"-1000px",top:"0"});eventsContainer.show();var html="";$.each(events,function(it,el){html+=el});$(inst.settings.eventsContent).empty().html(html);var offset=$(td).offset();offset.top+=$(td).height()+inst.settings.eventsContainerOffset;offset.left+=$(td).width()/2-$(eventsContainer).width()/2;$(eventsContainer).appendTo(td).offset(offset)},_mouseleaveDay:function(id,month,year,td){var inst=$.datepicker._getInst(this);$(inst.settings.eventsContainer).hide().appendTo(document.body)},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var size=(match=="@"?14:(match=="!"?20:(match=="y"?4:(match=="o"?3:2))));var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);for(var i=0;i<names.length;i++){if(value.substr(iValue,names[i].length).toLowerCase()==names[i].toLowerCase()){iValue+=names[i].length;return i+1}}throw"Unknown name at position "+iValue};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",(date.getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat");var dates=inst.lastVal=inst.input?inst.input.val():null;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);var dayEvents=null;var eventMarks="";var classMousehover="";var formattedDate=$.datepicker.formatDate($.datepicker._get(inst,"dateFormat"),printDate,$.datepicker._getFormatConfig(inst));if(inst.settings.eventTable){unselectable=true;dayEvents=inst.settings.eventTable[formattedDate];if(dayEvents!=null&&!otherMonth){unselectable=false;classMousehover=" ui-datepicker-mousehover ";var numCategories=dayEvents.categories.length;$.each(dayEvents.categories,function(it,el){var width=Math.ceil(100/numCategories);var left=width*it;eventMarks+='<div class="'+el+'" style="width:'+width+"%;left:"+left+'%"><img class="'+el+'" alt="Tiene '+el+'" src="../images/evento.gif" /></div>'})}}tbody+='<td class="'+classMousehover+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable||dayEvents!=null?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+'><div style="position:relative">'+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" title="'+formattedDate+'" href="#">'+printDate.getDate()+"</a>"))+eventMarks+"</div></td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span>"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8.6";window["DP_jQuery_"+dpuuid]=$})(jQuery);jQuery.extend({__stringPrototype:{JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"},blank:function(s){return/^\s*$/.test(this.s(s)||" ")},camelize:function(s){var a=this.s(s).split("-"),i;s=[a[0]];for(i=1;i<a.length;i++){s.push(a[i].charAt(0).toUpperCase()+a[i].substring(1))}s=s.join("");return this.r(arguments,0,s)},capitalize:function(s){s=this.s(s);s=s.charAt(0).toUpperCase()+s.substring(1).toLowerCase();return this.r(arguments,0,s)},dasherize:function(s){s=this.s(s).split("_").join("-");return this.r(arguments,0,s)},empty:function(s){return this.s(s)===""},endsWith:function(pattern,s){s=this.s(s);var d=s.length-pattern.length;return d>=0&&s.lastIndexOf(pattern)===d},escapeHTML:function(s){s=this.s(s).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return this.r(arguments,0,s)},evalJSON:function(sanitize,s){s=this.s(s);var json=this.unfilterJSON(false,s);try{if(!sanitize||this.isJSON(json)){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+s)},evalScripts:function(s){var scriptTags=this.extractScripts(this.s(s)),results=[];if(scriptTags.length>0){for(var i=0;i<scriptTags.length;i++){results.push(eval(scriptTags[i]))}}return results},extractScripts:function(s){var matchAll=new RegExp(this.ScriptFragment,"img"),matchOne=new RegExp(this.ScriptFragment,"im"),scriptMatches=this.s(s).match(matchAll)||[],scriptTags=[];if(scriptMatches.length>0){for(var i=0;i<scriptMatches.length;i++){scriptTags.push(scriptMatches[i].match(matchOne)[1]||"")}}return scriptTags},gsub:function(pattern,replacement,s){s=this.s(s);if(jQuery.isFunction(replacement)){s=this.sub(pattern,replacement,-1,s)}else{s=s.split(pattern).join(replacement)}return this.r(arguments,2,s)},include:function(pattern,s){return this.s(s).indexOf(pattern)>-1},inspect:function(useDoubleQuotes,s){s=this.s(s);var escapedString;try{escapedString=this.sub(/[\x00-\x1f\\]/,function(match){var character=jQuery.__stringPrototype.specialChar[match[0]];return character?character:"\\u00"+match[0].charCodeAt().toPaddedString(2,16)},-1,s)}catch(e){escapedString=s}s=(useDoubleQuotes)?'"'+escapedString.replace(/"/g,'\\"')+'"':"'"+escapedString.replace(/'/g,"\\'")+"'";return this.r(arguments,1,s)},interpolate:function(obj,pattern,s){s=this.s(s);if(!pattern){pattern=/(\#\{\s*(\w+)\s*\})/}var gpattern=new RegExp(pattern.source,"g");var matches=s.match(gpattern),i;for(i=0;i<matches.length;i++){s=s.replace(matches[i],obj[matches[i].match(pattern)[2]])}return this.r(arguments,2,s)},isJSON:function(s){s=this.s(s);if(this.blank(s)){return false}s=s.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(s)},scan:function(pattern,replacement,s){s=this.s(s);this.sub(pattern,replacement,-1,s);return this.r(arguments,2,s)},startsWith:function(pattern,s){return this.s(s).indexOf(pattern)===0},strip:function(s){s=jQuery.trim(this.s(s));return this.r(arguments,0,s)},stripScripts:function(s){s=this.s(s).replace(new RegExp(this.ScriptFragment,"img"),"");return this.r(arguments,0,s)},stripTags:function(s){s=this.s(s).replace(/<\/?[^>]+>/gi,"");return this.r(arguments,0,s)},sub:function(pattern,replacement,count,s){s=this.s(s);if(pattern.source&&!pattern.global){var patternMods=(pattern.ignoreCase)?"ig":"g";patternMods+=(pattern.multiline)?"m":"";pattern=new RegExp(pattern.source,patternMods)}var sarray=s.split(pattern),matches=s.match(pattern);if(jQuery.browser.msie){if(s.indexOf(matches[0])==0){sarray.unshift("")}if(s.lastIndexOf(matches[matches.length-1])==s.length-matches[matches.length-1].length){sarray.push("")}}count=(count<0)?(sarray.length-1):count||1;s=sarray[0];for(var i=1;i<sarray.length;i++){if(i<=count){if(jQuery.isFunction(replacement)){s+=replacement(matches[i-1]||matches)+sarray[i]}else{s+=replacement+sarray[i]}}else{s+=(matches[i-1]||matches)+sarray[i]}}return this.r(arguments,3,s)},succ:function(s){s=this.s(s);s=s.slice(0,s.length-1)+String.fromCharCode(s.charCodeAt(s.length-1)+1);return this.r(arguments,0,s)},times:function(count,s){s=this.s(s);var newS="";for(var i=0;i<count;i++){newS+=s}return this.r(arguments,1,newS)},toJSON:function(s){return this.r(arguments,0,this.inspect(true,this.s(s)))},toQueryParams:function(separator,s){s=this.s(s);var paramsList=s.substring(s.indexOf("?")+1).split("#")[0].split(separator||"&"),params={},i,key,value,pair;for(i=0;i<paramsList.length;i++){pair=paramsList[i].split("=");key=decodeURIComponent(pair[0]);value=(pair[1])?decodeURIComponent(pair[1]):undefined;if(params[key]){if(typeof params[key]=="string"){params[key]=[params[key]]}params[key].push(value)}else{params[key]=value}}return params},truncate:function(length,truncation,s){s=this.s(s);length=length||30;truncation=(!truncation)?"...":truncation;s=(s.length>length)?s.slice(0,length-truncation.length)+truncation:String(s);return this.r(arguments,2,s)},underscore:function(s){s=this.sub(/[A-Z]/,function(c){return"_"+c.toLowerCase()},-1,this.s(s));if(s.charAt(0)=="_"){s=s.substring(1)}return this.r(arguments,0,s)},unescapeHTML:function(s){s=this.stripTags(this.s(s)).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">");return this.r(arguments,0,s)},unfilterJSON:function(filter,s){s=this.s(s);filter=filter||this.JSONFilter;var filtered=s.match(filter);s=(filtered!==null)?filtered[1]:s;return this.r(arguments,1,jQuery.trim(s))},r:function(args,size,s){if(args.length>size||this.str===undefined){return s}else{this.str=""+s;return this}},s:function(s){if(s===""||s){return s}if(this.str===""||this.str){return this.str}return this}},string:function(str){if(str===String.prototype){jQuery.extend(String.prototype,jQuery.__stringPrototype)}else{return jQuery.extend({str:str},jQuery.__stringPrototype)}}});jQuery.__stringPrototype.parseQuery=jQuery.__stringPrototype.toQueryParams;(function($){var undefined,dataFlag="watermark",dataClass="watermarkClass",dataFocus="watermarkFocus",dataFormSubmit="watermarkSubmit",dataMaxLen="watermarkMaxLength",dataPassword="watermarkPassword",dataText="watermarkText",selWatermarkDefined=":data("+dataFlag+")",selWatermarkAble=":text,:password,:search,textarea",triggerFns=["Page_ClientValidate"],pageDirty=false;$.extend($.expr[":"],{search:function(elem){return"search"===(elem.type||"")},data:function(element,index,matches,set){var data,parts=/^((?:[^=!^$*]|[!^$*](?!=))+)(?:([!^$*]?=)(.*))?$/.exec(matches[3]);if(parts){data=$(element).data(parts[1]);if(data!==undefined){if(parts[2]){data=""+data;switch(parts[2]){case"=":return(data==parts[3]);case"!=":return(data!=parts[3]);case"^=":return(data.slice(0,parts[3].length)==parts[3]);case"$=":return(data.slice(-parts[3].length)==parts[3]);case"*=":return(data.indexOf(parts[3])!==-1)}}return true}}return false}});$.watermark={version:"3.0.6",options:{className:"watermark",useNative:true},hide:function(selector){$(selector).filter(selWatermarkDefined).each(function(){$.watermark._hide($(this))})},_hide:function($input,focus){var inputVal=$input.val()||"",inputWm=$input.data(dataText)||"",maxLen=$input.data(dataMaxLen)||0,className=$input.data(dataClass);if((inputWm.length)&&(inputVal==inputWm)){$input.val("");if($input.data(dataPassword)){if(($input.attr("type")||"")==="text"){var $pwd=$input.data(dataPassword)||[],$wrap=$input.parent()||[];if(($pwd.length)&&($wrap.length)){$wrap[0].removeChild($input[0]);$wrap[0].appendChild($pwd[0]);$input=$pwd}}}if(maxLen){$input.attr("maxLength",maxLen);$input.removeData(dataMaxLen)}if(focus){$input.attr("autocomplete","off");window.setTimeout(function(){$input.select()},1)}}className&&$input.removeClass(className)},show:function(selector){$(selector).filter(selWatermarkDefined).each(function(){$.watermark._show($(this))})},_show:function($input){var val=$input.val()||"",text=$input.data(dataText)||"",type=$input.attr("type")||"",className=$input.data(dataClass);if(((val.length==0)||(val==text))&&(!$input.data(dataFocus))){pageDirty=true;if($input.data(dataPassword)){if(type==="password"){var $pwd=$input.data(dataPassword)||[],$wrap=$input.parent()||[];if(($pwd.length)&&($wrap.length)){$wrap[0].removeChild($input[0]);$wrap[0].appendChild($pwd[0]);$input=$pwd;$input.attr("maxLength",text.length)}}}if((type==="text")||(type==="search")){var maxLen=$input.attr("maxLength")||0;if((maxLen>0)&&(text.length>maxLen)){$input.data(dataMaxLen,maxLen);$input.attr("maxLength",text.length)}}className&&$input.addClass(className);$input.val(text)}else{$.watermark._hide($input)}},hideAll:function(){if(pageDirty){$.watermark.hide(selWatermarkAble);pageDirty=false}},showAll:function(){$.watermark.show(selWatermarkAble)}};$.fn.watermark=function(text,options){if(!this.length){return this}var hasClass=false,hasText=(typeof(text)==="string");if(typeof(options)==="object"){hasClass=(typeof(options.className)==="string");options=$.extend({},$.watermark.options,options)}else{if(typeof(options)==="string"){hasClass=true;options=$.extend({},$.watermark.options,{className:options})}else{options=$.watermark.options}}if(typeof(options.useNative)!=="function"){options.useNative=options.useNative?function(){return true}:function(){return false}}return this.each(function(){var $input=$(this);if(!$input.is(selWatermarkAble)){return}if($input.data(dataFlag)){if(hasText||hasClass){$.watermark._hide($input);if(hasText){$input.data(dataText,text)}if(hasClass){$input.data(dataClass,options.className)}}}else{if(options.useNative.call(this,$input)){if(((""+$input.css("-webkit-appearance")).replace("undefined","")!=="")&&(($input.attr("tagName")||"")!=="TEXTAREA")){if(hasText){$input.attr("placeholder",text)}return}}$input.data(dataText,hasText?text:"");$input.data(dataClass,options.className);$input.data(dataFlag,1);if(($input.attr("type")||"")==="password"){var $wrap=$input.wrap("<span>").parent(),$wm=$($wrap.html().replace(/type=["']?password["']?/i,'type="text"'));$wm.data(dataText,$input.data(dataText));$wm.data(dataClass,$input.data(dataClass));$wm.data(dataFlag,1);$wm.attr("maxLength",text.length);$wm.focus(function(){$.watermark._hide($wm,true)}).bind("dragenter",function(){$.watermark._hide($wm)}).bind("dragend",function(){window.setTimeout(function(){$wm.blur()},1)});$input.blur(function(){$.watermark._show($input)}).bind("dragleave",function(){$.watermark._show($input)});$wm.data(dataPassword,$input);$input.data(dataPassword,$wm)}else{$input.focus(function(){$input.data(dataFocus,1);$.watermark._hide($input,true)}).blur(function(){$input.data(dataFocus,0);$.watermark._show($input)}).bind("dragenter",function(){$.watermark._hide($input)}).bind("dragleave",function(){$.watermark._show($input)}).bind("dragend",function(){window.setTimeout(function(){$.watermark._show($input)},1)}).bind("drop",function(evt){var dropText=evt.originalEvent.dataTransfer.getData("Text");if($input.val().replace(dropText,"")===$input.data(dataText)){$input.val(dropText)}$input.focus()})}if(this.form){var form=this.form,$form=$(form);if(!$form.data(dataFormSubmit)){$form.submit($.watermark.hideAll);if(form.submit){$form.data(dataFormSubmit,form.submit);form.submit=(function(f,$f){return function(){var nativeSubmit=$f.data(dataFormSubmit);$.watermark.hideAll();if(nativeSubmit.apply){nativeSubmit.apply(f,Array.prototype.slice.call(arguments))}else{nativeSubmit()}}})(form,$form)}else{$form.data(dataFormSubmit,1);form.submit=(function(f){return function(){$.watermark.hideAll();delete f.submit;f.submit()}})(form)}}}}$.watermark._show($input)})};if(triggerFns.length){$(function(){var i,name,fn;for(i=triggerFns.length-1;i>=0;i--){name=triggerFns[i];fn=window[name];if(typeof(fn)==="function"){window[name]=(function(origFn){return function(){$.watermark.hideAll();return origFn.apply(null,Array.prototype.slice.call(arguments))}})(fn)}}})}})(jQuery);
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version 2.1.2
 */
(function($){$.fn.bgiframe=($.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(s){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s);var html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(html),this.firstChild)}})}:function(){return this});$.fn.bgIframe=$.fn.bgiframe;function prop(n){return n&&n.constructor===Number?n+"px":n}})(jQuery);(function($){var effects={};var methods={};var urlBase;$.fn.theatre=function(){var currArguments=arguments;(this.length?this:$(document)).each(function(){methods.initAll.apply($(this),currArguments)});return this};methods.loadEffect=function(name){if(!urlBase){$('script[src*="jquery.theatre-"], link[href*="theatre.css"]').first().each(function(){urlBase=(this.href||this.src).replace(/\/[^\/]*(#.*)?$/,"")})}var url=urlBase+"/effect."+name.split(":")[0]+".js";$("head").append('<script type="text/javascript" src="'+url+'"><\/script>');return effects[name]};methods.initAll=function(method){if(typeof method=="object"||!method||method=="init"){return methods.init.apply(this,arguments)}if(method=="effect"){if(typeof arguments[2]=="function"){return effects[arguments[1]]=arguments[2]}else{$.error("Elixon Theatre cannot register effect object unless it is a Function.")}}var theatre=this.data("theatre");if(!theatre){return false}switch(method){case"jump":var jumpTo;switch(jumpTo){case"first":jumpTo=0;break;case"last":jumpTo=theatre.actors.length-1;break;default:jumpTo=(parseInt(arguments[1])-1)%theatre.actors.length;jumpTo=(Math.abs(Math.floor(jumpTo/theatre.actors.length)*theatre.actors.length)+jumpTo)%theatre.actors.length}while(theatre.index!=jumpTo){if(theatre.effect.jump){theatre.effect.jump(jumpTo);theatre.index=jumpTo}else{this.theatre(theatre.index<jumpTo?"next":"prev")}}break;case"next":case"prev":if(!arguments[1]){this.theatre("stop")}theatre.index=(theatre.index+(method=="next"?1:-1))%theatre.actors.length;theatre.index=(Math.abs(Math.floor(theatre.index/theatre.actors.length)*theatre.actors.length)+theatre.index)%theatre.actors.length;if(typeof theatre.settings.onMove=="function"){theatre.settings.onMove.apply(this,[theatre.index,theatre.actors[theatre.index]])}methods.updatePaging.apply(this);theatre.effect[method].apply(theatre.effect,Array.prototype.slice.call(arguments,1));break;case"play":case"stop":methods[method].apply(this,arguments);break;default:$.error('Elixon Theatre method "'+method+'" does not exist on jQuery.theatre!')}};methods.init=function(options){methods.destroy.apply(this);var settings={selector:'> *:not(".theatre-control")',effect:"horizontal",speed:1000,still:3000,autoplay:true,controls:"horizontal",itemWidth:false,itemHeight:false,width:false,height:false,onMove:false};if(options){$.extend(settings,options)}var actors=$(settings.selector,this);var theatre={paging:settings.paging&&$(settings.paging),actors:actors,effect:false,settings:settings,interval:false,index:0};var effect=(typeof settings.effect=="function"?settings.effect:effects[settings.effect]||methods.loadEffect(settings.effect));if(!effect){$.error('Elixon Theatre does not support effect "'+settings.effect+'"!')}theatre.effect=new effects[settings.effect](this,actors,settings,theatre);this.addClass("theatre").data("theatre",theatre);this.addClass("theatre-"+settings.effect.replace(/[^a-z0-9]+/ig,"-"));if(settings.width){this.css("width",settings.width)}if(settings.height){this.css("height",settings.height+999)}actors.each(function(){var $this=$(this);if(!$this.data("theatre")){$this.data("theatre",{width:$this.width(),height:$this.height()})}});if(settings.itemWidth||settings.itemHeight){var thisObj=this;actors.each(function(){var $this=$(this);if(settings.itemWidth){$this.css("width",settings.itemWidth=="max"?(thisObj.width()-$this.outerWidth()+$this.width())+"px":settings.itemWidth)}if(settings.itemHeight){$this.css("height",settings.itemHeight=="max"?(thisObj.height()-$this.outerHeight()+$this.height())+"px":settings.itemHeight)}})}actors.addClass("theatre-actor").stop(true,true);theatre.effect.init();if(settings.autoplay){methods.play.apply(this)}methods.appendControls.apply(this);methods.generatePaging.apply(this)};methods.generatePaging=function(){var stage=this;var theatre=this.data("theatre");if(!theatre.paging){return}theatre.paging.each(function(){var $this=$(this);var jumpers=[];$("> *",$this).each(function(){jumpers.push($("<div></div>").append(this).html())});var template=jumpers[jumpers.length-1];for(var i=0;i<theatre.actors.length;i++){var jumpHTML=jumpers.length<i+1?template:jumpers[i];(function(pos){$this.append(jumpHTML.replace("{#}",pos)+"\n");$this.children().last().click(function(){stage.theatre("jump",pos)})})(i+1)}});methods.updatePaging.apply(this)};methods.updatePaging=function(){var theatre=this.data("theatre");if(!theatre.paging){return}theatre.paging.each(function(){var $this=$(this);$("> *",$this).removeClass("active").eq(theatre.index).addClass("active")})};methods.appendControls=function(){settings=this.data("theatre").settings;if(settings.controls=="horizontal"||settings.controls=="vertical"){var thisObj=this;this.append('<a class="theatre-control theatre-control-'+settings.controls+'-next theatre-next"><span></span></a>');this.append('<a class="theatre-control theatre-control-'+settings.controls+'-prev theatre-prev"><span></span></a>');this.append('<a class="theatre-control theatre-control-'+settings.controls+'-play theatre-play"><span></span></a>');this.append('<a class="theatre-control theatre-control-'+settings.controls+'-stop theatre-stop"><span></span></a>');$(".theatre-next",this).click(function(){thisObj.theatre("next")});$(".theatre-prev",this).click(function(){thisObj.theatre("prev")});$(".theatre-play",this).click(function(){thisObj.theatre("play")});$(".theatre-stop",this).click(function(){thisObj.theatre("stop")});this.mouseenter(function(){$(".theatre-control",thisObj).fadeIn()});this.mouseleave(function(){$(".theatre-control",thisObj).fadeOut()});$(".theatre-control",this).fadeOut(0)}};methods.destroy=function(){var theatre=this.data("theatre");if(theatre){clearInterval(theatre.interval);this.theatre("jump",0);if(typeof theatre.effect.destroy=="function"){theatre.effect.destroy()}this.removeClass("theatre-"+theatre.settings.effect.replace(/[^a-z0-9]+/ig,"-"));theatre.actors.each(function(){var $this=$(this);var theatre=$this.data("theatre");$this.width(theatre.width);$this.height(theatre.height)})}$(".theatre-control",this).remove()};methods.play=function(){var theatre=this.data("theatre");var stage=this;theatre.interval=setInterval(function(){stage.theatre("next",true)},theatre.settings.speed+theatre.settings.still)};methods.stop=function(){var theatre=this.data("theatre");clearInterval(theatre.interval);theatre.interval=false};effects.fade=effects.slide=effects.show=function(stage,actors,settings,theatre){var x={fade:{show:"fadeIn",hide:"fadeOut",initStyle:{margin:0,top:0,left:0,position:"absolute",display:"none"}},slide:{show:"slideDown",hide:"slideUp",initStyle:{}},show:{show:"show",hide:"hide",initStyle:{}}}[settings.effect];this.init=function(){actors[x.hide](0).css(x.initStyle).first()[x.show](0)};this.next=function(){actors.stop(true,true).css("z-index",0)[x.hide](settings.speed).eq(theatre.index).css("z-index",10)[x.show](settings.speed)};this.prev=function(){actors.stop(true,true).css("z-index",0)[x.hide](settings.speed).eq(theatre.index).css("z-index",10)[x.show](settings.speed)};this.destroy=function(){actors.stop(true,true).css({zIndex:"",top:"",left:"",position:"",margin:""})[x.show](0)}};effects.vertical=effects.horizontal=function(stage,actors,settings){var x={horizontal:{size:"outerWidth",direction:"left"},vertical:{size:"outerHeight",direction:"top"}}[settings.effect];this.init=function(){actors.fadeOut(0);this.align(0,0);actors.fadeIn()};this.next=function(){var curr=$(settings.selector,stage).first();var offset=this.align(-curr[x.size](true));curr.appendTo(stage)};this.prev=function(){var curr=$(settings.selector,stage).last().prependTo(stage);curr.stop(true,true).css(x.direction,-curr[x.size](true));this.align(0)};this.destroy=function(){actors.stop(true,true).css(x.direction,"").css({opacity:"",left:"",top:""})};this.align=function(offset,speed){var sacked=false;$(settings.selector,stage).each(function(){var callBack=null;var $this=$(this);if(offset<0){callBack=function(){$this.css(x.direction,offset)}}var props={};props[x.direction]=offset;$this.stop(true,true).animate(props,isNaN(speed)?settings.speed:speed,callBack);offset+=$this[x.size](true)});return offset}};effects["3d"]=function(stage,actors,settings){settings.resize=false;settings.speed=800;settings.still=8000;var currIndex=0;var pivots=[];var maxWidth;var maxHeight;this.init=function(){var thisObj=this;maxWidth=stage.width()*0.5;maxHeight=stage.height()*0.8;actors.each(function(pos){var rad=(2*Math.PI*pos/actors.length)+Math.PI/2;var x=Math.cos(rad);var y=Math.sin(rad)+0.15;var margin=10;var sizeMin=0.2;var size=(y+1)/2*(1-sizeMin)+sizeMin;var x2=x*(stage.width()-margin)/2+stage.width()/2;var y2=y*(stage.height()-margin)/2+stage.height()/2;pivots.push({left:x2,top:y2,x:x,y:y,size:size,rad:rad})});this.animate()};this.next=function(){if(++currIndex>actors.length-1){currIndex=0}this.animate()};this.prev=function(){if(--currIndex<0){currIndex=actors.length-1}this.animate()};this.destroy=function(){actors.stop(true,true).css({"z-index":"",opacity:"",left:"",top:""})};this.animate=function(){var thisObj=this;actors.stop();actors.each(function(pos){var pivot=pivots[(pos-currIndex+actors.length)%actors.length];var dim=thisObj.calcDim($(this),maxWidth,maxHeight,pivot.size);var left=Math.round(pivot.left-pivot.x*dim[0]/2-dim[0]/2);var top=Math.round(pivot.top-pivot.y*dim[1]/2-dim[1]/2-pivot.y*6);if($.browser.webkit){}$(this).css({"z-index":Math.round(pivot.size*10)}).animate({opacity:Math.round(pivot.size),left:left,top:top,width:dim[0]},settings.speed)})};this.calcDim=function(obj,maxWidth,maxHeight,size){var dim=obj.data("theatre");var w=maxWidth;var h=dim.height/dim.width*w;if(h>maxHeight){w=maxWidth*(maxHeight/h);h=maxHeight}return[Math.round(w*size),Math.round(h*size)]}}})(jQuery);(function($){var myEffect=function(stage,actors,settings,theatre){var orbits=[];var steps=32;var dist=[0.1,0.6];var index=-1;this.init=function(){var thisObj=this;actors.each(function(){var orbit={planet:$(this),path:[],step:Math.round(Math.random()*100)};var orbitWidth=Math.random()*0.8+0.2;var orbitHeight=Math.random()*0.8+0.2;var rotation=2*Math.random()*Math.PI;var pivots=steps*((orbitWidth*orbitHeight)*0.5+0.5);for(var step=1;step<=pivots;step++){var coord=thisObj.getOrbitCoord(2*Math.PI*(step+1)/pivots,orbitWidth,orbitHeight,rotation,stage.width(),stage.height(),$(this).width(),$(this).height(),dist[0],dist[1]);orbit.path.push({left:coord.x,top:coord.y,opacity:coord.z+1-dist[1],zIndex:Math.round(100-coord.z*100),width:coord.itemWidth,height:coord.itemHeight})}orbits.push(orbit);thisObj.orbitting(orbit);orbit.mouseenter=function(){$(this).css({"z-index":300,opacity:1});$(this).stop(true,false)};$(this).mouseenter(orbit.mouseenter);orbit.mouseleave=function(){$(this).css("z-index",100);thisObj.orbitting(orbit)};$(this).mouseleave(orbit.mouseleave)})};this.orbitting=function(orbit){var thisObj=this;var reschedule=function(){thisObj.orbitting(orbit)};for(var i=Math.round(Math.random()*10)+32;i>=0;i--){orbit.planet.animate(orbit.path[orbit.step%orbit.path.length],300,"linear",i?null:reschedule);orbit.step++}};this.slide=function(){if(index!=-1){actors.eq(index).stop(true,false).css("z-index",0);this.orbitting(orbits[index])}index=theatre.index;var actor=actors.eq(theatre.index);var width=settings.itemWidth||this.getMaxDim(actor).width*0.8;var height=settings.itemHeight||this.getMaxDim(actor).height*0.8;actor.stop(true,false).css("z-index",250).animate({width:width,height:height,left:(stage.width()-width)/2,top:(stage.height()-height)/2,opacity:1},settings.speed)};this.next=function(){this.slide()};this.prev=function(){this.slide()};this.destroy=function(){var i=0;actors.stop(true,false).css({"z-index":0,width:"",height:"",opacity:1,left:0,top:0}).each(function(){$(this).unbind("mouseenter",orbits[i].mouseenter).unbind("mouseleave",orbits[i].mouseleave);i++})};this.getMaxDim=function(item){var width=stage.width();var height=item.height()/item.width()*width;if(height>stage.height()){var height=stage.height();var width=item.width()/item.height()*height}return{width:width,height:height}};this.getOrbitCoord=function(angle,width,height,rotation,containerWidth,containerHeight,itemWidth,itemHeight,distMin,distMax){var x0=width*Math.cos(angle)*Math.cos(rotation)-height*Math.sin(angle)*Math.sin(rotation);var y0=width*Math.cos(angle)*Math.sin(rotation)+height*Math.sin(angle)*Math.cos(rotation);var z0=1-(Math.cos(angle)*Math.sin(rotation)+Math.sin(angle)*Math.cos(rotation)+1)/2;distMin=(isNaN(distMin)?0:distMin);distMax=(isNaN(distMax)?1:distMax);var z=z0*(distMax-distMin)+distMin;itemWidth=((isNaN(itemWidth)?0:itemWidth)*z);itemHeight=((isNaN(itemHeight)?0:itemHeight)*z);var x=(isNaN(containerWidth)?x0:(x0+1)*(containerWidth-itemWidth)/2);var y=(isNaN(containerHeight)?y0:(y0+1)*(containerHeight-itemHeight)/2);return{x:x,y:y,z:z,itemWidth:itemWidth,itemHeight:itemHeight,x0:x0,y0:y0,z0:z0}}};$.fn.theatre("effect","orbit",myEffect)})(jQuery);jQuery.expr[":"].regex=function(elem,index,match){var matchParams=match[3].split(","),validLabels=/^(data|css):/,attr={method:matchParams[0].match(validLabels)?matchParams[0].split(":")[0]:"attr",property:matchParams.shift().replace(validLabels,"")},regexFlags="ig",regex=new RegExp(matchParams.join("").replace(/^\s+|\s+$/g,""),regexFlags);return regex.test(jQuery(elem)[attr.method](attr.property))};$.fn.stickyfloat=function(options,lockBottom){var $obj=this;var parentPaddingTop=parseInt($obj.parent().css("padding-top"));var startOffset=$obj.parent().offset().top;var opts=$.extend({startOffset:startOffset,offsetY:parentPaddingTop,duration:200,lockBottom:true},options);$obj.css({position:"absolute"});if(opts.lockBottom){var bottomPos=$obj.parent().height()-$obj.height()+parentPaddingTop;if(bottomPos<0){bottomPos=0}}$(window).scroll(function(){$obj.stop();var pastStartOffset=$(document).scrollTop()>opts.startOffset;var objFartherThanTopPos=$obj.offset().top>startOffset;var objBiggerThanWindow=$obj.outerHeight()<$(window).height();if((pastStartOffset||objFartherThanTopPos)&&objBiggerThanWindow){var newpos=($(document).scrollTop()-startOffset+opts.offsetY);if(newpos>bottomPos){newpos=bottomPos}if($(document).scrollTop()<opts.startOffset){newpos=parentPaddingTop}$obj.animate({top:newpos},opts.duration)}})};(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var validator=$.data(this[0],"validator");if(validator){return validator}validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true});if(validator.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){validator.submitButton=this})}this.submit(function(event){if(validator.settings.debug){event.preventDefault()}function handle(){if(validator.settings.submitHandler){if(validator.submitButton){var hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm)}validator.settings.submitHandler.call(validator,validator.currentForm);if(validator.submitButton){hidden.remove()}return false}return true}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle()}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false}return handle()}else{validator.focusInvalid();return false}})}return validator},valid:function(){if($(this[0]).is("form")){return this.validate().form()}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this)});return valid}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value)});return result},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,"validator").settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages)}break;case"remove":if(!argument){delete staticRules[element.name];return existingRules}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method]});return filtered}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data)}return data}});$.extend($.expr[":"],{blank:function(a){return !$.trim(""+a.value)},filled:function(a){return !!$.trim(""+a.value)},unchecked:function(a){return !a.checked}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init()};$.validator.format=function(source,params){if(arguments.length==1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args)}}if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1)}if(params.constructor!=Array){params=[params]}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n)});return source};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(element)).hide()}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element)}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element)}},onclick:function(element){if(element.name in this.submitted){this.element(element)}else{if(element.parentNode.name in this.submitted){this.element(element.parentNode)}}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass)}else{$(element).addClass(errorClass).removeClass(validClass)}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass)}else{$(element).removeClass(errorClass).addClass(validClass)}}},setDefaults:function(settings){$.extend($.validator.defaults,settings)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}."),maxE:$.validator.format("Please enter a value less than {0}."),minE:$.validator.format("Please enter a value greater than {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key})});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value)});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");validator.settings[eventType]&&validator.settings[eventType].call(validator,this[0])}$(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",delegate).validateDelegate(":radio, :checkbox, select, option","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i])}return this.valid()},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name]}else{this.invalid[element.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return result},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]})}this.successList=$.grep(this.successList,function(element){return !(element.name in errors)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(obj){var count=0;for(var i in obj){count++}return count},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name}).length==1&&lastActive},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false}rulesCache[this.name]=true;return true})},clean:function(selector){return $(selector)[0]},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element)},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name).not(this.settings.ignore)[0]}var rules=$(element).rules();var dependencyMismatch=false;for(var method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return}if(!result){this.formatAndAdd(element,rule);return false}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id+", check the '"+rule.method+"' method",e);throw e}}if(dependencyMismatch){return}if(this.objectLength(rules)){this.successList.push(element)}return true},customMetaMessage:function(element,method){if(!$.metadata){return}var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method]},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method])},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined){return arguments[i]}}return undefined},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>")},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message=="function"){message=message.call(this,rule.parameters,element)}else{if(theregex.test(message)){message=jQuery.format(message.replace(theregex,"{$1}"),rule.parameters)}}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper))}return toToggle},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i])}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return $(this.errorList).map(function(){return this.element})},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message)}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(label).length){this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element)}}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label)}this.toShow=this.toShow.add(label)},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr("for")==name})},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name)},checkable:function(element){return/radio|checkbox/i.test(element.type)},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null})},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length}}return value.length},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true},dependTypes:{"boolean":function(param,element){return param},string:function(param,element){return !!$(param,element.form).length},"function":function(param,element){return param(element)}},optional:function(element){return !$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch"},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false}else{if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className)},classRules:function(element){var rules={};var classes=$(element).attr("class");classes&&$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this])}});return rules},attributeRules:function(element){var rules={};var $element=$(element);for(var method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength}return rules},metadataRules:function(element){if(!$.metadata){return{}}var meta=$.data(element.form,"validator").settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata()},staticRules:function(element){var rules={};var validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{}}return rules},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break}if(keepRule){rules[prop]=val.param!==undefined?val.param:true}else{delete rules[prop]}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter});$.each(["minlength","maxlength","min","max","minE","maxE"],function(){if(rules[this]){rules[this]=Number(rules[this])}});$.each(["rangelength","range"],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])]}});if($.validator.autoCreateRanges){if(rules.min&&rules.max&&rules.minE&&rules.maxE){rules.range=[rules.min,rules.max,rules.minE,rules.maxE];delete rules.min;delete rules.max;delete rules.maxE;delete rules.minE}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength}}if(rules.messages){delete rules.messages}return rules},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true});data=transformed}return data},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!=undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name))}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch"}switch(element.nodeName.toLowerCase()){case"select":var val=$(element).val();return val&&val.length>0;case"input":if(this.checkable(element)){return this.getLength(value,element)>0}default:return $.trim(value).length>0}},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch"}var previous=this.previousValue(element);if(!this.settings.messages[element.name]){this.settings.messages[element.name]={}}previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param=="string"&&{url:param}||param;if(this.pending[element.name]){return"pending"}if(previous.old===value){return previous.valid}previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true;if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors()}else{var errors={};var message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.showErrors(errors)}previous.valid=valid;validator.stopRequest(element,valid)}},param));return"pending"},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1])},min:function(value,element,param){return this.optional(element)||value>=param},max:function(value,element,param){return this.optional(element)||value<=param},minE:function(value,element,param){return this.optional(element)||value>param},maxE:function(value,element,param){return this.optional(element)||value<param},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1])},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value)},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value))},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value)},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value)},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value)},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch"}if(/[^0-9-]+/.test(value)){return false}var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9}}nCheck+=nDigit;bEven=!bEven}return(nCheck%10)==0},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"))},equalTo:function(value,element,param){var target=$(param).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid()});return value==target.val()}}});$.format=$.validator.format})(jQuery);(function($){var pendingRequests={};if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}pendingRequests[port]=xhr}})}else{var ajax=$.ajax;$.ajax=function(settings){var mode=("mode" in settings?settings:$.ajaxSettings).mode,port=("port" in settings?settings:$.ajaxSettings).port;if(mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}return(pendingRequests[port]=ajax.apply(this,arguments))}return ajax.apply(this,arguments)}}})(jQuery);(function($){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){this.addEventListener(original,handler,true)},teardown:function(){this.removeEventListener(original,handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}};function handler(e){e=$.event.fix(e);e.type=fix;return $.event.handle.call(this,e)}})}$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})}})})(jQuery);(function(){function stripHtml(value){return value.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,"")}jQuery.validator.addMethod("maxWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length<params},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length>=params},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length>=params[0]&&value.match(/bw+b/g).length<params[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})();jQuery.validator.addMethod("letterswithbasicpunc",function(value,element){return this.optional(element)||/^[a-z-.,()'\"\s]+$/i.test(value)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(value,element){return this.optional(element)||/^\w+$/i.test(value)},"Letters, numbers, spaces or underscores only please");jQuery.validator.addMethod("lettersonly",function(value,element){return this.optional(element)||/^[a-z]+$/i.test(value)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(value,element){return this.optional(element)||/^\S+$/i.test(value)},"No white space please");jQuery.validator.addMethod("ziprange",function(value,element){return this.optional(element)||/^90[2-5]\d\{2}-\d{4}$/.test(value)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");jQuery.validator.addMethod("integer",function(value,element){return this.optional(element)||/^-?\d+$/.test(value)},"A positive or negative non-decimal number please");jQuery.validator.addMethod("vinUS",function(v){if(v.length!=17){return false}var i,n,d,f,cd,cdv;var LL=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];var VL=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];var FL=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];var rs=0;for(i=0;i<17;i++){f=FL[i];d=v.slice(i,i+1);if(i==8){cdv=d}if(!isNaN(d)){d*=f}else{for(n=0;n<LL.length;n++){if(d.toUpperCase()===LL[n]){d=VL[n];d*=f;if(isNaN(cdv)&&n==8){cdv=LL[n]}break}}}rs+=d}cd=rs%11;if(cd==10){cd="X"}if(cd==cdv){return true}return false},"The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(value,element){var check=false;var re=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(re.test(value)){var adata=value.split("/");var gg=parseInt(adata[0],10);var mm=parseInt(adata[1],10);var aaaa=parseInt(adata[2],10);var xdata=new Date(aaaa,mm-1,gg);if((xdata.getFullYear()==aaaa)&&(xdata.getMonth()==mm-1)&&(xdata.getDate()==gg)){check=true}else{check=false}}else{check=false}return this.optional(element)||check},"Please enter a correct date");jQuery.validator.addMethod("dateNL",function(value,element){return this.optional(element)||/^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value)},"Vul hier een geldige datum in.");jQuery.validator.addMethod("time",function(value,element){return this.optional(element)||/^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(value)},"Please enter a valid time, between 00:00 and 23:59");jQuery.validator.addMethod("phoneUS",function(phone_number,element){phone_number=phone_number.replace(/\s+/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(phone_number,element){return this.optional(element)||phone_number.length>9&&phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/)},"Please specify a valid phone number");jQuery.validator.addMethod("mobileUK",function(phone_number,element){return this.optional(element)||phone_number.length>9&&phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("strippedminlength",function(value,element,param){return jQuery(value).text().length>=param},jQuery.validator.format("Please enter at least {0} characters"));jQuery.validator.addMethod("email2",function(value,element,param){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value)},jQuery.validator.messages.email);jQuery.validator.addMethod("url2",function(value,element,param){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)},jQuery.validator.messages.url);jQuery.validator.addMethod("creditcardtypes",function(value,element,param){if(/[^0-9-]+/.test(value)){return false}value=value.replace(/\D/g,"");var validTypes=0;if(param.mastercard){validTypes|=1}if(param.visa){validTypes|=2}if(param.amex){validTypes|=4}if(param.dinersclub){validTypes|=8}if(param.enroute){validTypes|=16}if(param.discover){validTypes|=32}if(param.jcb){validTypes|=64}if(param.unknown){validTypes|=128}if(param.all){validTypes=1|2|4|8|16|32|64|128}if(validTypes&1&&/^(51|52|53|54|55)/.test(value)){return value.length==16}if(validTypes&2&&/^(4)/.test(value)){return value.length==16}if(validTypes&4&&/^(34|37)/.test(value)){return value.length==15}if(validTypes&8&&/^(300|301|302|303|304|305|36|38)/.test(value)){return value.length==14}if(validTypes&16&&/^(2014|2149)/.test(value)){return value.length==15}if(validTypes&32&&/^(6011)/.test(value)){return value.length==16}if(validTypes&64&&/^(3)/.test(value)){return value.length==16}if(validTypes&64&&/^(2131|1800)/.test(value)){return value.length==15}if(validTypes&128){return true}return false},"Please enter a valid credit card number.");jQuery.validator.addMethod("ipv4",function(value,element,param){return this.optional(element)||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value)},"Please enter a valid IP v4 address.");jQuery.validator.addMethod("ipv6",function(value,element,param){return this.optional(element)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value)},"Please enter a valid IP v6 address.");if(typeof GNF==="undefined"){GNF={}}(function(L){var bind=L.bind=function(fn,context){return function(){return fn.apply(context,arguments)}}})(GNF);GNF.jQuery=jQuery;(function(L){var ArrayP=Array.prototype,$break={},A=L.Array=function(arrayLike,from){from=from||0;return ArrayP.slice.call(arrayLike,from)};A.each=ArrayP.forEach?function(a,fn,context){return a.forEach(fn,context)}:function(a,fn,context){var l=a.length,i;fn=L.bind(fn,context);for(i=0;i<l;i+=1){if(i in a){fn(a[i],i,a)}}};A.indexOf=ArrayP.indexOf?function(a,search,fromIndex){return a.indexOf(search,fromIndex)}:function(a,search,fromIndex){var l=a.length,i=fromIndex||0;for(;i<l;i+=1){if(a[i]===search){return i}}return -1}})(GNF);(function(L){var stack=[],$=L.jQuery;L.init=function(context){if(context&&typeof context=="function"){context=document}context=context||document;L.Array.each(stack,function(fn){fn(context)})};L.onInit=function(method){stack.push(method);return L};$(document).ready(L.init)})(GNF);GNF.UI={};(function(L){var $=L.jQuery;L.MenusDesplegable={selectores:{tieneSubmenu:"li.tieneSubmenu:not(.seleccionado)",submenu:"div.submenu",onmouseover:"li.onmouseover, span.onmouseover",contexto:"#opcionesUsuario, #contenedorMenuNivel1, #contenedorMenuNivel2"},clases:{onmouseover:"onmouseover",tieneSubmenu:"tieneSubmenu",activo:"seleccionada",submenu:"submenu",menu:"menu jsToggleador",menu1:"jsToggleador",menu2:"menu",menu3:"enlaceMenuSuperior"},datos:{registroInicial:false,elementoActivo:null,submenuActivo:null,eventoApertura:null,ascendiente:null,capaSubmenu:null},registraComportamientos:function(){var that=this;that.alternarConDispositivoApuntador();that.alternarConFoco()},alternarConDispositivoApuntador:function(){var that=this,evento;$(that.selectores.tieneSubmenu,$(that.selectores.contexto)).each(function(){if($(this).hasClass(that.clases.onmouseover)){evento="mouseenter"}else{evento="click"}$(this).bind(evento,function(ev){if($(this).is("a")){ev.preventDefault()}if(that.datos.elementoActivo){that.ocultar()}that.datos.elementoActivo=$(this);that.mostrar()});$(this).bind("mouseleave",function(){that.ocultar()})})},alternarConFoco:function(){var that=this;$("a.jsToggleador.menu, a.enlaceMenuSuperior",$(that.selectores.contexto)).each(function(){$(this).bind("focus",function(){if($(this).parents(that.selectores.tieneSubmenu).length>0){if(that.datos.elementoActivo){that.ocultar()}that.datos.elementoActivo=$(this).closest(that.selectores.tieneSubmenu);if(!$(this).hasClass(that.clases.menu3)){that.mostrar()}}else{if(that.datos.elementoActivo){that.ocultar()}}})})},mostrar:function(){var that=this;if(that.datos.elementoActivo.hasClass("ultima")){that.datos.elementoActivo.addClass("seleccionadaUltima")}if(that.datos.elementoActivo.hasClass("primera")&&that.datos.elementoActivo.parents("#contenedorMenuNivel2")){that.datos.elementoActivo.addClass("seleccionadaPrimera")}that.datos.elementoActivo.addClass(that.clases.activo).find(that.selectores.submenu).eq(0).show()},ocultar:function(){var that=this;that.datos.elementoActivo.removeClass(that.clases.activo).removeClass("seleccionadaUltima").find(that.selectores.submenu).eq(0).hide();that.datos.elementoActivo.removeClass(that.clases.activo).removeClass("seleccionadaPrimera").find(that.selectores.submenu).eq(0).hide();that.datos.elementoActivo=null}}})(GNF);(function(L){var $=L.jQuery;$.fn.estilosMenu=function(options){var op={enlaces:"a.menu, strong a.menu span",enlacesParaRelleno:"li:not(.seleccionado) a.menu, li.seleccionado",enlacesParaRellenoSinSeleccionado:"li:not(.seleccionado) a.menu",claseMenuDerecha:"submenuDerecha",claseMenuIzquierda:"submenuIzquierda",unaColumna:"unaColumna",menuNivel1:"#contenedorMenuNivel1>ul",menuNivel2:"#contenedorMenuNivel2>ul",fuente:14,correccion:1,anchoRellenoMinimoNivel2:24,anchoRellenoMaximoNivel2:104,claseNivel2LineaPartida:"lineaPartida",ruta:"",tipo1Sup:"menu_desp_tipo_01_01_01_sup_izq.png",tipo1SupIe6:"ie/menu_desp_tipo_01_01_01_sup_izq.gif",tipo1Inf:"menu_desp_tipo_01_01_02_inf_izq.png",tipo1InfIe6:"ie/menu_desp_tipo_01_01_02_inf_izq.gif",tipo1SupDer:"menu_desp_tipo_01_02_01_sup_der.png",tipo1SupIe6Der:"ie/menu_desp_tipo_01_02_01_sup_der.gif",tipo1InfDer:"menu_desp_tipo_01_02_02_inf_der.png",tipo1InfIe6Der:"ie/menu_desp_tipo_01_02_02_inf_der.gif",tipo2Sup:"menu_desp_tipo_02_01_01_sup_izq.png",tipo2SupIe6:"ie/menu_desp_tipo_02_01_01_sup_izq.gif",tipo2Inf:"menu_desp_tipo_02_01_02_inf_izq.png",tipo2InfIe6:"ie/menu_desp_tipo_02_01_02_inf_izq.gif",tipo2SupDer:"menu_desp_tipo_02_02_01_sup_der.png",tipo2SupIe6Der:"ie/menu_desp_tipo_02_02_01_sup_der.gif",tipo2InfDer:"menu_desp_tipo_02_02_02_inf_der.png",tipo2InfIe6Der:"ie/menu_desp_tipo_02_02_02_inf_der.gif",tipo3Sup:"menu_desp_tipo_03_01_01_sup_izq.png",tipo3SupIe6:"ie/menu_desp_tipo_03_01_01_sup_izq.gif",tipo3Inf:"menu_desp_tipo_03_01_02_inf_izq.png",tipo3InfIe6:"ie/menu_desp_tipo_03_01_02_inf_izq.gif",tipo3SupDer:"menu_desp_tipo_03_02_01_sup_der.png",tipo3SupIe6Der:"ie/menu_desp_tipo_03_02_01_sup_der.gif",tipo3InfDer:"menu_desp_tipo_03_02_02_inf_der.png",tipo3InfIe6Der:"ie/menu_desp_tipo_03_02_02_inf_der.gif"};var datos={capa:"",pestanas:""};var options=$.extend(op,options);return this.each(function(){datos.capa=$(this);datos.pestanas=datos.capa.children("ul").eq(0).children("li");saltosDeLinea()});function saltosDeLinea(){anchuraPestanas()}function anchuraPestanas(){var correccionNumeroElementos=1;if(datos.capa.parent().parent().is("#menuActualidad")){correccionNumeroElementos=0}if(datos.capa.is("#contenedorMenuNivel1")){anchoNivel1(".seleccionado","a",false)}if(datos.capa.parent().parent().is("#menuActualidad")){anchoNivel1(".noEsNecesario","span",true)}if(datos.capa.is("#contenedorMenuNivel2")){anchoNivel2()}posicionarSubMenus()}function anchoNivel1(seleccionado,enlace,padding1024){var menu=datos.capa,elementoUl=datos.capa.children("ul").eq(0),elementosLISinSeleccionar=elementoUl.children("li:not("+seleccionado+")"),elementosLISeleccionado=elementoUl.children(seleccionado),anchoLISeleccionado=elementosLISeleccionado.outerWidth(true),anchoRellenoLI=0,anchoEnlaces=0,correccion=0;if((/MSIE 6.0/i.test(navigator.userAgent)||/MSIE 7.0/i.test(navigator.userAgent))&&datos.capa.is("#contenedorMenuNivel1")){correccion=0}elementosLISinSeleccionar.each(function(){var anchoCompuesto=$(this).outerWidth(true),anchoSimple=$(this).width(),relleno=anchoCompuesto-anchoSimple,anchoEnlace;anchoRellenoLI+=relleno;anchoEnlace=$(this).find(enlace).eq(0).width();anchoEnlaces+=anchoEnlace-correccion});var anchoMenu=menu.width(),anchoARepartir=Math.floor(anchoMenu-anchoRellenoLI-anchoEnlaces-anchoLISeleccionado),numeroElementos=elementosLISinSeleccionar.length,numeroRellenos=numeroElementos*2,anchoRelleno=Math.floor(anchoARepartir/numeroRellenos),sobrasRelleno=anchoARepartir-(anchoRelleno*numeroRellenos);elementosLISinSeleccionar.each(function(){var elementoEnlace=$(this).find(enlace).eq(0),suma1=0,suma2=0,relleno1,relleno2;if(sobrasRelleno>0){suma1=1}relleno1=anchoRelleno+suma1;elementoEnlace.css("padding-left",relleno1+"px");sobrasRelleno--;if(sobrasRelleno>0){suma2=1}relleno2=anchoRelleno+suma2;elementoEnlace.css("padding-right",relleno2+"px");sobrasRelleno--});if($("#esqueleto").hasClass("siteTematico")){var paddingOriginal=parseInt(elementosLISinSeleccionar.last().find(enlace).eq(0).css("padding-right")),paddingNuevo=elementosLISinSeleccionar.last().find(enlace).eq(0).css("padding-right",(paddingOriginal-3)+"px")}if((/MSIE 9.0/i.test(navigator.userAgent)||(navigator.platform=="MacIntel")&&navigator.userAgent.indexOf("Firefox")>0)&&$("#contenedorMenuNivel1")){var paddingOriginal=parseInt(elementosLISinSeleccionar.last().find(enlace).eq(0).css("padding-right")),paddingNuevo=elementosLISinSeleccionar.last().find(enlace).eq(0).css("padding-right",(paddingOriginal-1)+"px")}var ultimoEnlace=elementosLISinSeleccionar.last().find(enlace).eq(0),rellenoInicialUltimoEnlace=parseInt(ultimoEnlace.css("padding-right"));if($("div.moduloDosColumnas #menuActualidad div.contenedorMenuNivel1TR ul").width()>0){ultimoEnlace.css("padding-right",(rellenoInicialUltimoEnlace+2)+"px")}}function anchoNivel2(){var anchoMenu=$("#contenedorMenuNivel1 ul").width();if(navigator.userAgent.indexOf("Firefox")!=-1){anchoMenu=anchoMenu-1}$(op.menuNivel2).css("width",anchoMenu+"px");var ancho=definirAnchoElementosMenuNivel2(anchoMenu)}function definirAnchoElementosMenuNivel2(anchoMenu){var elementosMenuNivel2=$(op.menuNivel2+" li.onmouseover"),anchoTotalEnlaces=rellenosMenuNivel2(elementosMenuNivel2),nuevoRelleno=((anchoMenu-anchoTotalEnlaces)/2)/(elementosMenuNivel2.length),nuevoRellenoEntero=Math.floor(((anchoMenu-anchoTotalEnlaces)/2)/(elementosMenuNivel2.length)),sobranteRelleno=(anchoMenu-anchoTotalEnlaces)-(nuevoRellenoEntero*elementosMenuNivel2.length*2);if(nuevoRellenoEntero<op.anchoRellenoMinimoNivel2){anchoTotalEnlaces=rellenosMenuNivel2(elementosMenuNivel2);nuevoRelleno=((anchoMenu-anchoTotalEnlaces)/2)/(elementosMenuNivel2.length);nuevoRellenoEntero=Math.floor(((anchoMenu-anchoTotalEnlaces)/2)/(elementosMenuNivel2.length));sobranteRelleno=(anchoMenu-anchoTotalEnlaces)-(nuevoRellenoEntero*elementosMenuNivel2.length*2)}var recorrido=0,anchoFinal=0,sobrante=0;elementosMenuNivel2.each(function(index){sobrante=0;if(recorrido<sobranteRelleno&&(anchoFinal+1)<=anchoMenu){sobrante=1}var paddingEnlace=nuevoRellenoEntero+sobrante;if(paddingEnlace>op.anchoRellenoMaximoNivel2){paddingEnlace=op.anchoRellenoMaximoNivel2}restarPaddingDerecho=0;if(paddingEnlace<10){restarPaddingDerecho=10-paddingEnlace;paddingEnlace=10}var enlaceSpan=$(this).find("span.hacer-hover a").eq(0);enlaceSpan.css({"padding-left":paddingEnlace+"px"});recorrido++;sobrante=0;if(recorrido<sobranteRelleno&&(anchoFinal+2)<=anchoMenu){sobrante=1}var paddingEnlace=nuevoRellenoEntero+sobrante;if(paddingEnlace>op.anchoRellenoMaximoNivel2){paddingEnlace=op.anchoRellenoMaximoNivel2}enlaceSpan.css({"padding-right":(paddingEnlace-restarPaddingDerecho)+"px"});recorrido++;anchoFinal+=$(this).width()});return anchoFinal}function partirElementosMenuNivel2(elementosMenuNivel2){elementosMenuNivel2.each(function(index){var enlace=$(this).find("span.hacer-hover a").eq(0),texto=enlace.text().replace(/^\s*|\s*$/g,""),caracteres=texto.length,palabras=texto.split(" ").length;if((caracteres>16||palabras>2)&&elementosMenuNivel2.length>5){var longitud=caracteres,inf=Math.floor(texto.length/2),inf2=inf,nuevoTexto;while(texto.substr(inf,1)!=" "&&texto.substr(inf2,1)!=" "&&inf<longitud&&inf2>=0){inf++;inf2--}if(texto.substr(inf,1)!=" "&&texto.substr(inf2,1)==" "){inf=inf2}nuevoTexto=texto.substr(0,inf)+"<br />";nuevoTexto+=texto.substr(inf,texto.length);enlace.closest("li").addClass(op.claseNivel2LineaPartida);enlace.html(nuevoTexto)}})}function rellenosMenuNivel2(elementosMenuNivel2){var anchoTotal=0,anchoTotalEnlaces=0;elementosMenuNivel2.each(function(){var enlace=$(this).find("span.hacer-hover a").eq(0),anchoEnlace1=enlace.width(),anchoEnlace2=enlace.outerWidth(true)-enlace.outerWidth();anchoTotalEnlaces+=anchoEnlace1+anchoEnlace2});anchoTotalEnlaces=Math.floor(anchoTotalEnlaces);return anchoTotalEnlaces}function posicionarSubMenus(){var anchoCapa=datos.capa.children("ul").eq(0).width();datos.capa.find("li.tieneSubmenu div.submenu").each(function(){var el=$(this),posicion=el.parent().position().left,anchoElemento=el.width(),restante=anchoCapa-posicion;if(restante<anchoElemento){el.addClass(op.claseMenuDerecha)}else{el.addClass(op.claseMenuIzquierda)}var srcImagen1=op.tipo1Sup,srcImagen2=op.tipo1SupIe6,srcImagen3=op.tipo1Inf,srcImagen4=op.tipo1InfIe6;if(el.hasClass(op.claseMenuDerecha)){srcImagen1=op.tipo1SupDer;srcImagen2=op.tipo1SupIe6Der;srcImagen3=op.tipo1InfDer;srcImagen4=op.tipo1InfIe6Der}if(el.hasClass("dosColumnas")){srcImagen1=op.tipo2Sup;srcImagen2=op.tipo2SupIe6;srcImagen3=op.tipo2Inf;srcImagen4=op.tipo2InfIe6;if(el.hasClass(op.claseMenuDerecha)){srcImagen1=op.tipo2SupDer;srcImagen2=op.tipo2SupIe6Der;srcImagen3=op.tipo2InfDer;srcImagen4=op.tipo2InfIe6Der}}if(el.hasClass(op.unaColumna)){srcImagen1=op.tipo3Sup;srcImagen2=op.tipo3SupIe6;srcImagen3=op.tipo3Inf;srcImagen4=op.tipo3InfIe6;if(el.hasClass(op.claseMenuDerecha)){srcImagen1=op.tipo3SupDer;srcImagen2=op.tipo3SupIe6Der;srcImagen3=op.tipo3InfDer;srcImagen4=op.tipo3InfIe6Der}}var rutaImagen1=op.ruta+srcImagen1,rutaImagen2=op.ruta+srcImagen2,rutaImagen3=op.ruta+srcImagen3,rutaImagen4=op.ruta+srcImagen4,imagenSup='<img src="'+images_base_path+rutaImagen1+'" alt="" class="imgJs fondo fondoPng" /><img src="'+images_base_path+rutaImagen2+'" alt="" class="imgJs fondo" />',imagenInf='<img src="'+images_base_path+rutaImagen3+'" alt="" class="imgJs fondo fondoInferior fondoPng" /><img src="'+images_base_path+rutaImagen4+'" alt="" class="imgJs fondo fondoInferior" />',elSuperior=el.find("div.menuDesplegableT").eq(0);elSuperior.prepend(imagenSup);el.append(imagenInf);el.hide();el.css("visibility","")})}}})(GNF);(function(L){if(Modernizr.borderradius==false){var $=L.jQuery;L.onInit(function(context){})}})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("exactlength",function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)==param},$.validator.format("Please enter only {0} characters."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("nif",function(value,element,param){var re=/^[0-9]{8}[TRWAGMYFPDXBNJZSQVHLCKEtrwagmyfpdxbnjzsqvhlcke]$/,check=false;if(re.test(value)){var lookup="TRWAGMYFPDXBNJZSQVHLCKE",lastLetter=value.charAt(value.length-1).toUpperCase(),nifNumbers=value.substr(0,value.length-1),nifInteger=parseInt(nifNumbers,10);if(isNaN(nifInteger)){check=false}else{check=(lookup.charAt(nifInteger%23)==lastLetter)}}return this.optional(element)||check},jQuery.validator.format("Please enter a valid NIF."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("nie",function(value,element,param){var re=/^[XYZxyz][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKEtrwagmyfpdxbnjzsqvhlcke]$/,check=false;if(re.test(value)){var lookup="TRWAGMYFPDXBNJZSQVHLCKE",lastLetter=value.charAt(value.length-1).toUpperCase(),firstLetter=value.charAt(0).toUpperCase(),numeroValidar;switch(firstLetter){case"X":numeroValidar=value.substr(1,value.length-2);break;case"Y":numeroValidar="1"+value.substr(1,value.length-2);break;case"Z":numeroValidar="2"+value.substr(1,value.length-2);break}check=(lookup.charAt(numeroValidar%23)==lastLetter)}return this.optional(element)||check},jQuery.validator.format("Please enter a valid NIE."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("nifnie",function(value,element,param){var check=false||$.validator.methods.nif.call(this,value,element,param)||$.validator.methods.nie.call(this,value,element,param);return this.optional(element)||check},jQuery.validator.format("Please enter a valid NIF or NIE."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("cif",function(value,element,param){var re=/^[ABCDEFGHJKLMNPQRSUVWabcdefghjklmnpqrsuvw][0-9]{7}[JABCDEFGHIJjabcdefghij\d]$/,check=false;if(re.test(value)){var validLetters="ABCDEFGHJKLMNPRQSUVW",lastDigit=value.charAt(value.length-1),firstLetter=value.charAt(0),par=0,non=0,caracterControlLetra="KPQS",caracterControlNum="ABEH",i,parcial,control,controlLetra="JABCDEFGHIJ",check=true;if(value.length!=9){check=false}else{for(i=2;i<8;i+=2){par=par+parseInt(value.charAt(i))}for(i=1;i<9;i+=2){var nn=2*parseInt(value.charAt(i));if(nn>9){nn=1+(nn-10)}non=non+nn}parcial=par+non;control=10-(parcial%10);if(caracterControlLetra.indexOf(firstLetter.toUpperCase())!=-1){if(controlLetra.charAt(control)!=value.charAt(8).toUpperCase()){check=false}}if(caracterControlNum.indexOf(firstLetter.toUpperCase())!=-1){if(control==10){control=0}if(control!=value.charAt(8)){check=false}}if((caracterControlLetra.indexOf(firstLetter.toUpperCase())==-1)&&(caracterControlNum.indexOf(firstLetter.toUpperCase())==-1)){if(control==10){control=0}if((controlLetra.charAt(control)!=value.charAt(8).toUpperCase())&&(control!=value.charAt(8))){check=false}}}}return this.optional(element)||check},jQuery.validator.format("Please enter a valid CIF."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("cifnif",function(value,element,param){var check=false||$.validator.methods.cif.call(this,value,element,param)||$.validator.methods.nif.call(this,value,element,param);return this.optional(element)||check},jQuery.validator.format("Please enter a valid CIF or NIF."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("iban",function(value,element,param){var check=false,countryCode=value.substring(0,2);if(correctLength(value,countryCode)){check=checkIbanDigits(value)}return this.optional(element)||check;function correctLength(value,countryCode){var accountLengths={DE:22,AD:24,AT:20,AZ:17,BE:16,CY:28,DK:18,SI:19,ES:24,EE:20,FI:18,FR:27,GI:23,GR:27,HU:28,IE:22,IS:26,IT:27,LV:21,LT:20,LU:20,NO:15,NL:18,PL:28,PT:25,GB:22,CZ:24,SK:24,SE:24,CH:21};if(typeof accountLengths[countryCode]=="undefined"){return false}return(value.length===accountLengths[countryCode])}function checkIbanDigits(iban){var countryCode=iban.substring(0,2),checkDigits=iban.substring(2,4),accountCode=iban.substring(4),digits="",check;digits+=string2Digits(accountCode);digits+=string2Digits(countryCode);digits+=checkDigits;check=98-m97(digits);return(check===97)}function m97(digits){var m=0;$.each(digits.split(""),function(counter,digit){m=(m*10+parseInt(digit))%97});return m}function string2Digits(str){var result="";$.each(str.split(""),function(counter,ch){if("0"<=ch&&ch<="9"){result+=ch}else{result+=char2Digits(ch)}});return result}function char2Digits(ch){var upp="ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var i=0;i<upp.length;++i){if(ch===upp.charAt(i)){return i+10}}}},jQuery.validator.format("Please enter a valid IBAN number."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("ccc",function(value,element,param){var check=false;if(value.length==20){var cc1=value.substring(0,8),dc=value.substring(8,10),cc2=value.substring(10,20);check=checkDC(cc1,cc2,dc)}return this.optional(element)||check;function checkDC(cc1,cc2,dc){if(!correctLengths(cc1,cc2,dc)){return false}var dc1=calculateDC(cc1),dc2=calculateDC(cc2);return(10*dc1+dc2===parseInt(dc,10))}function checkEmptyDC(dc,options){return options.withoutDC&&(dc===this.noDCValue)}function calculateDC(cc){var dc=0,pesos=new Array(1,2,4,8,5,10,9,7,3,6),lengthDif=pesos.length-cc.length;for(var i=cc.length-1;i>=0;i--){dc+=pesos[i+lengthDif]*cc.charAt(i)}dc=11-(dc%11);if(11===dc){dc=0}else{if(10===dc){dc=1}}return dc}function correctLengths(cc1,cc2,dc){return cc1.match(/^\d{8}$/)&&cc2.match(/^\d{10}$/)&&(dc.match(/^\d{2}$/)||dc.match(/^\*\*$/))}},jQuery.validator.format("Please enter a valid CCC."))})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("natural",function(value,element){return this.optional(element)||/^\d+$/.test(value)},"A positive non-decimal number please")})(GNF);(function(L){var $=L.jQuery;$.validator.addMethod("greaterThan",function(value,element,params){if(!value.length&&!$(params).val().length){return true}if(!/Invalid|NaN/.test(new Date(value))){var startDate=parseDate($(params).val()),endDate=parseDate(value);return new Date(endDate)>=new Date(startDate)}return isNaN(value)&&isNaN($(params).val())||(parseFloat(value)>=parseFloat($(params).val()));function parseDate(val){var d=val.split("/");return d[1]+"/"+d[0]+"/"+d[2]}},"The end date must be greater or equal than start date.")})(GNF);(function(L){var $=L.jQuery;$.validator.addClassRules({letter:{lettersonly:true},nif:{nif:true},nie:{nie:true},cif:{cif:true},"nif-nie":{nifnie:true},"cif-nif":{cifnif:true},iban:{iban:true},ccc:{ccc:true},natural:{natural:true},phone:{maxlength:15,number:true},date:{dateITA:true}})})(GNF);(function(L){var $=L.jQuery;$.extend($.validator.messages,{globalMessage:"<strong>Error en el formulario</strong>, por favor compruebe que los siguientes datos sean correctos:",iconAltError:"(Error)"})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){$("form").each(function(){var triedSubmit=false,errorContainer='<div class="cajaValidaciones cajaValidaciones-'+this.id+'" style="display: none"><div class="validacionesTl"><div class="validacionesTr"><div class="validacionesBl"><div class="validacionesBr"><div class="validaciones"><ul></ul></div></div></div></div></div></div>';if($(this).closest("#capaOficinaVirtual").length){$(this).data("formType","ov:tabs")}else{if(this.id=="formAccesoOD"||this.id=="formAccesoOV"){$(this).data("formType","ov:column")}else{$(this).data("formType","standard")}}switch($(this).data("formType")){case"ov:tabs":$(this).closest("div.agrupadorAccesoOficinas").prepend(errorContainer);$(this).data("errorContainer",$(this).closest("div.agrupadorAccesoOficinas").find("div.cajaValidaciones:eq(0)"));initValidationsOVTabsForm(this);break;case"ov:column":if(!$(this).children("div.cajaValidaciones").length){$(this).prepend(errorContainer);$("div.cajaValidaciones",this).hide()}$(this).data("errorContainer",$(this).find("div.cajaValidaciones:eq(0)"));initValidationsOVTabsForm(this);break;default:errorContainer='<div class="cajaValidaciones cajaValidaciones-'+this.id+'"><div class="validacionesTl"><div class="validacionesTr"><div class="validacionesBl"><div class="validacionesBr"><div class="validaciones"><p>'+$.validator.messages.globalMessage+"</p><ul></ul></div></div></div></div></div></div>";if(!$(this).children("div.cajaValidaciones").length){$(this).prepend(errorContainer);$("div.cajaValidaciones",this).hide()}$(this).data("errorContainer",$(this).find("div.cajaValidaciones:eq(0)"));initValidationsStandardForm(this);break}$(":input:regex(class, length-[0-9]*)",this).each(function(){var classes=$(this).attr("class").split(" "),length_rule=/^length-([0-9]*$)/,result;for(var i=0;i<classes.length;i++){result=classes[i].match(length_rule);if(result!=null){$(this).rules("add",{exactlength:result[1]})}}});$(":input:regex(class, minlength-[0-9]*)",this).each(function(){var classes=$(this).attr("class").split(" "),minlength_rule=/^minlength-([0-9]*$)/,result;for(var i=0;i<classes.length;i++){result=classes[i].match(minlength_rule);if(result!=null){$(this).rules("add",{minlength:result[1]})}}});$(":input:regex(class, min-[0-9]*)",this).each(function(){var classes=$(this).attr("class").split(" "),min_rule=/^min-([0-9]*$)/,result;for(var i=0;i<classes.length;i++){result=classes[i].match(min_rule);if(result!=null){$(this).rules("add",{min:result[1]})}}});$(":input:regex(class, max-[0-9]*)",this).each(function(){var classes=$(this).attr("class").split(" "),max_rule=/^max-([0-9]*$)/,result;for(var i=0;i<classes.length;i++){result=classes[i].match(max_rule);if(result!=null){$(this).rules("add",{max:result[1]})}}});$(":input:regex(class, minE-[0-9]*)",this).each(function(){var classes=$(this).attr("class").split(" "),min_ruleE=/^minE-([0-9]*$)/,result;for(var i=0;i<classes.length;i++){result=classes[i].match(min_ruleE);if(result!=null){$(this).rules("add",{minE:result[1]})}}});$(":input:regex(class, maxE-[0-9]*)",this).each(function(){var classes=$(this).attr("class").split(" "),maxE_rule=/^maxE-([0-9]*$)/,result;for(var i=0;i<classes.length;i++){result=classes[i].match(maxE_rule);if(result!=null){$(this).rules("add",{maxE:result[1]})}}});$("input.date",this).each(function(){if($(this).attr("id")=="fechaHasta"){$(this).rules("add",{greaterThan:"#fechaDesde"})}})});function initValidationsStandardForm(form){$(form).validate({errorElement:"span",errorClass:"descripcionContextualError",highlight:function(element,errorClass,validClass){var triedSubmit=true;if($(element).hasClass("date")&&$(element).parents("div.variosCampos").length){$(element).closest("div.columna").addClass("errorCampo").find("span.titular img").show()}else{if(element.type=="checkbox"){$(element).closest("div.conRadio").addClass("errorCampo").find("span.texto img").show()}else{$(element.form).find("label[for="+element.id+"]").addClass("errorCampo").find("span.texto img").show()}}$("li.error-"+element.id).show();if(triedSubmit&&this.numberOfInvalids()==1){$(element.form).data("errorContainer").show()}},unhighlight:function(element,errorClass,validClass){if($(element).not(".captcha-input, .customfile-input").length){if($(element).hasClass("date")&&!this.invalid.fechaHasta){if($(element).closest("label").hasClass("errorCampo")){$(element).closest("label").removeClass("errorCampo").find("span.texto img").hide()}else{$(element).closest("div.columna").removeClass("errorCampo").find("span.titular img").hide()}}else{if(element.type=="checkbox"){$(element).closest("div.conRadio").removeClass("errorCampo").find("span.texto img").hide()}else{$(element.form).find("label[for="+element.id+"]").removeClass("errorCampo").find("span.texto img").hide()}}$("li.error-"+element.id).hide();var numErroresJava=$("div.cajaValidaciones ul li").not(".mensajeValidacion").length;var numErroresJS=$("div.cajaValidaciones ul li.mensajeValidacion:visible").length;if(numErroresJS==0&&numErroresJava==0){$(element.form).data("errorContainer").hide()}}},errorPlacement:function(error,element){var label,error_image='<img class="iconoError" alt="'+$.validator.messages.iconAltError+'" src="'+images_base_path+'alert_8bit.png">',form=element.attr("form");if(element.hasClass("date")&&element.parents("div.variosCampos").length){error.clone().insertAfter(element.closest("div.columna").find("label:last"));element.closest("div.columna").find("span.titular:eq(0)").prepend(error_image)}else{if(element[0].type=="checkbox"){error.clone().insertAfter(element.closest("ul"));element.closest("div.conRadio").find("span.texto:eq(0)").prepend(error_image)}else{error.clone().insertAfter(element.closest("span.campo01"));$(form).find("label[for="+element.attr("id")+"] span.texto").prepend(error_image)}}label=getLabelByElement(element);$("ul",$(form).data("errorContainer")).append('<li class="mensajeValidacion error-'+element.attr("id")+'" />').find("li:last").append('<a href="'+documentUrl+"#"+element.attr("id")+'">'+label+'</a> - <span class="descripcionError">'+error.text()+"</span>")},invalidHandler:function(form,validator){triedSubmit=true;var errors=validator.numberOfInvalids();if(errors){$(this).data("errorContainer").show()}else{$(this).data("errorContainer").hide()}},showErrors:function(errorMap,errorList){var error;for(var i=0;i<errorList.length;i++){$("li.error-"+errorList[i].element.id,this.errorContext).find("span.descripcionError").text(errorList[i].message)}this.defaultShowErrors()}})}function initValidationsOVTabsForm(form){$(form).validate({errorClass:"errorCampo",errorElement:"li",errorContainer:"div.cajaValidaciones-"+form.id,errorLabelContainer:"div.cajaValidaciones-"+form.id+" ul",showErrors:function(errorMap,errorList){var label;for(var i=0;i<errorList.length;i++){label=getLabelByElement($(errorList[i].element));errorList[i].message='<a href="'+documentUrl+"#"+errorList[i].element.id+'">'+label+'</a> - <span class="descripcionError">'+errorList[i].message+"</span>"}this.defaultShowErrors()},highlight:function(element,errorClass,validClass){$(element.form).find("label[for="+element.id+"]").addClass(errorClass)},unhighlight:function(element,errorClass,validClass){$(element.form).find("label[for="+element.id+"]").removeClass(errorClass)}});$("#capaOficinaVirtual div.selectorAccesoOficina a, #capaOficinaVirtual div.selectorGrupoOficinas a").bind("click",function(){$(this).closest("div.cajaAgrupadoresAccesoOficinas").find("div.cajaValidaciones").hide()})}function getLabelByElement(element){var label;if(element.hasClass("date")&&element.parents("div.variosCampos").length){label=$(element).closest("div.columna").find("span.titular:eq(0)").text()}else{if(element[0].type=="checkbox"){label=$(element).closest("div.conRadio").find("span.texto").text()}else{label=$(element.attr("form")).find("label[for="+element.attr("id")+"] span.texto").text()}}label=label.replace("*","").replace(":","");return $.trim(label)}})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){$("input, textarea, select",context).each(function(){var $label=$(this).parents("label");$(this).focusin(function(){if($label.hasClass("errorCampo")){$label.addClass("errorFocoCampo")}else{$label.addClass("focoCampo")}}).focusout(function(){$label.removeClass("focoCampo").removeClass("errorFocoCampo")})})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){var windowedElements="#contenedorMenuNivel1 div.submenu, #contenedorMenuNivel2 div.submenu, #opcionesUsuario div.submenu";$(windowedElements,context).bgiframe()})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){$("#contenido div.jsAreaRelacional",context).each(function(){$(this).parent().css({right:0}).stickyfloat({duration:10})})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){L.MenusDesplegable.registraComportamientos();var enlaceNivelCorrector=1;$("#contenedorMenuNivel1").estilosMenu();$("#menuActualidad div.contenedorMenuNivel1TR").eq(0).estilosMenu({menuNivel1:"#menuActualidad div.contenedorMenuNivel1TR>ul",enlaces:"a span",enlacesParaRelleno:"li a span",enlacesParaRellenoSinSeleccionado:"li a span"});$("#contenedorMenuNivel2").estilosMenu({anchoRellenoMinimoNivel2:24*enlaceNivelCorrector,anchoRellenoMaximoNivel2:104*enlaceNivelCorrector})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){function equalHeight(group){var tallest=0;group.each(function(){var thisHeight=$(this).height();if(thisHeight>tallest){tallest=thisHeight}});group.height(tallest)}equalHeight($("#menuRapido li.columna"))})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){calendarioEventos();function calendarioEventos(){$("#calendario table.ui-datepicker-calendar div a.ui-state-default").each(function(index){var valorFecha=$(this).attr("title");$(this).replaceWith("<span class='ui-state-default' id='"+$(this).attr("title")+"'>"+$(this).text()+"</span>")});$("#calendario table.ui-datepicker-calendar td").attr("onClick","")}$("a.ui-datepicker-prev").live("click",function(){if($(this).parents("#calendario").length){$.datepicker._adjustDate("#calendario",-1,"M")}calendarioEventos()});$("a.ui-datepicker-next").live("click",function(){if($(this).parents("#calendario").length){$.datepicker._adjustDate("#calendario",+1,"M")}calendarioEventos()})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){if($.browser.msie&&$.browser.version.substr(0,1)<7){var selectedTagsHover=$("#contenido form.formGenerico img.imgCalendario, #contenido div.conDesplegables div.titulo h3");selectedTagsHover.hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})}})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){$("form input[type=file]",context).each(function(){var fileInput=$(this).addClass("customfile-input").focus(function(){upload.addClass("customfile-focus");fileInput.data("val",fileInput.val())}).blur(function(){upload.removeClass("customfile-focus");$(this).trigger("checkChange")}).bind("disable",function(){fileInput.attr("disabled",true);upload.addClass("customfile-disabled")}).bind("enable",function(){fileInput.removeAttr("disabled");upload.removeClass("customfile-disabled")}).bind("checkChange",function(){if(fileInput.val()&&fileInput.val()!=fileInput.data("val")){fileInput.trigger("change")}}).bind("change",function(){var fileName=$(this).val().split(/\\/).pop();var fileExt="customfile-ext-"+fileName.split(".").pop().toLowerCase();uploadFeedback.text(fileName).removeClass(uploadFeedback.data("fileExt")||"").addClass(fileExt).data("fileExt",fileExt).addClass("customfile-feedback-populated");uploadButton.find(".custom-file-button-content").text(GNF.l10n.customFileInput.boton)}).click(function(){fileInput.data("val",fileInput.val());setTimeout(function(){fileInput.trigger("checkChange")},100)});var upload=$('<div class="customfile"></div>');var uploadFeedback=$('<span class="customfile-feedback" aria-hidden="true"></span>').appendTo(upload);var uploadButton=$('<span class="customfile-button" aria-hidden="true"><span class="customfile-buttonTl"><span class="customfile-buttonTr"><span class="customfile-buttonBl"><span class="customfile-buttonBr"><span class="customfile-button-content">'+GNF.l10n.customFileInput.boton+"</span></span></span></span></span></span>").appendTo(upload);if(fileInput.is("[disabled]")){fileInput.trigger("disable")}upload.insertAfter(fileInput).mouseover(function(){upload.addClass("customfile-hover")}).mouseout(function(){upload.removeClass("customfile-hover")});fileInput.appendTo(upload)})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){$("a.abreEnVentanaNueva").each(function(){var op={srcImagen:"ico_abreEnVentanaNueva.gif"},datos={enlace:""},options=$.extend(op,options);var atributosIdioma="";if(GNF.l10n.idioma!=$("html").attr("lang")){var atributosIdioma=""}datos.enlace=$(this);var texto=datos.enlace.text().split(" ");var last=texto.pop();var imagen='<img src="'+images_base_path+op.srcImagen+'" alt=" '+GNF.l10n.enlaceVentanaNueva.altImagen+'"';if(datos.enlace.attr("lang")&&datos.enlace.attr("lang")!=GNF.l10n.idioma){imagen+=' lang="'+GNF.l10n.idioma+'" xml:lang="'+GNF.l10n.idioma+'"'}imagen+=" />";htmlEnlace=texto.join(" ")+(texto.length>0?' <span class="avisoVentanaNueva">'+last:last)+imagen+"</span>";datos.enlace.html(htmlEnlace)}).click(function(){window.open(this.href);return false})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){$("div.conDesplegables div.titulo h3").each(function(){var control=$(this);var op={contenedorCapa:".cajaFondoAzulTl",contenedorDesplegable:".cajaFondoAzul",elementoDesplegable:".cajaContenidoAgrupado",clasePlegado:"plegado",claseDesplegado:"desplegado"};var datos={control:""};var contenedorElementoDesplegable=control.closest(op.contenedorCapa).next(op.contenedorDesplegable).find(op.elementoDesplegable);var idCajaContenidoAgrupado=contenedorElementoDesplegable.attr("id");control.attr("tabindex",0);control.attr("role","button");control.attr("aria-controls",idCajaContenidoAgrupado);if(control.hasClass(op.claseDesplegado)){control.attr("aria-expanded","true");contenedorElementoDesplegable.attr("aria-hidden","false")}else{alternarDesplegable(control);control.attr("aria-expanded","false");contenedorElementoDesplegable.attr("aria-hidden","true")}control.click(function(event){alternarDesplegable(control)});control.keypress(function(event){if(event.which==32||event.which==13){alternarDesplegable(control)}});function alternarDesplegable(control){var contenedor=control.closest(op.contenedorCapa).next(op.contenedorDesplegable);var contenedorElementoDesplegable=contenedor.find(op.elementoDesplegable);contenedorElementoDesplegable.eq(0).toggle();if(contenedorElementoDesplegable.is(":visible")){contenedorElementoDesplegable.attr("aria-hidden","false")}else{contenedorElementoDesplegable.attr("aria-hidden","true")}if(control.hasClass("")){control.addClass("plegado")}else{control.toggleClass(op.claseDesplegado).toggleClass(op.clasePlegado)}if(control.hasClass("plegado")){control.attr("aria-expanded","false")}else{control.attr("aria-expanded","true")}}})})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){var resources={es:{user:"Usuario conectado",logout:"Desconectar",login:"Acceder"}};function checkUsers(check,login,logout,id,lang){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead")}catch(e){}$.post(check,{checkCliente:"getNombreCompletoCliente"},function(data){if($("Salida",data).text()!="NOLOGGED"&&$("Salida",data).text()!=""){var text="";if($("form."+id).attr("class")=="formOficinaVirtual"){text='<div class="usuarioLogado"><p>'+resources[lang].user+":</p><p><strong>"+$("Salida",data).text()+'</strong></p><ul class="botonesCapa"><li class="derecha"><div class="botonPositivo"><div class="botonPositivoTl"><div class="botonPositivoTr"><div class="botonPositivoBl"><div class="botonPositivoBr"><p><a title="'+resources[lang].logout+'" href="'+logout+'">'+resources[lang].logout+'</a></p></div></div></div></div></div></li><li class="derecha"><div class="botonPositivo"><div class="botonPositivoTl"><div class="botonPositivoTr"><div class="botonPositivoBl"><div class="botonPositivoBr"><p><input type="submit" value="'+resources[lang].login+'" id="accederHogar" name="accederHogar"></p></div></div></div></div></div></li></ul></div>'}else{if($("form."+id).attr("class")=="formAcceso"){text='<div class="usuarioLogado"><p>'+resources[lang].user+":</p><p><strong>"+$("Salida",data).text()+'</strong></p></div><ul class="botonesCapa"><li class="derecha"><div class="botonPositivo"><div class="botonPositivoTl"><div class="botonPositivoTr"><div class="botonPositivoBl"><div class="botonPositivoBr"><p><input type="submit" value="'+resources[lang].login+'" id="acceder04" name="acceder04"></p></div></div></div></div></div></li><li class="derecha"><div class="botonPositivo"><div class="botonPositivoTl"><div class="botonPositivoTr"><div class="botonPositivoBl"><div class="botonPositivoBr"><p><a title="'+resources[lang].logout+'" href="'+logout+'">'+resources[lang].logout+"</a></p></div></div></div></div></div></li></ul>"}}if(text!=""){$("form."+id).html(text)}}})}})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){if($(".insite-slot").length==0){$(".contenidoHome .moduloUnaColumna").each(function(){if($(".dosColumnas, .columnaDeDosColumnas",this).length>0){$(this).attr("class","moduloDosColumnas");$(".unaColumnaHome",this).attr("class","dosColumnas")}if($(".columnaDeTresColumnas",this).length>0){$(this).attr("class","moduloTresColumnas");$(".unaColumnaHome",this).attr("class","")}if($(".moduloCuatroColumnas",this).length>0){$(this).attr("class","moduloCuatroColumnas");$(".unaColumnaHome",this).attr("class","")}});$(".contenidoHome .moduloDosColumnas").each(function(){if($(".columnaDeTresColumnas",this).length>0){$(this).attr("class","moduloTresColumnas");$(".dosColumnas",this).attr("class","")}if($(".moduloCuatroColumnas",this).length>0){$(this).attr("class","moduloCuatroColumnas");$(".dosColumnas",this).attr("class","")}})}})})(GNF);(function(L){var $=L.jQuery;L.onInit(function(context){if(!$("html",context).hasClass("htmlConJSLoaded")){clearTimeout(loaderTimeout);$("html",context).addClass("htmlConJSLoaded")}})})(GNF);
