DatePickerControl.defaultFormat="DD/MM/YYYY";DatePickerControl.submitFormat="";DatePickerControl.offsetY=1;DatePickerControl.offsetX=0;DatePickerControl.todayText="hoy";DatePickerControl.buttonTitle="Abrir calendario...";DatePickerControl.buttonPosition="in";DatePickerControl.buttonOffsetX=0;DatePickerControl.buttonOffsetY=0;DatePickerControl.closeOnTodayBtn=true;DatePickerControl.defaultTodaySel=true;DatePickerControl.autoShow=false;DatePickerControl.firstWeekDay=0;DatePickerControl.weekend=[0,6];DatePickerControl.weekNumber=false;DatePickerControl.Months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];DatePickerControl.Days=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"];DatePickerControl.useTrickyBG=false;if(navigator.userAgent.indexOf("MSIE")>1){DatePickerControl.useTrickyBG=true;DatePickerControl.offsetY=0;DatePickerControl.offsetX=-1;DatePickerControl.buttonOffsetX=-4;DatePickerControl.buttonOffsetY=-2;if(document.getElementsByTagName("html")[0].getAttribute("xmlns")!=null){DatePickerControl.offsetY=16;DatePickerControl.offsetX=10;DatePickerControl.buttonOffsetX=8;DatePickerControl.buttonOffsetY=14}}DatePickerControl.editIdPrefix="DPC_";DatePickerControl.displayed=false;DatePickerControl.HIDE_TIMEOUT=200;DatePickerControl.hideTimeout=null;DatePickerControl.buttonIdPrefix="CALBUTTON";DatePickerControl.dayIdPrefix="CALDAY";DatePickerControl.currentDay=1;DatePickerControl.originalValue="";DatePickerControl.calFrameId="calendarframe";DatePickerControl.submitByKey=false;DatePickerControl.dayOfWeek=0;DatePickerControl.firstFocused=false;DatePickerControl.hideCauseBlur=false;DatePickerControl.onSubmitAsigned=false;DatePickerControl.minDate=null;DatePickerControl.maxDate=null;DatePickerControl.DOMonth=[31,28,31,30,31,30,31,31,30,31,30,31];DatePickerControl.lDOMonth=[31,29,31,30,31,30,31,31,30,31,30,31];function DatePickerControl(){}DatePickerControl.init=function(){if(!document.getElementById("CalendarPickerControl")){this.setGlobalParams();this.calBG=null;if(this.useTrickyBG){this.calBG=document.createElement("iframe");this.calBG.id="CalendarPickerControlBG";this.calBG.style.zIndex="49999";this.calBG.style.position="absolute";this.calBG.style.display="none";this.calBG.style.border="0px solid transparent";document.body.appendChild(this.calBG)}this.calContainer=document.createElement("div");this.calContainer.id="CalendarPickerControl";this.calContainer.style.zIndex="50000";this.calContainer.style.position="absolute";this.calContainer.style.display="none";document.body.appendChild(this.calContainer);if(this.calContainer.addEventListener){this.calContainer.addEventListener("click",DPC_onContainerClick,false);window.addEventListener("resize",DPC_onWindowResize,false)}else{if(this.calContainer.attachEvent){this.calContainer.attachEvent("onclick",DPC_onContainerClick);window.attachEvent("onresize",DPC_onWindowResize)}}}var a=document.getElementsByTagName("input");var d=a.length;for(i=0;i6)?0:parseInt(obj.value)}obj=document.getElementById("DPC_WEEKEND_DAYS");if(obj){eval("this.weekend = "+obj.value)}obj=document.getElementById("DPC_AUTO_SHOW");if(obj){this.autoShow=obj.value=="true"}obj=document.getElementById("DPC_DEFAULT_TODAY");if(obj){this.defaultTodaySel=obj.value=="true"}obj=document.getElementById("DPC_CALENDAR_OFFSET_X");if(obj){this.offsetX=parseInt(obj.value)}obj=document.getElementById("DPC_CALENDAR_OFFSET_Y");if(obj){this.offsetY=parseInt(obj.value)}obj=document.getElementById("DPC_TODAY_TEXT");if(obj){this.todayText=obj.value}obj=document.getElementById("DPC_BUTTON_TITLE");if(obj){this.buttonTitle=obj.value}obj=document.getElementById("DPC_BUTTON_POSITION");if(obj){this.buttonPosition=obj.value}obj=document.getElementById("DPC_BUTTON_OFFSET_X");if(obj){this.buttonOffsetX=parseInt(obj.value)}obj=document.getElementById("DPC_BUTTON_OFFSET_Y");if(obj){this.buttonOffsetY=parseInt(obj.value)}obj=document.getElementById("DPC_WEEK_NUMBER");if(obj){this.weekNumber=obj.value=="true"}obj=document.getElementById("DPC_MONTH_NAMES");if(obj){eval("this.Months = "+obj.value)}obj=document.getElementById("DPC_DAY_NAMES");if(obj){eval("this.Days = "+obj.value)}};function DPC_autoInit(){DatePickerControl.init()}if(window.addEventListener){window.addEventListener("load",DPC_autoInit,false)}else{if(window.attachEvent){window.attachEvent("onload",DPC_autoInit)}}DatePickerControl.createButton=function(l,a){var b=this.buttonIdPrefix+l.id;if(document.getElementById(b)){return false}var c="";if(a){var f=l.id.split("_");var o=f[f.length-1];if((o.indexOf("-")>0||o.indexOf("/")>0||o.indexOf(".")>0)&&o.indexOf("YY")>=0&&o.indexOf("D")>=0&&o.indexOf("M")>=0){c=o}else{c=this.defaultFormat}}else{c=l.getAttribute("datepicker_format");if(!c){c=this.defaultFormat}}l.setAttribute("datepicker_format",c);l.setAttribute("maxlength",c.length);l.setMinDate=function(p){this.setAttribute("datepicker_min",p)};l.setMaxDate=function(p){this.setAttribute("datepicker_max",p)};var e=document.createElement("img");e.id=b;e.title=this.buttonTitle;e.setAttribute("datepicker_inputid",l.id);e.setAttribute("datepicker_format",c);if(e.addEventListener){e.addEventListener("click",DPC_onButtonClick,false)}else{if(e.attachEvent){e.attachEvent("onclick",DPC_onButtonClick)}}e.className="calendarbutton";e.style.position="relative";e.style.cursor="pointer";e.style.verticalAlign="middle";e.style.height=l.offsetHeight;e.src="/uploads/basecamp/theme/calendar_icon.png";if(this.buttonPosition=="in"){}var d=l.parentNode;var h=document.createElement("nobr");var g=document.createElement("span");g.innerHTML=" ";var n=null;if(l.nextSibling){n=l.nextSibling}d.removeChild(l);h.appendChild(l);h.appendChild(g);h.appendChild(e);h.appendChild(g.cloneNode(true));if(n){d.insertBefore(h,n)}else{d.appendChild(h)}return true};DatePickerControl.show=function(){if(!this.displayed){var a=this.inputControl;if(a==null){return}if(a.disabled){return}var d=getObject.getSize("offsetTop",a);var c=getObject.getSize("offsetLeft",a);var b=document.getElementById(this.calFrameId);this.calContainer.style.top=d+a.offsetHeight+this.offsetY+"px";this.calContainer.style.left=c+this.offsetX+"px";this.calContainer.style.display="none";this.calContainer.style.visibility="visible";this.calContainer.style.display="block";this.calContainer.style.height=b.offsetHeight;if(this.calBG){this.calBG.style.top=this.calContainer.style.top;this.calBG.style.left=this.calContainer.style.left;this.calBG.style.display="none";this.calBG.style.visibility="visible";this.calBG.style.display="block";this.calBG.style.width=this.calContainer.offsetWidth;if(b){this.calBG.style.height=b.offsetHeight}}this.displayed=true;a.focus()}};DatePickerControl.hide=function(){if(this.displayed){this.calContainer.style.visibility="hidden";this.calContainer.style.left=-1000;this.calContainer.style.top=-1000;if(this.calBG){this.calBG.style.visibility="hidden";this.calBG.style.left=-1000;this.calBG.style.top=-1000}this.inputControl.value=this.originalValue;this.displayed=false}};DatePickerControl.getMonthName=function(a){return this.Months[a]};DatePickerControl.getDaysOfMonth=function(b,a){if(this.isLeapYear(a)){return this.lDOMonth[b]}else{return this.DOMonth[b]}};DatePickerControl.calcMonthYear=function(b,a,d){var c=new Array();if(d==-1){if(b==0){c[0]=11;c[1]=parseInt(a)-1}else{c[0]=parseInt(b)-1;c[1]=parseInt(a)}}else{if(d==1){if(b==11){c[0]=0;c[1]=parseInt(a)+1}else{c[0]=parseInt(b)+1;c[1]=parseInt(a)}}}return c};DatePickerControl.getAllCode=function(){var a="";a+="";a+=this.getHeaderCode();a+=this.getDaysHeaderCode();a+=this.getDaysCode();a+="
";return a};DatePickerControl.getHeaderCode=function(){var d=this.calcMonthYear(this.month,this.year,-1);var g=d[0];var l=d[1];var f=this.calcMonthYear(this.month,this.year,1);var h=f[0];var a=f[1];var c=new Date();var b="";var e=this.weekNumber?8:7;b+="";b+=this.monthName+"  ";b+="«";b+=" "+this.year+" ";b+="»";b+="";b+="";b+="";b+="";b+="";b+="";b+="";b+="";return b};DatePickerControl.getDaysHeaderCode=function(){var a="";a=a+"";if(this.weekNumber){a+=" "}for(i=this.firstWeekDay;i"+this.Days[i%7]+""}a=a+"";return a};DatePickerControl.getDaysCode=function(){var f=new Date();f.setDate(1);f.setMonth(this.month);f.setFullYear(this.year);var h=f.getDay();var l=1;var d=this.getDaysOfMonth(this.month,this.year);var e=0;var c="";this.dayOfWeek=h;var g=this.month==0?11:this.month-1;var b=this.prevm==11?this.year-1:this.year;prevmontdays=this.getDaysOfMonth(g,b);h=(h==0&&this.firstWeekDay)?7:h;if(this.weekNumber){var a=this.getWeekNumber(this.year,this.month,1)}c+="";if(this.weekNumber){c+=""+a+""}for(i=this.firstWeekDay;i"+(prevmontdays-h+i+1)+""}for(j=h-this.firstWeekDay;j<7;j++){if(this.isInRange(l)){classname=this.getDayClass(l,j);c+=""+l+""}else{c+=""+l+""}l++}c=c+"";for(k=2;k<7;k++){c=c+"";if(this.weekNumber){a++;if(a>=53){a=1}c+=""+a+""}for(j=0;j<7;j++){if(this.isInRange(l)){classname=this.getDayClass(l,j);c+=""+l+""}else{c+=""+l+""}l++;if(l>d){e=1;break}}if(j==6){c+=""}if(e==1){break}}for(m=1;m<(7-j);m++){c+=""+m+""}return c};DatePickerControl.getDayClass=function(a,f){var g=new Date();var d=g.getDate();var c=g.getMonth();var b=g.getFullYear();if(a==d&&this.month==c&&this.year==b){return"today"}else{var e=(7+f+this.firstWeekDay)%7;for(i=0;i=0||f.indexOf("-")>=0||f.indexOf(".")>=0){return g}var c=f.split("@");if(c.length!=3){return g}for(i=0;i<3;i++){c[i]=parseFloat(c[i]);if(isNaN(c[i])){return g}}g.setDate(1);if(e.substring(0,1).toUpperCase()=="D"){g.setFullYear(this.yearTwo2Four(c[2]));g.setMonth(c[1]-1);g.setDate(c[0])}else{if(e.substring(0,1).toUpperCase()=="Y"){g.setFullYear(this.yearTwo2Four(c[0]));g.setMonth(c[1]-1);g.setDate(c[2])}else{if(e.substring(0,1).toUpperCase()=="M"){g.setFullYear(this.yearTwo2Four(c[2]));g.setMonth(c[0]-1);g.setDate(c[1])}}}return g};DatePickerControl.yearTwo2Four=function(a){if(a<99){if(a>=30){a+=1900}else{a+=2000}}return a};DatePickerControl.writeDate=function(a){var b=this.formatData(a);this.inputControl.value=b;this.originalValue=b;this.hide();if(DatePickerControl.onSelect){DatePickerControl.onSelect(this.inputControl.id)}this.firstFocused=true;this.inputControl.focus()};DatePickerControl.writeCurrentDate=function(){var a=this.formatData(this.currentDay);this.inputControl.value=a};DatePickerControl.build=function(a,g){var f=this.month;var e=this.year;var d=document.getElementById(this.calFrameId);if(a==null){var b=new Date();this.month=b.getMonth();this.year=b.getFullYear()}else{this.month=a;this.year=g}if(!this.isInRange(null)){this.month=f;this.year=e}if(!this.isInRange(this.currentDay)){if(this.minDate&&this.currentDaythis.maxDate.getDate()){this.currentDay=this.maxDate.getDate()}}this.monthName=this.Months[this.month];var c=this.getAllCode();writeLayer(this.calContainer.id,null,c);if(this.calContainer&&d){this.calContainer.style.height=d.offsetHeight}this.firstFocused=true;this.inputControl.focus();this.selectDay(this.currentDay)};DatePickerControl.buildPrev=function(){if(!this.displayed){return}var b=this.calcMonthYear(this.month,this.year,-1);var c=b[0];var a=b[1];this.build(c,a)};DatePickerControl.buildNext=function(){if(!this.displayed){return}var b=this.calcMonthYear(this.month,this.year,1);var c=b[0];var a=b[1];this.build(c,a)};DatePickerControl.selectToday=function(){var b=new Date();var a=b.getDate();if(!this.isInRange(a)){return}if(this.closeOnTodayBtn){this.currentDay=a;this.writeDate(this.currentDay)}else{this.selectDay(a)}};DatePickerControl.selectDay=function(c){if(!this.displayed){return}if(!this.isInRange(c)){return}var e=this.currentDay;var a=this.getDaysOfMonth(this.month,this.year);if(c>a){return}var b=document.getElementById(this.dayIdPrefix+c);var d=document.getElementById(this.dayIdPrefix+this.currentDay);if(d){d.className=d.getAttribute("class_orig")}if(b){b.className="current";this.currentDay=c;this.writeCurrentDate()}};DatePickerControl.selectPrevDay=function(c){if(!this.displayed){return}var d=this.currentDay;var a=this.getDaysOfMonth(this.month,this.year);var b=d-c;if(b<=0){if(c==7){d=(d+this.dayOfWeek)+28-this.dayOfWeek;d--;b=d>a?d-7:d}else{b=a}}this.selectDay(b)};DatePickerControl.selectNextDay=function(d){if(!this.displayed){return}var c=this.currentDay;var a=this.getDaysOfMonth(this.month,this.year);var b=c+d;if(b>a){if(d==7){c=((c+this.dayOfWeek)%7)-this.dayOfWeek;b=c<0?c+7:c;b++}else{b=1}}this.selectDay(b)};DatePickerControl.showForEdit=function(b){if(this.displayed){return}if(b==null){return}if(b.disabled){return}this.inputControl=b;this.originalValue=b.value;this.setupRange();var d=this.inputControl.getAttribute("datepicker_format");if(d==null){d=this.defaultFormat}this.format=d;if(this.validate(b.value,d)){var a=this.getDateFromControl();this.currentDate=a;this.build(a.getMonth(),a.getFullYear());this.currentDay=a.getDate()}else{b.value="";this.originalValue="";this.currentDate=null;if(this.defaultTodaySel){this.currentDay=new Date().getDate()}else{this.currentDay=1}this.build(null,null)}var c=document.getElementById(this.dayIdPrefix+this.currentDay);if(c){c.className="current"}this.writeCurrentDate();this.show()};DatePickerControl.isInRange=function(b){if(!this.minDate&&!this.maxDate){return true}if(b){var f=new Date();f.setFullYear(this.year);f.setMonth(this.month);f.setDate(b);if(this.minDate){if(this.compareDates(f,this.minDate)<0){return false}}if(this.maxDate){if(this.compareDates(f,this.maxDate)>0){return false}}}else{var e=parseInt(this.year.toString()+(this.month<10?"0"+this.month.toString():this.month.toString()));var a;if(this.minDate){a=this.minDate.getMonth();var d=parseInt(this.minDate.getFullYear().toString()+(a<10?"0"+a.toString():a.toString()));if(ec){return false}}}return true};DatePickerControl.setupRange=function(){var d=this.inputControl;var e=d.getAttribute("datepicker_format");var c=d.getAttribute("datepicker_min");this.minDate=c?this.getDateFromString(c,e):null;var a=d.getAttribute("datepicker_max");this.maxDate=a?this.getDateFromString(a,e):null;if(this.maxDate&&this.minDate){if(this.maxDate.getTime()1)?"/":((f.indexOf("-")>1)?"-":".");var c=f.split(g);if(p.substring(0,1).toUpperCase()=="D"){n=parseFloat(c[0]);e=parseFloat(c[1]);o=parseFloat(c[2])}else{if(p.substring(0,1).toUpperCase()=="Y"){n=parseFloat(c[2]);e=parseFloat(c[1]);o=parseFloat(c[0])}else{if(p.substring(0,1).toUpperCase()=="M"){n=parseFloat(c[1]);e=parseFloat(c[0]);o=parseFloat(c[2])}}}if(e<1||e>12){return false}if(n>this.getDaysOfMonth(e-1,o)){return false}this.month=e;this.year=o;var h=this.isInRange(n);this.month=l;this.year=b;return h};DatePickerControl.isLeapYear=function(a){if((a%4)==0){if((a%100)==0&&(a%400)!=0){return false}return true}return false};function DPC_onButtonClick(a){DatePickerControl.onButtonClick(a)}DatePickerControl.onButtonClick=function(c){if(!this.displayed){if(c==null){c=window.event}var b=(c.srcElement)?c.srcElement:c.originalTarget;var a=document.getElementById(b.getAttribute("datepicker_inputid"));this.showForEdit(a)}else{this.hide()}};function DPC_onContainerClick(a){DatePickerControl.onContainerClick(a)}DatePickerControl.onContainerClick=function(a){if(a==null){a=window.event}if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=null}this.inputControl.focus();return false};function DPC_onEditControlKeyUp(a){DatePickerControl.onEditControlKeyUp(a)}DatePickerControl.onEditControlKeyUp=function(c){if(c==null){c=window.event}var b=c.srcElement?c.srcElement:c.originalTarget;var a=c.charCode?c.charCode:c.which?c.which:c.keyCode;switch(a){case 37:this.selectPrevDay(1);break;case 38:this.selectPrevDay(7);break;case 39:this.selectNextDay(1);break;case 40:if(!this.displayed){this.showForEdit(b)}else{this.selectNextDay(7);break}break;case 27:this.hide();break;case 33:if((c.modifiers&Event.SHIFT_MASK)||(c.shiftKey)){this.build(this.month,parseInt(this.year)-1)}else{this.buildPrev()}break;case 34:if((c.modifiers&Event.SHIFT_MASK)||(c.shiftKey)){this.build(this.month,parseInt(this.year)+1)}else{this.buildNext()}break;case 13:if(this.displayed&&this.currentDay>0&&this.submitByKey){this.writeDate(this.currentDay)}break}return false};function DPC_onEditControlKeyDown(a){DatePickerControl.onEditControlKeyDown(a)}DatePickerControl.onEditControlKeyDown=function(c){if(c==null){c=window.event}var b=c.srcElement?c.srcElement:c.originalTarget;var a=c.charCode?c.charCode:c.which?c.which:c.keyCode;if(a>=65&&a<=90){if(c.stopPropagation){c.stopPropagation()}if(c.preventDefault){c.preventDefault()}c.returnValue=false;c.cancelBubble=true;return false}switch(a){case 13:this.submitByKey=true;break;case 9:case 32:if(this.displayed&&this.currentDay>0){this.writeDate(this.currentDay)}break}};function DPC_onEditControlKeyPress(a){DatePickerControl.onEditControlKeyPress(a)}DatePickerControl.onEditControlKeyPress=function(c){if(c==null){c=window.event}var b=c.srcElement?c.srcElement:c.originalTarget;var a=c.charCode?c.charCode:c.which?c.which:c.keyCode;if(!((a<32)||(a>44&&a<58))){if(c.stopPropagation){c.stopPropagation()}if(c.preventDefault){c.preventDefault()}c.returnValue=false;c.cancelBubble=true;return false}};function DPC_onEditControlBlur(a){DatePickerControl.onEditControlBlur(a)}DatePickerControl.onEditControlBlur=function(a){if(a==null){a=window.event}if(!this.hideTimeout){this.hideTimeout=setTimeout("DatePickerControl.hide()",this.HIDE_TIMEOUT)}this.firstFocused=false;this.hideCauseBlur=true};function DPC_onEditControlChange(a){DatePickerControl.onEditControlChange(a)}DatePickerControl.onEditControlChange=function(b){if(b==null){b=window.event}var a=(b.srcElement)?b.srcElement:b.originalTarget;if(a.value==""){return}var c=a.getAttribute("datepicker_format");if(!this.validate(a.value,c)){setTimeout("e = document.getElementById('"+a.id+"'); e.value=''; e.focus()",10)}};function DPC_onEditControlFocus(a){DatePickerControl.onEditControlFocus(a)}DatePickerControl.onEditControlFocus=function(b){if(b==null){b=window.event}var a=(b.srcElement)?b.srcElement:b.originalTarget;this.inputControl=a;this.originalValue=a.value;this.setupRange();if((!this.displayed||this.hideCauseBlur)&&this.autoShow&&!this.firstFocused){clearTimeout(this.hideTimeout);this.hideTimeout=null;this.firstFocused=true;if(this.hideCauseBlur){this.hideCauseBlur=false;this.hide()}this.showForEdit(a)}else{if(this.inputControl&&this.inputControl.id!=a.id){this.hide()}else{if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=null}}}};function DPC_onFormSubmit(a){DatePickerControl.onFormSubmit(a)}DatePickerControl.onFormSubmit=function(a){if(this.submitByKey){this.submitByKey=false;if(this.displayed&&this.currentDay>0){this.writeDate(this.currentDay);if(a==null){a=window.event}var b=(a.srcElement)?a.srcElement:a.originalTarget;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}a.returnValue=false;a.cancelBubble=true;return false}}this.reformatOnSubmit()};DatePickerControl.reformatOnSubmit=function(){if(this.submitFormat==""){return true}var a=document.getElementsByTagName("input");var e=a.length;var c;for(c=0;c=0){b=b.replace("YYYY",h.getFullYear())}else{b=b.replace("YY",h.getFullYear())}f.value=b}}}return true};function DPC_formSubmit(){var a=DatePickerControl.reformatOnSubmit();if(this.submitOrig){a=this.submitOrig()}return a}function DPC_onWindowResize(a){DatePickerControl.onWindowResize(a)}DatePickerControl.onWindowResize=function(a){this.relocate()};DatePickerControl.relocateButtons=function(){return;var e=document.getElementsByTagName("div");for(key in e){if(e[key].id&&e[key].id.indexOf(this.buttonIdPrefix)==0){var c=e[key];if(c.style.display=="none"){continue}var a=document.getElementById(c.getAttribute("datepicker_inputid"));if(a.style.display=="none"||a.offsetTop==0){continue}var b=getObject.getSize("offsetTop",a);var d=getObject.getSize("offsetLeft",a);c.style.top=(b+Math.floor((a.offsetHeight-c.offsetHeight)/2)+this.buttonOffsetY)+"px";var f=Math.floor((a.offsetHeight-c.offsetHeight)/2);if(this.buttonPosition=="in"){c.style.left=(d+a.offsetWidth-c.offsetWidth-f+this.buttonOffsetX)+"px"}else{c.style.left=(d+a.offsetWidth+f+this.buttonOffsetX)+"px"}}}};DatePickerControl.relocate=function(){if(this.displayed){var a=this.inputControl;if(a==null){return}var c=getObject.getSize("offsetTop",a);var b=getObject.getSize("offsetLeft",a);this.calContainer.style.top=c+a.offsetHeight+this.offsetY+"px";this.calContainer.style.left=b+this.offsetX+"px";if(this.calBG){this.calBG.style.top=this.calContainer.style.top;this.calBG.style.left=this.calContainer.style.left}}};DatePickerControl.getWeekNumber=function(h,f,n){var g=new Date(h,f,n);var c=new Date(h,0,1);var e=7+1-c.getDay();if(e==8){e=1}var b=((Date.UTC(y2k(h),g.getMonth(),g.getDate(),0,0,0)-Date.UTC(y2k(h),0,1,0,0,0))/1000/60/60/24)+1;var d=Math.floor((b-e+7)/7);if(d==0){h--;var a=new Date(h,0,1);var l=7+1-a.getDay();if(l==2||l==8){d=53}else{d=52}}return d};function y2k(a){return(a<1000)?a+1900:a}function getObject(a){if(bw.dom){this.hElement=document.getElementById(a);this.hStyle=this.hElement.style}else{if(bw.ns4){this.hElement=document.layers[a];this.hStyle=this.hElement}else{if(bw.ie){this.hElement=document.all[a];this.hStyle=this.hElement.style}}}}getObject.getSize=function(sParam,hLayer){nPos=0;while((hLayer.tagName)&&!(/(body|html)/i.test(hLayer.tagName))){nPos+=eval("hLayer."+sParam);if(sParam=="offsetTop"){if(hLayer.clientTop){nPos+=hLayer.clientTop}}if(sParam=="offsetLeft"){if(hLayer.clientLeft){nPos+=hLayer.clientLeft}}hLayer=hLayer.offsetParent}return nPos};function writeLayer(ID,parentID,sText){if(document.layers){var oLayer;if(parentID){oLayer=eval("document."+parentID+".document."+ID+".document")}else{oLayer=document.layers[ID].document}oLayer.open();oLayer.write(sText);oLayer.close()}else{if(document.all){document.all[ID].innerHTML=sText}else{document.getElementById(ID).innerHTML=sText}}};/* Modernizr 2.6.2 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-backgroundsize-shiv-cssclasses-testprop-testallprops-domprefixes-load */ ;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a){var e=a[d];if(!A(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.backgroundsize=function(){return D("backgroundSize")};for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},x(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f 0 ? --current : itemsCount - 1; } // new item var $newItem = $items.eq( current ); // show / hide items $oldItem.css( 'opacity', 0 ); $newItem.css( 'opacity', 1 ); $oldItem.addClass("slideimgPasActif"); $oldItem.removeClass("slideimgActif"); $newItem.addClass("slideimgActif"); $newItem.removeClass("slideimgPasActif"); } function startSlideshow() { isSlideshowActive = true; clearTimeout( slideshowtime ); slideshowtime = setTimeout( function() { navigate( 'next' ); startSlideshow(); }, interval ); } function stopSlideshow() { isSlideshowActive = false; clearTimeout( slideshowtime ); } return { init : init }; })();(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});/* Menu accessible au clavier */ $(document).ready(function(){if(document.body.clientWidth>=800){$(".nav-global").accessibleDropDown()}});$.fn.accessibleDropDown=function(){var e=$(this);$("li",e).mouseover(function(){$(this).addClass("hover-access")}).mouseout(function(){$(this).removeClass("hover-access")});$("a",e).focus(function(){$(this).parents("li").addClass("hover-access")}).blur(function(){$(this).parents("li").removeClass("hover-access")})} /* viewportwidth.min.js 0.1.1 | Author: Brett Jankord, 2012 | License: MIT */ /* https://github.com/bjankord/viewportwidth.js */ /* Corrige le pb de width qui n'est pas le même calcul entre CSS et JS - Attention ! ça ne fonctionne pas sous Chrome (moteur de rendu blink) */ var getViewportWidth = function(){var vpw,w=window,wk=(!(window.webkitConvertPointFromNodeToPage == null));if(wk||!(typeof(window.innerWidth)=='number')){vpw=document.documentElement.clientWidth;}else{vpw=w.innerWidth;}return vpw;}; var ww=getViewportWidth();$(document).ready(function(){$(".nav li a").each(function(){if($(this).next().length>0){$(this).addClass("parent")}});$(".toggleMenu").click(function(e){e.preventDefault();$(this).toggleClass("active");$(".nav").toggle()});adjustMenu()});$(window).bind("resize orientationchange",function(){ww=getViewportWidth();adjustMenu()});var adjustMenu=function(){if(ww<961){if(!$(".toggleMenu").hasClass("active")){$(".nav").hide()}else{$(".nav").show()}$(".nav li").unbind("mouseenter mouseleave");$("#primary-nav .ico-menu-down").unbind("click").bind("click",function(e){e.preventDefault();$(this).parent("li").toggleClass("hover")})}else if(ww>=961){$(".nav li").removeClass("hover");$(".nav li a").unbind("click");$(".nav li").unbind("mouseenter mouseleave").bind("mouseenter mouseleave",function(){$(this).toggleClass("hover")})}} /* Menu tactile */ $(document).ready(function(){var e=navigator.userAgent,t=e.match(/iPad/i)?"touchstart":"click";if($("html").hasClass("touch")){$("#menu a.menuparent").bind(t,function(e){e.preventDefault();if(!$(this).data("custom-even")){$(this).data("custom-even",true);return false}else{$(this).data("custom-even",false);document.location.href=$(this).attr("href")}});$("#menu ul.unli a").click(function(){return true})}})/*LiquidSlider*/ /* * Liquid Slider 2.3.5 * Copyright 2012 Kevin Batdorf * http://liquidslider.com * MIT license */ "function"!=typeof Object.create&&(Object.create=function(a){"use strict";function b(){}return b.prototype=a,new b}),function(a,b,c,d){"use strict";a.fn.liquidSlider=function(b){return this.each(function(){var c=Object.create(LiquidSlider);c.init(b,this),a.data(this,"liquidSlider",c)})},a.fn.liquidSlider.options={autoHeight:!0,minHeight:0,heightEaseDuration:1500,heightEaseFunction:"easeInOutExpo",slideEaseDuration:1500,slideEaseFunction:"easeInOutExpo",slideEaseFunctionFallback:"swing",animateIn:"bounceInRight",animateOut:"bounceOutRight",continuous:!0,fadeInDuration:500,fadeOutDuration:500,autoSlide:!1,autoSlideDirection:"right",autoSlideInterval:6e3,forceAutoSlide:!1,pauseOnHover:!1,dynamicArrows:!0,dynamicArrowsGraphical:!0,dynamicArrowLeftText:"« left",dynamicArrowRightText:"right »",hideSideArrows:!1,hideSideArrowsDuration:750,hoverArrows:!0,hoverArrowDuration:250,dynamicTabs:!0,dynamicTabsHtml:!0,includeTitle:!0,panelTitleSelector:".title",dynamicTabsAlign:"left",dynamicTabsPosition:"top",navElementTag:"div",firstPanelToLoad:1,hashLinking:!1,hashTitleSelector:".title",keyboardNavigation:!1,leftKey:39,rightKey:37,panelKeys:{1:49,2:50,3:51,4:52},responsive:!0,mobileNavigation:!0,mobileNavDefaultText:"Menu",mobileUIThreshold:0,hideArrowsWhenMobile:!0,hideArrowsThreshold:0,useCSSMaxWidth:3e3,preload:function(){var a=this;jQuery(b).bind("load",function(){a.finalize()})},onload:function(){},pretransition:function(){this.transition()},callback:function(){},preloader:!1,swipe:!0,swipeArgs:d}}(jQuery,window,document);var LiquidSlider={};LiquidSlider.init=function(a,b){var c=this;c.elem=b,c.$elem=jQuery(b),jQuery(".no-js").removeClass("no-js"),c.sliderId="#"+c.$elem.attr("id"),c.$sliderId=jQuery(c.sliderId),c.options=jQuery.extend({},jQuery.fn.liquidSlider.options,a),c.pSign=c.options.responsive?"%":"px",c.determineAnimationType(),c.options.responsive||(c.options.mobileNavigation=!1,c.options.hideArrowsWhenMobile=!1),"animate.css"===c.options.slideEaseFunction&&(c.useCSS?(c.options.continuous=!1,c.animateCSS=!0):c.options.slideEaseFunction=c.options.slideEaseFunctionFallback),c.build(),c.events(),!c.options.responsive&&c.options.dynamicArrows&&c.$sliderWrap.width(c.$sliderId.outerWidth(!0)+c.leftArrow.outerWidth(!0)+c.rightArrow.outerWidth(!0)),c.loaded=!0,c.options.preload.call(c)},LiquidSlider.build=function(){var a,b=this;"ls-wrapper"!==b.$sliderId.parent().attr("class")&&b.$sliderId.wrap('
'),b.$sliderWrap=jQuery(b.sliderId+"-wrapper"),b.options.preloader&&b.addPreloader(),jQuery(b.sliderId).children().addClass(b.$elem.attr("id")+"-panel panel"),b.panelClass=b.sliderId+" ."+b.$elem.attr("id")+"-panel:not(.clone)",b.$panelClass=jQuery(b.panelClass),b.$panelClass.wrapAll('
'),b.$panelClass.wrapInner('
'),b.panelContainer=b.$panelClass.parent(),b.$panelContainer=b.panelContainer,b.options.hashLinking&&b.buildHashTags(),"fade"===b.options.slideEaseFunction&&(b.$panelClass.addClass("fade"),b.options.continuous=!1,b.fade=!0),b.options.dynamicTabs?b.addNavigation():b.options.mobileNavigation=!1,b.options.dynamicArrows?b.addArrows():(b.options.hoverArrows=!1,b.options.hideSideArrows=!1,b.options.hideArrowsWhenMobile=!1),a=b.$leftArrow&&"absolute"===b.$leftArrow.css("position")?0:1,b.totalSliderWidth=b.$sliderId.outerWidth(!0)+jQuery(b.$leftArrow).outerWidth(!0)*a+jQuery(b.$rightArrow).outerWidth(!0)*a,jQuery(b.$sliderWrap).css("width",b.totalSliderWidth),b.options.dynamicTabs&&b.alignNavigation(),b.options.hideSideArrows&&(b.options.continuous=!1),b.options.continuous&&(b.$panelContainer.prepend(b.$panelContainer.children().last().clone().addClass("clone")),b.$panelContainer.append(b.$panelContainer.children().eq(1).clone().addClass("clone")));var c=b.options.continuous?2:0;b.panelCount=jQuery(b.panelClass).length,b.panelCountTotal=b.fade?1:b.panelCount+c,b.panelWidth=jQuery(b.panelClass).outerWidth(),b.totalWidth=b.panelCountTotal*b.panelWidth,jQuery(b.sliderId+" .panel-container").css("width",b.totalWidth),b.slideDistance=b.options.responsive?100:jQuery(b.sliderId).outerWidth(),b.useCSS&&b.options.responsive&&(b.totalWidth=100*b.panelCountTotal,b.slideDistance=100/b.panelCountTotal),b.options.responsive&&b.makeResponsive(),b.prepareTransition(b.getFirstPanel(),!0),b.updateClass()},LiquidSlider.determineAnimationType=function(){var a=this,b="animation",c="",d="Webkit Moz O ms Khtml".split(" "),e="",f=0;if(a.useCSS=!1,a.elem.style.animationName&&(a.useCSS=!0),a.useCSS===!1)for(f=0;fa.options.useCSSMaxWidth&&(a.useCSS=!1)},LiquidSlider.configureCSSTransitions=function(a,b){var c,d,e,f,g=this;g.easing={easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175,.885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},e=g.easing[g.options.slideEaseFunction]||g.options.slideEaseFunction,f=g.easing[g.options.heightEaseFunction]||g.options.heightEaseFunction,g.useCSS&&(c="all "+(a||g.options.slideEaseDuration)+"ms "+e,d="all "+(b||g.options.heightEaseDuration)+"ms "+f,jQuery(g.panelContainer).css({"-webkit-transition":c,"-moz-transition":c,"-ms-transition":c,"-o-transition":c,transition:c}),g.options.autoHeight&&g.$sliderId.css({"-webkit-transition":d,"-moz-transition":d,"-ms-transition":d,"-o-transition":d,transition:d}))},LiquidSlider.transitionFade=function(){var a=this;jQuery(a.panelClass).eq(a.nextPanel).fadeTo(a.options.fadeInDuration,1).css("z-index",1),jQuery(a.panelClass).eq(a.prevPanel).fadeTo(a.options.fadeOutDuration,0).css("z-index",0),a.callback(a.options.callback,!0)},LiquidSlider.hover=function(){var a=this;a.$sliderWrap.hover(function(){a.options.hoverArrows&&a.hideShowArrows(a.options.fadeInDuration,!0,!0,!1),a.options.pauseOnHover&&clearTimeout(a.autoSlideTimeout)},function(){a.options.hoverArrows&&a.hideShowArrows(a.options.fadeOutnDuration,!0,!1,!0),a.options.pauseOnHover&&a.options.autoSlide&&a.startAutoSlide(!0)})},LiquidSlider.events=function(){var a=this;a.options.dynamicArrows&&a.registerArrows(),a.options.dynamicTabs&&a.registerNav(),a.options.swipe&&a.registerTouch(),a.options.keyboardNavigation&&a.registerKeyboard(),a.$sliderWrap.find("*").on("click",function(){a.options.forceAutoSlide?a.startAutoSlide(!0):a.options.autoSlide&&a.stopAutoSlide()}),a.hover()},LiquidSlider.setNextPanel=function(a){var b=this;a!==b.nextPanel&&(b.prevPanel=b.nextPanel,b.loaded&&("number"==typeof a?b.nextPanel=a:(b.nextPanel+=~~("right"===a)||-1,b.options.continuous||(b.nextPanel=b.nextPanel<0?b.panelCount-1:b.nextPanel%b.panelCount)),b.fade||b.animateCSS?b.prepareTransition(b.nextPanel):b.verifyPanel()))},LiquidSlider.getFirstPanel=function(){var a,b=this;return b.options.hashLinking&&(a=jQuery.inArray(b.convertRegex(window.location.hash),b.hashLinks),-1===a&&(a=0)),a?a:b.options.firstPanelToLoad-1},LiquidSlider.getFromPanel=function(a,b){var c=this;return c.convertRegex(c.$panelClass.find(a).eq(b).text())},LiquidSlider.convertRegex=function(a){return jQuery.trim(a).replace(/[^\w -]+/g,"").replace(/ +/g,"-").toLowerCase()},LiquidSlider.updateClass=function(a){var b=this;b.options.dynamicTabs&&jQuery(b.$sliderWrap).find("> .ls-nav .tab"+b.sanitizeNumber(b.nextPanel)).addClass("current").siblings().removeClass("current"),b.$panelClass.eq(b.sanitizeNumber(b.nextPanel)-1).addClass("currentPanel").siblings().removeClass("currentPanel"),b.$clones=jQuery(b.sliderId+" .clone"),!b.options.continuous||-1!==b.nextPanel&&b.nextPanel!==b.panelCount?b.$clones.removeClass("currentPanel"):b.$clones.addClass("currentPanel"),a&&($(".ls-current").removeClass("ls-current"),a.addClass("ls-current"))},LiquidSlider.sanitizeNumber=function(a){var b=this;switch(!0){case a>=b.panelCount:return 1;case-1>=a:return b.panelCount;default:return a+1}},LiquidSlider.finalize=function(){var a=this,b=a.options.autoHeight?a.getHeight():a.getHeighestPanel(a.nextPanel);a.options.autoHeight&&a.adjustHeight(!0,b),a.options.autoSlide&&a.autoSlide(),a.options.preloader&&a.removePreloader(),a.onload()},LiquidSlider.callback=function(a,b){var c=this;a&&c.loaded&&(c.useCSS&&"undefined"!=typeof b?jQuery(".panel-container").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){a.call(c)}):setTimeout(function(){a.call(c)},c.options.slideEaseDuration+50))},LiquidSlider.onload=function(){var a=this;a.options.onload.call(a)},LiquidSlider.prepareTransition=function(a,b,c,d){var e=this;e.nextPanel=a||0,c||e.pretransition(e.options.pretransition),e.noAnimation=b,e.noPosttransition=d,e.loaded?e.options.pretransition.call(e):e.transition()},LiquidSlider.pretransition=function(){var a=this;a.options.hashLinking&&a.updateHashTags(),a.options.mobileNavigation&&a.dropdownSelect.val("tab"+(a.nextPanel+1)),a.options.hideSideArrows&&a.hideShowArrows(),a.updateClass()},LiquidSlider.getTransitionMargin=function(){var a=this;return-(a.nextPanel*a.slideDistance)-a.slideDistance*~~a.options.continuous},LiquidSlider.transition=function(){var a=this,b=a.getTransitionMargin();if(a.animateCSS&&a.loaded)return a.transitionOutAnimateCSS(),!1;if(b+a.pSign!==a.panelContainer.css("margin-left")||-100!==b)switch(a.options.autoHeight&&!a.animateCSS&&a.adjustHeight(!0,a.getHeight()),!0){case a.fade:a.transitionFade();break;case a.animateCSS:a.transitionInAnimateCSS(b);break;case a.useCSS:a.transitionCSS(b,a.noAnimation);break;default:a.transitionjQuery(b,a.noAnimation)}a.noPosttransition||a.callback(a.options.callback)},LiquidSlider.transitionOutAnimateCSS=function(){var a=this;jQuery(a.panelClass).removeClass(a.options.animateIn+" animated"),jQuery(a.panelClass).eq(a.prevPanel).addClass("animated "+a.options.animateOut),a.callback(a.transitionInAnimateCSS,void 0)},LiquidSlider.transitionInAnimateCSS=function(){var a=this;a.options.autoHeight&&a.adjustHeight(!1,a.getHeight()),a.transitionCSS(a.getTransitionMargin(),!a.loaded),jQuery(a.panelClass).removeClass(a.options.animateOut+" animated"),jQuery(a.panelClass).eq(a.nextPanel).addClass("animated "+a.options.animateIn),a.callback(a.options.callback,void 0)},LiquidSlider.transitionCSS=function(a,b){var c=this;b&&c.configureCSSTransitions("0","0"),c.panelContainer.css({"-webkit-transform":"translate3d("+a+c.pSign+", 0, 0)","-moz-transform":"translate3d("+a+c.pSign+", 0, 0)","-ms-transform":"translate3d("+a+c.pSign+", 0, 0)","-o-transform":"translate3d("+a+c.pSign+", 0, 0)",transform:"translate3d("+a+c.pSign+", 0, 0)"}),b?c.callback(function(){c.configureCSSTransitions()}):c.configureCSSTransitions()},LiquidSlider.transitionjQuery=function(a,b){var c=this;b?c.panelContainer.css("margin-left",a+c.pSign):c.panelContainer.animate({"margin-left":a+c.pSign},{easing:jQuery.easing.hasOwnProperty(c.options.slideEaseFunction)?c.options.slideEaseFunction:c.options.slideEaseFunctionFallback,duration:c.options.slideEaseDuration,queue:!1})},LiquidSlider.getHeight=function(a){var b=this;return a=a||b.$panelClass.eq(b.sanitizeNumber(b.nextPanel)-1).outerHeight(!0),a=ac?a:c}),b.options.autoHeight?c:void 0},LiquidSlider.verifyPanel=function(){var a=this,b=!1;if(a.options.continuous)switch(!0){case a.nextPanel>a.panelCount:a.nextPanel=a.panelCount,a.setNextPanel(a.panelCount);break;case a.nextPanel<-1:a.nextPanel=-1,a.setNextPanel(-1);break;case b||a.nextPanel===a.panelCount||-1===a.nextPanel:a.prepareTransition(a.nextPanel),a.updateClass(),clearTimeout(c);var c=setTimeout(function(){a.nextPanel===a.panelCount?a.prepareTransition(0,!0,!0,!0):-1===a.nextPanel&&a.prepareTransition(a.panelCount-1,!0,!0,!0)},a.options.slideEaseDuration+50);break;default:b=!0,a.prepareTransition(a.nextPanel)}else a.nextPanel===a.panelCount?a.nextPanel=0:-1===a.nextPanel&&(a.nextPanel=a.panelCount-1),a.prepareTransition(a.nextPanel)},LiquidSlider.addNavigation=function(a){var b=this,c="<"+b.options.navElementTag+' class="ls-nav">
    ";if("bottom"===b.options.dynamicTabsPosition?b.$sliderId.after(c):b.$sliderId.before(c),b.options.mobileNavigation){var d=b.options.mobileNavDefaultText?'":null,e='
    ";b.navigation=jQuery(b.sliderId+"-nav-ul").before(e),b.dropdown=jQuery(b.sliderId+"-wrapper .ls-select-box"),b.dropdownSelect=jQuery(b.sliderId+"-nav-select"),jQuery.each(b.$elem.find(b.options.panelTitleSelector),function(a){jQuery(b.$sliderWrap).find(".ls-select-box select").append('")})}jQuery.each(b.$elem.find(b.options.panelTitleSelector),function(c){jQuery(b.$sliderWrap).find(".ls-nav ul").append('
  • '+b.getNavInsides(this)+"
  • "),b.options.includeTitle||jQuery(this).remove()})},LiquidSlider.getNavInsides=function(a){return this.options.dynamicTabsHtml?jQuery(a).html():jQuery(a).text()},LiquidSlider.alignNavigation=function(){var a=this,b=a.options.dynamicArrowsGraphical?"-arrow":"";"center"!==a.options.dynamicTabsAlign&&(a.options.responsive||jQuery(a.$sliderWrap).find(".ls-nav ul").css("margin-"+a.options.dynamicTabsAlign,jQuery(a.$sliderWrap).find(".ls-nav-"+a.options.dynamicTabsAlign+b).outerWidth(!0)+parseInt(a.$sliderId.css("margin-"+a.options.dynamicTabsAlign),10)),jQuery(a.$sliderWrap).find(".ls-nav ul").css("float",a.options.dynamicTabsAlign)),a.totalNavWidth=jQuery(a.$sliderWrap).find(".ls-nav ul").outerWidth(!0),"center"===a.options.dynamicTabsAlign&&(a.totalNavWidth=0,jQuery(a.$sliderWrap).find(".ls-nav li a").each(function(){a.totalNavWidth+=jQuery(this).outerWidth(!0)}),jQuery(a.$sliderWrap).find(".ls-nav ul").css("width",a.totalNavWidth+1))},LiquidSlider.registerNav=function(){var a=this;a.$sliderWrap.find("[class^=ls-nav] li").on("click",function(b){return b.preventDefault(),a.setNextPanel(parseInt(jQuery(this).attr("class").split("tab")[1],10)-1),!1})},LiquidSlider.addArrows=function(a){var b=this,c=b.options.dynamicArrowsGraphical?"-arrow ":" ";b.$sliderWrap.addClass("arrows"),b.options.dynamicArrowsGraphical&&(b.options.dynamicArrowLeftText="",b.options.dynamicArrowRightText=""),b.$sliderId.before('"),b.$sliderId.after('"),b.leftArrow=jQuery(b.sliderId+"-wrapper [class^=ls-nav-left]").css("visibility","hidden").addClass("ls-hidden"),b.rightArrow=jQuery(b.sliderId+"-wrapper [class^=ls-nav-right]").css("visibility","hidden").addClass("ls-hidden"),b.options.hoverArrows||b.hideShowArrows(void 0,!0,!0,!1)},LiquidSlider.hideShowArrows=function(a,b,c,d){var e=this,f="undefined"!=typeof a?a:e.options.fadeOutDuration,g="undefined"!=typeof a?a:e.options.fadeInDuration,h=b?"visible":"hidden";c||!d&&1!==e.sanitizeNumber(e.nextPanel)?(c||e.leftArrow.hasClass("ls-hidden"))&&e.leftArrow.stop().css("visibility","visible").fadeTo(g,1).removeClass("ls-hidden"):e.leftArrow.stop().fadeTo(f,0,function(){jQuery(this).css("visibility",h).addClass("ls-hidden")}),c||!d&&e.sanitizeNumber(e.nextPanel)!==e.panelCount?(c||e.rightArrow.hasClass("ls-hidden"))&&e.rightArrow.stop().css("visibility","visible").fadeTo(g,1).removeClass("ls-hidden"):e.rightArrow.stop().fadeTo(f,0,function(){jQuery(this).css("visibility",h).addClass("ls-hidden")})},LiquidSlider.registerArrows=function(){var a=this;jQuery(a.$sliderWrap.find("[class^=ls-nav-]")).on("click",function(b){b.preventDefault(),a.setNextPanel(jQuery(this).attr("class").split(" ")[0].split("-")[2])})},LiquidSlider.adjustHeight=function(a,b,c,d){var e=this;return a||e.useCSS?(a&&e.configureCSSTransitions("0","0"),e.$sliderId.height(b),void(a&&e.configureCSSTransitions())):void e.$sliderId.animate({height:b+"px"},{easing:jQuery.easing.hasOwnProperty(c||e.options.heightEaseFunction)?c||e.options.heightEaseFunction:e.options.slideEaseFunctionFallback,duration:d||e.options.heightEaseDuration,queue:!1})},LiquidSlider.autoSlide=function(){var a=this;a.options.autoSlideIntervala.options.heightEaseDuration?a.options.slideEaseDuration:a.options.heightEaseDuration),a.autoSlideTimeout=document.hasFocus()?setTimeout(function(){a.setNextPanel(a.options.autoSlideDirection),a.autoSlide()},a.options.autoSlideInterval):void 0,jQuery(window).on("focus",function(){a.startAutoSlide(!0)}),jQuery(window).on("blur",function(){a.stopAutoSlide()})},LiquidSlider.stopAutoSlide=function(){var a=this;a.options.autoSlide=!1,clearTimeout(a.autoSlideTimeout)},LiquidSlider.startAutoSlide=function(a){var b=this;b.options.autoSlide=!0,a||b.setNextPanel(b.options.autoSlideDirection),b.autoSlide(clearTimeout(b.autoSlideTimeout))},LiquidSlider.buildHashTags=function(){var a=this;a.hashLinks=[],jQuery(a.panelClass+" "+a.options.hashTitleSelector).each(function(){a.hashLinks.push(a.convertRegex($(this).text()))})},LiquidSlider.updateHashTags=function(){var a=this;window.location.hash=a.hashLinks[a.sanitizeNumber(a.nextPanel)-1]},LiquidSlider.registerKeyboard=function(){var a=this;jQuery(document).keydown(function(b){var c=b.keyCode||b.which;"textarea"!==b.target.type&&"textbox"!==b.target.type&&(a.options.forceAutoSlide||jQuery(this).trigger("click"),c===a.options.leftKey&&a.setNextPanel("right"),c===a.options.rightKey&&a.setNextPanel("left"),jQuery.each(a.options.panelKeys,function(b,d){c===d&&a.setNextPanel(b-1)}))})},LiquidSlider.addPreloader=function(){var a=this;jQuery(a.sliderId+"-wrapper").append('
    ')},LiquidSlider.removePreloader=function(){var a=this;jQuery(a.sliderId+"-wrapper .ls-preloader").fadeTo("slow",0,function(){jQuery(this).remove()})},LiquidSlider.makeResponsive=function(){var a=this;jQuery(a.sliderId+"-wrapper").addClass("ls-responsive").css({"max-width":jQuery(a.sliderId+" .panel:first-child").width(),width:"100%"}),jQuery(a.sliderId+" .panel-container").css("width",100*a.panelCountTotal+a.pSign),jQuery(a.sliderId+" .panel").css("width",100/a.panelCountTotal+a.pSign),jQuery(a.sliderId+" .panel").css("width",jQuery(a.sliderId+" .panel").outerWidth(!0)),a.options.hideArrowsWhenMobile&&(a.leftWrapperPadding=jQuery(a.sliderId+"-wrapper").css("padding-left"),a.rightWrapperPadding=a.$sliderWrap.css("padding-right")),a.responsiveEvents(),jQuery(window).bind("resize orientationchange",function(){a.responsiveEvents(),clearTimeout(a.resizingTimeout),a.resizingTimeout=setTimeout(function(){var b=a.options.autoHeight?a.getHeight():a.getHeighestPanel(a.nextPanel);a.adjustHeight(!1,b),jQuery(a.sliderId+" .panel").css("width",jQuery(a.sliderId+" .panel").outerWidth(!0))},500)})},LiquidSlider.responsiveEvents=function(){var a=this,b=a.options.hideArrowsThreshold||a.options.mobileUIThreshold||a.totalNavWidth+10;a.$sliderId.outerWidth()0){return}var ba=a9.originalEvent?a9.originalEvent:a9;var a8,a7=a?ba.touches[0]:ba;W=f;if(a){T=ba.touches.length}else{a9.preventDefault()}ac=0;aL=null;aF=null;Y=0;aX=0;aV=0;D=1;am=0;aM=af();J=X();O();if(!a||(T===aq.fingers||aq.fingers===h)||aT()){ae(0,a7);Q=ao();if(T==2){ae(1,ba.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}if(aq.swipeStatus||aq.pinchStatus){a8=L(ba,W)}}else{a8=false}if(a8===false){W=p;L(ba,W);return a8}else{ak(true)}}function aZ(ba){var bd=ba.originalEvent?ba.originalEvent:ba;if(W===g||W===p||ai()){return}var a9,a8=a?bd.touches[0]:bd;var bb=aD(a8);aY=ao();if(a){T=bd.touches.length}W=j;if(T==2){if(aX==0){ae(1,bd.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}else{aD(bd.touches[1]);aV=ap(aM[0].end,aM[1].end);aF=an(aM[0].end,aM[1].end)}D=a3(aX,aV);am=Math.abs(aX-aV)}if((T===aq.fingers||aq.fingers===h)||!a||aT()){aL=aH(bb.start,bb.end);ah(ba,aL);ac=aO(bb.start,bb.end);Y=aI();aE(aL,ac);if(aq.swipeStatus||aq.pinchStatus){a9=L(bd,W)}if(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave){var a7=true;if(aq.triggerOnTouchLeave){var bc=aU(this);a7=B(bb.end,bc)}if(!aq.triggerOnTouchEnd&&a7){W=ay(j)}else{if(aq.triggerOnTouchLeave&&!a7){W=ay(g)}}if(W==p||W==g){L(bd,W)}}}else{W=p;L(bd,W)}if(a9===false){W=p;L(bd,W)}}function I(a7){var a8=a7.originalEvent;if(a){if(a8.touches.length>0){C();return true}}if(ai()){T=aa}a7.preventDefault();aY=ao();Y=aI();if(a6()){W=p;L(a8,W)}else{if(aq.triggerOnTouchEnd||(aq.triggerOnTouchEnd==false&&W===j)){W=g;L(a8,W)}else{if(!aq.triggerOnTouchEnd&&a2()){W=g;aB(a8,W,x)}else{if(W===j){W=p;L(a8,W)}}}}ak(false)}function a5(){T=0;aY=0;Q=0;aX=0;aV=0;D=1;O();ak(false)}function H(a7){var a8=a7.originalEvent;if(aq.triggerOnTouchLeave){W=ay(g);L(a8,W)}}function aG(){aN.unbind(G,aJ);aN.unbind(az,a5);aN.unbind(au,aZ);aN.unbind(R,I);if(P){aN.unbind(P,H)}ak(false)}function ay(bb){var ba=bb;var a9=aw();var a8=aj();var a7=a6();if(!a9||a7){ba=p}else{if(a8&&bb==j&&(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave)){ba=g}else{if(!a8&&bb==g&&aq.triggerOnTouchLeave){ba=p}}}return ba}function L(a9,a7){var a8=undefined;if(F()||S()){a8=aB(a9,a7,k)}else{if((M()||aT())&&a8!==false){a8=aB(a9,a7,s)}}if(aC()&&a8!==false){a8=aB(a9,a7,i)}else{if(al()&&a8!==false){a8=aB(a9,a7,b)}else{if(ad()&&a8!==false){a8=aB(a9,a7,x)}}}if(a7===p){a5(a9)}if(a7===g){if(a){if(a9.touches.length==0){a5(a9)}}else{a5(a9)}}return a8}function aB(ba,a7,a9){var a8=undefined;if(a9==k){aN.trigger("swipeStatus",[a7,aL||null,ac||0,Y||0,T]);if(aq.swipeStatus){a8=aq.swipeStatus.call(aN,ba,a7,aL||null,ac||0,Y||0,T);if(a8===false){return false}}if(a7==g&&aR()){aN.trigger("swipe",[aL,ac,Y,T]);if(aq.swipe){a8=aq.swipe.call(aN,ba,aL,ac,Y,T);if(a8===false){return false}}switch(aL){case o:aN.trigger("swipeLeft",[aL,ac,Y,T]);if(aq.swipeLeft){a8=aq.swipeLeft.call(aN,ba,aL,ac,Y,T)}break;case n:aN.trigger("swipeRight",[aL,ac,Y,T]);if(aq.swipeRight){a8=aq.swipeRight.call(aN,ba,aL,ac,Y,T)}break;case d:aN.trigger("swipeUp",[aL,ac,Y,T]);if(aq.swipeUp){a8=aq.swipeUp.call(aN,ba,aL,ac,Y,T)}break;case v:aN.trigger("swipeDown",[aL,ac,Y,T]);if(aq.swipeDown){a8=aq.swipeDown.call(aN,ba,aL,ac,Y,T)}break}}}if(a9==s){aN.trigger("pinchStatus",[a7,aF||null,am||0,Y||0,T,D]);if(aq.pinchStatus){a8=aq.pinchStatus.call(aN,ba,a7,aF||null,am||0,Y||0,T,D);if(a8===false){return false}}if(a7==g&&a4()){switch(aF){case c:aN.trigger("pinchIn",[aF||null,am||0,Y||0,T,D]);if(aq.pinchIn){a8=aq.pinchIn.call(aN,ba,aF||null,am||0,Y||0,T,D)}break;case w:aN.trigger("pinchOut",[aF||null,am||0,Y||0,T,D]);if(aq.pinchOut){a8=aq.pinchOut.call(aN,ba,aF||null,am||0,Y||0,T,D)}break}}}if(a9==x){if(a7===p||a7===g){clearTimeout(aS);if(V()&&!E()){K=ao();aS=setTimeout(e.proxy(function(){K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}},this),aq.doubleTapThreshold)}else{K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}}}}else{if(a9==i){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("doubletap",[ba.target]);if(aq.doubleTap){a8=aq.doubleTap.call(aN,ba,ba.target)}}}else{if(a9==b){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("longtap",[ba.target]);if(aq.longTap){a8=aq.longTap.call(aN,ba,ba.target)}}}}}return a8}function aj(){var a7=true;if(aq.threshold!==null){a7=ac>=aq.threshold}return a7}function a6(){var a7=false;if(aq.cancelThreshold!==null&&aL!==null){a7=(aP(aL)-ac)>=aq.cancelThreshold}return a7}function ab(){if(aq.pinchThreshold!==null){return am>=aq.pinchThreshold}return true}function aw(){var a7;if(aq.maxTimeThreshold){if(Y>=aq.maxTimeThreshold){a7=false}else{a7=true}}else{a7=true}return a7}function ah(a7,a8){if(aq.allowPageScroll===l||aT()){a7.preventDefault()}else{var a9=aq.allowPageScroll===r;switch(a8){case o:if((aq.swipeLeft&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case n:if((aq.swipeRight&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case d:if((aq.swipeUp&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break;case v:if((aq.swipeDown&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break}}}function a4(){var a8=aK();var a7=U();var a9=ab();return a8&&a7&&a9}function aT(){return !!(aq.pinchStatus||aq.pinchIn||aq.pinchOut)}function M(){return !!(a4()&&aT())}function aR(){var ba=aw();var bc=aj();var a9=aK();var a7=U();var a8=a6();var bb=!a8&&a7&&a9&&bc&&ba;return bb}function S(){return !!(aq.swipe||aq.swipeStatus||aq.swipeLeft||aq.swipeRight||aq.swipeUp||aq.swipeDown)}function F(){return !!(aR()&&S())}function aK(){return((T===aq.fingers||aq.fingers===h)||!a)}function U(){return aM[0].end.x!==0}function a2(){return !!(aq.tap)}function V(){return !!(aq.doubleTap)}function aQ(){return !!(aq.longTap)}function N(){if(K==null){return false}var a7=ao();return(V()&&((a7-K)<=aq.doubleTapThreshold))}function E(){return N()}function at(){return((T===1||!a)&&(isNaN(ac)||ac===0))}function aW(){return((Y>aq.longTapThreshold)&&(ac=0)){return o}else{if((a9<=360)&&(a9>=315)){return o}else{if((a9>=135)&&(a9<=225)){return n}else{if((a9>45)&&(a9<135)){return v}else{return d}}}}}function ao(){var a7=new Date();return a7.getTime()}function aU(a7){a7=e(a7);var a9=a7.offset();var a8={left:a9.left,right:a9.left+a7.outerWidth(),top:a9.top,bottom:a9.top+a7.outerHeight()};return a8}function B(a7,a8){return(a7.x>a8.left&&a7.xa8.top&&a7.y pos + windowHeight) { return; } $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px"); }); } $window.bind('scroll', update).resize(update); update(); }; })(jQuery); /** * jQuery.LocalScroll - Animated scrolling navigation, using anchors. * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 3/11/2009 * @author Ariel Flesler * @version 1.2.7 **/ ;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$(' ').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery); !function(t,e,i,n){var a=e.document,o=t(a),r=t(e),s=Array.prototype,l=1.33,c=true,h=3e4,u=false,f=navigator.userAgent.toLowerCase(),d=e.location.hash.replace(/#\//,""),p=e.location.protocol,g=Math,m=function(){},v=function(){return false},y=function(){var t=3,e=a.createElement("div"),i=e.getElementsByTagName("i");do{e.innerHTML=""}while(i[0]);return t>4?t:a.documentMode||n}(),_=function(){return{html:a.documentElement,body:a.body,head:a.getElementsByTagName("head")[0],title:a.title}},b=e.parent!==e.self,w="data ready thumbnail loadstart loadfinish image play pause progress "+"fullscreen_enter fullscreen_exit idle_enter idle_exit rescale "+"lightbox_open lightbox_close lightbox_image",x=function(){var e=[];t.each(w.split(" "),function(t,i){e.push(i);if(/_/.test(i)){e.push(i.replace(/_/g,""))}});return e}(),T=function(e){var i;if(typeof e!=="object"){return e}t.each(e,function(n,a){if(/^[a-z]+_/.test(n)){i="";t.each(n.split("_"),function(t,e){i+=t>0?e.substr(0,1).toUpperCase()+e.substr(1):e});e[i]=a;delete e[n]}});return e},k=function(e){if(t.inArray(e,x)>-1){return i[e.toUpperCase()]}return e},C={youtube:{reg:/https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&(?:amp;)?)*v(?:<[A-Z]+>)?=([0-9a-zA-Z\-\_]+))/i,embed:function(){return"http://www.youtube.com/embed/"+this.id},getUrl:function(){return p+"//gdata.youtube.com/feeds/api/videos/"+this.id+"?v=2&alt=json-in-script&callback=?"},get_thumb:function(t){return t.entry.media$group.media$thumbnail[2].url},get_image:function(t){if(t.entry.yt$hd){return p+"//img.youtube.com/vi/"+this.id+"/maxresdefault.jpg"}return t.entry.media$group.media$thumbnail[3].url}},vimeo:{reg:/https?:\/\/(?:www\.)?(vimeo\.com)\/(?:hd#)?([0-9]+)/i,embed:function(){return"http://player.vimeo.com/video/"+this.id},getUrl:function(){return p+"//vimeo.com/api/v2/video/"+this.id+".json?callback=?"},get_thumb:function(t){return t[0].thumbnail_medium},get_image:function(t){return t[0].thumbnail_large}},dailymotion:{reg:/https?:\/\/(?:www\.)?(dailymotion\.com)\/video\/([^_]+)/,embed:function(){return p+"//www.dailymotion.com/embed/video/"+this.id},getUrl:function(){return"https://api.dailymotion.com/video/"+this.id+"?fields=thumbnail_240_url,thumbnail_720_url&callback=?"},get_thumb:function(t){return t.thumbnail_240_url},get_image:function(t){return t.thumbnail_720_url}},_inst:[]},I=function(e,i){for(var n=0;n=a+n.timeout){n.error();return false}i._waiters.push(s=e.setTimeout(l,10))};i._waiters.push(s=e.setTimeout(l,10))},toggleQuality:function(t,e){if(y!==7&&y!==8||!t||t.nodeName.toUpperCase()!="IMG"){return}if(typeof e==="undefined"){e=t.style.msInterpolationMode==="nearest-neighbor"}t.style.msInterpolationMode=e?"bicubic":"nearest-neighbor"},insertStyleTag:function(e,i){if(i&&t("#"+i).length){return}var n=a.createElement("style");if(i){n.id=i}_().head.appendChild(n);if(n.styleSheet){n.styleSheet.cssText=e}else{var o=a.createTextNode(e);n.appendChild(o)}},loadScript:function(e,i){var n=false,a=t("").attr({src:e,async:true}).get(0);a.onload=a.onreadystatechange=function(){if(!n&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){n=true;a.onload=a.onreadystatechange=null;if(typeof i==="function"){i.call(this,this)}}};_().head.appendChild(a)},parseValue:function(t){if(typeof t==="number"){return t}else if(typeof t==="string"){var e=t.match(/\-?\d|\./g);return e&&e.constructor===Array?e.join("")*1:0}else{return 0}},timestamp:function(){return(new Date).getTime()},loadCSS:function(e,o,r){var s,l;t("link[rel=stylesheet]").each(function(){if(new RegExp(e).test(this.href)){s=this;return false}});if(typeof o==="function"){r=o;o=n}r=r||m;if(s){r.call(s,s);return s}l=a.styleSheets.length;if(t("#"+o).length){t("#"+o).attr("href",e);l--}else{s=t("").attr({rel:"stylesheet",href:e,id:o}).get(0);var c=t('link[rel="stylesheet"], style');if(c.length){c.get(0).parentNode.insertBefore(s,c[0])}else{_().head.appendChild(s)}if(y&&l>=31){i.raise("You have reached the browser stylesheet limit (31)",true);return}}if(typeof r==="function"){var h=t("").attr("id","galleria-loader").hide().appendTo(_().body);H.wait({until:function(){return h.height()==1},success:function(){h.remove();r.call(s,s)},error:function(){h.remove();i.raise("Theme CSS could not load after 20 sec. "+(i.QUIRK?"Your browser is in Quirks Mode, please add a correct doctype.":"Please download the latest theme at http://galleria.io/customer/."),true)},timeout:5e3})}return s}}}(),O=function(e){var i=".galleria-videoicon{width:60px;height:60px;position:absolute;top:50%;left:50%;z-index:1;"+"margin:-30px 0 0 -30px;cursor:pointer;background:#000;background:rgba(0,0,0,.8);border-radius:3px;-webkit-transition:all 150ms}"+".galleria-videoicon i{width:0px;height:0px;border-style:solid;border-width:10px 0 10px 16px;display:block;"+"border-color:transparent transparent transparent #ffffff;margin:20px 0 0 22px}.galleria-image:hover .galleria-videoicon{background:#000}";H.insertStyleTag(i,"galleria-videoicon");return t(H.create("galleria-videoicon")).html("").appendTo(e).click(function(){t(this).siblings("img").mouseup()})},F=function(){var e=function(e,i,n,a){var o=this.getOptions("easing"),r=this.getStageWidth(),s={left:r*(e.rewind?-1:1)},l={left:0};if(n){s.opacity=0;l.opacity=1}else{s.opacity=1}t(e.next).css(s);H.animate(e.next,l,{duration:e.speed,complete:function(t){return function(){i();t.css({left:0})}}(t(e.next).add(e.prev)),queue:false,easing:o});if(a){e.rewind=!e.rewind}if(e.prev){s={left:0};l={left:r*(e.rewind?1:-1)};if(n){s.opacity=1;l.opacity=0}t(e.prev).css(s);H.animate(e.prev,l,{duration:e.speed,queue:false,easing:o,complete:function(){t(this).css("opacity",0)}})}};return{active:false,init:function(t,e,i){if(F.effects.hasOwnProperty(t)){F.effects[t].call(this,e,i)}},effects:{fade:function(e,i){t(e.next).css({opacity:0,left:0});H.animate(e.next,{opacity:1},{duration:e.speed,complete:i});if(e.prev){t(e.prev).css("opacity",1).show();H.animate(e.prev,{opacity:0},{duration:e.speed})}},flash:function(e,i){t(e.next).css({opacity:0,left:0});if(e.prev){H.animate(e.prev,{opacity:0},{duration:e.speed/2,complete:function(){H.animate(e.next,{opacity:1},{duration:e.speed,complete:i})}})}else{H.animate(e.next,{opacity:1},{duration:e.speed,complete:i})}},pulse:function(e,i){if(e.prev){t(e.prev).hide()}t(e.next).css({opacity:0,left:0}).show();H.animate(e.next,{opacity:1},{duration:e.speed,complete:i})},slide:function(t,i){e.apply(this,H.array(arguments))},fadeslide:function(t,i){e.apply(this,H.array(arguments).concat([true]))},doorslide:function(t,i){e.apply(this,H.array(arguments).concat([false,true]))}}}}();A.listen();t.event.special["click:fast"]={propagate:true,add:function(e){var n=this.propagate;if(i.TOUCH){t(this).on("touchstart.fast",function a(i){var n=i.originalEvent,a,o,r=0;if(n.touches.length==1){a=n.touches[0].pageX;o=n.touches[0].pageY;t(this).on("touchmove.fast",function(t){var e=t.originalEvent.touches;if(e.length==1){r=g.max(g.abs(a-e[0].pageX),g.abs(o-e[0].pageY))}});t(this).on("touchend.fast",function(){if(r>4){return t(this).off("touchend.fast touchmove.fast")}e.handler.call(this,i);t(this).off("touchend.fast touchmove.fast")})}})}else{t(this).on("click.fast",e.handler)}},remove:function(e){if(i.TOUCH){t(this).off("touchstart.fast touchmove.fast touchend.fast")}else{t(this).off("click.fast",e.handler)}}};r.on("orientationchange",function(){t(this).resize()});i=function(){var s=this;this._options={};this._playing=false;this._playtime=5e3;this._active=null;this._queue={length:0};this._data=[];this._dom={};this._thumbnails=[];this._layers=[];this._initialized=false;this._firstrun=false;this._stageWidth=0;this._stageHeight=0;this._target=n;this._binds=[];this._id=parseInt(g.random()*1e4,10);var l="container stage images image-nav image-nav-left image-nav-right "+"info info-text info-title info-description "+"thumbnails thumbnails-list thumbnails-container thumb-nav-left thumb-nav-right "+"loader counter tooltip",c="current total";t.each(l.split(" "),function(t,e){s._dom[e]=H.create("galleria-"+e)});t.each(c.split(" "),function(t,e){s._dom[e]=H.create("galleria-"+e,"span")});var h=this._keyboard={keys:{UP:38,DOWN:40,LEFT:37,RIGHT:39,RETURN:13,ESCAPE:27,BACKSPACE:8,SPACE:32},map:{},bound:false,press:function(t){var e=t.keyCode||t.which;if(e in h.map&&typeof h.map[e]==="function"){h.map[e].call(s,t)}},attach:function(t){var e,i;for(e in t){if(t.hasOwnProperty(e)){i=e.toUpperCase();if(i in h.keys){h.map[h.keys[i]]=t[e]}else{h.map[i]=t[e]}}}if(!h.bound){h.bound=true;o.on("keydown",h.press)}},detach:function(){h.bound=false;h.map={};o.off("keydown",h.press)}};var u=this._controls={0:n,1:n,active:0,swap:function(){u.active=u.active?0:1},getActive:function(){return s._options.swipe?u.slides[s._active]:u[u.active]},getNext:function(){return s._options.swipe?u.slides[s.getNext(s._active)]:u[1-u.active]},slides:[],frames:[],layers:[]};var d=this._carousel={next:s.$("thumb-nav-right"),prev:s.$("thumb-nav-left"),width:0,current:0,max:0,hooks:[],update:function(){var e=0,i=0,n=[0];t.each(s._thumbnails,function(a,o){if(o.ready){e+=o.outerWidth||t(o.container).outerWidth(true);var r=t(o.container).width();e+=r-g.floor(r);n[a+1]=e;i=g.max(i,o.outerHeight||t(o.container).outerHeight(true))}});s.$("thumbnails").css({width:e,height:i});d.max=e;d.hooks=n;d.width=s.$("thumbnails-list").width();d.setClasses();s.$("thumbnails-container").toggleClass("galleria-carousel",e>d.width);d.width=s.$("thumbnails-list").width()},bindControls:function(){var t;d.next.on("click:fast",function(e){e.preventDefault();if(s._options.carouselSteps==="auto"){for(t=d.current;td.width){d.set(t-2);break}}}else{d.set(d.current+s._options.carouselSteps)}});d.prev.on("click:fast",function(e){e.preventDefault();if(s._options.carouselSteps==="auto"){for(t=d.current;t>=0;t--){if(d.hooks[d.current]-d.hooks[t]>d.width){d.set(t+2);break}else if(t===0){d.set(0);break}}}else{d.set(d.current-s._options.carouselSteps)}})},set:function(t){t=g.max(t,0);while(d.hooks[t-1]+d.width>=d.max&&t>=0){t--}d.current=t;d.animate()},getLast:function(t){return(t||d.current)-1},follow:function(t){if(t===0||t===d.hooks.length-2){d.set(t);return}var e=d.current;while(d.hooks[e]-d.hooks[d.current]e){d.set(t-e+d.current+2)}},setClasses:function(){d.prev.toggleClass("disabled",!d.current);d.next.toggleClass("disabled",d.hooks[d.current]+d.width>=d.max)},animate:function(e){d.setClasses();var i=d.hooks[d.current]*-1;if(isNaN(i)){return}s.$("thumbnails").css("left",function(){return t(this).css("left")});H.animate(s.get("thumbnails"),{left:i},{duration:s._options.carouselSpeed,easing:s._options.easing,queue:false})}};var p=this._tooltip={initialized:false,open:false,timer:"tooltip"+s._id,swapTimer:"swap"+s._id,init:function(){p.initialized=true;var t=".galleria-tooltip{padding:3px 8px;max-width:50%;background:#ffe;color:#000;z-index:3;position:absolute;font-size:11px;line-height:1.3;"+"opacity:0;box-shadow:0 0 2px rgba(0,0,0,.4);-moz-box-shadow:0 0 2px rgba(0,0,0,.4);-webkit-box-shadow:0 0 2px rgba(0,0,0,.4);}";H.insertStyleTag(t,"galleria-tooltip");s.$("tooltip").css({opacity:.8,visibility:"visible",display:"none"})},move:function(t){var e=s.getMousePosition(t).x,i=s.getMousePosition(t).y,n=s.$("tooltip"),a=e,o=i,r=n.outerHeight(true)+1,l=n.outerWidth(true),c=r+15;var h=s.$("container").width()-l-2,u=s.$("container").height()-r-2;if(!isNaN(a)&&!isNaN(o)){a+=10;o-=r+8;a=g.max(0,g.min(h,a));o=g.max(0,g.min(u,o));if(i7){c.nextholder+="background:#000;filter:alpha(opacity=0);";c.prevholder+="background:#000;filter:alpha(opacity=0);"}t.each(c,function(t,e){o+=".galleria-"+l+t+"{"+e+"}"});o+=".galleria-"+l+"box.iframe .galleria-"+l+"prevholder,"+".galleria-"+l+"box.iframe .galleria-"+l+"nextholder{"+"width:100px;height:100px;top:50%;margin-top:-70px}";H.insertStyleTag(o,"galleria-lightbox");t.each(e.split(" "),function(t,e){s.addElement("lightbox-"+e);n[e]=w.elems[e]=s.get("lightbox-"+e)});w.image=new i.Picture;t.each({box:"shadow content close prevholder nextholder",info:"title counter",content:"info image",prevholder:"prev",nextholder:"next"},function(e,i){var n=[];t.each(i.split(" "),function(t,e){n.push(l+e)});u[l+e]=n});s.append(u);t(n.image).append(w.image.container);t(_().body).append(n.overlay,n.box);h(t(n.close).on("click:fast",w.hide).html("×"));t.each(["Prev","Next"],function(e,a){var o=t(n[a.toLowerCase()]).html(/v/.test(a)?"‹ ":" ›"),r=t(n[a.toLowerCase()+"holder"]);r.on("click:fast",function(){w["show"+a]()});if(y<8||i.TOUCH){o.show();return}r.hover(function(){o.show()},function(t){o.stop().fadeOut(200)})});t(n.overlay).on("click:fast",w.hide);if(i.IPAD){s._options.lightboxTransitionSpeed=0}},rescale:function(e){var n=g.min(r.width()-40,w.width),a=g.min(r.height()-60,w.height),o=g.min(n/w.width,a/w.height),l=g.round(w.width*o)+40,c=g.round(w.height*o)+60,h={width:l,height:c,"margin-top":g.ceil(c/2)*-1,"margin-left":g.ceil(l/2)*-1};if(e){t(w.elems.box).css(h)}else{t(w.elems.box).animate(h,{duration:s._options.lightboxTransitionSpeed,easing:s._options.easing,complete:function(){var e=w.image,n=s._options.lightboxFadeSpeed;s.trigger({type:i.LIGHTBOX_IMAGE,imageTarget:e.image});t(e.container).show();t(e.image).animate({opacity:1},n);H.show(w.elems.info,n)}})}},hide:function(){w.image.image=null;r.off("resize",w.rescale);t(w.elems.box).hide().find("iframe").remove();H.hide(w.elems.info);s.detachKeyboard();s.attachKeyboard(w.keymap);w.keymap=false;H.hide(w.elems.overlay,200,function(){t(this).hide().css("opacity",s._options.overlayOpacity);s.trigger(i.LIGHTBOX_CLOSE)})},showNext:function(){w.show(s.getNext(w.active))},showPrev:function(){w.show(s.getPrev(w.active))},show:function(n){w.active=n=typeof n==="number"?n:s.getIndex()||0;if(!w.initialized){w.init()}s.trigger(i.LIGHTBOX_OPEN);if(!w.keymap){w.keymap=t.extend({},s._keyboard.map);s.attachKeyboard({escape:w.hide,right:w.showNext,left:w.showPrev})}r.off("resize",w.rescale);var a=s.getData(n),o=s.getDataLength(),l=s.getNext(n),c,h,u;H.hide(w.elems.info);try{for(u=s._options.preload;u>0;u--){h=new i.Picture;c=s.getData(l);h.preload(c.big?c.big:c.image);l=s.getNext(l)}}catch(f){}w.image.isIframe=a.iframe&&!a.image;t(w.elems.box).toggleClass("iframe",w.image.isIframe);t(w.image.container).find(".galleria-videoicon").remove();w.image.load(a.big||a.image||a.iframe,function(i){if(i.isIframe){var l=t(e).width(),c=t(e).height();if(i.video&&s._options.maxVideoSize){var h=g.min(s._options.maxVideoSize/l,s._options.maxVideoSize/c);if(h<1){l*=h;c*=h}}w.width=l;w.height=c}else{w.width=i.original.width;w.height=i.original.height}t(i.image).css({width:i.isIframe?"100%":"100.1%",height:i.isIframe?"100%":"100.1%",top:0,bottom:0,zIndex:99998,opacity:0,visibility:"visible"}).parent().height("100%");w.elems.title.innerHTML=a.title||"";w.elems.counter.innerHTML=n+1+" / "+o;r.resize(w.rescale);w.rescale();if(a.image&&a.iframe){t(w.elems.box).addClass("iframe");if(a.video){var u=O(i.container).hide();e.setTimeout(function(){u.fadeIn(200)},200)}t(i.image).css("cursor","pointer").mouseup(function(e,i){return function(n){t(w.image.container).find(".galleria-videoicon").remove();n.preventDefault();i.isIframe=true;i.load(e.iframe+(e.video?"&autoplay=1":""),{width:"100%",height:y<8?t(w.image.container).height():"100%"})}}(a,i))}});t(w.elems.overlay).show().css("visibility","visible");t(w.elems.box).show()}};var x=this._timer={trunk:{},add:function(t,i,n,a){t=t||(new Date).getTime();a=a||false;this.clear(t);if(a){var o=i;i=function(){o();x.add(t,i,n)}}this.trunk[t]=e.setTimeout(i,n)},clear:function(t){var i=function(t){e.clearTimeout(this.trunk[t]);delete this.trunk[t]},n;if(!!t&&t in this.trunk){i.call(this,t)}else if(typeof t==="undefined"){for(n in this.trunk){if(this.trunk.hasOwnProperty(n)){i.call(this,n)}}}}};return this};i.prototype={constructor:i,init:function(e,a){a=T(a);this._original={target:e,options:a,data:null};this._target=this._dom.target=e.nodeName?e:t(e).get(0);this._original.html=this._target.innerHTML;$.push(this);if(!this._target){i.raise("Target not found",true);return}this._options={autoplay:false,carousel:true,carouselFollow:true,carouselSpeed:400,carouselSteps:"auto",clicknext:false,dailymotion:{foreground:"%23EEEEEE",highlight:"%235BCEC5",background:"%23222222",logo:0,hideInfos:1},dataConfig:function(t){return{}},dataSelector:"img",dataSort:false,dataSource:this._target,debug:n,dummy:n,easing:"galleria",extend:function(t){},fullscreenCrop:n,fullscreenDoubleTap:true,fullscreenTransition:n,height:0,idleMode:true,idleTime:3e3,idleSpeed:200,imageCrop:false,imageMargin:0,imagePan:false,imagePanSmoothness:12,imagePosition:"50%",imageTimeout:n,initialTransition:n,keepSource:false,layerFollow:true,lightbox:false,lightboxFadeSpeed:200,lightboxTransitionSpeed:200,linkSourceImages:true,maxScaleRatio:n,maxVideoSize:n,minScaleRatio:n,overlayOpacity:.85,overlayBackground:"#0b0b0b",pauseOnInteraction:true,popupLinks:false,preload:2,queue:true,responsive:true,show:0,showInfo:true,showCounter:true,showImagenav:true,swipe:true,thumbCrop:true,thumbEventType:"click:fast",thumbMargin:0,thumbQuality:"auto",thumbDisplayOrder:true,thumbPosition:"50%",thumbnails:true,touchTransition:n,transition:"fade",transitionInitial:n,transitionSpeed:400,trueFullscreen:true,useCanvas:false,variation:"",videoPoster:true,vimeo:{title:0,byline:0,portrait:0,color:"aaaaaa"},wait:5e3,width:"auto",youtube:{modestbranding:1,autohide:1,color:"white",hd:1,rel:0,showinfo:0}}; this._options.initialTransition=this._options.initialTransition||this._options.transitionInitial;if(a&&a.debug===false){c=false}if(a&&typeof a.imageTimeout==="number"){h=a.imageTimeout}if(a&&typeof a.dummy==="string"){u=a.dummy}if(!i.TOUCH){this._options.swipe=false}t(this._target).children().hide();if(i.QUIRK){i.raise("Your page is in Quirks mode, Galleria may not render correctly. Please validate your HTML and add a correct doctype.")}if(typeof i.theme==="object"){this._init()}else{P.push(this)}return this},_init:function(){var o=this,s=this._options;if(this._initialized){i.raise("Init failed: Gallery instance already initialized.");return this}this._initialized=true;if(!i.theme){i.raise("Init failed: No theme found.",true);return this}t.extend(true,s,i.theme.defaults,this._original.options,i.configure.options);if(s.swipe){s.clicknext=false;s.imagePan=false}!function(t){if(!("getContext"in t)){t=null;return}L=L||{elem:t,context:t.getContext("2d"),cache:{},length:0}}(a.createElement("canvas"));this.bind(i.DATA,function(){if(e.screen&&e.screen.width&&Array.prototype.forEach){this._data.forEach(function(t){var i="devicePixelRatio"in e?e.devicePixelRatio:1,n=g.max(e.screen.width,e.screen.height);if(n*i<1024){t.big=t.image}})}this._original.data=this._data;this.get("total").innerHTML=this.getDataLength();var t=this.$("container");if(o._options.height<2){o._userRatio=o._ratio=o._options.height}var n={width:0,height:0};var a=function(){return o.$("stage").height()};H.wait({until:function(){n=o._getWH();t.width(n.width).height(n.height);return a()&&n.width&&n.height>50},success:function(){o._width=n.width;o._height=n.height;o._ratio=o._ratio||n.height/n.width;if(i.WEBKIT){e.setTimeout(function(){o._run()},1)}else{o._run()}},error:function(){if(a()){i.raise("Could not extract sufficient width/height of the gallery container. Traced measures: width:"+n.width+"px, height: "+n.height+"px.",true)}else{i.raise("Could not extract a stage height from the CSS. Traced height: "+a()+"px.",true)}},timeout:typeof this._options.wait=="number"?this._options.wait:false})});this.append({"info-text":["info-title","info-description"],info:["info-text"],"image-nav":["image-nav-right","image-nav-left"],stage:["images","loader","counter","image-nav"],"thumbnails-list":["thumbnails"],"thumbnails-container":["thumb-nav-left","thumbnails-list","thumb-nav-right"],container:["stage","thumbnails-container","info","tooltip"]});H.hide(this.$("counter").append(this.get("current"),a.createTextNode(" / "),this.get("total")));this.setCounter("–");H.hide(o.get("tooltip"));this.$("container").addClass((i.TOUCH?"touch":"notouch")+" "+this._options.variation);if(!this._options.swipe){t.each(new Array(2),function(e){var n=new i.Picture;t(n.container).css({position:"absolute",top:0,left:0}).prepend(o._layers[e]=t(H.create("galleria-layer")).css({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:2})[0]);o.$("images").append(n.container);o._controls[e]=n;var a=new i.Picture;a.isIframe=true;t(a.container).attr("class","galleria-frame").css({position:"absolute",top:0,left:0,zIndex:4,background:"#000",display:"none"}).appendTo(n.container);o._controls.frames[e]=a})}this.$("images").css({position:"relative",top:0,left:0,width:"100%",height:"100%"});if(s.swipe){this.$("images").css({position:"absolute",top:0,left:0,width:0,height:"100%"});this.finger=new i.Finger(this.get("stage"),{onchange:function(t){o.setCounter(t).setInfo(t).pause();o.show(t)},oncomplete:function(t){var e=g.max(0,g.min(parseInt(t,10),o.getDataLength()-1)),i=o.getData(e);if(!i){return}o.$("images").find("iframe").remove();o.$("images").find(".galleria-frame").css("opacity",0).hide();if(o._options.carousel&&o._options.carouselFollow){o._carousel.follow(e)}}});this.bind(i.RESCALE,function(){this.finger.setup()});this.$("stage").on("click",function(i){var a=o.getData();if(!a){return}if(a.iframe){if(o.isPlaying()){o.pause()}var r=o._controls.frames[o._active],s=o._stageWidth,l=o._stageHeight;if(t(r.container).find("iframe").length){return}t(r.container).css({width:s,height:l,opacity:0}).show().animate({opacity:1},200);e.setTimeout(function(){r.load(a.iframe+(a.video?"&autoplay=1":""),{width:s,height:l},function(t){o.$("container").addClass("videoplay");t.scale({width:o._stageWidth,height:o._stageHeight,iframelimit:a.video?o._options.maxVideoSize:n})})},100);return}if(a.link){if(o._options.popupLinks){var c=e.open(a.link,"_blank")}else{e.location.href=a.link}return}});this.bind(i.IMAGE,function(e){o.setCounter(e.index);o.setInfo(e.index);var i=this.getNext(),n=this.getPrev();var a=[n,i];a.push(this.getNext(i),this.getPrev(n),o._controls.slides.length-1);var r=[];t.each(a,function(e,i){if(t.inArray(i,r)==-1){r.push(i)}});t.each(r,function(e,i){var n=o.getData(i),a=o._controls.slides[i],r=o.isFullscreen()&&n.big?n.big:n.image||n.iframe;if(n.iframe&&!n.image){a.isIframe=true}if(!a.ready){o._controls.slides[i].load(r,function(e){if(!e.isIframe){t(e.image).css("visibility","hidden")}o._scaleImage(e,{complete:function(e){if(!e.isIframe){t(e.image).css({opacity:0,visibility:"visible"}).animate({opacity:1},200)}}})})}})})}this.$("thumbnails, thumbnails-list").css({overflow:"hidden",position:"relative"});this.$("image-nav-right, image-nav-left").on("click:fast",function(t){if(s.pauseOnInteraction){o.pause()}var e=/right/.test(this.className)?"next":"prev";o[e]()}).on("click",function(t){t.preventDefault();if(s.clicknext||s.swipe){t.stopPropagation()}});t.each(["info","counter","image-nav"],function(t,e){if(s["show"+e.substr(0,1).toUpperCase()+e.substr(1).replace(/-/,"")]===false){H.moveOut(o.get(e.toLowerCase()))}});this.load();if(!s.keepSource&&!y){this._target.innerHTML=""}if(this.get("errors")){this.appendChild("target","errors")}this.appendChild("target","container");if(s.carousel){var l=0,c=s.show;this.bind(i.THUMBNAIL,function(){this.updateCarousel();if(++l==this.getDataLength()&&typeof c=="number"&&c>0){this._carousel.follow(c)}})}if(s.responsive){r.on("resize",function(){if(!o.isFullscreen()){o.resize()}})}if(s.fullscreenDoubleTap){this.$("stage").on("touchstart",function(){var t,e,i,n,a,r,s=function(t){return t.originalEvent.touches?t.originalEvent.touches[0]:t};o.$("stage").on("touchmove",function(){t=0});return function(l){if(/(-left|-right)/.test(l.target.className)){return}r=H.timestamp();e=s(l).pageX;i=s(l).pageY;if(l.originalEvent.touches.length<2&&r-t<300&&e-n<20&&i-a<20){o.toggleFullscreen();l.preventDefault();return}t=r;n=e;a=i}}())}t.each(i.on.binds,function(e,i){if(t.inArray(i.hash,o._binds)==-1){o.bind(i.type,i.callback)}});return this},addTimer:function(){this._timer.add.apply(this._timer,H.array(arguments));return this},clearTimer:function(){this._timer.clear.apply(this._timer,H.array(arguments));return this},_getWH:function(){var e=this.$("container"),i=this.$("target"),n=this,a={},o;t.each(["width","height"],function(t,r){if(n._options[r]&&typeof n._options[r]==="number"){a[r]=n._options[r]}else{o=[H.parseValue(e.css(r)),H.parseValue(i.css(r)),e[r](),i[r]()];if(!n["_"+r]){o.splice(o.length,H.parseValue(e.css("min-"+r)),H.parseValue(i.css("min-"+r)))}a[r]=g.max.apply(g,o)}});if(n._userRatio){a.height=a.width*n._userRatio}return a},_createThumbnails:function(n){this.get("total").innerHTML=this.getDataLength();var o,r,s,l,c=this,h=this._options,u=n?this._data.length-n.length:0,f=u,d=[],p=0,g=y<8?"http://upload.wikimedia.org/wikipedia/commons/c/c0/Blank.gif":"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D",m=function(){var t=c.$("thumbnails").find(".active");if(!t.length){return false}return t.find("img").attr("src")}(),v=typeof h.thumbnails==="string"?h.thumbnails.toLowerCase():null,_=function(t){return a.defaultView&&a.defaultView.getComputedStyle?a.defaultView.getComputedStyle(r.container,null)[t]:l.css(t)},b=function(e,n,a){return function(){t(a).append(e);c.trigger({type:i.THUMBNAIL,thumbTarget:e,index:n,galleriaData:c.getData(n)})}},w=function(e){if(h.pauseOnInteraction){c.pause()}var i=t(e.currentTarget).data("index");if(c.getIndex()!==i){c.show(i)}e.preventDefault()},x=function(e,n){t(e.container).css("visibility","visible");c.trigger({type:i.THUMBNAIL,thumbTarget:e.image,index:e.data.order,galleriaData:c.getData(e.data.order)});if(typeof n=="function"){n.call(c,e)}},T=function(e,i){e.scale({width:e.data.width,height:e.data.height,crop:h.thumbCrop,margin:h.thumbMargin,canvas:h.useCanvas,position:h.thumbPosition,complete:function(e){var n=["left","top"],a=["Width","Height"],o,r,s=c.getData(e.index);t.each(a,function(i,a){o=a.toLowerCase();if(h.thumbCrop!==true||h.thumbCrop===o){r={};r[o]=e[o];t(e.container).css(r);r={};r[n[i]]=0;t(e.image).css(r)}e["outer"+a]=t(e.container)["outer"+a](true)});H.toggleQuality(e.image,h.thumbQuality===true||h.thumbQuality==="auto"&&e.original.widtha._thumbnails.length-1){return}var s=a._thumbnails[r],l=s.data,c=function(){if(++o==n.length&&typeof i=="function"){i.call(a)}},h=t(s.container).data("thumbload");if(s.video){h.call(a,s,c)}else{s.load(l.src,function(t){h.call(a,t,c)})}});return this},lazyLoadChunks:function(t,i){var n=this.getDataLength(),a=0,o=0,r=[],s=[],l=this;i=i||0;for(;a50},success:function(){E.push(a);if(a._options.swipe){var o=a.$("images").width(a.getDataLength()*a._stageWidth);t.each(new Array(a.getDataLength()),function(e){var n=new i.Picture,r=a.getData(e);t(n.container).css({position:"absolute",top:0,left:a._stageWidth*e}).prepend(a._layers[e]=t(H.create("galleria-layer")).css({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:2})[0]).appendTo(o);if(r.video){O(n.container)}a._controls.slides.push(n);var s=new i.Picture;s.isIframe=true;t(s.container).attr("class","galleria-frame").css({position:"absolute",top:0,left:0,zIndex:4,background:"#000",display:"none"}).appendTo(n.container);a._controls.frames.push(s)});a.finger.setup()}H.show(a.get("counter"));if(a._options.carousel){a._carousel.bindControls()}if(a._options.autoplay){a.pause();if(typeof a._options.autoplay==="number"){a._playtime=a._options.autoplay}a._playing=true}if(a._firstrun){if(a._options.autoplay){a.trigger(i.PLAY)}if(typeof a._options.show==="number"){a.show(a._options.show)}return}a._firstrun=true;if(i.History){i.History.change(function(t){if(isNaN(t)){e.history.go(-1)}else{a.show(t,n,true)}})}a.trigger(i.READY);i.theme.init.call(a,a._options);t.each(i.ready.callbacks,function(t,e){if(typeof e=="function"){e.call(a,a._options)}});a._options.extend.call(a,a._options);if(/^[0-9]{1,4}$/.test(d)&&i.History){a.show(d,n,true)}else if(a._data[a._options.show]){a.show(a._options.show)}if(a._options.autoplay){a.trigger(i.PLAY)}},error:function(){i.raise("Stage width or height is too small to show the gallery. Traced measures: width:"+a._stageWidth+"px, height: "+a._stageHeight+"px.",true)}})},load:function(e,n,a){var o=this,r=this._options;this._data=[];this._thumbnails=[];this.$("thumbnails").empty();if(typeof n==="function"){a=n;n=null}e=e||r.dataSource;n=n||r.dataSelector;a=a||r.dataConfig;if(t.isPlainObject(e)){e=[e]}if(t.isArray(e)){if(this.validate(e)){this._data=e}else{i.raise("Load failed: JSON Array not valid.")}}else{n+=",.video,.iframe";t(e).find(n).each(function(e,i){i=t(i);var n={},r=i.parent(),s=r.attr("href"),l=r.attr("rel");if(s&&(i[0].nodeName=="IMG"||i.hasClass("video"))&&S(s)){n.video=s}else if(s&&i.hasClass("iframe")){n.iframe=s}else{n.image=n.big=s}if(l){n.big=l}t.each("big title description link layer image".split(" "),function(t,e){if(i.data(e)){n[e]=i.data(e).toString()}});if(!n.big){n.big=n.image}o._data.push(t.extend({title:i.attr("title")||"",thumb:i.attr("src"),image:i.attr("src"),big:i.attr("src"),description:i.attr("alt")||"",link:i.attr("longdesc"),original:i.get(0)},n,a(i)))})}if(typeof r.dataSort=="function"){s.sort.call(this._data,r.dataSort)}else if(r.dataSort=="random"){this._data.sort(function(){return g.round(g.random())-.5})}if(this.getDataLength()){this._parseData(function(){this.trigger(i.DATA)})}return this},_parseData:function(e){var i=this,a,o=false,r=function(){var n=true;t.each(i._data,function(t,e){if(e.loading){n=false;return false}});if(n&&!o){o=true;e.call(i)}};t.each(this._data,function(e,o){a=i._data[e];if("thumb"in o===false){a.thumb=o.image}if(!o.big){a.big=o.image}if("video"in o){var s=S(o.video);if(s){a.iframe=new I(s.provider,s.id).embed()+function(){if(typeof i._options[s.provider]=="object"){var e="?",n=[];t.each(i._options[s.provider],function(t,e){n.push(t+"="+e)});if(s.provider=="youtube"){n=["wmode=opaque"].concat(n)}return e+n.join("&")}return""}();if(!a.thumb||!a.image){t.each(["thumb","image"],function(t,e){if(e=="image"&&!i._options.videoPoster){a.image=n;return}var o=new I(s.provider,s.id);if(!a[e]){a.loading=true;o.getMedia(e,function(t,e){return function(i){t[e]=i;if(e=="image"&&!t.big){t.big=t.image}delete t.loading;r()}}(a,e))}})}}}});r();return this},destroy:function(){this.$("target").data("galleria",null);this.$("container").off("galleria");this.get("target").innerHTML=this._original.html;this.clearTimer();H.removeFromArray($,this);H.removeFromArray(E,this);if(i._waiters.length){t.each(i._waiters,function(t,i){if(i)e.clearTimeout(i)})}return this},splice:function(){var t=this,i=H.array(arguments);e.setTimeout(function(){s.splice.apply(t._data,i);t._parseData(function(){t._createThumbnails()})},2);return t},push:function(){var t=this,i=H.array(arguments);if(i.length==1&&i[0].constructor==Array){i=i[0]}e.setTimeout(function(){s.push.apply(t._data,i);t._parseData(function(){t._createThumbnails(i)})},2);return t},_getActive:function(){return this._controls.getActive()},validate:function(t){return true},bind:function(t,e){t=k(t);this.$("container").on(t,this.proxy(e));return this},unbind:function(t){t=k(t);this.$("container").off(t);return this},trigger:function(e){e=typeof e==="object"?t.extend(e,{scope:this}):{type:k(e),scope:this};this.$("container").trigger(e);return this},addIdleState:function(t,e,i,n){this._idle.add.apply(this._idle,H.array(arguments));return this},removeIdleState:function(t){this._idle.remove.apply(this._idle,H.array(arguments));return this},enterIdleMode:function(){this._idle.hide();return this},exitIdleMode:function(){this._idle.showAll();return this},enterFullscreen:function(t){this._fullscreen.enter.apply(this,H.array(arguments));return this},exitFullscreen:function(t){this._fullscreen.exit.apply(this,H.array(arguments));return this},toggleFullscreen:function(t){this._fullscreen[this.isFullscreen()?"exit":"enter"].apply(this,H.array(arguments));return this},bindTooltip:function(t,e){this._tooltip.bind.apply(this._tooltip,H.array(arguments));return this},defineTooltip:function(t,e){this._tooltip.define.apply(this._tooltip,H.array(arguments));return this},refreshTooltip:function(t){this._tooltip.show.apply(this._tooltip,H.array(arguments));return this},openLightbox:function(){this._lightbox.show.apply(this._lightbox,H.array(arguments));return this},closeLightbox:function(){this._lightbox.hide.apply(this._lightbox,H.array(arguments));return this},hasVariation:function(e){return t.inArray(e,this._options.variation.split(/\s+/))>-1},getActiveImage:function(){var t=this._getActive();return t?t.image:n},getActiveThumb:function(){return this._thumbnails[this._active].image||n},getMousePosition:function(t){return{x:t.pageX-this.$("container").offset().left,y:t.pageY-this.$("container").offset().top}},addPan:function(e){if(this._options.imageCrop===false){return}e=t(e||this.getActiveImage());var i=this,n=e.width()/2,a=e.height()/2,o=parseInt(e.css("left"),10),r=parseInt(e.css("top"),10),s=o||0,l=r||0,c=0,h=0,u=false,f=H.timestamp(),d=0,p=0,m=function(t,i,n){if(t>0){p=g.round(g.max(t*-1,g.min(0,i)));if(d!==p){d=p;if(y===8){e.parent()["scroll"+n](p*-1)}else{var a={};a[n.toLowerCase()]=p;e.css(a)}}}},v=function(t){if(H.timestamp()-f<50){return}u=true;n=i.getMousePosition(t).x;a=i.getMousePosition(t).y},_=function(t){if(!u){return}c=e.width()-i._stageWidth;h=e.height()-i._stageHeight;o=n/i._stageWidth*c*-1;r=a/i._stageHeight*h*-1;s+=(o-s)/i._options.imagePanSmoothness;l+=(r-l)/i._options.imagePanSmoothness;m(h,l,"Top");m(c,s,"Left")};if(y===8){e.parent().scrollTop(l*-1).scrollLeft(s*-1);e.css({top:0,left:0})}this.$("stage").off("mousemove",v).on("mousemove",v);this.addTimer("pan"+i._id,_,50,true);return this},proxy:function(t,e){if(typeof t!=="function"){return m}e=e||this;return function(){return t.apply(e,H.array(arguments))}},removePan:function(){this.$("stage").off("mousemove");this.clearTimer("pan"+this._id);return this},addElement:function(e){var i=this._dom;t.each(H.array(arguments),function(t,e){i[e]=H.create("galleria-"+e)});return this},attachKeyboard:function(t){this._keyboard.attach.apply(this._keyboard,H.array(arguments));return this},detachKeyboard:function(){this._keyboard.detach.apply(this._keyboard,H.array(arguments));return this},appendChild:function(t,e){this.$(t).append(this.get(e)||e);return this},prependChild:function(t,e){this.$(t).prepend(this.get(e)||e);return this},remove:function(t){this.$(H.array(arguments).join(",")).remove();return this},append:function(t){var e,i;for(e in t){if(t.hasOwnProperty(e)){if(t[e].constructor===Array){for(i=0;t[e][i];i++){this.appendChild(e,t[e][i])}}else{this.appendChild(e,t[e])}}}return this},_scaleImage:function(e,i){e=e||this._controls.getActive();if(!e){return}var n,a=function(e){t(e.container).children(":first").css({top:g.max(0,H.parseValue(e.image.style.top)),left:g.max(0,H.parseValue(e.image.style.left)),width:H.parseValue(e.image.width),height:H.parseValue(e.image.height)})};i=t.extend({width:this._stageWidth,height:this._stageHeight,crop:this._options.imageCrop,max:this._options.maxScaleRatio,min:this._options.minScaleRatio,margin:this._options.imageMargin,position:this._options.imagePosition,iframelimit:this._options.maxVideoSize},i);if(this._options.layerFollow&&this._options.imageCrop!==true){if(typeof i.complete=="function"){n=i.complete;i.complete=function(){n.call(e,e);a(e)}}else{i.complete=a}}else{t(e.container).children(":first").css({top:0,left:0})}e.scale(i);return this},updateCarousel:function(){this._carousel.update();return this},resize:function(e,i){if(typeof e=="function"){i=e;e=n}e=t.extend({width:0,height:0},e);var a=this,o=this.$("container");t.each(e,function(t,i){if(!i){o[t]("auto");e[t]=a._getWH()[t]}});t.each(e,function(t,e){o[t](e)});return this.rescale(i)},rescale:function(e,a,o){var r=this;if(typeof e==="function"){o=e;e=n}var s=function(){r._stageWidth=e||r.$("stage").width();r._stageHeight=a||r.$("stage").height();if(r._options.swipe){t.each(r._controls.slides,function(e,i){r._scaleImage(i);t(i.container).css("left",r._stageWidth*e)});r.$("images").css("width",r._stageWidth*r.getDataLength())}else{r._scaleImage()}if(r._options.carousel){r.updateCarousel()}r._controls.frames[r._controls.active].scale({width:r._stageWidth,height:r._stageHeight,iframelimit:r._options.maxVideoSize});r.trigger(i.RESCALE);if(typeof o==="function"){o.call(r)}};s.call(r);return this},refreshImage:function(){this._scaleImage();if(this._options.imagePan){this.addPan()}return this},show:function(n,a,o){var r=this._options.swipe;if(!r&&(this._queue.length>3||n===false||!this._options.queue&&this._queue.stalled)){return}n=g.max(0,g.min(parseInt(n,10),this.getDataLength()-1));a=typeof a!=="undefined"?!!a:n1){return}if(o.iframe){if(a.isPlaying()){a.pause()}var s=a._controls.frames[a._controls.active],l=a._stageWidth,c=a._stageHeight;t(s.container).css({width:l,height:c,opacity:0}).show().animate({opacity:1},200);e.setTimeout(function(){s.load(o.iframe+(o.video?"&autoplay=1":""),{width:l,height:c},function(t){a.$("container").addClass("videoplay");t.scale({width:a._stageWidth,height:a._stageHeight,iframelimit:o.video?a._options.maxVideoSize:n})})},100);return}if(a._options.clicknext&&!i.TOUCH){if(a._options.pauseOnInteraction){a.pause()}a.next();return}if(o.link){if(a._options.popupLinks){u=e.open(o.link,"_blank")}else{e.location.href=o.link}return}if(a._options.lightbox){a.openLightbox()}})}a._playCheck();a.trigger({type:i.IMAGE,index:c.index,imageTarget:r.image,thumbTarget:h.image,galleriaData:o});s.shift.call(a._queue);a._queue.stalled=false;if(a._queue.length){a._show()}}}(r,h,c,o,f);if(this._options.carousel&&this._options.carouselFollow){this._carousel.follow(o.index)}if(this._options.preload){var g,m,v=this.getNext(),y;try{for(m=this._options.preload;m>0;m--){g=new i.Picture;y=a.getData(v);g.preload(this.isFullscreen()&&y.big?y.big:y.image);v=a.getNext(v)}}catch(_){}}H.show(h.container);h.isIframe=r.iframe&&!r.image;t(a._thumbnails[o.index].container).addClass("active").siblings(".active").removeClass("active");a.trigger({type:i.LOADSTART,cached:u,index:o.index,rewind:o.rewind,imageTarget:h.image,thumbTarget:f.image,galleriaData:r});a._queue.stalled=true;h.load(l,function(e){var s=t(a._layers[1-a._controls.active]).html(r.layer||"").hide();a._scaleImage(e,{complete:function(e){if("image"in c){H.toggleQuality(c.image,false)}H.toggleQuality(e.image,false);a.removePan();a.setInfo(o.index);a.setCounter(o.index);if(r.layer){s.show();if(r.iframe&&r.image||r.link||a._options.lightbox||a._options.clicknext){s.css("cursor","pointer").off("mouseup").mouseup(d)}}if(r.video&&r.image){O(e.container)}var l=a._options.transition;t.each({initial:c.image===null,touch:i.TOUCH,fullscreen:a.isFullscreen()},function(t,e){if(e&&a._options[t+"Transition"]!==n){l=a._options[t+"Transition"];return false}});if(l in F.effects===false){p()}else{var h={prev:c.container,next:e.container,rewind:o.rewind,speed:a._options.transitionSpeed||400};F.active=true;F.init.call(a,l,h,p)}a.trigger({type:i.LOADFINISH,cached:u,index:o.index,rewind:o.rewind,imageTarget:e.image,thumbTarget:a._thumbnails[o.index].image,galleriaData:a.getData(o.index)})}})})},getNext:function(t){t=typeof t==="number"?t:this.getIndex();return t===this.getDataLength()-1?0:t+1},getPrev:function(t){t=typeof t==="number"?t:this.getIndex();return t===0?this.getDataLength()-1:t-1},next:function(){if(this.getDataLength()>1){this.show(this.getNext(),false)}return this},prev:function(){if(this.getDataLength()>1){this.show(this.getPrev(),true)}return this},get:function(t){return t in this._dom?this._dom[t]:null},getData:function(t){return t in this._data?this._data[t]:this._data[this._active]},getDataLength:function(){return this._data.length},getIndex:function(){return typeof this._active==="number"?this._active:false},getStageHeight:function(){return this._stageHeight},getStageWidth:function(){return this._stageWidth},getOptions:function(t){return typeof t==="undefined"?this._options:this._options[t]},setOptions:function(e,i){if(typeof e==="object"){t.extend(this._options,e)}else{this._options[e]=i}return this},play:function(t){this._playing=true;this._playtime=t||this._playtime;this._playCheck();this.trigger(i.PLAY);return this},pause:function(){this._playing=false;this.trigger(i.PAUSE);return this},playToggle:function(t){return this._playing?this.pause():this.play(t)},isPlaying:function(){return this._playing},isFullscreen:function(){return this._fullscreen.active},_playCheck:function(){var t=this,e=0,n=20,a=H.timestamp(),o="play"+this._id;if(this._playing){this.clearTimer(o);var r=function(){e=H.timestamp()-a;if(e>=t._playtime&&t._playing){t.clearTimer(o);t.next();return}if(t._playing){t.trigger({type:i.PROGRESS,percent:g.ceil(e/t._playtime*100),seconds:g.floor(e/1e3),milliseconds:e});t.addTimer(o,r,n)}};t.addTimer(o,r,n)}},setPlaytime:function(t){this._playtime=t;return this},setIndex:function(t){this._active=t;return this},setCounter:function(t){if(typeof t==="number"){t++}else if(typeof t==="undefined"){t=this.getIndex()+1}this.get("current").innerHTML=t;if(y){var e=this.$("counter"),i=e.css("opacity");if(parseInt(i,10)===1){H.removeAlpha(e[0])}else{this.$("counter").css("opacity",i)}}return this},setInfo:function(e){var i=this,n=this.getData(e);t.each(["title","description"],function(t,e){var a=i.$("info-"+e);if(!!n[e]){a[n[e].length?"show":"hide"]().html(n[e])}else{a.empty().hide()}});return this},hasInfo:function(t){var e="title description".split(" "),i;for(i=0;e[i];i++){if(!!this.getData(t)[e[i]]){return true}}return false},jQuery:function(e){var i=this,n=[];t.each(e.split(","),function(e,a){a=t.trim(a);if(i.get(a)){n.push(a)}});var a=t(i.get(n.shift()));t.each(n,function(t,e){a=a.add(i.get(e))});return a},$:function(t){return this.jQuery.apply(this,H.array(arguments))}};t.each(x,function(t,e){var n=/_/.test(e)?e.replace(/_/g,""):e;i[e.toUpperCase()]="galleria."+n});t.extend(i,{IE9:y===9,IE8:y===8,IE7:y===7,IE6:y===6,IE:y,WEBKIT:/webkit/.test(f),CHROME:/chrome/.test(f),SAFARI:/safari/.test(f)&&!/chrome/.test(f),QUIRK:y&&a.compatMode&&a.compatMode==="BackCompat",MAC:/mac/.test(navigator.platform.toLowerCase()),OPERA:!!e.opera,IPHONE:/iphone/.test(f),IPAD:/ipad/.test(f),ANDROID:/android/.test(f),TOUCH:"ontouchstart"in a});i.addTheme=function(n){if(!n.name){i.raise("No theme name specified")}if(typeof n.defaults!=="object"){n.defaults={}}else{n.defaults=T(n.defaults)}var a=false,o;if(typeof n.css==="string"){t("link").each(function(t,e){o=new RegExp(n.css);if(o.test(e.href)){a=true;z(n);return false}});if(!a){t(function(){var r=0;var s=function(){t("script").each(function(t,i){o=new RegExp("galleria\\."+n.name.toLowerCase()+"\\.");if(o.test(i.src)){a=i.src.replace(/[^\/]*$/,"")+n.css;e.setTimeout(function(){H.loadCSS(a,"galleria-theme",function(){z(n)})},1)}});if(!a){if(r++>5){i.raise("No theme CSS loaded")}else{e.setTimeout(s,500)}}};s()})}}else{z(n)}return n};i.loadTheme=function(n,a){if(t("script").filter(function(){return t(this).attr("src")==n}).length){return}var o=false,r;t(e).load(function(){if(!o){r=e.setTimeout(function(){if(!o&&!i.theme){i.raise("Galleria had problems loading theme at "+n+". Please check theme path or load manually.",true)}},2e4)}});i.unloadTheme();H.loadScript(n,function(){o=true;e.clearTimeout(r)});return i};i.unloadTheme=function(){if(typeof i.theme=="object"){t("script").each(function(e,n){if(new RegExp("galleria\\."+i.theme.name+"\\.").test(n.src)){t(n).remove()}});i.theme=n}return i};i.get=function(t){if(!!$[t]){return $[t]}else if(typeof t!=="number"){return $}else{i.raise("Gallery index "+t+" not found")}};i.configure=function(e,n){var a={};if(typeof e=="string"&&n){a[e]=n;e=a}else{t.extend(a,e)}i.configure.options=a;t.each(i.get(),function(t,e){e.setOptions(a)});return i};i.configure.options={};i.on=function(e,n){if(!e){return}n=n||m;var a=e+n.toString().replace(/\s/g,"")+H.timestamp();t.each(i.get(),function(t,i){i._binds.push(a);i.bind(e,n)});i.on.binds.push({type:e,callback:n,hash:a});return i};i.on.binds=[];i.run=function(e,n){if(t.isFunction(n)){n={extend:n}}t(e||"#galleria").galleria(n);return i};i.addTransition=function(t,e){F.effects[t]=e;return i};i.utils=H;i.log=function(){var i=H.array(arguments);if("console"in e&&"log"in e.console){try{return e.console.log.apply(e.console,i)}catch(n){t.each(i,function(){e.console.log(this)})}}else{return e.alert(i.join("
    "))}};i.ready=function(e){if(typeof e!="function"){return i}t.each(E,function(t,i){e.call(i,i._options)});i.ready.callbacks.push(e);return i};i.ready.callbacks=[];i.raise=function(e,i){var n=i?"Fatal error":"Error",a={color:"#fff",position:"absolute",top:0,left:0,zIndex:1e5},o=function(e){var o='
    '+(i?""+n+": ":"")+e+"
    ";t.each($,function(){var t=this.$("errors"),e=this.$("target");if(!t.length){e.css("position","relative");t=this.addElement("errors").appendChild("target","errors").$("errors").css(a)}t.append(o)});if(!$.length){t("
    ").css(t.extend(a,{position:"fixed"})).append(o).appendTo(_().body)}};if(c){o(e);if(i){throw new Error(n+": "+e)}}else if(i){if(D){return}D=true;i=false;o("Gallery could not load.")}};i.version=l;i.requires=function(t,e){e=e||"You need to upgrade Galleria to version "+t+" to use one or more components.";if(i.version",{src:n,frameborder:0,id:r,allowfullscreen:true,css:{visibility:"hidden"}})[0];if(a){t(s).css(a)}t(this.container).find("iframe,img").remove();this.container.appendChild(this.image);t("#"+r).load(function(i,n){return function(){e.setTimeout(function(){t(i.image).css("visibility","visible");if(typeof n=="function"){n.call(i,i)}},10)}}(this,o));return this.container}this.image=new Image;if(i.IE8){t(this.image).css("filter","inherit")}var l=false,c=false,h=t(this.container),f=t(this.image),d=function(){if(!l){l=true;e.setTimeout(function(t,e){return function(){t.attr("src",e+(e.indexOf("?")>-1?"&":"?")+H.timestamp())}}(t(this),n),50)}else{if(u){t(this).attr("src",u)}else{i.raise("Image not found: "+n)}}},p=function(n,o,r){return function(){var s=function(){t(this).off("load");n.original=a||{height:this.height,width:this.width};if(i.HAS3D){this.style.MozTransform=this.style.webkitTransform="translate3d(0,0,0)"}h.append(this);n.cache[r]=r;if(typeof o=="function"){e.setTimeout(function(){o.call(n,n)},1)}};if(!this.width||!this.height){!function(e){H.wait({until:function(){return e.width&&e.height},success:function(){s.call(e)},error:function(){if(!c){t(new Image).load(p).attr("src",e.src);c=true}else{i.raise("Could not extract width/height from image: "+e.src+". Traced measures: width:"+e.width+"px, height: "+e.height+"px.")}},timeout:100})}(this)}else{s.call(this)}}}(this,o,n);h.find("iframe,img").remove();f.css("display","block");H.hide(this.image);t.each("minWidth minHeight maxWidth maxHeight".split(" "),function(t,e){f.css(e,/min/.test(e)?"0":"none")});f.load(p).on("error",d).attr("src",n);return this.container},scale:function(e){var a=this;e=t.extend({width:0,height:0,min:n,max:n,margin:0,complete:m,position:"center",crop:false,canvas:false,iframelimit:n},e);if(this.isIframe){var o=e.width,r=e.height,s,l;if(e.iframelimit){var c=g.min(e.iframelimit/o,e.iframelimit/r);if(c<1){s=o*c;l=r*c;t(this.image).css({top:r/2-l/2,left:o/2-s/2,position:"absolute"})}else{t(this.image).css({top:0,left:0})}}t(this.image).width(s||o).height(l||r).removeAttr("width").removeAttr("height");t(this.container).width(o).height(r);e.complete.call(a,a);try{if(this.image.contentWindow){t(this.image.contentWindow).trigger("resize")}}catch(h){}return this.container}if(!this.image){return this.container}var u,f,d=t(a.container),p;H.wait({until:function(){u=e.width||d.width()||H.parseValue(d.css("width"));f=e.height||d.height()||H.parseValue(d.css("height"));return u&&f},success:function(){var i=(u-e.margin*2)/a.original.width,n=(f-e.margin*2)/a.original.height,o=g.min(i,n),r=g.max(i,n),s={"true":r,width:i,height:n,"false":o,landscape:a.original.width>a.original.height?r:o,portrait:a.original.width0&&i!=="none"}();var s=function(){var t="RequestAnimationFrame";return e.requestAnimationFrame||e["webkit"+t]||e["moz"+t]||e["o"+t]||e["ms"+t]||function(t){e.setTimeout(t,1e3/60)}}();var l=function(i,n){this.config={start:0,duration:500,onchange:function(){},oncomplete:function(){},easing:function(t,e,i,n,a){return-n*((e=e/a-1)*e*e*e-1)+i}};this.easeout=function(t,e,i,n,a){return n*((e=e/a-1)*e*e*e*e+1)+i};if(!i.children.length){return}var a=this;t.extend(this.config,n);this.elem=i;this.child=i.children[0];this.to=this.pos=0;this.touching=false;this.start={};this.index=this.config.start;this.anim=0;this.easing=this.config.easing;if(!r){this.child.style.position="absolute";this.elem.style.position="relative"}t.each(["ontouchstart","ontouchmove","ontouchend","setup"],function(t,e){a[e]=function(t){return function(){t.apply(a,arguments)}}(a[e])});this.setX=function(){var t=a.child.style;if(!r){t.left=a.pos+"px";return}t.MozTransform=t.webkitTransform="translate3d("+a.pos+"px,0,0)";return};t(i).on("touchstart",this.ontouchstart);t(e).on("resize",this.setup);t(e).on("orientationchange",this.setup);this.setup();!function o(){s(o);a.loop.call(a)}()};l.prototype={constructor:l,setup:function(){this.width=t(this.elem).width();this.length=g.ceil(t(this.child).width()/this.width);if(this.index!==0){this.index=g.max(0,g.min(this.index,this.length-1));this.pos=this.to=-this.width*this.index}},setPosition:function(t){this.pos=t;this.to=t},ontouchstart:function(t){var e=t.originalEvent.touches;this.start={pageX:e[0].pageX,pageY:e[0].pageY,time:+new Date};this.isScrolling=null;this.touching=true;this.deltaX=0;o.on("touchmove",this.ontouchmove);o.on("touchend",this.ontouchend)},ontouchmove:function(t){var e=t.originalEvent.touches;if(e&&e.length>1||t.scale&&t.scale!==1){return}this.deltaX=e[0].pageX-this.start.pageX;if(this.isScrolling===null){this.isScrolling=!!(this.isScrolling||g.abs(this.deltaX)0||this.index==this.length-1&&this.deltaX<0?g.abs(this.deltaX)/this.width+1.8:1;this.to=this.deltaX-this.index*this.width}t.stopPropagation()},ontouchend:function(t){this.touching=false;var e=+new Date-this.start.time<250&&g.abs(this.deltaX)>40||g.abs(this.deltaX)>this.width/2,i=!this.index&&this.deltaX>0||this.index==this.length-1&&this.deltaX<0;if(!this.isScrolling){this.show(this.index+(e&&!i?this.deltaX<0?1:-1:0))}o.off("touchmove",this.ontouchmove);o.off("touchend",this.ontouchend)},show:function(t){if(t!=this.index){this.config.onchange.call(this,t)}else{this.to=-(t*this.width)}},moveTo:function(t){if(t!=this.index){this.pos=this.to=-(t*this.width);this.index=t}},loop:function(){var t=this.to-this.pos,e=1;if(this.width&&t){e=g.max(.5,g.min(1.5,g.abs(t/this.width)))}if(this.touching||g.abs(t)<=1){this.pos=this.to;t=0;if(this.anim&&!this.touching){this.config.oncomplete(this.index)}this.anim=0;this.easing=this.config.easing}else{if(!this.anim){this.anim={start:this.pos,time:+new Date,distance:t,factor:e,destination:this.to}}if(this.anim.destination!=this.to){this.anim=0;this.easing=this.easeout;return}this.pos=this.easing(null,+new Date-this.anim.time,this.anim.start,this.anim.distance,this.config.duration*this.anim.factor)}this.setX()}};return l}();t.fn.galleria=function(e){var n=this.selector;if(!t(this).length){t(function(){if(t(n).length){t(n).galleria(e)}else{i.utils.wait({until:function(){return t(n).length},success:function(){t(n).galleria(e)},error:function(){i.raise('Init failed: Galleria could not find the element "'+n+'".')},timeout:5e3})}});return this}return this.each(function(){if(t.data(this,"galleria")){t.data(this,"galleria").destroy();t(this).find("*").hide()}t.data(this,"galleria",(new i).init(this,e))})};if(typeof module==="object"&&module&&typeof module.exports==="object"){module.exports=i}else{e.Galleria=i;if(typeof define==="function"&&define.amd){define("galleria",["jquery"],function(){return i})}}}(jQuery,this);!function(){if(!window.hasCookieConsent){window.hasCookieConsent=!0;var e="cookieconsent_options",t="update_cookieconsent_options",n="cookieconsent_dismissed",i="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/";if(!(document.cookie.indexOf(n)>-1||window.navigator&&window.navigator.CookiesOK)){"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var o,s={isArray:function(e){var t=Object.prototype.toString.call(e);return"[object Array]"==t},isObject:function(e){return"[object Object]"==Object.prototype.toString.call(e)},each:function(e,t,n,i){if(s.isObject(e)&&!i)for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e);else for(var r=0,a=e.length;a>r;r++)t.call(n,e[r],r,e)},merge:function(e,t){e&&s.each(t,function(t,n){s.isObject(t)&&s.isObject(e[n])?s.merge(e[n],t):e[n]=t})},bind:function(e,t){return function(){return e.apply(t,arguments)}},queryObject:function(e,t){var n,i=0,o=e;for(t=t.split(".");(n=t[i++])&&o.hasOwnProperty(n)&&(o=o[n]);)if(i===t.length)return o;return null},setCookie:function(e,t,n,i,o){n=n||365;var s=new Date;s.setDate(s.getDate()+n);var r=[e+"="+t,"expires="+s.toUTCString(),"path="+o||"/"];i&&r.push("domain="+i),document.cookie=r.join(";")},addEventListener:function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}},r=function(){var e="data-cc-event",t="data-cc-if",n=function(e,t,i){return s.isArray(t)?s.each(t,function(t){n(e,t,i)}):void(e.addEventListener?e.addEventListener(t,i):e.attachEvent("on"+t,i))},i=function(e,t){return e.replace(/\{\{(.*?)\}\}/g,function(e,n){for(var i,o,r=n.split("||");o=r.shift();){if(o=o.trim(),'"'===o[0])return o.slice(1,o.length-1);if(i=s.queryObject(t,o))return i}return""})},o=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},r=function(e,t,n){var i=e.parentNode.querySelectorAll("["+t+"]");s.each(i,function(e){var i=e.getAttribute(t);n(e,i)},window,!0)},a=function(t,i){r(t,e,function(e,t){var o=t.split(":"),r=s.queryObject(i,o[1]);n(e,o[0],s.bind(r,i))})},c=function(e,n){r(e,t,function(e,t){var i=s.queryObject(n,t);i||e.parentNode.removeChild(e)})};return{build:function(e,t){s.isArray(e)&&(e=e.join("")),e=i(e,t);var n=o(e);return a(n,t),c(n,t),n}}}(),a={options:{message:"This website uses cookies to ensure you get the best experience on our website. ",dismiss:"Got it!",learnMore:"More info",link:null,target:"_self",container:null,theme:"light-floating",domain:null,path:"/",expiryDays:365,markup:['"]},init:function(){var t=window[e];t&&this.setOptions(t),this.setContainer(),this.options.theme?this.loadTheme(this.render):this.render()},setOptionsOnTheFly:function(e){this.setOptions(e),this.render()},setOptions:function(e){s.merge(this.options,e)},setContainer:function(){this.options.container?this.container=document.querySelector(this.options.container):this.container=document.body,this.containerClasses="",navigator.appVersion.indexOf("MSIE 8")>-1&&(this.containerClasses+=" cc_ie8")},loadTheme:function(e){var t=this.options.theme;-1===t.indexOf(".css")&&(t=i+t+".css");var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=t;var o=!1;n.onload=s.bind(function(){!o&&e&&(e.call(this),o=!0)},this),document.getElementsByTagName("head")[0].appendChild(n)},render:function(){this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),delete this.element),this.element=r.build(this.options.markup,this),this.container.firstChild?this.container.insertBefore(this.element,this.container.firstChild):this.container.appendChild(this.element)},dismiss:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1,this.setDismissedCookie(),this.container.removeChild(this.element)},setDismissedCookie:function(){s.setCookie(n,"yes",this.options.expiryDays,this.options.domain,this.options.path)}},c=!1;(o=function(){c||"complete"!=document.readyState||(a.init(),c=!0,window[t]=s.bind(a.setOptionsOnTheFly,a))})(),s.addEventListener(document,"readystatechange",o)}}}(); function loading(){$('.page').css("overflow","auto");$('#main').before($('#header'));$('#main').before($('#nav'));$('#header').addClass("newclass");$('.newclass').css("display","block");$('#preloader').fadeOut("fast");} $(window).load(function(){dateplug();$('.expand-one').click(function(){$('.collapse-one').slideToggle('slow');});if($('div').hasClass('ma_gallerie')){Galleria.loadTheme('http://cdn.camping-la-clairiere.com/uploads/basecamp/galleria/themes/classic/galleria.classic.min.js');$("#gallery").galleria({transition:'slide',imageCrop:'landscape',responsive:true,height:0.73,autoplay:true,lightbox:false,fullscreenDoubleTap:false,imageMargin:0,thumbMargin:0});} $("#back-top").hide();$(function(){$(window).scroll(function(){if($(this).scrollTop()>500){$('#back-top').fadeIn();}else{$('#back-top').fadeOut();}});$('#back-top').click(function(){$('body,html').animate({scrollTop:0},800);return false;});});});$(document).ready(function(){loading();$('#slider-id').liquidSlider({dynamicArrows:!0,autoSlide:!1,hoverArrows:false,dynamicTabs:!1,hideSideArrows:true});$('#slider2-id').liquidSlider({dynamicArrows:!0,autoSlide:!1,hoverArrows:false,dynamicTabs:!1,hideSideArrows:true});});function LZ(n){return(n>9?n:'0'+n);} function dateplug(){var d=new Date();document.getElementById('DPC_arrivalDate').value=LZ(d.getDate())+"/"+LZ(d.getMonth()+1)+"/"+d.getFullYear();var df=new Date();df.setDate(df.getDate()+7);if(document.getElementById('DPC_departureDate')) document.getElementById('DPC_departureDate').value=LZ(df.getDate())+"/"+LZ(df.getMonth()+1)+"/"+df.getFullYear();} function dateupd(){day=document.getElementById('DPC_arrivalDate').value.substring(0,2);month=document.getElementById('DPC_arrivalDate').value.substring(3,5);year=document.getElementById('DPC_arrivalDate').value.substring(6,10);var d=new Date();d.setDate(day);d.setMonth(month-1);d.setFullYear(year);var dt=d;dt.setDate(d.getDate()+7);if(document.getElementById('DPC_departureDate')) document.getElementById('DPC_departureDate').value=LZ(dt.getDate())+"/"+LZ(dt.getMonth()+1)+"/"+dt.getFullYear();} function datedep(){day=document.getElementById('DPC_departureDate').value.substring(0,2);month=document.getElementById('DPC_departureDate').value.substring(3,5);year=document.getElementById('DPC_departureDate').value.substring(6,10);var d=new Date();d.setDate(day);d.setMonth(month-1);d.setFullYear(year);var dt=d;} $(function(){cbpBGSlideshow.init();});