(function($){var getAFValue=function(o){var type,c=[];if(!o.length){return undefined;} if(o[0].tagName.toLowerCase()==='span'){o.find(':checked').each(function(){c.push(this.value);});return c.join(',');} type=o.attr('type');if(type==='checkbox'||type==='radio'){return o.filter(':checked').val();}else{return o.val();}};$.fn.yiiactiveform=function(options){return this.each(function(){var settings=$.extend({},$.fn.yiiactiveform.defaults,options||{}),$form=$(this);if(settings.validationUrl===undefined){settings.validationUrl=$form.attr('action');} $.each(settings.attributes,function(i){this.value=getAFValue($form.find('#'+this.inputID));settings.attributes[i]=$.extend({},{validationDelay:settings.validationDelay,validateOnChange:settings.validateOnChange,validateOnType:settings.validateOnType,hideErrorMessage:settings.hideErrorMessage,inputContainer:settings.inputContainer,errorCssClass:settings.errorCssClass,successCssClass:settings.successCssClass,beforeValidateAttribute:settings.beforeValidateAttribute,afterValidateAttribute:settings.afterValidateAttribute,validatingCssClass:settings.validatingCssClass},this);});$form.data('settings',settings);settings.submitting=false;var validate=function(attribute,forceValidate){if(forceValidate){attribute.status=2;} $.each(settings.attributes,function(){if(this.value!==getAFValue($form.find('#'+this.inputID))){this.status=2;forceValidate=true;}});if(!forceValidate){return;} if(settings.timer!==undefined){clearTimeout(settings.timer);} settings.timer=setTimeout(function(){if(settings.submitting||$form.is(':hidden')){return;} if(attribute.beforeValidateAttribute===undefined||attribute.beforeValidateAttribute($form,attribute)){$.each(settings.attributes,function(){if(this.status===2){this.status=3;$.fn.yiiactiveform.getInputContainer(this,$form).addClass(this.validatingCssClass);}});$.fn.yiiactiveform.validate($form,function(data){var hasError=false;$.each(settings.attributes,function(){if(this.status===2||this.status===3){hasError=$.fn.yiiactiveform.updateInput(this,data,$form)||hasError;}});if(attribute.afterValidateAttribute!==undefined){attribute.afterValidateAttribute($form,attribute,data,hasError);}});}},attribute.validationDelay);};$.each(settings.attributes,function(i,attribute){if(this.validateOnChange){$form.find('#'+this.inputID).change(function(){validate(attribute,false);}).blur(function(){if(attribute.status!==2&&attribute.status!==3){validate(attribute,!attribute.status);}});} if(this.validateOnType){$form.find('#'+this.inputID).keyup(function(){if(attribute.value!==getAFValue($(this))){validate(attribute,false);}});}});if(settings.validateOnSubmit){$form.on('mouseup keyup',':submit',function(){$form.data('submitObject',$(this));});var validated=false;$form.submit(function(){if(validated){validated=false;return true;} if(settings.timer!==undefined){clearTimeout(settings.timer);} settings.submitting=true;if(settings.beforeValidate===undefined||settings.beforeValidate($form)){$.fn.yiiactiveform.validate($form,function(data){var hasError=false;$.each(settings.attributes,function(){hasError=$.fn.yiiactiveform.updateInput(this,data,$form)||hasError;});$.fn.yiiactiveform.updateSummary($form,data);if(settings.afterValidate===undefined||settings.afterValidate($form,data,hasError)){if(!hasError){validated=true;var $button=$form.data('submitObject')||$form.find(':submit:first');if($button.length){$button.click();}else{$form.submit();} return;}} settings.submitting=false;});}else{settings.submitting=false;} return false;});} $form.bind('reset',function(){setTimeout(function(){$.each(settings.attributes,function(){this.status=0;var $error=$form.find('#'+this.errorID),$container=$.fn.yiiactiveform.getInputContainer(this,$form);$container.removeClass(this.validatingCssClass+' '+ this.errorCssClass+' '+ this.successCssClass);$error.html('').hide();this.value=getAFValue($form.find('#'+this.inputID));});$form.find('label, input').each(function(){$(this).removeClass('error');});$('#'+settings.summaryID).hide().find('ul').html('');if(settings.focus!==undefined&&!window.location.hash){$form.find(settings.focus).focus();}},1);});if(settings.focus!==undefined&&!window.location.hash){$form.find(settings.focus).focus();}});};$.fn.yiiactiveform.getInputContainer=function(attribute,form){if(attribute.inputContainer===undefined){return form.find('#'+attribute.inputID).closest('div');}else{return form.find(attribute.inputContainer).filter(':has("#'+attribute.inputID+'")');}};$.fn.yiiactiveform.updateInput=function(attribute,messages,form){attribute.status=1;var $error,$container,hasError=false,$el=form.find('#'+attribute.inputID);if($el.length){hasError=messages!==null&&$.isArray(messages[attribute.id])&&messages[attribute.id].length>0;$error=form.find('#'+attribute.errorID);$container=$.fn.yiiactiveform.getInputContainer(attribute,form);$container.removeClass(attribute.validatingCssClass+' '+ attribute.errorCssClass+' '+ attribute.successCssClass);if(hasError){$error.html(messages[attribute.id][0]);$container.addClass(attribute.errorCssClass);}else if(attribute.enableAjaxValidation||attribute.clientValidation){$container.addClass(attribute.successCssClass);} if(!attribute.hideErrorMessage){$error.toggle(hasError);} attribute.value=getAFValue($el);} return hasError;};$.fn.yiiactiveform.updateSummary=function(form,messages){var settings=$(form).data('settings'),content='';if(settings.summaryID===undefined){return;} if(messages){$.each(settings.attributes,function(){if($.isArray(messages[this.id])){$.each(messages[this.id],function(j,message){content=content+'
  • '+message+'
  • ';});}});} $('#'+settings.summaryID).toggle(content!=='').find('ul').html(content);};$.fn.yiiactiveform.validate=function(form,successCallback,errorCallback){var $form=$(form),settings=$form.data('settings'),needAjaxValidation=false,messages={};$.each(settings.attributes,function(){var value,msg=[];if(this.clientValidation!==undefined&&(settings.submitting||this.status===2||this.status===3)){value=getAFValue($form.find('#'+this.inputID));this.clientValidation(value,msg,this);if(msg.length){messages[this.id]=msg;}} if(this.enableAjaxValidation&&!msg.length&&(settings.submitting||this.status===2||this.status===3)){needAjaxValidation=true;}});if(!needAjaxValidation||settings.submitting&&!$.isEmptyObject(messages)){if(settings.submitting){setTimeout(function(){successCallback(messages);},200);}else{successCallback(messages);} return;} var $button=$form.data('submitObject'),extData='&'+settings.ajaxVar+'='+$form.attr('id');if($button&&$button.length){extData+='&'+$button.attr('name')+'='+$button.attr('value');} $.ajax({url:settings.validationUrl,type:$form.attr('method'),data:$form.serialize()+extData,dataType:'json',success:function(data){if(data!==null&&typeof data==='object'){$.each(settings.attributes,function(){if(!this.enableAjaxValidation){delete data[this.id];}});successCallback($.extend({},messages,data));}else{successCallback(messages);}},error:function(){if(errorCallback!==undefined){errorCallback();}}});};$.fn.yiiactiveform.getSettings=function(form){return $(form).data('settings');};$.fn.yiiactiveform.defaults={ajaxVar:'ajax',validationUrl:undefined,validationDelay:200,validateOnSubmit:false,validateOnChange:true,validateOnType:false,hideErrorMessage:false,inputContainer:undefined,errorCssClass:'error',successCssClass:'success',validatingCssClass:'validating',summaryID:undefined,timer:undefined,beforeValidateAttribute:undefined,afterValidateAttribute:undefined,beforeValidate:undefined,afterValidate:undefined,attributes:[]};})(jQuery);;var menuEl=$('nav.main ul');var menuItemsEl=menuEl.children('li');$(window).on('resize',function(){EACMenu_init(menuEl);});EACMenu_init(menuEl);function EACMenu_init(menuEl) {menuItemsEl.each(function(index){if($(this).children('ul').parents('ul').length==1){$(this).children('ul').css('min-width',$(this).innerWidth()+'px');}});};function isDate(txtDate){if(txtDate.match(/\b(0?[1-9]|[12][0-9]|3[01])[\- \/.](0?[1-9]|1[012])[\- \/.](19|20)?[0-9]{2}\b/)){return true;}else{return false;}} function addDays(myDate,days) {return new Date(myDate.getTime()+days*24*60*60*1000);} function customRange(input,object){if($(input).hasClass('todate')){var min=$('form.booking-form input.fromdate.hasDatePicker').datepicker('getDate','+1d');min.setDate(min.getDate()+1);return{minDate:min};}} $(document).ready(function(){if($('#EBookingFormWidgetModal').length) return;var InputDateFormat='dd/mm/y';var InputDateFormatPickadate='dd/mm/yyyy';var PostDateFormat='yy-mm-dd';var minimumDateGeneral='';var maximumDateGeneral='';if(!Modernizr.touch) {if($('input[name="start_date"]').val()!=''){minimumDateGeneral=new Date($('input[name="start_date"]').val());}else{minimumDateGeneral=new Date();} if($('input[name="end_date"]').val()!=''){maximumDateGeneral=new Date($('input[name="end_date"]').val());}else{maximumDateGeneral=new Date();var currentYear=maximumDateGeneral.getFullYear();maximumDateGeneral.setFullYear(currentYear+10);} $('form.booking-form input.fromdate.hasDatePicker').datepicker({dateFormat:InputDateFormat,minDate:minimumDateGeneral,maxDate:maximumDateGeneral,beforeShow:customRange,onClose:function(selectedDate){$('form.booking-form input.fromdate.hasDatePicker').datepicker('setDate',selectedDate);}});$('form.booking-form input.todate.hasDatePicker').datepicker({dateFormat:InputDateFormat,minDate:minimumDateGeneral,maxDate:maximumDateGeneral,beforeShow:customRange});$('form.booking-form input.fromdate.hasDatePicker').datepicker('setDate',new Date());$('form.booking-form input.fromdate.hasDatePicker').click(function(){$('form.booking-form input.todate.hasDatePicker').val(null);});}else{if($('input[name="start_date"]').val()!=''){minimumDateGeneral=new Date($('input[name="start_date"]').val());}else{minimumDateGeneral=new Date();} if($('input[name="end_date"]').val()!=''){maximumDateGeneral=new Date($('input[name="end_date"]').val());}else{maximumDateGeneral=new Date();var currentYear=maximumDateGeneral.getFullYear();maximumDateGeneral.setFullYear(currentYear+10);} var fromPickerMax=maximumDateGeneral;fromPickerMax.setTime(fromPickerMax.getTime()-1*86400000);var date=new Date();$('form.booking-form input.fromdate').pickadate({format:InputDateFormatPickadate,min:minimumDateGeneral,max:fromPickerMax});$('form.booking-form input.todate').pickadate({format:InputDateFormatPickadate,min:minimumDateGeneral,max:maximumDateGeneral});from_picker=$('form.booking-form input.fromdate').pickadate('picker');to_picker=$('form.booking-form input.todate').pickadate('picker');from_picker.on('set',function(event){if(event.select){var dateSel=from_picker.get('select');var date=new Date(dateSel.year,dateSel.month,dateSel.date);date.setTime(date.getTime()+1*86400000);var toObj=to_picker.get('select');to_picker.set('min',date);var fromObj=from_picker.get('select');if(toObj!==null){if(fromObj.pick>=toObj.pick||from_picker.get()==to_picker.get()){to_picker.clear();}}}}).set('select',[date.getFullYear(),date.getMonth(),date.getDate()]);to_picker.on('set',function(event){if(event.select){}});} $("form.booking-form i.fromdate").click(function(){$("form.booking-form input.fromdate").focus();});if($("form.booking-form i.todate").length) $("form.booking-form i.todate").click(function(){$("form.booking-form input.todate").focus();});if($('form.booking-form input.fromdate').length||$('form.booking-form input.todate').length) {$('form.booking-form input.fromdate, form.booking-form input.todate').change(function(){if(isDate($(this).val())&&(cdate=$.datepicker.parseDate(InputDateFormat,$(this).val()))) {var id=$(this).attr('name');id=id.substr(0,id.length-2);cdate=$.datepicker.formatDate(PostDateFormat,cdate);$(this).parents('form.booking-form').find('input[name="'+id+'"]').val(cdate);}});} if($('form.booking-form input.fromdate').length&&$('form.booking-form input.todate').length) {$('form.booking-form input.fromdate, form.booking-form input.todate').change(function(){dateA=$.datepicker.parseDate(InputDateFormat,$(this).parents('form.booking-form').find('input.fromdate').val());dateB=$.datepicker.parseDate(InputDateFormat,$(this).parents('form.booking-form').find('input.todate').val());if(dateA!=null&&dateB!=null) {var msecs=dateB.getTime()-dateA.getTime();var Days=Math.round(msecs/1000/60/60/24);if(msecs>0) {var StrDays=Days;if(Days==1) StrDays=Days+' '+EBookingFormWidget_langStrings['day.text'];else if(Days>1) StrDays=Days+' '+EBookingFormWidget_langStrings['days.text'];if($(this).parents('form.booking-form').find('div.days').length) $(this).parents('form.booking-form').find('div.days').html(StrDays);} if($(this).parents('form.booking-form').find('input[name="nights"]').length) $(this).parents('form.booking-form').find('input[name="nights"]').val(Days);}});} $('form.booking-form').submit(function(e){var failed=false;if($(this).find('select[name="hotel"]').length) $(this).attr('action',$(this).find('select[name="hotel"]').val());if(!$(this).attr('action').length) {$('#EBookingFormWidgetModal div.msg').html(EBookingFormWidget_langStrings['invalid.hotel.message']);$('#EBookingFormWidgetModal').foundation('reveal','open');failed=true;} $(this).find('input.hasDatePicker').each(function(){if(!isDate($(this).val())&&!failed) {$('#EBookingFormWidgetModal div.msg').html(EBookingFormWidget_langStrings['invalid.date.message']);$('#EBookingFormWidgetModal').foundation('reveal','open');failed=true;}});if(failed) return false;else return true;});if($('form.booking-form input.todate').length) {$('form.booking-form input.fromdate').change(function(){var fromDate=$.datepicker.parseDate(InputDateFormat,$(this).val());$(this).parents('form.booking-form').find('input.todate').datepicker("option","minDate",addDays(fromDate,1));});} $('body').append('
    ×OK
    ');}); ;(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"||e.expr.filters.hidden(this)}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.9.0",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on({remove:"destroy"}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("
    "),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};lr(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.0",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.browser.msie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.leftu[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.topu[3]?f-this.offset.click.topu[2]?l-this.offset.click.left=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s=l&&o<=c||u>=l&&u<=c||oc)&&(i>=a&&i<=f||s>=a&&s<=f||if);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var o=0;o').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;i');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length)continue}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled)return;e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled)return;t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;n.after(this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];if(!f)return!1;var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)l=this._updateRatio(l,e);return l=this._respectSize(l,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};if(this._aspectRatio||e)n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),ie.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;if(!this._proportionallyResizeElements.length)return;var n=this.helper||this.element;for(var r=0;r');var r=e.browser.msie&&e.browser.version<7,i=r?1:0,s=r?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+s,height:this.element.outerHeight()+s,position:"absolute",left:this.elementOffset.left-i+"px",top:this.elementOffset.top-i+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;if(!a)return;i.containerElement=e(a);if(/document/.test(u)||u==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)}});var n=function(e){return parseInt(e,10)||0},r=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e,t){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.0",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
    ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this;this.opos=[t.pageX,t.pageY];if(this.options.disabled)return;var r=this.options;this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");r.startselected=!0,!t.metaKey&&!t.ctrlKey&&(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");return r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}})},_mouseDrag:function(t){var n=this;this.dragged=!0;if(this.options.disabled)return;var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!a||a.element==n.element[0])return;var f=!1;r.tolerance=="touch"?f=!(a.left>o||a.rightu||a.bottomi&&a.rights&&a.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r)return i=e(this),!1});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){var o=!1;e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(s.instance!==this.currentContainer)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+fs&&t+le[this.floating?"width":"height"]?c:s0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");for(var t=0;t=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])continue;var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize)return;i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(!n)return;if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else if(this.currentContainer!=this.containers[r]){var s=1e4,o=null,u=this.positionAbs[this.containers[r].floating?"left":"top"];for(var a=this.items.length-1;a>=0;a--){if(!e.contains(this.containers[r].element[0],this.items[a].item[0]))continue;var f=this.containers[r].floating?this.items[a].item.offset().left:this.items[a].item.offset().top;Math.abs(f-u)0?"down":"up")}if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[r],o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[r].element,!0),this._trigger("change",t,this._uiHash()),this.containers[r]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):n.helper=="clone"?this.currentItem.clone():this.currentItem;return r.parents("body").length||e(n.appendTo!="parent"?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(r[0].style.width==""||n.forceHelperSize)&&r.width(this.currentItem.width()),(r[0].style.height==""||n.forceHelperSize)&&r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.browser.msie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0],r=e(t.containment).offset(),i=e(n).css("overflow")!="hidden";this.containment=[r.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,r.left+(i?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(i?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var s=t.pageX,o=t.pageY;if(this.originalPosition){this.containment&&(t.pageX-this.offset.click.leftthis.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.topthis.containment[3]?u-this.offset.click.topthis.containment[2]?a-this.offset.click.left=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.accordionId="ui-accordion-"+(this.element.attr("id")||++n),r=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(r.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),!r.collapsible&&r.active===!1&&(r.active=0),r.active<0&&(r.active+=this.headers.length),this.active=this._findActive(r.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.originalHeight=this.element[0].style.height,this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(n){var r=e(this),i=r.attr("id"),s=r.next(),o=s.attr("id");i||(i=t+"-header-"+n,r.attr("id",i)),o||(o=t+"-panel-"+n,s.attr("id",o)),r.attr("aria-controls",o),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(r.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this.options.heightStyle!=="content"&&(this.element.css("height",this.originalHeight),e.css("height",""))},_setOption:function(e,t){if(e==="active"){this._activate(t);return}e==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),e==="collapsible"&&!t&&this.options.active===!1&&this._activate(0),e==="icons"&&(this._destroyIcons(),t&&this._createIcons()),e==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)},_keydown:function(t){if(t.altKey||t.ctrlKey)return;var n=e.ui.keyCode,r=this.headers.length,i=this.headers.index(t.target),s=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(i+1)%r];break;case n.LEFT:case n.UP:s=this.headers[(i-1+r)%r];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:s=this.headers[0];break;case n.END:s=this.headers[r-1]}s&&(e(t.target).attr("tabIndex",-1),e(s).attr("tabIndex",0),s.focus(),t.preventDefault())},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,n,r=this.options.heightStyle,i=this.element.parent();this.element.css("height",this.originalHeight),r==="fill"?(e.support.minHeight||(n=i.css("overflow"),i.css("overflow","hidden")),t=i.height(),this.element.siblings(":visible").each(function(){var n=e(this),r=n.css("position");if(r==="absolute"||r==="fixed")return;t-=n.outerHeight(!0)}),n&&i.css("overflow",n),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):r==="auto"&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).height("").height())}).height(t)),r!=="content"&&this.element.height(this.element.height())},_activate:function(t){var n=this._findActive(t)[0];if(n===this.active[0])return;n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):e()},_setupEvents:function(t){var n={};if(!t)return;e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._on(this.headers,n)},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i[0]===r[0],o=s&&n.collapsible,u=o?e():i.next(),a=r.next(),f={oldHeader:r,oldPanel:a,newHeader:o?e():i,newPanel:u};t.preventDefault();if(s&&!n.collapsible||this._trigger("beforeActivate",t,f)===!1)return;n.active=o?!1:this.headers.index(i),this.active=s?e():i,this._toggle(f),r.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),s||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),i.next().addClass("ui-accordion-content-active"))},_toggle:function(t){var n=t.newPanel,r=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=r,this.options.animate?this._animate(n,r,t):(r.hide(),n.show(),this._toggleComplete(t)),r.attr({"aria-expanded":"false","aria-hidden":"true"}),r.prev().attr("aria-selected","false"),n.length&&r.length?r.prev().attr("tabIndex",-1):n.length&&this.headers.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),n.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,n){var s,o,u,a=this,f=0,l=e.length&&(!t.length||e.index()",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on({keydown:function(i){if(this.element.prop("readOnly")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",i);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case s.UP:t=!0,this._keyEvent("previous",i);break;case s.DOWN:t=!0,this._keyEvent("next",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("
    "); a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));c.directionNav.update();a.directionNav.bind("click touchend MSPointerUp",function(b){b.preventDefault();var k;if(""===m||m===b.type)k=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev"),a.flexAnimate(k,a.vars.pauseOnAction);""===m&&(m=b.type);c.setToClearWatchedEvent()})},update:function(){var b=e+"disabled"; 1===a.pagingCount?a.directionNav.addClass(b).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(b).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b).attr("tabindex","-1"):a.directionNav.removeClass(b).removeAttr("tabindex")}},pausePlay:{setup:function(){var b=d('
    ');a.controlsContainer? (a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));c.pausePlay.update(a.vars.slideshow?e+"pause":e+"play");a.pausePlay.bind("click touchend MSPointerUp",function(b){b.preventDefault();if(""===m||m===b.type)d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play());""===m&&(m=b.type);c.setToClearWatchedEvent()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+ "pause").addClass(e+"play").html(a.vars.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").html(a.vars.pauseText)}},touch:function(){var b,f,k,d,c,e,m=!1,l=0,q=0,s=0;if(v){g.style.msTouchAction="none";g._gesture=new MSGesture;g._gesture.target=g;g.addEventListener("MSPointerDown",t,!1);g._slider=a;g.addEventListener("MSGestureChange",u,!1);g.addEventListener("MSGestureEnd",y,!1);var t=function(b){b.stopPropagation();a.animating?b.preventDefault():(a.pause(),g._gesture.addPointer(b.pointerId), s=0,d=p?a.h:a.w,e=Number(new Date),k=h&&n&&a.animatingTo===a.last?0:h&&n?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:n?(a.last-a.currentSlide+a.cloneOffset)*d:(a.currentSlide+a.cloneOffset)*d)},u=function(a){a.stopPropagation();var b=a.target._slider;if(b){var f=-a.translationX,h=-a.translationY;c=s+=p?h:f;m=p?Math.abs(s)s||b.currentSlide===b.last&&0Number(new Date)-e&&50d/2)?a.flexAnimate(h,a.vars.pauseOnAction):r||a.flexAnimate(a.currentSlide, a.vars.pauseOnAction,!0)}k=c=f=b=null;s=0}}}else{g.addEventListener("touchstart",z,!1);var z=function(c){if(a.animating)c.preventDefault();else if(window.navigator.msPointerEnabled||1===c.touches.length)a.pause(),d=p?a.h:a.w,e=Number(new Date),l=c.touches[0].pageX,q=c.touches[0].pageY,k=h&&n&&a.animatingTo===a.last?0:h&&n?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:n?(a.last-a.currentSlide+a.cloneOffset)* d:(a.currentSlide+a.cloneOffset)*d,b=p?q:l,f=p?l:q,g.addEventListener("touchmove",w,!1),g.addEventListener("touchend",x,!1)},w=function(g){l=g.touches[0].pageX;q=g.touches[0].pageY;c=p?b-q:b-l;m=p?Math.abs(c)c||a.currentSlide===a.last&&0Number(new Date)-e&&50d/2)?a.flexAnimate(l,a.vars.pauseOnAction):r||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}g.removeEventListener("touchend",x,!1);k=c=f=b=null}}},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),r?c.smoothHeight():h?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):p?(a.viewport.height(a.h),a.setProps(a.h, "setTotal")):(a.vars.smoothHeight&&c.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!p||r){var f=r?a:a.viewport;b?f.animate({height:a.slides.eq(a.animatingTo).height()},b):f.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var f=d(a.vars.sync).data("flexslider"),c=a.animatingTo;switch(b){case "animate":f.flexAnimate(c,a.vars.pauseOnAction,!1,!0);break;case "play":f.playing||f.asNav||f.play();break;case "pause":f.pause()}}, uniqueID:function(a){a.find("[id]").each(function(){var a=d(this);a.attr("id",a.attr("id")+"_clone")});return a},pauseInvisible:{visProp:null,init:function(){var b=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var f=0;fa.currentSlide?"next":"prev");q&&1===a.pagingCount&&(a.direction=a.currentItema.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?n?(a.count+a.cloneOffset)*l:0:a.currentSlide===a.last&&0===b&&a.vars.animationLoop&&"prev"!==a.direction?n?0:(a.count+1)*l:n?(a.count-1-b+a.cloneOffset)* l:(b+a.cloneOffset)*l;a.setProps(b,"",a.vars.animationSpeed);a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){a.wrapup(l)})):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(l)})}a.vars.smoothHeight&&c.smoothHeight(a.vars.animationSpeed)}};a.wrapup=function(b){r||h||(0===a.currentSlide&&a.animatingTo=== a.last&&a.vars.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;a.vars.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=function(){clearInterval(a.animatedSlides);a.animatedSlides=null;a.playing=!1;a.vars.pausePlay&&c.pausePlay.update("play");a.syncExists&&c.sync("pause")};a.play=function(){a.playing&&clearInterval(a.animatedSlides); a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed);a.started=a.playing=!0;a.vars.pausePlay&&c.pausePlay.update("pause");a.syncExists&&c.sync("play")};a.stop=function(){a.pause();a.stopped=!0};a.canAdvance=function(b,f){var c=q?a.pagingCount-1:a.last;return f?!0:q&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:q&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b!==a.currentSlide||q?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b=== c&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===c&&0===b&&"next"===a.direction?!1:!0:!1};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,f,c){var d=function(){var c=b?b:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo;return-1*function(){if(h)return"setTouch"===f?b:n&&a.animatingTo===a.last?0:n?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit: c;switch(f){case "setTotal":return n?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return n?b:a.count*b;case "jumpStart":return n?a.count*b:b;default:return b}}()+"px"}();a.transitions&&(d=p?"translate3d(0,"+d+",0)":"translate3d("+d+",0,0)",c=void 0!==c?c/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",c),a.container.css("transition-duration",c));a.args[a.prop]=d;(a.transitions||void 0===c)&&a.container.css(a.args); a.container.css("transform",d)};a.setup=function(b){if(r)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(t?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&c.smoothHeight();else{var f, g;"init"===b&&(a.viewport=d('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,n&&(g=d.makeArray(a.slides).reverse(),a.slides=d(g),a.container.empty().append(a.slides)));a.vars.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),c.uniqueID(a.slides.first().clone().addClass("clone").attr("aria-hidden","true")).appendTo(a.container),c.uniqueID(a.slides.last().clone().addClass("clone").attr("aria-hidden", "true")).prependTo(a.container));a.newSlides=d(a.vars.selector,a);f=n?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;p&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(f*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(f*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW, "float":"left",display:"block"});a.vars.smoothHeight&&c.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide");a.vars.init(a)};a.doMath=function(){var b=a.slides.first(),c=a.vars.itemMargin,d=a.vars.minItems,e=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=a.vars.itemWidth+c,a.minW=d?d*a.itemT:a.w,a.maxW=e?e*a.itemT-c:a.w,a.itemW=a.minW>a.w?(a.w- c*(d-1))/d:a.maxWa.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=0a.w?a.itemW*(a.count-1)+c*(a.count-1):(a.itemW+c)*a.count-a.w-c):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(ba.controlNav.length)c.controlNav.update("add");else if("remove"===d&&!h||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),c.controlNav.update("remove",a.last);a.vars.directionNav&&c.directionNav.update()};a.addSlide=function(b,c){var e=d(b);a.count+=1;a.last=a.count-1;p&&n?void 0!==c?a.slides.eq(a.count- c).after(e):a.container.prepend(e):void 0!==c?a.slides.eq(c).before(e):a.container.append(e);a.update(c,"add");a.slides=d(a.vars.selector+":not(.clone)",a);a.setup();a.vars.added(a)};a.removeSlide=function(b){var c=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():p&&n?a.slides.eq(a.last).remove():a.slides.eq(b).remove();a.doMath();a.update(c,"remove");a.slides=d(a.vars.selector+":not(.clone)",a);a.setup();a.vars.removed(a)};c.init()};d(window).blur(function(d){focused= !1}).focus(function(d){focused=!0});d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1, pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};d.fn.flexslider=function(g){void 0===g&&(g={});if("object"===typeof g)return this.each(function(){var a=d(this),e=a.find(g.selector?g.selector:".slides > li");1===e.length&&!0===g.allowOneSlide||0===e.length? (e.fadeIn(400),g.start&&g.start(a)):void 0===a.data("flexslider")&&new d.flexslider(this,g)});var l=d(this).data("flexslider");switch(g){case "play":l.play();break;case "pause":l.pause();break;case "stop":l.stop();break;case "next":l.flexAnimate(l.getTarget("next"),!0);break;case "prev":case "previous":l.flexAnimate(l.getTarget("prev"),!0);break;default:"number"===typeof g&&l.flexAnimate(g,!0)}}})(jQuery); ;(function($){function getVendorProperty(name){var property=false,prefix=["Webkit","Moz","O","ms"];var test=document.createElement("div");if(typeof test.style[name]==="string"){property=name}else{var name_u=name.charAt(0).toUpperCase()+name.substr(1);for(var p in prefix){if(typeof test.style[prefix[p]+name_u]==="string"){property=prefix[p]+name_u;break}}}test=null;return property}function getVendorPrefix(){var prefix={WebkitTransition:"-webkit-",MozTransition:"-moz-",msTransition:"-ms-",OTransition:"-o-",transition:""};if(/(Safari|Chrome)/.test(navigator.userAgent)){return prefix.WebkitTransition}return prefix[getVendorProperty("transition")]}function checkTransform3D(){var support=false,test=document.createElement("div");var transform=getVendorProperty("transform");test.style[transform]="rotateY(45deg)";if(test.style[transform]!==""){support=true}test=null;return support}function getPixelOffset(element,cssok){var transform=getVendorProperty("transform");var position={left:0,top:0};if(transform&&cssok){var matrix=element.css(transform);if(matrix.indexOf("matrix")===0){matrix=matrix.split("(")[1].split(")")[0].split(/,\s*/);position.left=parseInt(matrix[4],10);position.top=parseInt(matrix[5],10)}}else{position=element.position()}return position}var transition=getVendorProperty("transition");var transform=getVendorProperty("transform");var cssprefix=getVendorPrefix();var transform3d=checkTransform3D();function translate(element,pixels,animate){if(typeof animate==="object"){var property=cssprefix+"transform";setTransition(element,property,animate.duration,animate.easing,animate.delay,animate.complete);if(pixels===getPixelOffset(element,true).left){animate.complete.call(element,property)}}if(transform3d){element.css(transform,"translate3d("+parseInt(pixels,10)+"px, 0px, 0px)")}else{element.css(transform,"translate("+parseInt(pixels,10)+"px, 0px)")}}function setTransition(element,properties,duration,easing,delay,complete){var easing_map={linear:"linear",swing:"cubic-bezier(.02,.01,.47,1)",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)"};var event_map={transition:"transitionend",OTransition:"oTransitionEnd otransitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend"};properties=properties.split(/\s+/);duration=(parseInt(duration,10)/1000||0)+"s";easing=easing_map[easing]||easing_map.swing;if(typeof delay==="function"){complete=delay;delay=0}delay=(parseInt(delay,10)/1000||0)+"s";complete=complete||$.noop;var transition_tmp=element.css(transition);element.bind(event_map[transition],function(e){var event=e.originalEvent;if(event.target===this){complete.call(element,event.propertyName);$(this).css(transition,transition_tmp).unbind(e)}e.stopPropagation()});var string="";for(var n=0;n0){this.list.children().css("width",this.settings.itemWidth)}this.settings.itemHeight=parseInt(this.settings.itemHeight,10)||0;if(this.settings.itemHeight>0){this.list.children().css("height",this.settings.itemHeight)}if(this.settings.itemMargin!==false){this.list.children().css("margin-right",parseInt(this.settings.itemMargin,10)||0)}if(!this.settings.itemKeepRatio){this.list.children().css({height:"auto"})}this.slide_width=this.slide.width();this.slide_margin=parseInt(this.slide.css("margin-right"),10)||0;this.slide_ratio=this.slide.height()/this.slide.width();if(this.settings.maxVisible>0){var max_width=this.settings.maxVisible*(this.slide_width+this.slide_margin)-this.slide_margin;this.container.css("max-width",max_width)}else{this.container.css("max-width",this.settings.maxWidth)}if(this.settings.mode==="carousel"){var cloned_before=this.list.children().clone(true),cloned_after=this.list.children().clone(true);this.list.prepend(document.createComment(" END CLONED ")).prepend(cloned_before).prepend(document.createComment(" BEGIN CLONED "));this.list.append(document.createComment(" BEGIN CLONED ")).append(cloned_after).append(document.createComment(" END CLONED "));this.offset=this.total;this.total=this.total*3;var p=this.offset*(this.slide_width+this.slide_margin);if(this.cssok){translate(this.list,-p)}else{this.list.css("left",-p)}}if(this.settings.ticker&&this.settings.mode!=="normal"){this.enableTicker()}if(this.settings.navigation){this.container.append(['"].join("\n"));this.updateNavigation(this.offset);this.container.find(".es-prev").click(function(e){self.slidePrevious();e.preventDefault()}).end().find(".es-next").click(function(e){self.slideNext();e.preventDefault()}).end()}if(this.settings.pagination&&this.settings.mode!=="carousel"){this.container.append('
    ')}if(this.settings.touchSwipe){this.enableTouchSwipe()}if(this.settings.mouseWheel){this.enableMouseWheel()}if(this.settings.keyboard){this.enableKeyboard()}$(window).bind("resize",function(){window.clearTimeout(self.timer);self.timer=window.setTimeout(function(){self.resizeSlides()},self.settings.fitDelay)}).trigger("resize");$.extend(this.api,{slideNext:function(){self.slideNext()},slidePrevious:function(){self.slidePrevious()},slideTo:function(p){self.slideTo(p)},isSliding:function(){return self.isSliding()},getVisibleSlides:function(){return self.getVisibleSlides()},tickerPause:function(){if("tickerPause" in self){self.tickerPause()}},tickerPlay:function(){if("tickerPlay" in self){self.tickerPlay()}}});this.container.data("everslider",this.api);this.container.bind("everslider",function(e,method,param){if(method in self.api){self.api[method](param)}return false});window.setTimeout(function(){self.container.addClass("es-slides-ready");self.getVisibleSlides().addClass("es-after-slide");if(typeof self.settings.slidesReady==="function"){self.settings.slidesReady.call(self.container.get(0),self.api)}},parseInt(this.settings.fitDelay,10)+parseInt(this.settings.fitDuration,10))}Slider.prototype.slideNext=function(){if(!this.lock){this.slideOffset(this.getOffset("next"))}};Slider.prototype.slidePrevious=function(){if(!this.lock){this.slideOffset(this.getOffset("prev"))}};Slider.prototype.slideTo=function(p){if(this.settings.mode==="carousel"){p=this.total/3+Math.min(p,this.total/3-this.visible)}var position_offset=p-this.offset;var direction=position_offset>0?"next":"prev";var offset_tmp=this.offset;for(var n=0;nslide_limit?slide_limit:this.offset)}}}if(direction==="next"){var left=this.total-(this.offset+this.visible);if(this.settings.mode==="carousel"&&left===0){var p=(this.offset-this.total/3)*(this.slide.width()+this.slide_margin);if(this.cssok){if(this.settings.effect!=="fade"){translate(this.list,-p)}}else{if(this.settings.effect!=="fade"){this.list.css("left",-p)}}return this.offset-this.total/3+slide_limit}else{if(this.settings.mode==="circular"&&left===0){return 0}else{return this.offset+(left>slide_limit?slide_limit:left)}}}};Slider.prototype.slideOffset=function(offset,force){if(!force&&offset===this.offset){return}var self=this;var unlock=function(){self.lock=false;self.offset=offset;if(!force){self.syncContainerHeight();self.list.children(".es-after-slide").removeClass("es-after-slide");self.getVisibleSlides().removeClass("es-before-slide").addClass("es-after-slide").trigger("es-after-slide");if(typeof self.settings.afterSlide==="function"){self.settings.afterSlide.call(self.container.get(0),self.getVisibleSlides())}}};this.lock=true;if(!force){this.list.children().slice(offset,offset+this.visible).not(".es-after-slide").addClass("es-before-slide").trigger("es-before-slide");if(typeof this.settings.beforeSlide==="function"){this.settings.beforeSlide.call(this.container.get(0),this.getVisibleSlides())}}if(this.settings.pagination&&this.settings.mode!=="carousel"){var slide_limit=Math.min(this.settings.moveSlides,this.visible);var active_page=Math.ceil(offset/slide_limit);this.container.find(".es-pagination a:eq("+active_page+")").addClass("es-active").siblings().removeClass("es-active")}this.updateNavigation(offset);var pixel_offset=offset*(this.slide.width()+this.slide_margin);if(this.cssok){if(this.settings.effect==="fade"){var now_visible=this.getVisibleSlides();var next_visible=this.list.children().slice(offset,offset+this.visible);if(this.settings.fadeDirection*offset>this.offset*this.settings.fadeDirection){next_visible=Array.prototype.reverse.call(next_visible);now_visible=Array.prototype.reverse.call(now_visible)}$.each(now_visible,function(n){setTransition($(this),"opacity",self.settings.fadeDuration,self.settings.fadeEasing,self.settings.fadeDelay*n,function(){if(nthis.offset*this.settings.fadeDirection){next_visible=Array.prototype.reverse.call(next_visible);now_visible=Array.prototype.reverse.call(now_visible)}$.each(now_visible,function(n){$(this).stop().delay(self.settings.fadeDelay*n).animate({opacity:0},self.settings.fadeDuration,self.settings.fadeEasing,function(){if(n0?Math.floor(this.visible):1}else{this.visible=Math.ceil(this.visible)}var width=(this.container.width()+this.slide_margin)/this.visible-this.slide_margin;var height=this.slide_ratio*width;var size={width:Math.round(width)};if(this.settings.itemKeepRatio){size.height=Math.round(height)}if(this.offset>0){if(this.offset+this.visible>this.total){this.offset=this.total-this.visible}var pixel_offset=this.offset*(width+this.slide_margin);if(this.cssok){translate(this.list,-pixel_offset)}else{this.list.css("left",-pixel_offset)}}var self=this;var duration=this.settings.fitDuration;var easing=this.settings.fitEasing;var unlock=function(){self.lock=false;self.syncContainerHeight()};this.list.children().each(function(){if(self.cssok){if($(this).width()===Math.round(width)){unlock()}else{setTransition($(this),"width height",duration,easing,unlock);$(this).css(size)}}else{$(this).stop().animate(size,duration,easing,unlock)}});this.updatePagination()};Slider.prototype.syncContainerHeight=function(){if(this.settings.syncHeight&&!this.settings.itemKeepRatio){var max_height=0;$.each(this.getVisibleSlides(),function(){if($(this).height()>max_height){max_height=$(this).height()}});var duration=this.settings.syncHeightDuration,easing=this.settings.syncHeightEasing;if(this.cssok){setTransition(this.container,"height",duration,easing);this.container.css("height",max_height)}else{this.container.stop().animate({height:max_height},duration,easing)}}};Slider.prototype.updatePagination=function(){if(!this.settings.pagination||this.settings.mode==="carousel"){return}var self=this;var slide_limit=Math.min(this.settings.moveSlides,this.visible);var total_pages=Math.ceil(this.total*2/(slide_limit+this.visible));var pagination=this.container.find(".es-pagination").empty();for(var i=0;i'+i+"").click((function(index){return function(e){if(self.lock){return}var offset=Math.min(index*slide_limit,self.total-self.visible);self.slideOffset(offset);e.preventDefault()}})(i)).appendTo(pagination)}var active_page=Math.ceil(this.offset/slide_limit);pagination.find("a:eq("+active_page+")").addClass("es-active").siblings().removeClass("es-active")};Slider.prototype.updateNavigation=function(offset){if(this.settings.navigation&&this.settings.mode==="normal"){var navigation=this.container.find(".es-navigation a");navigation.removeClass("es-first es-last");if(offset===0){navigation.filter(".es-prev").addClass("es-first")}if(offset===this.total-this.visible){navigation.filter(".es-next").addClass("es-last")}}};Slider.prototype.enableTouchSwipe=function(){var self=this,swipe=false;var touch_x=0,touch_y=0,pixel_offset=0;var swipeStart=function(e){var event=e;if(e.type.indexOf("touch")===0){event=e.originalEvent.changedTouches[0]}if(!self.lock){swipe=true;touch_x=event.pageX;touch_y=event.pageY;pixel_offset=getPixelOffset(self.list,self.cssok).left;self.container.bind("mousemove touchmove",swipeMove);self.container.addClass("es-swipe-grab")}};var swipeMove=function(e){var event=e;if(e.type.indexOf("touch")===0){event=e.originalEvent.changedTouches[0]}var swipe_x=event.pageX-touch_x;var swipe_y=event.pageY-touch_y;if(Math.abs(swipe_x)0)?"prev":"next";var offset=self.getOffset(swipe_direction);self.slideOffset(offset);self.container.unbind("mousemove touchmove",swipeMove)}if(!self.settings.swipePage){e.preventDefault()}};var swipeEnd=function(){if(swipe){if(!self.lock&&pixel_offset!==getPixelOffset(self.list,self.cssok).left){self.slideOffset(self.offset,true)}self.container.unbind("mousemove touchmove",swipeMove);swipe=false;self.container.removeClass("es-swipe-grab")}};this.container.bind("mousedown touchstart",swipeStart);$("body").bind("mouseup touchend touchcancel",swipeEnd);this.container.bind("dragstart",function(e){e.preventDefault()})};Slider.prototype.enableMouseWheel=function(){if(typeof $.fn.mousewheel!=="function"){return}var self=this;this.container.bind("mousewheel",function(e,delta){if(delta>0){self.slidePrevious()}else{self.slideNext()}e.preventDefault()})};Slider.prototype.enableKeyboard=function(){var self=this;$(document).bind("keydown",function(e){if(e.which===39){self.slideNext()}else{if(e.which===37){self.slidePrevious()}}})};Slider.prototype.enableTicker=function(){var self=this,first_run=true,ticker_timer,timeout;var delay=0,duration=0,ticker_timeout=parseInt(this.settings.tickerTimeout,10);if(this.settings.effect==="fade"){delay=parseInt(this.settings.fadeDelay,10);duration=parseInt(this.settings.fadeDuration,10)}else{delay=parseInt(this.settings.slideDelay,10);duration=parseInt(this.settings.slideDuration,10)}this.tickerPlay=function(){this.container.find(".es-ticker a").hide().filter(".es-pause").show();if(first_run){timeout=ticker_timeout}else{if(self.settings.effect==="fade"){timeout=((self.visible-1)*delay+self.visible*duration)+ticker_timeout}else{timeout=(delay+duration)+ticker_timeout}}window.clearInterval(ticker_timer);ticker_timer=window.setInterval(function(){self.slideNext();if(first_run){first_run=false;self.tickerPlay()}},timeout)};this.tickerPause=function(){this.container.find(".es-ticker a").hide().filter(".es-play").show();window.clearInterval(ticker_timer);first_run=true};this.container.append('
    ');$(''+this.settings.tickerPlay+"").click(function(e){self.tickerPlay();e.preventDefault()}).appendTo(this.container.find(".es-ticker"));$(''+this.settings.tickerPause+"").click(function(e){self.tickerPause();e.preventDefault()}).appendTo(this.container.find(".es-ticker"));if(this.settings.tickerHover){var hover_timer=0;this.container.hover(function(){window.clearTimeout(hover_timer);hover_timer=window.setTimeout(function(){self.tickerPause()},self.settings.tickerHoverDelay)},function(){window.clearTimeout(hover_timer);hover_timer=window.setTimeout(function(){self.tickerPlay()},self.settings.tickerHoverDelay)})}this.tickerPause();if(this.settings.tickerAutoStart){this.tickerPlay()}};$.fn.everslider=function(c){var s=$.extend({mode:"normal",effect:"slide",useCSS:true,itemWidth:false,itemHeight:false,itemMargin:false,itemKeepRatio:true,maxWidth:"100%",maxVisible:0,moveSlides:1,slideDelay:0,slideDuration:500,slideEasing:"swing",fadeDelay:200,fadeDuration:500,fadeEasing:"swing",fadeDirection:1,fitDelay:300,fitDuration:200,fitEasing:"swing",syncHeight:false,syncHeightDuration:200,syncHeightEasing:"swing",navigation:true,nextNav:"Next",prevNav:"Previous",pagination:true,touchSwipe:true,swipeThreshold:50,swipePage:false,mouseWheel:false,keyboard:false,ticker:false,tickerTimeout:2000,tickerAutoStart:true,tickerPlay:"Play",tickerPause:"Pause",tickerHover:false,tickerHoverDelay:300,slidesReady:function(){},beforeSlide:function(){},afterSlide:function(){}},c);return this.each(function(){new Slider(this,s)})}})(jQuery); ;!function(a,b){function j(a,b){function c(){}c[e]=this[e];var d=this,g=new c,h=f(a),j=h?a:this,k=h?{}:a,l=function(){this.initialize?this.initialize.apply(this,arguments):(b||h&&d.apply(this,arguments),j.apply(this,arguments))};l.methods=function(a){i(g,a,d),l[e]=g;return this},l.methods.call(l,k).prototype.constructor=l,l.extend=arguments.callee,l[e].implement=l.statics=function(a,b){a=typeof a=="string"?function(){var c={};c[a]=b;return c}():a,i(this,a,d);return this};return l}function i(a,b,d){for(var g in b)b.hasOwnProperty(g)&&(a[g]=f(b[g])&&f(d[e][g])&&c.test(b[g])?h(g,b[g],d):b[g])}function h(a,b,c){return function(){var d=this.supr;this.supr=c[e][a];var f=b.apply(this,arguments);this.supr=d;return f}}function g(a){return j.call(f(a)?a:d,a,1)}var c=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,d=function(){},e="prototype",f=function(a){return typeof a===b};if(typeof module!="undefined"&&module.exports)module.exports=g;else{var k=a.klass;g.noConflict=function(){a.klass=k;return this},a.klass=g}}(this,"function") ;// PhotoSwipe - http://www.photoswipe.com/ // Copyright (c) 2012 by Code Computerlove (http://www.codecomputerlove.com) // Licensed under the MIT license // version: 3.0.5 (function(e){if(!Function.prototype.bind)Function.prototype.bind=function(d){var a=[].slice,b=a.call(arguments,1),c=this,g=function(){},f=function(){return c.apply(this instanceof g?this:d||{},b.concat(a.call(arguments)))};g.prototype=c.prototype;f.prototype=new g;return f};if(typeof e.Code==="undefined")e.Code={};e.Code.Util={registerNamespace:function(){var d=arguments,a=null,b,c,g,f,i;b=0;for(f=d.length;bd.DOM.windowHeight()}};d.Browser._detect()})(window,window.Code.Util); (function(e,d,a){a.extend(a,{Events:{add:function(a,c,g){d(a).bind(c,g)},remove:function(a,c,g){d(a).unbind(c,g)},fire:function(a,c){var g,f=Array.prototype.slice.call(arguments).splice(2);g=typeof c==="string"?{type:c}:c;d(a).trigger(d.Event(g.type,g),f)},getMousePosition:function(a){return{x:a.pageX,y:a.pageY}},getTouchEvent:function(a){return a.originalEvent},getWheelDelta:function(b){var c=0;a.isNothing(b.wheelDelta)?a.isNothing(b.detail)||(c=-b.detail/3):c=b.wheelDelta/120;return c},domReady:function(a){d(document).ready(a)}}})})(window, window.jQuery,window.Code.Util); (function(e,d,a){a.extend(a,{DOM:{setData:function(b,c,g){if(a.isLikeArray(b)){var f,d;f=0;for(d=b.length;f");a.attr(c);a.append(g);return a[0]},appendChild:function(a,c){d(c).append(a)},insertBefore:function(a,c){d(a).insertBefore(c)},appendText:function(a,c){d(c).text(a)},appendToBody:function(a){d("body").append(a)},removeChild:function(a){d(a).empty().remove()},removeChildren:function(a){d(a).empty()}, hasAttribute:function(b,c){return!a.isNothing(d(b).attr(c))},getAttribute:function(b,c,g){b=d(b).attr(c);a.isNothing(b)&&!a.isNothing(g)&&(b=g);return b},setAttribute:function(b,c,g){if(a.isLikeArray(b)){var f,d;f=0;for(d=b.length;f=1&&d.DOM.setStyle(a,"opacity",0);d.Browser.isCSSTransformSupported?this._applyTransition(a,"opacity",f,b,c,g):d.isNothing(e.jQuery)||e.jQuery(a).fadeTo(b,f,c)},fadeTo:function(a,b,c,g,f){this.fadeIn(a, c,g,f,b)},fadeOut:function(a,b,c,g){if(b<=0&&(d.DOM.setStyle(a,"opacity",0),!d.isNothing(c))){c(a);return}d.Browser.isCSSTransformSupported?this._applyTransition(a,"opacity",0,b,c,g):e.jQuery(a).fadeTo(b,0,c)},slideBy:function(a,b,c,g,f,i){var j={},b=d.coalesce(b,0),c=d.coalesce(c,0),i=d.coalesce(i,"ease-out");j[this._transitionPrefix+"Property"]="all";j[this._transitionPrefix+"Delay"]="0";g===0?(j[this._transitionPrefix+"Duration"]="",j[this._transitionPrefix+"TimingFunction"]=""):(j[this._transitionPrefix+ "Duration"]=g+"ms",j[this._transitionPrefix+"TimingFunction"]=d.coalesce(i,"ease-out"),d.Events.add(a,this._transitionEndLabel,this._getTransitionEndHandler()));j[this._transformLabel]=d.Browser.is3dSupported?"translate3d("+b+"px, "+c+"px, 0px)":"translate("+b+"px, "+c+"px)";if(!d.isNothing(f))a.cclallcallback=f;d.DOM.setStyle(a,j);g===0&&e.setTimeout(function(){this._leaveTransforms(a)}.bind(this),this._applyTransitionDelay)},resetTranslate:function(a){var b={};b[this._transformLabel]=b[this._transformLabel]= d.Browser.is3dSupported?"translate3d(0px, 0px, 0px)":"translate(0px, 0px)";d.DOM.setStyle(a,b)},_applyTransition:function(a,b,c,g,f,i){var j={},i=d.coalesce(i,"ease-in");j[this._transitionPrefix+"Property"]=b;j[this._transitionPrefix+"Duration"]=g+"ms";j[this._transitionPrefix+"TimingFunction"]=i;j[this._transitionPrefix+"Delay"]="0";d.Events.add(a,this._transitionEndLabel,this._getTransitionEndHandler());d.DOM.setStyle(a,j);d.isNothing(f)||(a["ccl"+b+"callback"]=f);e.setTimeout(function(){d.DOM.setStyle(a, b,c)},this._applyTransitionDelay)},_onTransitionEnd:function(a){d.Events.remove(a.currentTarget,this._transitionEndLabel,this._getTransitionEndHandler());this._leaveTransforms(a.currentTarget)},_leaveTransforms:function(a){var b=a.style[this._transitionPrefix+"Property"],c=b!==""?"ccl"+b+"callback":"cclallcallback",g,b=d.coalesce(a.style.webkitTransform,a.style.MozTransform,a.style.transform),f,i=e.parseInt(d.DOM.getStyle(a,"left"),0),j=e.parseInt(d.DOM.getStyle(a,"top"),0),h,l,k={};b!==""&&(b=d.Browser.is3dSupported? b.match(/translate3d\((.*?)\)/):b.match(/translate\((.*?)\)/),d.isNothing(b)||(f=b[1].split(", "),h=e.parseInt(f[0],0),l=e.parseInt(f[1],0)));k[this._transitionPrefix+"Property"]="";k[this._transitionPrefix+"Duration"]="";k[this._transitionPrefix+"TimingFunction"]="";k[this._transitionPrefix+"Delay"]="";d.DOM.setStyle(a,k);e.setTimeout(function(){if(!d.isNothing(f))k={},k[this._transformLabel]="",k.left=i+h+"px",k.top=j+l+"px",d.DOM.setStyle(a,k);d.isNothing(a[c])||(g=a[c],delete a[c],g(a))}.bind(this), this._applyTransitionDelay)}}})})(window,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.Util.TouchElement");a.TouchElement.EventTypes={onTouch:"CodeUtilTouchElementOnTouch"};a.TouchElement.ActionTypes={touchStart:"touchStart",touchMove:"touchMove",touchEnd:"touchEnd",touchMoveEnd:"touchMoveEnd",tap:"tap",doubleTap:"doubleTap",swipeLeft:"swipeLeft",swipeRight:"swipeRight",swipeUp:"swipeUp",swipeDown:"swipeDown",gestureStart:"gestureStart",gestureChange:"gestureChange",gestureEnd:"gestureEnd"}})(window,window.klass,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.Util.TouchElement");a.TouchElement.TouchElementClass=d({el:null,captureSettings:null,touchStartPoint:null,touchEndPoint:null,touchStartTime:null,doubleTapTimeout:null,touchStartHandler:null,touchMoveHandler:null,touchEndHandler:null,mouseDownHandler:null,mouseMoveHandler:null,mouseUpHandler:null,mouseOutHandler:null,gestureStartHandler:null,gestureChangeHandler:null,gestureEndHandler:null,swipeThreshold:null,swipeTimeThreshold:null,doubleTapSpeed:null,dispose:function(){var b; this.removeEventHandlers();for(b in this)a.objectHasProperty(this,b)&&(this[b]=null)},initialize:function(b,c){this.el=b;this.captureSettings={swipe:!1,move:!1,gesture:!1,doubleTap:!1,preventDefaultTouchEvents:!0};a.extend(this.captureSettings,c);this.swipeThreshold=50;this.doubleTapSpeed=this.swipeTimeThreshold=250;this.touchStartPoint={x:0,y:0};this.touchEndPoint={x:0,y:0}},addEventHandlers:function(){if(a.isNothing(this.touchStartHandler))this.touchStartHandler=this.onTouchStart.bind(this),this.touchMoveHandler= this.onTouchMove.bind(this),this.touchEndHandler=this.onTouchEnd.bind(this),this.mouseDownHandler=this.onMouseDown.bind(this),this.mouseMoveHandler=this.onMouseMove.bind(this),this.mouseUpHandler=this.onMouseUp.bind(this),this.mouseOutHandler=this.onMouseOut.bind(this),this.gestureStartHandler=this.onGestureStart.bind(this),this.gestureChangeHandler=this.onGestureChange.bind(this),this.gestureEndHandler=this.onGestureEnd.bind(this);a.Events.add(this.el,"touchstart",this.touchStartHandler);this.captureSettings.move&& a.Events.add(this.el,"touchmove",this.touchMoveHandler);a.Events.add(this.el,"touchend",this.touchEndHandler);a.Events.add(this.el,"mousedown",this.mouseDownHandler);a.Browser.isGestureSupported&&this.captureSettings.gesture&&(a.Events.add(this.el,"gesturestart",this.gestureStartHandler),a.Events.add(this.el,"gesturechange",this.gestureChangeHandler),a.Events.add(this.el,"gestureend",this.gestureEndHandler))},removeEventHandlers:function(){a.Events.remove(this.el,"touchstart",this.touchStartHandler); this.captureSettings.move&&a.Events.remove(this.el,"touchmove",this.touchMoveHandler);a.Events.remove(this.el,"touchend",this.touchEndHandler);a.Events.remove(this.el,"mousedown",this.mouseDownHandler);a.Browser.isGestureSupported&&this.captureSettings.gesture&&(a.Events.remove(this.el,"gesturestart",this.gestureStartHandler),a.Events.remove(this.el,"gesturechange",this.gestureChangeHandler),a.Events.remove(this.el,"gestureend",this.gestureEndHandler))},getTouchPoint:function(a){return{x:a[0].pageX, y:a[0].pageY}},fireTouchEvent:function(b){var c=0,g=0,f=0,d,c=this.touchEndPoint.x-this.touchStartPoint.x,g=this.touchEndPoint.y-this.touchStartPoint.y,f=Math.sqrt(c*c+g*g);if(this.captureSettings.swipe&&(d=new Date,d-=this.touchStartTime,d<=this.swipeTimeThreshold)){if(e.Math.abs(c)>=this.swipeThreshold){a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,point:this.touchEndPoint,action:c<0?a.TouchElement.ActionTypes.swipeLeft:a.TouchElement.ActionTypes.swipeRight,targetEl:b.target, currentTargetEl:b.currentTarget});return}if(e.Math.abs(g)>=this.swipeThreshold){a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,point:this.touchEndPoint,action:g<0?a.TouchElement.ActionTypes.swipeUp:a.TouchElement.ActionTypes.swipeDown,targetEl:b.target,currentTargetEl:b.currentTarget});return}}f>1?a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.touchMoveEnd,point:this.touchEndPoint,targetEl:b.target,currentTargetEl:b.currentTarget}): this.captureSettings.doubleTap?a.isNothing(this.doubleTapTimeout)?this.doubleTapTimeout=e.setTimeout(function(){this.doubleTapTimeout=null;a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,point:this.touchEndPoint,action:a.TouchElement.ActionTypes.tap,targetEl:b.target,currentTargetEl:b.currentTarget})}.bind(this),this.doubleTapSpeed):(e.clearTimeout(this.doubleTapTimeout),this.doubleTapTimeout=null,a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,point:this.touchEndPoint, action:a.TouchElement.ActionTypes.doubleTap,targetEl:b.target,currentTargetEl:b.currentTarget})):a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,point:this.touchEndPoint,action:a.TouchElement.ActionTypes.tap,targetEl:b.target,currentTargetEl:b.currentTarget})},onTouchStart:function(b){this.captureSettings.preventDefaultTouchEvents&&b.preventDefault();a.Events.remove(this.el,"mousedown",this.mouseDownHandler);var c=a.Events.getTouchEvent(b).touches;c.length>1&&this.captureSettings.gesture? this.isGesture=!0:(this.touchStartTime=new Date,this.isGesture=!1,this.touchStartPoint=this.getTouchPoint(c),a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.touchStart,point:this.touchStartPoint,targetEl:b.target,currentTargetEl:b.currentTarget}))},onTouchMove:function(b){this.captureSettings.preventDefaultTouchEvents&&b.preventDefault();if(!this.isGesture||!this.captureSettings.gesture){var c=a.Events.getTouchEvent(b).touches;a.Events.fire(this, {type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.touchMove,point:this.getTouchPoint(c),targetEl:b.target,currentTargetEl:b.currentTarget})}},onTouchEnd:function(b){if(!this.isGesture||!this.captureSettings.gesture){this.captureSettings.preventDefaultTouchEvents&&b.preventDefault();var c=a.Events.getTouchEvent(b);this.touchEndPoint=this.getTouchPoint(!a.isNothing(c.changedTouches)?c.changedTouches:c.touches);a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch, target:this,action:a.TouchElement.ActionTypes.touchEnd,point:this.touchEndPoint,targetEl:b.target,currentTargetEl:b.currentTarget});this.fireTouchEvent(b)}},onMouseDown:function(b){b.preventDefault();a.Events.remove(this.el,"touchstart",this.mouseDownHandler);a.Events.remove(this.el,"touchmove",this.touchMoveHandler);a.Events.remove(this.el,"touchend",this.touchEndHandler);this.captureSettings.move&&a.Events.add(this.el,"mousemove",this.mouseMoveHandler);a.Events.add(this.el,"mouseup",this.mouseUpHandler); a.Events.add(this.el,"mouseout",this.mouseOutHandler);this.touchStartTime=new Date;this.isGesture=!1;this.touchStartPoint=a.Events.getMousePosition(b);a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.touchStart,point:this.touchStartPoint,targetEl:b.target,currentTargetEl:b.currentTarget})},onMouseMove:function(b){b.preventDefault();a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.touchMove, point:a.Events.getMousePosition(b),targetEl:b.target,currentTargetEl:b.currentTarget})},onMouseUp:function(b){b.preventDefault();this.captureSettings.move&&a.Events.remove(this.el,"mousemove",this.mouseMoveHandler);a.Events.remove(this.el,"mouseup",this.mouseUpHandler);a.Events.remove(this.el,"mouseout",this.mouseOutHandler);this.touchEndPoint=a.Events.getMousePosition(b);a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.touchEnd,point:this.touchEndPoint, targetEl:b.target,currentTargetEl:b.currentTarget});this.fireTouchEvent(b)},onMouseOut:function(b){var c=b.relatedTarget;if(!(this.el===c||a.DOM.isChildOf(c,this.el)))b.preventDefault(),this.captureSettings.move&&a.Events.remove(this.el,"mousemove",this.mouseMoveHandler),a.Events.remove(this.el,"mouseup",this.mouseUpHandler),a.Events.remove(this.el,"mouseout",this.mouseOutHandler),this.touchEndPoint=a.Events.getMousePosition(b),a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this, action:a.TouchElement.ActionTypes.touchEnd,point:this.touchEndPoint,targetEl:b.target,currentTargetEl:b.currentTarget}),this.fireTouchEvent(b)},onGestureStart:function(b){b.preventDefault();var c=a.Events.getTouchEvent(b);a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.gestureStart,scale:c.scale,rotation:c.rotation,targetEl:b.target,currentTargetEl:b.currentTarget})},onGestureChange:function(b){b.preventDefault();var c=a.Events.getTouchEvent(b); a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.gestureChange,scale:c.scale,rotation:c.rotation,targetEl:b.target,currentTargetEl:b.currentTarget})},onGestureEnd:function(b){b.preventDefault();var c=a.Events.getTouchEvent(b);a.Events.fire(this,{type:a.TouchElement.EventTypes.onTouch,target:this,action:a.TouchElement.ActionTypes.gestureEnd,scale:c.scale,rotation:c.rotation,targetEl:b.target,currentTargetEl:b.currentTarget})}})})(window,window.klass, window.Code.Util);(function(e,d,a){a.registerNamespace("Code.PhotoSwipe.Image");e.Code.PhotoSwipe.Image.EventTypes={onLoad:"onLoad",onError:"onError"}})(window,window.klass,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.PhotoSwipe.Image");var b=e.Code.PhotoSwipe;b.Image.ImageClass=d({refObj:null,imageEl:null,src:null,caption:null,metaData:null,imageLoadHandler:null,imageErrorHandler:null,dispose:function(){var c;this.shrinkImage();for(c in this)a.objectHasProperty(this,c)&&(this[c]=null)},initialize:function(a,b,f,d){this.refObj=a;this.src=this.originalSrc=b;this.caption=f;this.metaData=d;this.imageEl=new e.Image;this.imageLoadHandler=this.onImageLoad.bind(this);this.imageErrorHandler= this.onImageError.bind(this)},load:function(){this.imageEl.originalSrc=a.coalesce(this.imageEl.originalSrc,"");this.imageEl.originalSrc===this.src?this.imageEl.isError?a.Events.fire(this,{type:b.Image.EventTypes.onError,target:this}):a.Events.fire(this,{type:b.Image.EventTypes.onLoad,target:this}):(this.imageEl.isError=!1,this.imageEl.isLoading=!0,this.imageEl.naturalWidth=null,this.imageEl.naturalHeight=null,this.imageEl.isLandscape=!1,this.imageEl.onload=this.imageLoadHandler,this.imageEl.onerror= this.imageErrorHandler,this.imageEl.onabort=this.imageErrorHandler,this.imageEl.originalSrc=this.src,this.imageEl.src=this.src)},shrinkImage:function(){if(!a.isNothing(this.imageEl)&&this.imageEl.src.indexOf(this.src)>-1)this.imageEl.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",a.isNothing(this.imageEl.parentNode)||a.DOM.removeChild(this.imageEl,this.imageEl.parentNode)},onImageLoad:function(){this.imageEl.onload=null;this.imageEl.naturalWidth=a.coalesce(this.imageEl.naturalWidth, this.imageEl.width);this.imageEl.naturalHeight=a.coalesce(this.imageEl.naturalHeight,this.imageEl.height);this.imageEl.isLandscape=this.imageEl.naturalWidth>this.imageEl.naturalHeight;this.imageEl.isLoading=!1;a.Events.fire(this,{type:b.Image.EventTypes.onLoad,target:this})},onImageError:function(){this.imageEl.onload=null;this.imageEl.onerror=null;this.imageEl.onabort=null;this.imageEl.isLoading=!1;this.imageEl.isError=!0;a.Events.fire(this,{type:b.Image.EventTypes.onError,target:this})}})})(window, window.klass,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.PhotoSwipe.Cache");e=e.Code.PhotoSwipe;e.Cache.Mode={normal:"normal",aggressive:"aggressive"};e.Cache.Functions={getImageSource:function(a){return a.href},getImageCaption:function(b){if(b.nodeName==="IMG")return a.DOM.getAttribute(b,"alt");var c,g,f;c=0;for(g=b.childNodes.length;cb&& (b=a.DOM.windowHeight())}else c=a.DOM.width(this.settings.target),b=a.DOM.height(this.settings.target),f="0px";a.DOM.setStyle(this.el,{width:c,height:b,top:f})},fadeIn:function(c,b){this.resetPosition();a.DOM.setStyle(this.el,"opacity",0);a.DOM.show(this.el);a.Animation.fadeIn(this.el,c,b)}})})(window,window.klass,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.PhotoSwipe.Carousel");e=e.Code.PhotoSwipe;e.Carousel.EventTypes={onSlideByEnd:"PhotoSwipeCarouselOnSlideByEnd",onSlideshowStart:"PhotoSwipeCarouselOnSlideshowStart",onSlideshowStop:"PhotoSwipeCarouselOnSlideshowStop"};e.Carousel.CssClasses={carousel:"ps-carousel",content:"ps-carousel-content",item:"ps-carousel-item",itemLoading:"ps-carousel-item-loading",itemError:"ps-carousel-item-error"};e.Carousel.SlideByAction={previous:"previous",current:"current",next:"next"}})(window, window.klass,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.PhotoSwipe.Carousel");var b=e.Code.PhotoSwipe;b.Carousel.CarouselClass=d({el:null,contentEl:null,settings:null,cache:null,slideByEndHandler:null,currentCacheIndex:null,isSliding:null,isSlideshowActive:null,lastSlideByAction:null,touchStartPoint:null,touchStartPosition:null,imageLoadHandler:null,imageErrorHandler:null,slideshowTimeout:null,dispose:function(){var c,g,f;g=0;for(f=this.cache.images.length;g0&&a.DOM.setStyle(j,{marginRight:this.settings.margin+"px"}),a.DOM.appendChild(j,this.contentEl);this.settings.target===e?a.DOM.appendToBody(this.el):a.DOM.appendChild(this.el,this.settings.target)}, resetPosition:function(){var c,g,f,d,j,h;this.settings.target===e?(c=a.DOM.windowWidth(),g=a.DOM.windowHeight(),f=a.DOM.windowScrollTop()+"px"):(c=a.DOM.width(this.settings.target),g=a.DOM.height(this.settings.target),f="0px");d=this.settings.margin>0?c+this.settings.margin:c;j=a.DOM.find("."+b.Carousel.CssClasses.item,this.contentEl);d*=j.length;a.DOM.setStyle(this.el,{top:f,width:c,height:g});a.DOM.setStyle(this.contentEl,{width:d,height:g});f=0;for(d=j.length;fe&&(b=e/f,f=Math.round(f*b),d=Math.round(d*b)),d>h&&(b=h/d,d=Math.round(d*b),f=Math.round(f*b))):(b=c.isLandscape?e/c.naturalWidth:h/c.naturalHeight,f=Math.round(c.naturalWidth* b),d=Math.round(c.naturalHeight*b),this.settings.imageScaleMethod==="zoom"?(b=1,de?b=e/f:d>h&&(b=h/d),b!==1&&(f=Math.round(f*b),d=Math.round(d*b))));a.DOM.setStyle(c,{position:"absolute",width:f,height:d,top:Math.round((h-d)/2)+"px",left:Math.round((e-f)/2)+"px",display:"block"})}},setContentLeftPosition:function(){var c,b,d;c=this.settings.target===e?a.DOM.windowWidth():a.DOM.width(this.settings.target); b=this.getItemEls();d=0;this.settings.loop?d=(c+this.settings.margin)*-1:this.currentCacheIndex===this.cache.images.length-1?d=(b.length-1)*(c+this.settings.margin)*-1:this.currentCacheIndex>0&&(d=(c+this.settings.margin)*-1);a.DOM.setStyle(this.contentEl,{left:d+"px"})},show:function(c){this.currentCacheIndex=c;this.resetPosition();this.setImages(!1);a.DOM.show(this.el);a.Animation.resetTranslate(this.contentEl);var c=this.getItemEls(),d,f;d=0;for(f=c.length;dthis.cache.images.length-1&&(b=0),e<0&&(e=this.cache.images.length-1),b=this.cache.getImages([e,this.currentCacheIndex,b]),a||this.addCacheImageToItemEl(b[1],d[1]),this.addCacheImageToItemEl(b[2],d[2]),this.addCacheImageToItemEl(b[0], d[0])):d.length===1?a||(b=this.cache.getImages([this.currentCacheIndex]),this.addCacheImageToItemEl(b[0],d[0])):d.length===2?this.currentCacheIndex===0?(b=this.cache.getImages([this.currentCacheIndex,this.currentCacheIndex+1]),a||this.addCacheImageToItemEl(b[0],d[0]),this.addCacheImageToItemEl(b[1],d[1])):(b=this.cache.getImages([this.currentCacheIndex-1,this.currentCacheIndex]),a||this.addCacheImageToItemEl(b[1],d[1]),this.addCacheImageToItemEl(b[0],d[0])):this.currentCacheIndex===0?(b=this.cache.getImages([this.currentCacheIndex, this.currentCacheIndex+1,this.currentCacheIndex+2]),a||this.addCacheImageToItemEl(b[0],d[0]),this.addCacheImageToItemEl(b[1],d[1]),this.addCacheImageToItemEl(b[2],d[2])):(this.currentCacheIndex===this.cache.images.length-1?(b=this.cache.getImages([this.currentCacheIndex-2,this.currentCacheIndex-1,this.currentCacheIndex]),a||this.addCacheImageToItemEl(b[2],d[2]),this.addCacheImageToItemEl(b[1],d[1])):(b=this.cache.getImages([this.currentCacheIndex-1,this.currentCacheIndex,this.currentCacheIndex+1]), a||this.addCacheImageToItemEl(b[1],d[1]),this.addCacheImageToItemEl(b[2],d[2])),this.addCacheImageToItemEl(b[0],d[0]))},addCacheImageToItemEl:function(c,d){a.DOM.removeClass(d,b.Carousel.CssClasses.itemError);a.DOM.addClass(d,b.Carousel.CssClasses.itemLoading);a.DOM.removeChildren(d);a.DOM.setStyle(c.imageEl,{display:"none"});a.DOM.appendChild(c.imageEl,d);a.Animation.resetTranslate(c.imageEl);a.Events.add(c,b.Image.EventTypes.onLoad,this.imageLoadHandler);a.Events.add(c,b.Image.EventTypes.onError, this.imageErrorHandler);c.load()},slideCarousel:function(c,d,f){if(!this.isSliding){var i,j;i=this.settings.target===e?a.DOM.windowWidth()+this.settings.margin:a.DOM.width(this.settings.target)+this.settings.margin;f=a.coalesce(f,this.settings.slideSpeed);if(!(e.Math.abs(j)<1)){switch(d){case a.TouchElement.ActionTypes.swipeLeft:c=i*-1;break;case a.TouchElement.ActionTypes.swipeRight:c=i;break;default:j=c.x-this.touchStartPoint.x,c=e.Math.abs(j)>i/2?j>0?i:i*-1:0}this.lastSlideByAction=c<0?b.Carousel.SlideByAction.next: c>0?b.Carousel.SlideByAction.previous:b.Carousel.SlideByAction.current;if(!this.settings.loop&&(this.lastSlideByAction===b.Carousel.SlideByAction.previous&&this.currentCacheIndex===0||this.lastSlideByAction===b.Carousel.SlideByAction.next&&this.currentCacheIndex===this.cache.images.length-1))c=0,this.lastSlideByAction=b.Carousel.SlideByAction.current;this.isSliding=!0;this.doSlideCarousel(c,f)}}},moveCarousel:function(a){this.isSliding||this.settings.enableDrag&&this.doMoveCarousel(a.x-this.touchStartPoint.x)}, getItemEls:function(){return a.DOM.find("."+b.Carousel.CssClasses.item,this.contentEl)},previous:function(){this.stopSlideshow();this.slideCarousel({x:0,y:0},a.TouchElement.ActionTypes.swipeRight,this.settings.nextPreviousSlideSpeed)},next:function(){this.stopSlideshow();this.slideCarousel({x:0,y:0},a.TouchElement.ActionTypes.swipeLeft,this.settings.nextPreviousSlideSpeed)},slideshowNext:function(){this.slideCarousel({x:0,y:0},a.TouchElement.ActionTypes.swipeLeft)},startSlideshow:function(){this.stopSlideshow(); this.isSlideshowActive=!0;this.slideshowTimeout=e.setTimeout(this.slideshowNext.bind(this),this.settings.slideshowDelay);a.Events.fire(this,{type:b.Carousel.EventTypes.onSlideshowStart,target:this})},stopSlideshow:function(){if(!a.isNothing(this.slideshowTimeout))e.clearTimeout(this.slideshowTimeout),this.slideshowTimeout=null,this.isSlideshowActive=!1,a.Events.fire(this,{type:b.Carousel.EventTypes.onSlideshowStop,target:this})},onSlideByEnd:function(){if(!a.isNothing(this.isSliding)){var c=this.getItemEls(); this.isSliding=!1;this.lastSlideByAction===b.Carousel.SlideByAction.next?this.currentCacheIndex+=1:this.lastSlideByAction===b.Carousel.SlideByAction.previous&&(this.currentCacheIndex-=1);if(this.settings.loop)if(this.lastSlideByAction===b.Carousel.SlideByAction.next?a.DOM.appendChild(c[0],this.contentEl):this.lastSlideByAction===b.Carousel.SlideByAction.previous&&a.DOM.insertBefore(c[c.length-1],c[0],this.contentEl),this.currentCacheIndex<0)this.currentCacheIndex=this.cache.images.length-1;else{if(this.currentCacheIndex=== this.cache.images.length)this.currentCacheIndex=0}else this.cache.images.length>3&&(this.currentCacheIndex>1&&this.currentCacheIndex
    '}})(window,window.klass,window.Code.Util); (function(e,d,a){a.registerNamespace("Code.PhotoSwipe.Toolbar");var b=e.Code.PhotoSwipe;b.Toolbar.ToolbarClass=d({toolbarEl:null,closeEl:null,playEl:null,previousEl:null,nextEl:null,captionEl:null,captionContentEl:null,currentCaption:null,settings:null,cache:null,timeout:null,isVisible:null,fadeOutHandler:null,touchStartHandler:null,touchMoveHandler:null,clickHandler:null,dispose:function(){var b;this.clearTimeout();this.removeEventHandlers();a.Animation.stop(this.toolbarEl);a.Animation.stop(this.captionEl); a.DOM.removeChild(this.toolbarEl,this.toolbarEl.parentNode);a.DOM.removeChild(this.captionEl,this.captionEl.parentNode);for(b in this)a.objectHasProperty(this,b)&&(this[b]=null)},initialize:function(c,d){var f;this.settings=d;this.cache=c;this.isVisible=!1;this.fadeOutHandler=this.onFadeOut.bind(this);this.touchStartHandler=this.onTouchStart.bind(this);this.touchMoveHandler=this.onTouchMove.bind(this);this.clickHandler=this.onClick.bind(this);f=b.Toolbar.CssClasses.toolbar;this.settings.captionAndToolbarFlipPosition&& (f=f+" "+b.Toolbar.CssClasses.toolbarTop);this.toolbarEl=a.DOM.createElement("div",{"class":f},this.settings.getToolbar());a.DOM.setStyle(this.toolbarEl,{left:0,position:"absolute",overflow:"hidden",zIndex:this.settings.zIndex});this.settings.target===e?a.DOM.appendToBody(this.toolbarEl):a.DOM.appendChild(this.toolbarEl,this.settings.target);a.DOM.hide(this.toolbarEl);this.closeEl=a.DOM.find("."+b.Toolbar.CssClasses.close,this.toolbarEl)[0];this.settings.preventHide&&!a.isNothing(this.closeEl)&&a.DOM.hide(this.closeEl); this.playEl=a.DOM.find("."+b.Toolbar.CssClasses.play,this.toolbarEl)[0];this.settings.preventSlideshow&&!a.isNothing(this.playEl)&&a.DOM.hide(this.playEl);this.nextEl=a.DOM.find("."+b.Toolbar.CssClasses.next,this.toolbarEl)[0];this.previousEl=a.DOM.find("."+b.Toolbar.CssClasses.previous,this.toolbarEl)[0];f=b.Toolbar.CssClasses.caption;this.settings.captionAndToolbarFlipPosition&&(f=f+" "+b.Toolbar.CssClasses.captionBottom);this.captionEl=a.DOM.createElement("div",{"class":f},"");a.DOM.setStyle(this.captionEl, {left:0,position:"absolute",overflow:"hidden",zIndex:this.settings.zIndex});this.settings.target===e?a.DOM.appendToBody(this.captionEl):a.DOM.appendChild(this.captionEl,this.settings.target);a.DOM.hide(this.captionEl);this.captionContentEl=a.DOM.createElement("div",{"class":b.Toolbar.CssClasses.captionContent},"");a.DOM.appendChild(this.captionContentEl,this.captionEl);this.addEventHandlers()},resetPosition:function(){var b,d,f;this.settings.target===e?(this.settings.captionAndToolbarFlipPosition? (d=a.DOM.windowScrollTop(),f=a.DOM.windowScrollTop()+a.DOM.windowHeight()-a.DOM.height(this.captionEl)):(d=a.DOM.windowScrollTop()+a.DOM.windowHeight()-a.DOM.height(this.toolbarEl),f=a.DOM.windowScrollTop()),b=a.DOM.windowWidth()):(this.settings.captionAndToolbarFlipPosition?(d="0",f=a.DOM.height(this.settings.target)-a.DOM.height(this.captionEl)):(d=a.DOM.height(this.settings.target)-a.DOM.height(this.toolbarEl),f=0),b=a.DOM.width(this.settings.target));a.DOM.setStyle(this.toolbarEl,{top:d+"px", width:b});a.DOM.setStyle(this.captionEl,{top:f+"px",width:b})},toggleVisibility:function(a){this.isVisible?this.fadeOut():this.show(a)},show:function(c){a.Animation.stop(this.toolbarEl);a.Animation.stop(this.captionEl);this.resetPosition();this.setToolbarStatus(c);a.Events.fire(this,{type:b.Toolbar.EventTypes.onBeforeShow,target:this});this.showToolbar();this.setCaption(c);this.showCaption();this.isVisible=!0;this.setTimeout();a.Events.fire(this,{type:b.Toolbar.EventTypes.onShow,target:this})},setTimeout:function(){if(this.settings.captionAndToolbarAutoHideDelay> 0)this.clearTimeout(),this.timeout=e.setTimeout(this.fadeOut.bind(this),this.settings.captionAndToolbarAutoHideDelay)},clearTimeout:function(){if(!a.isNothing(this.timeout))e.clearTimeout(this.timeout),this.timeout=null},fadeOut:function(){this.clearTimeout();a.Events.fire(this,{type:b.Toolbar.EventTypes.onBeforeHide,target:this});a.Animation.fadeOut(this.toolbarEl,this.settings.fadeOutSpeed);a.Animation.fadeOut(this.captionEl,this.settings.fadeOutSpeed,this.fadeOutHandler);this.isVisible=!1},addEventHandlers:function(){a.Browser.isTouchSupported&& (a.Browser.blackberry||a.Events.add(this.toolbarEl,"touchstart",this.touchStartHandler),a.Events.add(this.toolbarEl,"touchmove",this.touchMoveHandler),a.Events.add(this.captionEl,"touchmove",this.touchMoveHandler));a.Events.add(this.toolbarEl,"click",this.clickHandler)},removeEventHandlers:function(){a.Browser.isTouchSupported&&(a.Browser.blackberry||a.Events.remove(this.toolbarEl,"touchstart",this.touchStartHandler),a.Events.remove(this.toolbarEl,"touchmove",this.touchMoveHandler),a.Events.remove(this.captionEl, "touchmove",this.touchMoveHandler));a.Events.remove(this.toolbarEl,"click",this.clickHandler)},handleTap:function(c){this.clearTimeout();var d;if(c.target===this.nextEl||a.DOM.isChildOf(c.target,this.nextEl))d=b.Toolbar.ToolbarAction.next;else if(c.target===this.previousEl||a.DOM.isChildOf(c.target,this.previousEl))d=b.Toolbar.ToolbarAction.previous;else if(c.target===this.closeEl||a.DOM.isChildOf(c.target,this.closeEl))d=b.Toolbar.ToolbarAction.close;else if(c.target===this.playEl||a.DOM.isChildOf(c.target, this.playEl))d=b.Toolbar.ToolbarAction.play;this.setTimeout();if(a.isNothing(d))d=b.Toolbar.ToolbarAction.none;a.Events.fire(this,{type:b.Toolbar.EventTypes.onTap,target:this,action:d,tapTarget:c.target})},setCaption:function(b){a.DOM.removeChildren(this.captionContentEl);this.currentCaption=a.coalesce(this.cache.images[b].caption,"\u00a0");if(a.isObject(this.currentCaption))a.DOM.appendChild(this.currentCaption,this.captionContentEl);else{if(this.currentCaption==="")this.currentCaption="\u00a0"; a.DOM.appendText(this.currentCaption,this.captionContentEl)}this.currentCaption=this.currentCaption==="\u00a0"?"":this.currentCaption;this.resetPosition()},showToolbar:function(){a.DOM.setStyle(this.toolbarEl,{opacity:this.settings.captionAndToolbarOpacity});a.DOM.show(this.toolbarEl)},showCaption:function(){(this.currentCaption===""||this.captionContentEl.childNodes.length<1)&&!this.settings.captionAndToolbarShowEmptyCaptions?a.DOM.hide(this.captionEl):(a.DOM.setStyle(this.captionEl,{opacity:this.settings.captionAndToolbarOpacity}), a.DOM.show(this.captionEl))},setToolbarStatus:function(c){this.settings.loop||(a.DOM.removeClass(this.previousEl,b.Toolbar.CssClasses.previousDisabled),a.DOM.removeClass(this.nextEl,b.Toolbar.CssClasses.nextDisabled),c>0&&cthis.settings.maxUserZoom)a=this.settings.maxUserZoom;return a},setStartingScaleAndRotation:function(a,b){this.transformSettings.startingScale=this.getScale(a);this.transformSettings.startingRotation=(this.transformSettings.startingRotation+b)%360},zoomRotate:function(a,b){this.transformSettings.scale=this.getScale(a);this.transformSettings.rotation=this.transformSettings.startingRotation+b;this.applyTransform()},panStart:function(a){this.setStartingTranslateFromCurrentTransform();this.panStartingPoint= {x:a.x,y:a.y}},pan:function(a){var b=(a.y-this.panStartingPoint.y)/this.transformSettings.scale;this.transformSettings.translateX=this.transformSettings.startingTranslateX+(a.x-this.panStartingPoint.x)/this.transformSettings.scale;this.transformSettings.translateY=this.transformSettings.startingTranslateY+b;this.applyTransform()},zoomAndPanToPoint:function(b,d){if(this.settings.target===e){this.panStart({x:a.DOM.windowWidth()/2,y:a.DOM.windowHeight()/2});var f=(d.y-this.panStartingPoint.y)/this.transformSettings.scale; this.transformSettings.translateX=(this.transformSettings.startingTranslateX+(d.x-this.panStartingPoint.x)/this.transformSettings.scale)*-1;this.transformSettings.translateY=(this.transformSettings.startingTranslateY+f)*-1}this.setStartingScaleAndRotation(b,0);this.transformSettings.scale=this.transformSettings.startingScale;this.transformSettings.rotation=0;this.applyTransform()},applyTransform:function(){var c=this.transformSettings.rotation%360,d=e.parseInt(this.transformSettings.translateX,10), f=e.parseInt(this.transformSettings.translateY,10),i="scale("+this.transformSettings.scale+") rotate("+c+"deg) translate("+d+"px, "+f+"px)";a.DOM.setStyle(this.transformEl,{webkitTransform:i,MozTransform:i,msTransform:i,transform:i});a.Events.fire(this,{target:this,type:b.ZoomPanRotate.EventTypes.onTransform,scale:this.transformSettings.scale,rotation:this.transformSettings.rotation,rotationDegs:c,translateX:d,translateY:f})}})})(window,window.klass,window.Code.Util); (function(e,d){d.registerNamespace("Code.PhotoSwipe");var a=e.Code.PhotoSwipe;a.CssClasses={buildingBody:"ps-building",activeBody:"ps-active"};a.EventTypes={onBeforeShow:"PhotoSwipeOnBeforeShow",onShow:"PhotoSwipeOnShow",onBeforeHide:"PhotoSwipeOnBeforeHide",onHide:"PhotoSwipeOnHide",onDisplayImage:"PhotoSwipeOnDisplayImage",onResetPosition:"PhotoSwipeOnResetPosition",onSlideshowStart:"PhotoSwipeOnSlideshowStart",onSlideshowStop:"PhotoSwipeOnSlideshowStop",onTouch:"PhotoSwipeOnTouch",onBeforeCaptionAndToolbarShow:"PhotoSwipeOnBeforeCaptionAndToolbarShow", onCaptionAndToolbarShow:"PhotoSwipeOnCaptionAndToolbarShow",onBeforeCaptionAndToolbarHide:"PhotoSwipeOnBeforeCaptionAndToolbarHide",onCaptionAndToolbarHide:"PhotoSwipeOnCaptionAndToolbarHide",onToolbarTap:"PhotoSwipeOnToolbarTap",onBeforeZoomPanRotateShow:"PhotoSwipeOnBeforeZoomPanRotateShow",onZoomPanRotateShow:"PhotoSwipeOnZoomPanRotateShow",onBeforeZoomPanRotateHide:"PhotoSwipeOnBeforeZoomPanRotateHide",onZoomPanRotateHide:"PhotoSwipeOnZoomPanRotateHide",onZoomPanRotateTransform:"PhotoSwipeOnZoomPanRotateTransform"}; a.instances=[];a.activeInstances=[];a.setActivateInstance=function(b){if(d.arrayIndexOf(b.settings.target,a.activeInstances,"target")>-1)throw"Code.PhotoSwipe.activateInstance: Unable to active instance as another instance is already active for this target";a.activeInstances.push({target:b.settings.target,instance:b})};a.unsetActivateInstance=function(b){b=d.arrayIndexOf(b,a.activeInstances,"instance");a.activeInstances.splice(b,1)};a.attach=function(b,c,e){var f,i;f=a.createInstance(b,c,e);c=0;for(e= b.length;c=2.1)this.isBackEventSupported=!0;if(!this.isBackEventSupported)this.isBackEventSupported=a.objectHasProperty(e,"onhashchange");this.settings={fadeInSpeed:250,fadeOutSpeed:250,preventHide:!1,preventSlideshow:!1,zIndex:1E3,backButtonHideEnabled:!0,enableKeyboard:!0,enableMouseWheel:!0, mouseWheelSpeed:350,autoStartSlideshow:!1,jQueryMobile:!a.isNothing(e.jQuery)&&!a.isNothing(e.jQuery.mobile),jQueryMobileDialogHash:"&ui-state=dialog",enableUIWebViewRepositionTimeout:!1,uiWebViewResetPositionDelay:500,target:e,preventDefaultTouchEvents:!0,loop:!0,slideSpeed:250,nextPreviousSlideSpeed:0,enableDrag:!0,swipeThreshold:50,swipeTimeThreshold:250,slideTimingFunction:"ease-out",slideshowDelay:3E3,doubleTapSpeed:250,margin:20,imageScaleMethod:"fit",captionAndToolbarHide:!1,captionAndToolbarFlipPosition:!1, captionAndToolbarAutoHideDelay:5E3,captionAndToolbarOpacity:0.8,captionAndToolbarShowEmptyCaptions:!0,getToolbar:h.Toolbar.getToolbar,allowUserZoom:!0,allowRotationOnUserZoom:!1,maxUserZoom:5,minUserZoom:0.5,doubleTapZoomLevel:2.5,getImageSource:h.Cache.Functions.getImageSource,getImageCaption:h.Cache.Functions.getImageCaption,getImageMetaData:h.Cache.Functions.getImageMetaData,cacheMode:h.Cache.Mode.normal};a.extend(this.settings,d);this.settings.target!==e&&(d=a.DOM.getStyle(this.settings.target, "position"),(d!=="relative"||d!=="absolute")&&a.DOM.setStyle(this.settings.target,"position","relative"));if(this.settings.target!==e)this.isBackEventSupported=!1,this.settings.backButtonHideEnabled=!1;else if(this.settings.preventHide)this.settings.backButtonHideEnabled=!1;this.cache=new b.CacheClass(c,this.settings)},show:function(b){var c,d;this.backButtonClicked=this._isResettingPosition=!1;if(a.isNumber(b))this.currentIndex=b;else{this.currentIndex=-1;c=0;for(d=this.originalImages.length;cthis.originalImages.length-1)throw"Code.PhotoSwipe.PhotoSwipeClass.show: Starting index out of range";this.isAlreadyGettingPage=this.getWindowDimensions();h.setActivateInstance(this);this.windowDimensions=this.getWindowDimensions();this.settings.target===e?a.DOM.addClass(e.document.body,h.CssClasses.buildingBody):a.DOM.addClass(this.settings.target,h.CssClasses.buildingBody);this.createComponents();a.Events.fire(this,{type:h.EventTypes.onBeforeShow, target:this});this.documentOverlay.fadeIn(this.settings.fadeInSpeed,this.onDocumentOverlayFadeIn.bind(this))},getWindowDimensions:function(){return{width:a.DOM.windowWidth(),height:a.DOM.windowHeight()}},createComponents:function(){this.documentOverlay=new c.DocumentOverlayClass(this.settings);this.carousel=new g.CarouselClass(this.cache,this.settings);this.uiLayer=new i.UILayerClass(this.settings);if(!this.settings.captionAndToolbarHide)this.toolbar=new f.ToolbarClass(this.cache,this.settings)}, resetPosition:function(){if(!this._isResettingPosition){var b=this.getWindowDimensions();if(a.isNothing(this.windowDimensions)||!(b.width===this.windowDimensions.width&&b.height===this.windowDimensions.height))this._isResettingPosition=!0,this.windowDimensions=b,this.destroyZoomPanRotate(),this.documentOverlay.resetPosition(),this.carousel.resetPosition(),a.isNothing(this.toolbar)||this.toolbar.resetPosition(),this.uiLayer.resetPosition(),this._isResettingPosition=!1,a.Events.fire(this,{type:h.EventTypes.onResetPosition, target:this})}},addEventHandler:function(b,c){a.Events.add(this,b,c)},addEventHandlers:function(){if(a.isNothing(this.windowOrientationChangeHandler))this.windowOrientationChangeHandler=this.onWindowOrientationChange.bind(this),this.windowScrollHandler=this.onWindowScroll.bind(this),this.keyDownHandler=this.onKeyDown.bind(this),this.windowHashChangeHandler=this.onWindowHashChange.bind(this),this.uiLayerTouchHandler=this.onUILayerTouch.bind(this),this.carouselSlideByEndHandler=this.onCarouselSlideByEnd.bind(this), this.carouselSlideshowStartHandler=this.onCarouselSlideshowStart.bind(this),this.carouselSlideshowStopHandler=this.onCarouselSlideshowStop.bind(this),this.toolbarTapHandler=this.onToolbarTap.bind(this),this.toolbarBeforeShowHandler=this.onToolbarBeforeShow.bind(this),this.toolbarShowHandler=this.onToolbarShow.bind(this),this.toolbarBeforeHideHandler=this.onToolbarBeforeHide.bind(this),this.toolbarHideHandler=this.onToolbarHide.bind(this),this.mouseWheelHandler=this.onMouseWheel.bind(this),this.zoomPanRotateTransformHandler= this.onZoomPanRotateTransform.bind(this);a.Browser.android?this.orientationEventName="resize":a.Browser.iOS&&!a.Browser.safari?a.Events.add(e.document.body,"orientationchange",this.windowOrientationChangeHandler):this.orientationEventName=!a.isNothing(e.onorientationchange)?"orientationchange":"resize";a.isNothing(this.orientationEventName)||a.Events.add(e,this.orientationEventName,this.windowOrientationChangeHandler);this.settings.target===e&&a.Events.add(e,"scroll",this.windowScrollHandler);this.settings.enableKeyboard&& a.Events.add(e.document,"keydown",this.keyDownHandler);if(this.isBackEventSupported&&this.settings.backButtonHideEnabled)this.windowHashChangeHandler=this.onWindowHashChange.bind(this),this.settings.jQueryMobile?e.location.hash=this.settings.jQueryMobileDialogHash:(this.currentHistoryHashValue="PhotoSwipe"+(new Date).getTime().toString(),e.location.hash=this.currentHistoryHashValue),a.Events.add(e,"hashchange",this.windowHashChangeHandler);this.settings.enableMouseWheel&&a.Events.add(e,"mousewheel", this.mouseWheelHandler);a.Events.add(this.uiLayer,a.TouchElement.EventTypes.onTouch,this.uiLayerTouchHandler);a.Events.add(this.carousel,g.EventTypes.onSlideByEnd,this.carouselSlideByEndHandler);a.Events.add(this.carousel,g.EventTypes.onSlideshowStart,this.carouselSlideshowStartHandler);a.Events.add(this.carousel,g.EventTypes.onSlideshowStop,this.carouselSlideshowStopHandler);a.isNothing(this.toolbar)||(a.Events.add(this.toolbar,f.EventTypes.onTap,this.toolbarTapHandler),a.Events.add(this.toolbar, f.EventTypes.onBeforeShow,this.toolbarBeforeShowHandler),a.Events.add(this.toolbar,f.EventTypes.onShow,this.toolbarShowHandler),a.Events.add(this.toolbar,f.EventTypes.onBeforeHide,this.toolbarBeforeHideHandler),a.Events.add(this.toolbar,f.EventTypes.onHide,this.toolbarHideHandler))},removeEventHandlers:function(){a.Browser.iOS&&!a.Browser.safari&&a.Events.remove(e.document.body,"orientationchange",this.windowOrientationChangeHandler);a.isNothing(this.orientationEventName)||a.Events.remove(e,this.orientationEventName, this.windowOrientationChangeHandler);a.Events.remove(e,"scroll",this.windowScrollHandler);this.settings.enableKeyboard&&a.Events.remove(e.document,"keydown",this.keyDownHandler);this.isBackEventSupported&&this.settings.backButtonHideEnabled&&a.Events.remove(e,"hashchange",this.windowHashChangeHandler);this.settings.enableMouseWheel&&a.Events.remove(e,"mousewheel",this.mouseWheelHandler);a.isNothing(this.uiLayer)||a.Events.remove(this.uiLayer,a.TouchElement.EventTypes.onTouch,this.uiLayerTouchHandler); a.isNothing(this.toolbar)||(a.Events.remove(this.carousel,g.EventTypes.onSlideByEnd,this.carouselSlideByEndHandler),a.Events.remove(this.carousel,g.EventTypes.onSlideshowStart,this.carouselSlideshowStartHandler),a.Events.remove(this.carousel,g.EventTypes.onSlideshowStop,this.carouselSlideshowStopHandler));a.isNothing(this.toolbar)||(a.Events.remove(this.toolbar,f.EventTypes.onTap,this.toolbarTapHandler),a.Events.remove(this.toolbar,f.EventTypes.onBeforeShow,this.toolbarBeforeShowHandler),a.Events.remove(this.toolbar, f.EventTypes.onShow,this.toolbarShowHandler),a.Events.remove(this.toolbar,f.EventTypes.onBeforeHide,this.toolbarBeforeHideHandler),a.Events.remove(this.toolbar,f.EventTypes.onHide,this.toolbarHideHandler))},hide:function(){if(!this.settings.preventHide){if(a.isNothing(this.documentOverlay))throw"Code.PhotoSwipe.PhotoSwipeClass.hide: PhotoSwipe instance is already hidden";if(a.isNothing(this.hiding)){this.clearUIWebViewResetPositionTimeout();this.destroyZoomPanRotate();this.removeEventHandlers();a.Events.fire(this, {type:h.EventTypes.onBeforeHide,target:this});this.uiLayer.dispose();this.uiLayer=null;if(!a.isNothing(this.toolbar))this.toolbar.dispose(),this.toolbar=null;this.carousel.dispose();this.carousel=null;a.DOM.removeClass(e.document.body,h.CssClasses.activeBody);this.documentOverlay.dispose();this.documentOverlay=null;this._isResettingPosition=!1;h.unsetActivateInstance(this);a.Events.fire(this,{type:h.EventTypes.onHide,target:this});this.goBackInHistory()}}},goBackInHistory:function(){this.isBackEventSupported&& this.settings.backButtonHideEnabled&&(this.backButtonClicked||e.history.back())},play:function(){!this.isZoomActive()&&!this.settings.preventSlideshow&&!a.isNothing(this.carousel)&&(!a.isNothing(this.toolbar)&&this.toolbar.isVisible&&this.toolbar.fadeOut(),this.carousel.startSlideshow())},stop:function(){this.isZoomActive()||a.isNothing(this.carousel)||this.carousel.stopSlideshow()},previous:function(){this.isZoomActive()||a.isNothing(this.carousel)||this.carousel.previous()},next:function(){this.isZoomActive()|| a.isNothing(this.carousel)||this.carousel.next()},toggleToolbar:function(){this.isZoomActive()||a.isNothing(this.toolbar)||this.toolbar.toggleVisibility(this.currentIndex)},fadeOutToolbarIfVisible:function(){!a.isNothing(this.toolbar)&&this.toolbar.isVisible&&this.settings.captionAndToolbarAutoHideDelay>0&&this.toolbar.fadeOut()},createZoomPanRotate:function(){this.stop();if(this.canUserZoom()&&!this.isZoomActive())a.Events.fire(this,h.EventTypes.onBeforeZoomPanRotateShow),this.zoomPanRotate=new j.ZoomPanRotateClass(this.settings, this.cache.images[this.currentIndex],this.uiLayer),this.uiLayer.captureSettings.preventDefaultTouchEvents=!0,a.Events.add(this.zoomPanRotate,h.ZoomPanRotate.EventTypes.onTransform,this.zoomPanRotateTransformHandler),a.Events.fire(this,h.EventTypes.onZoomPanRotateShow),!a.isNothing(this.toolbar)&&this.toolbar.isVisible&&this.toolbar.fadeOut()},destroyZoomPanRotate:function(){if(!a.isNothing(this.zoomPanRotate))a.Events.fire(this,h.EventTypes.onBeforeZoomPanRotateHide),a.Events.remove(this.zoomPanRotate, h.ZoomPanRotate.EventTypes.onTransform,this.zoomPanRotateTransformHandler),this.zoomPanRotate.dispose(),this.zoomPanRotate=null,this.uiLayer.captureSettings.preventDefaultTouchEvents=this.settings.preventDefaultTouchEvents,a.Events.fire(this,h.EventTypes.onZoomPanRotateHide)},canUserZoom:function(){var b;if(a.Browser.msie){if(b=document.createElement("div"),a.isNothing(b.style.msTransform))return!1}else if(!a.Browser.isCSSTransformSupported)return!1;if(!this.settings.allowUserZoom)return!1;if(this.carousel.isSliding)return!1; b=this.cache.images[this.currentIndex];if(a.isNothing(b))return!1;if(b.isLoading)return!1;return!0},isZoomActive:function(){return!a.isNothing(this.zoomPanRotate)},getCurrentImage:function(){return this.cache.images[this.currentIndex]},onDocumentOverlayFadeIn:function(){e.setTimeout(function(){var b=this.settings.target===e?e.document.body:this.settings.target;a.DOM.removeClass(b,h.CssClasses.buildingBody);a.DOM.addClass(b,h.CssClasses.activeBody);this.addEventHandlers();this.carousel.show(this.currentIndex); this.uiLayer.show();this.settings.autoStartSlideshow?this.play():a.isNothing(this.toolbar)||this.toolbar.show(this.currentIndex);a.Events.fire(this,{type:h.EventTypes.onShow,target:this});this.setUIWebViewResetPositionTimeout()}.bind(this),250)},setUIWebViewResetPositionTimeout:function(){if(this.settings.enableUIWebViewRepositionTimeout&&a.Browser.iOS&&!a.Browser.safari)a.isNothing(this._uiWebViewResetPositionTimeout)||e.clearTimeout(this._uiWebViewResetPositionTimeout),this._uiWebViewResetPositionTimeout= e.setTimeout(function(){this.resetPosition();this.setUIWebViewResetPositionTimeout()}.bind(this),this.settings.uiWebViewResetPositionDelay)},clearUIWebViewResetPositionTimeout:function(){a.isNothing(this._uiWebViewResetPositionTimeout)||e.clearTimeout(this._uiWebViewResetPositionTimeout)},onWindowScroll:function(){this.resetPosition()},onWindowOrientationChange:function(){this.resetPosition()},onWindowHashChange:function(){if(e.location.hash!=="#"+(this.settings.jQueryMobile?this.settings.jQueryMobileDialogHash: this.currentHistoryHashValue))this.backButtonClicked=!0,this.hide()},onKeyDown:function(a){a.keyCode===37?(a.preventDefault(),this.previous()):a.keyCode===39?(a.preventDefault(),this.next()):a.keyCode===38||a.keyCode===40?a.preventDefault():a.keyCode===27?(a.preventDefault(),this.hide()):a.keyCode===32?(this.settings.hideToolbar?this.hide():this.toggleToolbar(),a.preventDefault()):a.keyCode===13&&(a.preventDefault(),this.play())},onUILayerTouch:function(b){if(this.isZoomActive())switch(b.action){case a.TouchElement.ActionTypes.gestureChange:this.zoomPanRotate.zoomRotate(b.scale, this.settings.allowRotationOnUserZoom?b.rotation:0);break;case a.TouchElement.ActionTypes.gestureEnd:this.zoomPanRotate.setStartingScaleAndRotation(b.scale,this.settings.allowRotationOnUserZoom?b.rotation:0);break;case a.TouchElement.ActionTypes.touchStart:this.zoomPanRotate.panStart(b.point);break;case a.TouchElement.ActionTypes.touchMove:this.zoomPanRotate.pan(b.point);break;case a.TouchElement.ActionTypes.doubleTap:this.destroyZoomPanRotate();this.toggleToolbar();break;case a.TouchElement.ActionTypes.swipeLeft:this.destroyZoomPanRotate(); this.next();this.toggleToolbar();break;case a.TouchElement.ActionTypes.swipeRight:this.destroyZoomPanRotate(),this.previous(),this.toggleToolbar()}else switch(b.action){case a.TouchElement.ActionTypes.touchMove:case a.TouchElement.ActionTypes.swipeLeft:case a.TouchElement.ActionTypes.swipeRight:this.fadeOutToolbarIfVisible();this.carousel.onTouch(b.action,b.point);break;case a.TouchElement.ActionTypes.touchStart:case a.TouchElement.ActionTypes.touchMoveEnd:this.carousel.onTouch(b.action,b.point); break;case a.TouchElement.ActionTypes.tap:this.toggleToolbar();break;case a.TouchElement.ActionTypes.doubleTap:this.settings.target===e&&(b.point.x-=a.DOM.windowScrollLeft(),b.point.y-=a.DOM.windowScrollTop());var c=this.cache.images[this.currentIndex].imageEl,d=e.parseInt(a.DOM.getStyle(c,"top"),10),f=e.parseInt(a.DOM.getStyle(c,"left"),10),g=f+a.DOM.width(c),c=d+a.DOM.height(c);if(b.point.xg)b.point.x=g;if(b.point.yc)b.point.y=c; this.createZoomPanRotate();this.isZoomActive()&&this.zoomPanRotate.zoomAndPanToPoint(this.settings.doubleTapZoomLevel,b.point);break;case a.TouchElement.ActionTypes.gestureStart:this.createZoomPanRotate()}a.Events.fire(this,{type:h.EventTypes.onTouch,target:this,point:b.point,action:b.action})},onCarouselSlideByEnd:function(b){this.currentIndex=b.cacheIndex;a.isNothing(this.toolbar)||(this.toolbar.setCaption(this.currentIndex),this.toolbar.setToolbarStatus(this.currentIndex));a.Events.fire(this,{type:h.EventTypes.onDisplayImage, target:this,action:b.action,index:b.cacheIndex})},onToolbarTap:function(b){switch(b.action){case f.ToolbarAction.next:this.next();break;case f.ToolbarAction.previous:this.previous();break;case f.ToolbarAction.close:this.hide();break;case f.ToolbarAction.play:this.play()}a.Events.fire(this,{type:h.EventTypes.onToolbarTap,target:this,toolbarAction:b.action,tapTarget:b.tapTarget})},onMouseWheel:function(b){var c=a.Events.getWheelDelta(b);if(!(b.timeStamp-(this.mouseWheelStartTime||0)0&&this.previous()},onCarouselSlideshowStart:function(){a.Events.fire(this,{type:h.EventTypes.onSlideshowStart,target:this})},onCarouselSlideshowStop:function(){a.Events.fire(this,{type:h.EventTypes.onSlideshowStop,target:this})},onToolbarBeforeShow:function(){a.Events.fire(this,{type:h.EventTypes.onBeforeCaptionAndToolbarShow,target:this})},onToolbarShow:function(){a.Events.fire(this,{type:h.EventTypes.onCaptionAndToolbarShow, target:this})},onToolbarBeforeHide:function(){a.Events.fire(this,{type:h.EventTypes.onBeforeCaptionAndToolbarHide,target:this})},onToolbarHide:function(){a.Events.fire(this,{type:h.EventTypes.onCaptionAndToolbarHide,target:this})},onZoomPanRotateTransform:function(b){a.Events.fire(this,{target:this,type:h.EventTypes.onZoomPanRotateTransform,scale:b.scale,rotation:b.rotation,rotationDegs:b.rotationDegs,translateX:b.translateX,translateY:b.translateY})}})})(window,window.klass,window.Code.Util,window.Code.PhotoSwipe.Cache, window.Code.PhotoSwipe.DocumentOverlay,window.Code.PhotoSwipe.Carousel,window.Code.PhotoSwipe.Toolbar,window.Code.PhotoSwipe.UILayer,window.Code.PhotoSwipe.ZoomPanRotate); ;(function(j){var c=function(){throw"UID cannot be instantiated";};c._nextID=0;c.get=function(){return c._nextID++};j.UID=c})(window);(function(j){var c=function(){throw"Ticker cannot be instantiated.";};c.useRAF=null;c._listeners=null;c._pauseable=null;c._paused=false;c._inited=false;c._startTime=0;c._pausedTime=0;c._ticks=0;c._pausedTickers=0;c._interval=50;c._lastTime=0;c._times=null;c._tickTimes=null;c._rafActive=false;c._timeoutID=null;c.addListener=function(a,b){c._inited||c.init();c.removeListener(a);c._pauseable[c._listeners.length]=b==null?true:b;c._listeners.push(a)};c.init=function(){c._inited=true;c._times=[];c._tickTimes=[];c._pauseable=[];c._listeners=[];c._times.push(c._startTime=c._getTime());c.setInterval(c._interval)};c.removeListener=function(a){c._listeners!=null&&(a=c._listeners.indexOf(a),a!=-1&&(c._listeners.splice(a,1),c._pauseable.splice(a,1)))};c.removeAllListeners=function(){c._listeners=[];c._pauseable=[]};c.setInterval=function(a){c._lastTime=c._getTime();c._interval=a;c.timeoutID!=null&&clearTimeout(c.timeoutID);if(c.useRAF){if(c._rafActive)return;c._rafActive=true;var b=j.requestAnimationFrame||j.webkitRequestAnimationFrame||j.mozRequestAnimationFrame||j.oRequestAnimationFrame||j.msRequestAnimationFrame;if(b){b(c._handleAF);return}}if(c._inited)c.timeoutID=setTimeout(c._handleTimeout,a)};c.getInterval=function(){return c._interval};c.setFPS=function(a){c.setInterval(1E3/a)};c.getFPS=function(){return 1E3/c._interval};c.getMeasuredFPS=function(a){if(c._times.length<2)return-1;a==null&&(a=c.getFPS()>>1);a=Math.min(c._times.length-1,a);return 1E3/((c._times[0]-c._times[a])/a)};c.setPaused=function(a){c._paused=a};c.getPaused=function(){return c._paused};c.getTime=function(a){return c._getTime()-c._startTime-(a?c._pausedTime:0)};c.getTicks=function(a){return c._ticks-(a?c._pausedTickers:0)};c._handleAF=function(a){a-c._lastTime>=c._interval-1&&c._tick();c.useRAF?(j.requestAnimationFrame||j.webkitRequestAnimationFrame||j.mozRequestAnimationFrame||j.oRequestAnimationFrame||j.msRequestAnimationFrame)(c._handleAF,c.animationTarget):c._rafActive=false};c._handleTimeout=function(){c._tick();if(!c.useRAF)c.timeoutID=setTimeout(c._handleTimeout,c._interval)};c._tick=function(){c._ticks++;var a=c._getTime(),b=a-c._lastTime,n=c._paused;n&&(c._pausedTickers++,c._pausedTime+=b);c._lastTime=a;for(var i=c._pauseable,d=c._listeners.slice(),e=d?d.length:0,f=0;f100;)c._tickTimes.pop();for(c._times.unshift(a);c._times.length>100;)c._times.pop()};c._getTime=function(){return(new Date).getTime()};j.Ticker=c})(window);(function(j){var c=function(b,a,i,c,e){this.initialize(b,a,i,c,e)},a=c.prototype;a.stageX=0;a.stageY=0;a.type=null;a.nativeEvent=null;a.onMouseMove=null;a.onMouseUp=null;a.target=null;a.initialize=function(b,a,i,c,e){this.type=b;this.stageX=a;this.stageY=i;this.target=c;this.nativeEvent=e};a.clone=function(){return new c(this.type,this.stageX,this.stageY,this.target,this.nativeEvent)};a.toString=function(){return"[MouseEvent (type="+this.type+" stageX="+this.stageX+" stageY="+this.stageY+")]"};j.MouseEvent=c})(window);(function(j){var c=function(b,a,i,c,e,f){this.initialize(b,a,i,c,e,f)},a=c.prototype;c.identity=null;c.DEG_TO_RAD=Math.PI/180;a.a=1;a.b=0;a.c=0;a.d=1;a.tx=0;a.ty=0;a.alpha=1;a.shadow=null;a.compositeOperation=null;a.initialize=function(b,a,i,c,e,f){if(b!=null)this.a=b;this.b=a||0;this.c=i||0;if(c!=null)this.d=c;this.tx=e||0;this.ty=f||0};a.prepend=function(b,a,i,c,e,f){var g=this.tx;if(b!=1||a!=0||i!=0||c!=1){var k=this.a,h=this.c;this.a=k*b+this.b*i;this.b=k*a+this.b*c;this.c=h*b+this.d*i;this.d=h*a+this.d*c}this.tx=g*b+this.ty*i+e;this.ty=g*a+this.ty*c+f};a.append=function(b,a,i,c,e,f){var g=this.a,k=this.b,h=this.c,l=this.d;this.a=b*g+a*h;this.b=b*k+a*l;this.c=i*g+c*h;this.d=i*k+c*l;this.tx=e*g+f*h+this.tx;this.ty=e*k+f*l+this.ty};a.prependMatrix=function(b){this.prepend(b.a,b.b,b.c,b.d,b.tx,b.ty);this.prependProperties(b.alpha,b.shadow,b.compositeOperation)};a.appendMatrix=function(b){this.append(b.a,b.b,b.c,b.d,b.tx,b.ty);this.appendProperties(b.alpha,b.shadow,b.compositeOperation)};a.prependTransform=function(b,a,i,d,e,f,g,k,h){if(e%360)var l=e*c.DEG_TO_RAD,e=Math.cos(l),l=Math.sin(l);else e=1,l=0;if(k||h)this.tx-=k,this.ty-=h;f||g?(f*=c.DEG_TO_RAD,g*=c.DEG_TO_RAD,this.prepend(e*i,l*i,-l*d,e*d,0,0),this.prepend(Math.cos(g),Math.sin(g),-Math.sin(f),Math.cos(f),b,a)):this.prepend(e*i,l*i,-l*d,e*d,b,a)};a.appendTransform=function(b,a,i,d,e,f,g,k,h){if(e%360)var l=e*c.DEG_TO_RAD,e=Math.cos(l),l=Math.sin(l);else e=1,l=0;f||g?(f*=c.DEG_TO_RAD,g*=c.DEG_TO_RAD,this.append(Math.cos(g),Math.sin(g),-Math.sin(f),Math.cos(f),b,a),this.append(e*i,l*i,-l*d,e*d,0,0)):this.append(e*i,l*i,-l*d,e*d,b,a);if(k||h)this.tx-=k*this.a+h*this.c,this.ty-=k*this.b+h*this.d};a.rotate=function(b){var a=Math.cos(b),b=Math.sin(b),c=this.a,d=this.c,e=this.tx;this.a=c*a-this.b*b;this.b=c*b+this.b*a;this.c=d*a-this.d*b;this.d=d*b+this.d*a;this.tx=e*a-this.ty*b;this.ty=e*b+this.ty*a};a.skew=function(b,a){b*=c.DEG_TO_RAD;a*=c.DEG_TO_RAD;this.append(Math.cos(a),Math.sin(a),-Math.sin(b),Math.cos(b),0,0)};a.scale=function(b,a){this.a*=b;this.d*=a;this.tx*=b;this.ty*=a};a.translate=function(b,a){this.tx+=b;this.ty+=a};a.identity=function(){this.alpha=this.a=this.d=1;this.b=this.c=this.tx=this.ty=0;this.shadow=this.compositeOperation=null};a.invert=function(){var b=this.a,a=this.b,c=this.c,d=this.d,e=this.tx,f=b*d-a*c;this.a=d/f;this.b=-a/f;this.c=-c/f;this.d=b/f;this.tx=(c*this.ty-d*e)/f;this.ty=-(b*this.ty-a*e)/f};a.isIdentity=function(){return this.tx==0&&this.ty==0&&this.a==1&&this.b==0&&this.c==0&&this.d==1};a.decompose=function(b){b==null&&(b={});b.x=this.tx;b.y=this.ty;b.scaleX=Math.sqrt(this.a*this.a+this.b*this.b);b.scaleY=Math.sqrt(this.c*this.c+this.d*this.d);var a=Math.atan2(-this.c,this.d),i=Math.atan2(this.b,this.a);a==i?(b.rotation=i/c.DEG_TO_RAD,this.a<0&&this.d>=0&&(b.rotation+=b.rotation<=0?180:-180),b.skewX=b.skewY=0):(b.skewX=a/c.DEG_TO_RAD,b.skewY=i/c.DEG_TO_RAD);return b};a.reinitialize=function(b,a,c,d,e,f,g,k,h){this.initialize(b,a,c,d,e,f);this.alpha=g||1;this.shadow=k;this.compositeOperation=h;return this};a.appendProperties=function(b,a,c){this.alpha*=b;this.shadow=a||this.shadow;this.compositeOperation=c||this.compositeOperation};a.prependProperties=function(b,a,c){this.alpha*=b;this.shadow=this.shadow||a;this.compositeOperation=this.compositeOperation||c};a.clone=function(){var b=new c(this.a,this.b,this.c,this.d,this.tx,this.ty);b.shadow=this.shadow;b.alpha=this.alpha;b.compositeOperation=this.compositeOperation;return b};a.toString=function(){return"[Matrix2D (a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+")]"};c.identity=new c(1,0,0,1,0,0);j.Matrix2D=c})(window);(function(j){var c=function(b,a){this.initialize(b,a)},a=c.prototype;a.x=0;a.y=0;a.initialize=function(b,a){this.x=b==null?0:b;this.y=a==null?0:a};a.clone=function(){return new c(this.x,this.y)};a.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"};j.Point=c})(window);(function(j){var c=function(b,a,c,d){this.initialize(b,a,c,d)},a=c.prototype;a.x=0;a.y=0;a.width=0;a.height=0;a.initialize=function(b,a,c,d){this.x=b==null?0:b;this.y=a==null?0:a;this.width=c==null?0:c;this.height=d==null?0:d};a.clone=function(){return new c(this.x,this.y,this.width,this.height)};a.toString=function(){return"[Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")]"};j.Rectangle=c})(window);(function(j){var c=function(b,a,c,d){this.initialize(b,a,c,d)},a=c.prototype;c.identity=null;a.color=null;a.offsetX=0;a.offsetY=0;a.blur=0;a.initialize=function(b,a,c,d){this.color=b;this.offsetX=a;this.offsetY=c;this.blur=d};a.toString=function(){return"[Shadow]"};a.clone=function(){return new c(this.color,this.offsetX,this.offsetY,this.blur)};c.identity=new c("transparent",0,0,0);j.Shadow=c})(window);(function(j){var c=function(b){this.initialize(b)},a=c.prototype;a.complete=true;a._animations=null;a._frames=null;a._images=null;a._data=null;a._loadCount=0;a._frameHeight=0;a._frameWidth=0;a._numFrames=0;a._regX=0;a._regY=0;a.initialize=function(b){var a,c,d;if(b!=null){if(b.images&&(c=b.images.length)>0){d=this._images=[];for(a=0;a0?Math.min(this._numFrames-b,g*k):g*k,h=0;h>8&255,b=b>>16&255);return e==null?"rgb("+b+","+a+","+c+")":"rgba("+b+","+a+","+c+","+e+")"};a.getHSL=function(b,a,c,e){return e==null?"hsl("+b%360+","+a+"%,"+c+"%)":"hsla("+b%360+","+a+"%,"+c+"%,"+e+")"};a.STROKE_CAPS_MAP=["butt","round","square"];a.STROKE_JOINTS_MAP=["miter","round","bevel"];a._ctx=document.createElement("canvas").getContext("2d");a.beginCmd=new c(a._ctx.beginPath,[]);a.fillCmd=new c(a._ctx.fill,[]);a.strokeCmd=new c(a._ctx.stroke,[]);b._strokeInstructions=null;b._strokeStyleInstructions=null;b._fillInstructions=null;b._instructions=null;b._oldInstructions=null;b._activeInstructions=null;b._active=false;b._dirty=false;b.initialize=function(){this.clear();this._ctx=a._ctx};b.draw=function(b){this._dirty&&this._updateInstructions();for(var a=this._instructions,c=0,e=a.length;c0&&this.scaleX!=0&&this.scaleY!=0};a.draw=function(b,a){if(a||!this.cacheCanvas)return false;b.drawImage(this.cacheCanvas,this._cacheOffsetX,this._cacheOffsetY);return true};a.cache=function(b,a,i,d){if(this.cacheCanvas==null)this.cacheCanvas=document.createElement("canvas");var e=this.cacheCanvas.getContext("2d");this.cacheCanvas.width=i;this.cacheCanvas.height=d;e.clearRect(0,0,i+1,d+1);e.setTransform(1,0,0,1,-b,-a);this.draw(e,true,this._matrix.reinitialize(1,0,0,1,-b,-a));this._cacheOffsetX=b;this._cacheOffsetY=a;this._applyFilters();this.cacheID=c._nextCacheID++};a.updateCache=function(b){if(this.cacheCanvas==null)throw"cache() must be called before updateCache()";var a=this.cacheCanvas.getContext("2d");a.setTransform(1,0,0,1,-this._cacheOffsetX,-this._cacheOffsetY);b?a.globalCompositeOperation=b:a.clearRect(0,0,this.cacheCanvas.width+1,this.cacheCanvas.height+1);this.draw(a,true);if(b)a.globalCompositeOperation="source-over";this._applyFilters();this.cacheID=c._nextCacheID++};a.uncache=function(){this._cacheDataURL=this.cacheCanvas=null;this.cacheID=this._cacheOffsetX=this._cacheOffsetY=0};a.getCacheDataURL=function(){if(!this.cacheCanvas)return null;if(this.cacheID!=this._cacheDataURLID)this._cacheDataURL=this.cacheCanvas.toDataURL();return this._cacheDataURL};a.getStage=function(){for(var b=this;b.parent;)b=b.parent;return b instanceof Stage?b:null};a.localToGlobal=function(b,a){var c=this.getConcatenatedMatrix(this._matrix);if(c==null)return null;c.append(1,0,0,1,b,a);return new Point(c.tx,c.ty)};a.globalToLocal=function(b,a){var c=this.getConcatenatedMatrix(this._matrix);if(c==null)return null;c.invert();c.append(1,0,0,1,b,a);return new Point(c.tx,c.ty)};a.localToLocal=function(b,a,c){b=this.localToGlobal(b,a);return c.globalToLocal(b.x,b.y)};a.setTransform=function(b,a,c,d,e,f,g,k,h){this.x=b||0;this.y=a||0;this.scaleX=c==null?1:c;this.scaleY=d==null?1:d;this.rotation=e||0;this.skewX=f||0;this.skewY=g||0;this.regX=k||0;this.regY=h||0};a.getConcatenatedMatrix=function(b){b?b.identity():b=new Matrix2D;for(var a=this;a!=null;)b.prependTransform(a.x,a.y,a.scaleX,a.scaleY,a.rotation,a.skewX,a.skewY,a.regX,a.regY),b.prependProperties(a.alpha,a.shadow,a.compositeOperation),a=a.parent;return b};a.hitTest=function(b,a){var i=c._hitTestContext,d=c._hitTestCanvas;i.setTransform(1,0,0,1,-b,-a);this.draw(i);i=this._testHit(i);d.width=0;d.width=1;return i};a.clone=function(){var b=new c;this.cloneProps(b);return b};a.toString=function(){return"[DisplayObject (name="+this.name+")]"};a.cloneProps=function(b){b.alpha=this.alpha;b.name=this.name;b.regX=this.regX;b.regY=this.regY;b.rotation=this.rotation;b.scaleX=this.scaleX;b.scaleY=this.scaleY;b.shadow=this.shadow;b.skewX=this.skewX;b.skewY=this.skewY;b.visible=this.visible;b.x=this.x;b.y=this.y;b.mouseEnabled=this.mouseEnabled;b.compositeOperation=this.compositeOperation;if(this.cacheCanvas)b.cacheCanvas=this.cacheCanvas.cloneNode(true),b.cacheCanvas.getContext("2d").putImageData(this.cacheCanvas.getContext("2d").getImageData(0,0,this.cacheCanvas.width,this.cacheCanvas.height),0,0)};a.applyShadow=function(b,a){a=a||Shadow.identity;b.shadowColor=a.color;b.shadowOffsetX=a.offsetX;b.shadowOffsetY=a.offsetY;b.shadowBlur=a.blur};a._tick=function(){this.tick&&this.tick()};a._testHit=function(b){try{var a=b.getImageData(0,0,1,1).data[3]>1}catch(i){if(!c.suppressCrossDomainErrors)throw"An error has occured. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images.";}return a};a._applyFilters=function(){if(this.filters&&this.filters.length!=0&&this.cacheCanvas)for(var b=this.filters.length,a=this.cacheCanvas.getContext("2d"),c=this.cacheCanvas.width,d=this.cacheCanvas.height,e=0;e0&&this.children.length&&this.scaleX!=0&&this.scaleY!=0};a.DisplayObject_draw=a.draw;a.draw=function(b,a,i){var d=Stage._snapToPixelEnabled;if(this.DisplayObject_draw(b,a))return true;for(var i=i||this._matrix.reinitialize(1,0,0,1,0,0,this.alpha,this.shadow,this.compositeOperation),a=this.children.length,e=this.children.slice(0),f=0;f1){for(var c=0;c2){for(var a=arguments[d-1],d=0;d1){for(var c=true,d=0;d1){for(var c=[],d=0;dthis.children.length-1)return false;a=this.children[b];if(a!=null)a.parent=null;this.children.splice(b,1);return true};a.removeAllChildren=function(){for(var b=this.children;b.length;)b.pop().parent=null};a.getChildAt=function(b){return this.children[b]};a.sortChildren=function(b){this.children.sort(b)};a.getChildIndex=function(b){return this.children.indexOf(b)};a.getNumChildren=function(){return this.children.length};a.swapChildrenAt=function(b,a){var c=this.children,d=c[b],e=c[a];d&&e&&(c[b]=e,c[a]=d)};a.swapChildren=function(b,a){for(var c=this.children,d,e,f=0,g=c.length;fe||d==a||(c.splice(a,1),a=0;a--){var c=this.children[a];c._tick&&c._tick(b)}this.tick&&this.tick()};a._getObjectsUnderPoint=function(b,a,i,d){var e=DisplayObject._hitTestContext,f=DisplayObject._hitTestCanvas,g=this._matrix,k=d&1&&(this.onPress||this.onClick||this.onDoubleClick)||d&2&&(this.onMouseOver||this.onMouseOut);if(this.cacheCanvas)if(this.getConcatenatedMatrix(g),e.setTransform(g.a,g.b,g.c,g.d,g.tx-b,g.ty-a),e.globalAlpha=g.alpha,this.draw(e),this._testHit(e)){if(f.width=0,f.width=1,k)return this}else return null;for(var h=this.children.length-1;h>=0;h--){var l=this.children[h];if(l.isVisible()&&l.mouseEnabled)if(l instanceof c)if(k){if(l=l._getObjectsUnderPoint(b,a))return this}else{if(l=l._getObjectsUnderPoint(b,a,i,d),!i&&l)return l}else if(!d||k||d&1&&(l.onPress||l.onClick||l.onDoubleClick)||d&2&&(l.onMouseOver||l.onMouseOut))if(l.getConcatenatedMatrix(g),e.setTransform(g.a,g.b,g.c,g.d,g.tx-b,g.ty-a),e.globalAlpha=g.alpha,l.draw(e),this._testHit(e))if(f.width=0,f.width=1,k)return this;else if(i)i.push(l);else return l}return null};j.Container=c})(window);(function(j){var c=function(b){this.initialize(b)},a=c.prototype=new Container;c._snapToPixelEnabled=false;a.autoClear=true;a.canvas=null;a.mouseX=null;a.mouseY=null;a.onMouseMove=null;a.onMouseUp=null;a.onMouseDown=null;a.snapToPixelEnabled=false;a.mouseInBounds=false;a.tickOnUpdate=true;a._activeMouseEvent=null;a._activeMouseTarget=null;a._mouseOverIntervalID=null;a._mouseOverX=0;a._mouseOverY=0;a._mouseOverTarget=null;a.Container_initialize=a.initialize;a.initialize=function(b){this.Container_initialize();this.canvas=b instanceof HTMLCanvasElement?b:document.getElementById(b);this._enableMouseEvents(true)};a.update=function(){if(this.canvas){this.autoClear&&this.clear();c._snapToPixelEnabled=this.snapToPixelEnabled;if(this.tickOnUpdate){if(this.tick==this.update){var b=1;this.tick=null}this._tick(true);if(b)this.tick=this.update}this.draw(this.canvas.getContext("2d"),false,this.getConcatenatedMatrix(this._matrix))}};a.tick=a.update;a.clear=function(){if(this.canvas){var b=this.canvas.getContext("2d");b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,this.canvas.width,this.canvas.height)}};a.toDataURL=function(b,a){a||(a="image/png");var c=this.canvas.getContext("2d"),d=this.canvas.width,e=this.canvas.height,f;if(b){f=c.getImageData(0,0,d,e);var g=c.globalCompositeOperation;c.globalCompositeOperation="destination-over";c.fillStyle=b;c.fillRect(0,0,d,e)}var k=this.canvas.toDataURL(a);if(b)c.clearRect(0,0,d,e),c.putImageData(f,0,0),c.globalCompositeOperation=g;return k};a.enableMouseOver=function(b){if(this._mouseOverIntervalID)clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null;if(b==null)b=20;else if(b<=0)return;var a=this;this._mouseOverIntervalID=setInterval(function(){a._testMouseOver()},1E3/Math.min(50,b));this._mouseOverX=NaN;this._mouseOverTarget=null};a.clone=function(){var b=new c(null);this.cloneProps(b);return b};a.toString=function(){return"[Stage (name="+this.name+")]"};a._enableMouseEvents=function(){var b=this,a=j.addEventListener?j:document;a.addEventListener("mouseup",function(a){b._handleMouseUp(a)},false);a.addEventListener("mousemove",function(a){b._handleMouseMove(a)},false);a.addEventListener("dblclick",function(a){b._handleDoubleClick(a)},false);this.canvas&&this.canvas.addEventListener("mousedown",function(a){b._handleMouseDown(a)},false)};a._handleMouseMove=function(b){if(this.canvas){if(!b)b=j.event;var a=this.mouseInBounds;this._updateMousePosition(b.pageX,b.pageY);if(a||this.mouseInBounds){b=new MouseEvent("onMouseMove",this.mouseX,this.mouseY,this,b);if(this.onMouseMove)this.onMouseMove(b);if(this._activeMouseEvent&&this._activeMouseEvent.onMouseMove)this._activeMouseEvent.onMouseMove(b)}}else this.mouseX=this.mouseY=null};a._updateMousePosition=function(b,a){var c=this.canvas;do b-=c.offsetLeft,a-=c.offsetTop;while(c=c.offsetParent);if(this.mouseInBounds=b>=0&&a>=0&&b0&&this.scaleX!=0&&this.scaleY!=0&&this.image&&(this.image.complete||this.image.getContext||this.image.readyState>=2)};a.DisplayObject_draw=a.draw;a.draw=function(b,a){if(this.DisplayObject_draw(b,a))return true;b.drawImage(this.image,0,0);return true};a.clone=function(){var b=new c(this.image);this.cloneProps(b);return b};a.toString=function(){return"[Bitmap (name="+this.name+")]"};j.Bitmap=c})(window);(function(j){var c=function(b){this.initialize(b)},a=c.prototype=new DisplayObject;a.onAnimationEnd=null;a.currentFrame=-1;a.currentAnimation=null;a.paused=true;a.spriteSheet=null;a.snapToPixel=true;a.offset=0;a.currentAnimationFrame=0;a._advanceCount=0;a._animation=null;a.DisplayObject_initialize=a.initialize;a.initialize=function(b){this.DisplayObject_initialize();this.spriteSheet=b};a.isVisible=function(){return this.visible&&this.alpha>0&&this.scaleX!=0&&this.scaleY!=0&&this.spriteSheet.complete&&this.currentFrame>=0};a.DisplayObject_draw=a.draw;a.draw=function(b,a){if(this.DisplayObject_draw(b,a))return true;this._normalizeFrame();var c=this.spriteSheet.getFrame(this.currentFrame);if(c!=null){var d=c.rect;b.drawImage(c.image,d.x,d.y,d.width,d.height,-c.regX,-c.regY,d.width,d.height);return true}};a.gotoAndPlay=function(b){this.paused=false;this._goto(b)};a.gotoAndStop=function(b){this.paused=true;this._goto(b)};a.advance=function(){this._animation?this.currentAnimationFrame++:this.currentFrame++;this._normalizeFrame()};a.clone=function(){var b=new c(this.spriteSheet);this.cloneProps(b);return b};a.toString=function(){return"[BitmapAnimation (name="+this.name+")]"};a._tick=function(b){var a=this._animation?this._animation.frequency:1;b&&!this.paused&&(++this._advanceCount+this.offset)%a==0&&this.advance()};a._normalizeFrame=function(){var b=this._animation;if(b)if(this.currentAnimationFrame>=b.frames.length){if(b.next?this._goto(b.next):(this.paused=true,this.currentAnimationFrame=b.frames.length- 1,this.currentFrame=b.frames[this.currentAnimationFrame]),this.onAnimationEnd)this.onAnimationEnd(this,b.name)}else this.currentFrame=b.frames[this.currentAnimationFrame];else if(this.currentFrame>=this.spriteSheet.getNumFrames()&&(this.currentFrame=0,this.onAnimationEnd))this.onAnimationEnd(this,null)};a.DisplayObject_cloneProps=a.cloneProps;a.cloneProps=function(b){this.DisplayObject_cloneProps(b);b.onAnimationEnd=this.onAnimationEnd;b.currentFrame=this.currentFrame;b.currentAnimation=this.currentAnimation;b.paused=this.paused;b.offset=this.offset;b._animation=this._animation;b.currentAnimationFrame=this.currentAnimationFrame};a._goto=function(b){if(isNaN(b)){var a=this.spriteSheet.getAnimation(b);if(a)this.currentAnimationFrame=0,this._animation=a,this.currentAnimation=b,this._normalizeFrame()}else this.currentAnimation=this._animation=null,this.currentFrame=b};j.BitmapAnimation=c})(window);(function(j){var c=function(b){this.initialize(b)},a=c.prototype=new DisplayObject;a.graphics=null;a.DisplayObject_initialize=a.initialize;a.initialize=function(b){this.DisplayObject_initialize();this.graphics=b?b:new Graphics};a.isVisible=function(){return this.visible&&this.alpha>0&&this.scaleX!=0&&this.scaleY!=0&&this.graphics};a.DisplayObject_draw=a.draw;a.draw=function(b,a){if(this.DisplayObject_draw(b,a))return true;this.graphics.draw(b);return true};a.clone=function(b){b=new c(b&&this.graphics?this.graphics.clone():this.graphics);this.cloneProps(b);return b};a.toString=function(){return"[Shape (name="+this.name+")]"};j.Shape=c})(window);(function(j){var c=function(b,a,c){this.initialize(b,a,c)},a=c.prototype=new DisplayObject;c._workingContext=document.createElement("canvas").getContext("2d");a.text="";a.font=null;a.color=null;a.textAlign=null;a.textBaseline=null;a.maxWidth=null;a.outline=false;a.lineHeight=null;a.lineWidth=null;a.DisplayObject_initialize=a.initialize;a.initialize=function(b,a,c){this.DisplayObject_initialize();this.text=b;this.font=a;this.color=c?c:"#000"};a.isVisible=function(){return Boolean(this.visible&&this.alpha>0&&this.scaleX!=0&&this.scaleY!=0&&this.text!=null&&this.text!="")};a.DisplayObject_draw=a.draw;a.draw=function(b,a){if(this.DisplayObject_draw(b,a))return true;this.outline?b.strokeStyle=this.color:b.fillStyle=this.color;b.font=this.font;b.textAlign=this.textAlign?this.textAlign:"start";b.textBaseline=this.textBaseline?this.textBaseline:"alphabetic";for(var c=String(this.text).split(/(?:\r\n|\r|\n)/),d=this.lineHeight==null?this.getMeasuredLineHeight():this.lineHeight,e=0,f=0,g=c.length;fthis.lineWidth?(this._drawTextLine(b,h,e),e+=d,h=k[l+1]):h+=k[l]+k[l+1];this._drawTextLine(b,h,e)}e+=d}return true};a.getMeasuredWidth=function(){return this._getWorkingContext().measureText(this.text).width};a.getMeasuredLineHeight=function(){return this._getWorkingContext().measureText("M").width*1.2};a.clone=function(){var b=new c(this.text,this.font,this.color);this.cloneProps(b);return b};a.toString=function(){return"[Text (text="+(this.text.length>20?this.text.substr(0,17)+"...":this.text)+")]"};a.DisplayObject_cloneProps=a.cloneProps;a.cloneProps=function(b){this.DisplayObject_cloneProps(b);b.textAlign=this.textAlign;b.textBaseline=this.textBaseline;b.maxWidth=this.maxWidth;b.outline=this.outline;b.lineHeight=this.lineHeight;b.lineWidth=this.lineWidth};a._getWorkingContext=function(){var b=c._workingContext;b.font=this.font;b.textAlign=this.textAlign?this.textAlign:"start";b.textBaseline=this.textBaseline?this.textBaseline:"alphabetic";return b};a._drawTextLine=function(b,a,c){this.outline?b.strokeText(a,0,c,this.maxWidth):b.fillText(a,0,c,this.maxWidth||65535)};j.Text=c})(window);(function(j){var c=function(){throw"SpriteSheetUtils cannot be instantiated";};c._workingCanvas=document.createElement("canvas");c._workingContext=c._workingCanvas.getContext("2d");c.addFlippedFrames=function(a,b,j,i){if(b||j||i){var d=0;b&&c._flip(a,++d,true,false);j&&c._flip(a,++d,false,true);i&&c._flip(a,++d,true,true)}};c.extractFrame=function(a,b){isNaN(b)&&(b=a.getAnimation(b).frames[0]);var j=a.getFrame(b);if(!j)return null;var i=j.rect,d=c._workingCanvas;d.width=i.width;d.height=i.height;c._workingContext.drawImage(j.image,i.x,i.y,i.width,i.height,0,0,i.width,i.height);j=new Image;j.src=d.toDataURL("image/png");return j};c._flip=function(a,b,j,i){for(var d=a._images,e=c._workingCanvas,f=c._workingContext,g=d.length/b,k=0;k=0;e--){var f=a[e];if(!d||f.ignoreGlobalPause)f.tick(f._useTicks?1:b)}};Ticker&&Ticker.addListener(Tween,false);Tween.removeTweens=function(b){if(b.tweenjs_count){for(var a=Tween._tweens,c=a.length-1;c>=0;c--)a[c]._target==b&&a.splice(c,1);b.tweenjs_count=0}};Tween._register=function(b,a){var c=b._target;if(a){if(c)c.tweenjs_count=c.tweenjs_count?c.tweenjs_count+1:1;Tween._tweens.push(b)}else c&&c.tweenjs_count--,c=Tween._tweens.indexOf(b),c!=-1&&Tween._tweens.splice(c,1)};a.ignoreGlobalPause=false;a.loop=false;a.cssSuffixMap=null;a.duration=0;a._paused=false;a._curQueueProps=null;a._initQueueProps=null;a._steps=null;a._actions=null;a._prevPosition=0;a._prevPos=-1;a._prevIndex=-1;a._target=null;a._css=false;a._useTicks=false;a.initialize=function(b,a){this._target=b;if(a)this._useTicks=a.useTicks,this._css=a.css,this.ignoreGlobalPause=a.ignoreGlobalPause,this.loop=a.loop,a.override&&Tween.removeTweens(b);this._curQueueProps={};this._initQueueProps={};this._steps=[];this._actions=[];this._catalog=[];Tween._register(this,true)};a.wait=function(b){if(b==null||b<=0)return this;var a=this._cloneProps(this._curQueueProps);return this._addStep({d:b,p0:a,e:this._linearEase,p1:a})};a.to=function(b,a,c){if(isNaN(a)||a<0)a=0;return this._addStep({d:a||0,p0:this._cloneProps(this._curQueueProps),e:c,p1:this._cloneProps(this._appendQueueProps(b))})};a.call=function(b,a,c){return this._addAction({f:b,p:a?a:[this],o:c?c:this._target})};a.set=function(b,a){return this._addAction({f:this._set,o:this,p:[b,a?a:this._target]})};a.play=function(b){return this.call(b.setPaused,[false],b)};a.pause=function(b){b||(b=this);return this.call(b.setPaused,[true],b)};a.setPosition=function(b,a){a==null&&(a=1);var c=b,e=false;if(c>=this.duration)this.loop?c%=this.duration:(c=this.duration,e=true);if(c==this._prevPos)return e;if(c!=this._prevPos)if(e)this._updateTargetProps(null,1);else if(this._steps.length>0){for(var f=0,g=this._steps.length;fc)break;f=this._steps[f-1];this._updateTargetProps(f,(c-f.t)/f.d)}f=this._prevPos;this._prevPos=c;this._prevPosition=b;a!=0&&this._actions.length>0&&(this._useTicks?this._runActions(c,c):a==1&&ca&&(e=a,f=b,g=h,h=i=-1);for(;(g+=i)!=h;){var a=this._actions[g],j=a.t;(j==f||j>e&&j0)this._steps.push(b),b.t=this.duration,this.duration+=b.d;return this};a._addAction=function(b){b.t=this.duration;this._actions.push(b);return this};a._set=function(b,a){for(var c in b)a[c]=b[c]};i.Tween=Tween})(window);(function(i){Timeline=function(b,a,c){this.initialize(b,a,c)};var a=Timeline.prototype;a.ignoreGlobalPause=false;a.duration=0;a.loop=false;a._paused=true;a._tweens=null;a._labels=null;a._prevPosition=0;a._prevPos=0;a._useTicks=false;a.initialize=function(b,a,c){this._tweens=[];b&&this.addTween.apply(this,b);this.setLabels(a);this.setPaused(false);if(c)this._useTicks=c.useTicks,this.loop=c.loop,this.ignoreGlobalPause=c.ignoreGlobalPause};a.addTween=function(b){var a=arguments.length;if(a>1){for(var c=0;cthis.duration)this.duration=b.duration;return b};a.removeTween=function(a){var d=arguments.length;if(d>1){for(var c=true,e=0;e=this.duration&&this.updateDuration(),true):false};a.addLabel=function(a,d){this._labels[a]=d};a.setLabels=function(a){this._labels=a?a:{}};a.gotoAndPlay=function(a){this.setPaused(false);this._goto(a)};a.gotoAndStop=function(a){this.setPaused(true);this._goto(a)};a.setPosition=function(a){var d=this.loop?a%this.duration:a,c=!this.loop&&a>=this.duration;this._prevPosition=a;this._prevPos=d;for(var a=0,e=this._tweens.length;athis.duration)this.duration=tween.duration};a.tick=function(a){this.setPosition(this._prevPosition+a)};a.toString=function(){return"[Timeline]"};a.clone=function(){throw"Timeline can not be cloned.";};a._goto=function(a){var d=parseFloat(a);isNaN(d)&&(d=this._labels[a]);d!=null&&this.setPosition(d)};i.Timeline=Timeline})(window);(function(i){var a=function(){throw"Ease cannot be instantiated.";};a.linear=function(a){return a};a.none=a.linear;a.get=function(a){a<-1&&(a=-1);a>1&&(a=1);return function(d){return a==0?d:a<0?d*(d*-a+1+a):d*((2-d)*a+(1-a))}};a.getPowIn=function(a){return function(d){return Math.pow(d,a)}};a.getPowOut=function(a){return function(d){return 1-Math.pow(1-d,a)}};a.getPowInOut=function(a){return function(d){return(d*=2)<1?0.5*Math.pow(d,a):1-0.5*Math.abs(Math.pow(2-d,a))}};a.quadIn=a.getPowIn(2);a.quadOut=a.getPowOut(2);a.quadInOut=a.getPowInOut(2);a.cubicIn=a.getPowIn(3);a.cubicOut=a.getPowOut(3);a.cubicInOut=a.getPowInOut(3);a.quartIn=a.getPowIn(4);a.quartOut=a.getPowOut(4);a.quartInOut=a.getPowInOut(4);a.quintIn=a.getPowIn(5);a.quintOut=a.getPowOut(5);a.quintInOut=a.getPowInOut(5);a.sineIn=function(a){return 1-Math.cos(a*Math.PI/2)};a.sineOut=function(a){return Math.sin(a*Math.PI/2)};a.sineInOut=function(a){return-0.5*(Math.cos(Math.PI*a)-1)};a.getBackIn=function(a){return function(d){return d*d*((a+1)*d-a)}};a.backIn=a.getBackIn(1.7);a.getBackOut=function(a){return function(d){return--d*d*((a+1)*d+a)+1}};a.backOut=a.getBackOut(1.7);a.getBackInOut=function(a){a*=1.525;return function(d){return(d*=2)<1?0.5*d*d*((a+1)*d-a):0.5*((d-=2)*d*((a+1)*d+a)+2)}};a.backInOut=a.getBackInOut(1.7);a.circIn=function(a){return-(Math.sqrt(1-a*a)-1)};a.circOut=function(a){return Math.sqrt(1- --a*a)};a.circInOut=function(a){return(a*=2)<1?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)};a.bounceIn=function(b){return 1-a.bounceOut(1-b)};a.bounceOut=function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375};a.bounceInOut=function(b){return b<0.5?a.bounceIn(b*2)*0.5:a.bounceOut(b*2-1)*0.5+0.5};a.getElasticIn=function(a,d){var c=Math.PI*2;return function(e){if(e==0||e==1)return e;var f=d/c*Math.asin(1/a);return-(a*Math.pow(2,10*(e-=1))*Math.sin((e-f)*c/d))}};a.elasticIn=a.getElasticIn(1,0.3);a.getElasticOut=function(a,d){var c=Math.PI*2;return function(e){if(e==0||e==1)return e;var f=d/c*Math.asin(1/a);return a*Math.pow(2,-10*e)*Math.sin((e-f)*c/d)+1}};a.elasticOut=a.getElasticOut(1,0.3);a.getElasticInOut=function(a,d){var c=Math.PI*2;return function(e){var f=d/c*Math.asin(1/a);return(e*=2)<1?-0.5*a*Math.pow(2,10*(e-=1))*Math.sin((e-f)*c/d):a*Math.pow(2,-10*(e-=1))*Math.sin((e-f)*c/d)*0.5+1}};a.elasticInOut=a.getElasticInOut(1,0.3*1.5);i.Ease=a})(window);;function CanvasCarousel(a,b){function db(){eb();Gb()} function eb(){bb.width=cb.canvasWidth;bb.height=cb.canvasHeight;$(bb).css("background-color",cb.backgroundColor);m=cb.thumbWidth;n=cb.thumbHeight;o=cb.reflHeight;p=cb.reflTransparency;q=cb.thumbsAr;r=cb.nrImages;s=new Stage(bb);s.enableMouseOver(40);Touch.enable(s);t=new Container;s.addChild(t);t.x=cb.canvasWidth/2+parseInt(cb.centerX);t.y=cb.canvasHeight/2+parseInt(cb.centerY);y=cb.carouselAngle;_.src=cb.preloaderPath;_.onload=mb;if(cb.showTooltip){L=new Container;M=new Shape;N=new Text("",cb.tooltipTextSize+"px "+cb.tooltipFont,cb.tooltipTextColor);L.addChild(M);L.addChild(N);s.addChild(L);L.alpha=0} s.onMouseMove=gb} function fb(a){B=a.stageX;A=B;D=true;F=false;H=0;I=0;for(var b=0;b10)I=10;if(I<-10)I=-10}} function hb(a){if(E){E=false;D=false;G=true;if(Math.abs(I)<5){ib()}else{F=true}}} function ib(){var a=0;var b=Ob(q[0].angle)%360;for(var c=1;c0){Nb(j+1)}else{Nb(j-1)} return false})} function Kb(a){$(bb).css("cursor","pointer");var b=a.target.id;if(b==j){if(cb.showTooltip){L.id=b;N.text=q[b].text;M.graphics=new Graphics;M.graphics.beginFill(cb.tooltipBgColor);M.graphics.drawRoundRect(0,0,N.getMeasuredWidth()+4,N.getMeasuredLineHeight()+8,4);M.graphics.moveTo((N.getMeasuredWidth()+4)/2-4,N.getMeasuredLineHeight()+8);M.graphics.lineTo((N.getMeasuredWidth()+4)/2,N.getMeasuredLineHeight()+16);M.graphics.lineTo((N.getMeasuredWidth()+4)/2+4,N.getMeasuredLineHeight()+8);M.graphics.endFill();M.y=-(N.getMeasuredLineHeight()+4)/2;N.x=2;N.y=N.getMeasuredLineHeight()/2;Tween.get(L,{override:true}).to({alpha:1},400,Ease.cubicOut)} Tween.get(K,{override:true}).to({redOffset:50,greenOffset:50,blueOffset:50},600,Ease.cubicOut)}} function Lb(a){$(bb).css("cursor","default");var b=a.target.id;if(b==j){if(cb.showTooltip){Tween.get(L,{override:true}).to({alpha:0},400,Ease.cubicOut)} Tween.get(K,{override:true}).to({redOffset:0,greenOffset:0,blueOffset:0},600,Ease.cubicOut)}} function Mb(a){var b=a.target.id;if(e&&!E){if(b!=j){Nb(b)}else{if(cb.allowUrlClick) {if(cb.triggerSelector&&cb.triggerSelectorAttribute&&cb.triggerEvent) {$(cb.triggerSelector+'['+cb.triggerSelectorAttribute+'="'+q[b].url+'"]').trigger(cb.triggerEvent);} else {window.open(q[b].url,cb.windowLocation);}}}}} function Nb(a){k=j;if(g){clearTimeout(x);Tween.get(J,{override:true}).to({transPercent:0},1e3,Ease.cubicOut);Tween.get(this).wait(1e3).call(tb)} if(a<0)j=a+r;else j=a%r;if(cb.showScrollbar&&!h){v.gotoItem(j)} Pb();K.redOffset=1;K.greenOffset=1;K.blueOffset=1} function Ob(a){while(a<0)a+=360;return a} function Pb(){var a;var b=Ob(q[j].angle)%360;if(b>=90&&b<=270){a=90-b}else if(b>270){a=180-(b-270)}else{a=90-b} for(var c=0;c0)I-=1;else I+=1;if(Math.abs(I)<2){F=false;ib()}}} var c=this;var d=false;var e=false;var f=false;var g=false;var h=false;var i=250;var j=0;var k=-1;var l=0;var m;var n;var o;var p;var q;var r;var s;var t;var u;var v;var w;var x;var y;var z;var A;var B;var C;var D=false;var E=false;var F=false;var G=false;var H=0;var I=0;var J=new Object;J.transPercent=0;var K=new Object;K.redOffset=0;K.greenOffset=0;K.blueOffset=0;var L;var M;var N;var O;var P;var Q=new Container;var R=new Container;var S=new Container;var T=new Image;var U=new Image;var V=new Image;var W=new Image;var X=new Image;var Y=new Image;var Z=new Image;var _=new Image;var ab;var bb=$("#"+a)[0];if(!bb){alert("Invalid canvas id: "+a)} var cb=new Data(b);$(cb).bind("loaded",db);this.tick=function(){Qb();Rb();Sb();Tb();s.update()}} function Data(a){function c(a){b.canvasWidth=$(a).find("canvas_width").text();b.canvasHeight=$(a).find("canvas_height").text();b.centerX=$(a).find("carousel_center_x_offset").text();b.centerY=$(a).find("carousel_center_y_offset").text();b.radiusX=$(a).find("radius_x").text();b.radiusY=$(a).find("radius_y").text();b.radiusZ=$(a).find("radius_z").text();b.carouselAngle=$(a).find("carousel_rotation_angle").text();b.backThumbTransparency=$(a).find("back_thumb_transparency").text();b.backgroundColor=$(a).find("background_color").text();if($(a).find("auto_play").text()=="yes")b.autoplay=true;else b.autoplay=false;if($(a).find("enable_mouse_wheel").text()=="yes")b.mousewheel=true;else b.mousewheel=false;b.slideshowDelay=parseFloat($(a).find("slideshow_delay").text())*1e3;b.preloaderPath=$(a).find("preloader_path").text();b.preloaderSize=$(a).find("preloader_size").text();b.preloaderColor=$(a).find("preloader_color").text();b.buttonsBackgroundPath=$(a).find("buttons_background_path").text();b.buttonsNextIconPath=$(a).find("buttons_next_icon_path").text();b.buttonsPrevIconPath=$(a).find("buttons_prev_icon_path").text();b.buttonsPlayIconPath=$(a).find("buttons_play_icon_path").text();b.buttonsPauseIconPath=$(a).find("buttons_pause_icon_path").text();if($(a).find("show_next_button").text()=="yes")b.showNextBtn=true;else b.showNextBtn=false;if($(a).find("show_prev_button").text()=="yes")b.showPrevBtn=true;else b.showPrevBtn=false;if($(a).find("show_play_button").text()=="yes")b.showPlayBtn=true;else b.showPlayBtn=false;b.nextButtonPosX=$(a).find("next_button_x_position").text();b.nextButtonPosY=$(a).find("next_button_y_position").text();b.prevButtonPosX=$(a).find("prev_button_x_position").text();b.prevButtonPosY=$(a).find("prev_button_y_position").text();b.playButtonPosX=$(a).find("play_button_x_position").text();b.playButtonPosY=$(a).find("play_button_y_position").text();b.nextBtnBgColor=$(a).find("next_button_background_color").text();b.nextBtnIcColor=$(a).find("next_button_icon_color").text();b.prevBtnBgColor=$(a).find("prev_button_background_color").text();b.prevBtnIcColor=$(a).find("prev_button_icon_color").text();b.playBtnBgColor=$(a).find("play_button_background_color").text();b.playBtnIcColor=$(a).find("play_button_icon_color").text();if($(a).find("show_scrollbar").text()=="yes")b.showScrollbar=true;else b.showScrollbar=false;b.scrollbarPosX=parseInt($(a).find("scrollbar_x_position").text());b.scrollbarPosY=parseInt($(a).find("scrollbar_y_position").text());b.scrollbarWidth=$(a).find("scrollbar_width").text();b.scrollbarHeight=$(a).find("scrollbar_height").text();b.scrollbarHandlerWidth=$(a).find("scrollbar_handler_width").text();b.scrollbarHandlerColor=$(a).find("scrollbar_handler_color").text();b.scrollbarTrackColor=$(a).find("scrollbar_track_bar_color").text();b.scrollbarLinesPath=$(a).find("scrollbar_lines_image_path").text();b.thumbWidth=$(a).find("image_width").text();b.thumbHeight=$(a).find("image_height").text();b.borderSize=parseInt($(a).find("border_size").text());b.borderColor=$(a).find("border_color").text();if($(a).find("show_tooltip").text()=="yes")b.showTooltip=true;else b.showTooltip=false;b.tooltipFont=$(a).find("tooltip_font").text();b.tooltipTextSize=$(a).find("tooltip_text_size").text();b.tooltipTextColor=$(a).find("tooltip_text_color").text();b.tooltipBgColor=$(a).find("tooltip_background_color").text();if($(a).find("open_link_on_image_click").text()=="yes")b.allowUrlClick=true;else b.allowUrlClick=false;b.windowLocation=$(a).find("window_open_location").text();if($(a).find("show_reflection").text()=="yes")b.showReflection=true;else b.showReflection=false;b.reflHeight=parseInt($(a).find("reflection_height").text());b.reflDistance=parseInt($(a).find("reflection_distance").text());b.reflTransparency=$(a).find("reflection_transparency").text();b.transPrelPosX=$(a).find("slide_show_preloader_x_position").text();b.transPrelPosY=$(a).find("slide_show_preloader_y_position").text();b.transPrelSize=$(a).find("slide_show_preloader_size").text();b.transPrelBgColor=$(a).find("slide_show_preloader_background_color").text();b.transPrelFillColor=$(a).find("slide_show_preloader_fill_color").text();b.triggerSelector=$(a).find("triggerSelector").text();b.triggerSelectorAttribute=$(a).find("triggerSelectorAttribute").text();b.triggerEvent=$(a).find("triggerEvent").text();$(a).find("image").each(function(){var a=b.nrImages++;var c=new Thumb(a,$(this).find("image_path").text(),$(this).find("text").text(),$(this).find("url_to_open_on_click").text());b.thumbsAr[a]=c});$(b).trigger("loaded")} var b=this;b.nrImages=0;b.thumbsAr=new Array;$.ajax({type:"GET",url:a,dataType:"xml",success:c,error:function(a,b){alert("Error with the xml file: "+b)}})} function Thumb(a,b,c,d){this.id=a;this.imagePath=b;this.text=c;this.url=d;this.angle=0;this.positionZ=0;this.selected=false;this.posterPath=null;this.container=new Container;this.imgContainer=new Container;this.setImage=function(a,b,c){var d=a.image.width;var e=a.image.height;var f=b.borderSize;var g=new Shape;g.graphics=new Graphics;g.graphics.shadow=new Shadow('#999',0,0,30);g.shadow=new Shadow('#999',0,0,30);g.graphics.shadow=new Shadow('#999',0,0,30);g.shadow=new Shadow('#999',0,0,30);g.graphics.beginFill(b.borderColor);g.graphics.drawRect(0,0,d+f*2,e+f*2);g.cache(0,0,d+f*2,e+f*2);if(f>0)this.imgContainer.addChild(g);this.container.shadow=new Shadow('rgba(0,0,0,0.9)',0,0,15);a.x=f;a.y=f;this.imgContainer.addChild(a);this.container.addChild(this.imgContainer);this.imgContainer.cache(0,0,d+f*2,e+f*2);var h=b.reflHeight;h*=e/b.thumbHeight;h+=f;$("#"+c).prepend("");var i=$("#carouselReflCanvas");$(i).attr({width:d+f*2,height:h});ctx=i[0].getContext("2d");ctx.save();ctx.translate(0,e+f*2-1);ctx.scale(1,-1);ctx.drawImage(this.imgContainer.cacheCanvas,0,0,d+f*2,e+f*2);ctx.restore();ctx.globalCompositeOperation="destination-out";gradient=ctx.createLinearGradient(0,0,0,h);gradient.addColorStop(0,"rgba(255, 255, 255, "+(1-b.reflTransparency)+")");gradient.addColorStop(1,"rgba(255, 255, 255, 1.0)");ctx.fillStyle=gradient;ctx.fillRect(0,0,d+f*2,h);var j=new Bitmap(i[0]);this.container.addChild(j);j.y=e+f*2+b.reflDistance;$("#carouselReflCanvas").remove();if(!b.showReflection){j.visible=false}else{this.imgContainer.cache(0,0,d+f*2,e+f*2+h+b.reflDistance)} this.width=a.image.width+f*2;this.height=a.image.height+f*2;this.imageWidth=this.width;this.imageHeight=this.height;}} function TransitionPreloader(a){this.x=a.transPrelPosX;this.y=a.transPrelPosY;this.size=a.transPrelSize;this.bgColor=a.transPrelBgColor;this.fillColor=a.transPrelFillColor;this.rotation=-90;this.fillPreloader=function(a){var b=Math.PI*2*a;this.graphics=new Graphics;this.graphics.beginFill(this.bgColor);this.graphics.drawCircle(0,0,this.size/2);this.graphics.endFill();this.graphics.beginFill(this.fillColor);this.graphics.lineTo(this.size/2,0);this.graphics.arc(0,0,this.size/2,0,b,false);this.graphics.lineTo(0,0);this.graphics.endFill()}} function ScrollBar(a,b){this.x=a.scrollbarPosX;this.y=a.scrollbarPosY;this.width=a.scrollbarWidth;this.height=a.scrollbarHeight;this.trackColor=a.scrollbarTrackColor;this.handlerColor=a.scrollbarHandlerColor;this.nrItems=a.nrImages;this.handlerWidth=a.scrollbarHandlerWidth;this.unitWidth=(this.width-this.handlerWidth)/(this.nrItems-1);this.track=new Shape;this.handler=new Container;this.handlerBar=new Shape;this.addChild(this.track);this.addChild(this.handler);this.track.graphics=new Graphics;this.track.graphics.beginFill("#FFFFFF");this.track.graphics.drawRect(0,0,this.width,this.height);this.track.graphics.endFill();this.handlerBar.graphics=new Graphics;this.handlerBar.graphics.beginFill("#FFFFFF");this.handlerBar.graphics.drawRect(0,0,this.handlerWidth,this.height);this.handlerBar.graphics.endFill();this.lines=new Bitmap(b);this.lines.regX=Math.floor(this.lines.image.width/2);this.lines.regY=Math.floor(this.lines.image.height/2);var c=this.height/this.lines.image.height;this.lines.scaleX=c;this.lines.scaleY=c;this.handler.addChild(this.handlerBar);this.handler.addChild(this.lines);this.lines.x=Math.floor(this.handlerWidth/2);this.lines.y=Math.floor(this.height/2);this.track.cache(0,0,this.width,this.height);this.handlerBar.cache(0,0,this.handlerWidth,this.height);this.lines.cache(0,0,this.lines.image.width,this.lines.image.height);this.gotoItem=function(a){Tween.get(this.handler,{override:true}).to({x:Math.floor(a*this.unitWidth)},1e3,Ease.cubicOut)}} TransitionPreloader.prototype=new Shape;TransitionPreloader.prototype.constructor=TransitionPreloader;ScrollBar.prototype=new Container;ScrollBar.prototype.constructor=ScrollBar; /*! * pickadate.js v3.4.0, 2014/02/15 * By Amsul, http://amsul.ca * Hosted on http://amsul.github.io/pickadate.js * Licensed under MIT */ !function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):this.Picker=a(jQuery)}(function(a){function b(d,e,g,h){function i(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",s.component.nodes(n.open),p.box),p.wrap),p.frame),p.holder)}function j(){q.data(e,s).addClass(p.input).val(q.data("value")?s.get("select",o.format):d.value).on("focus."+n.id+" click."+n.id,m),o.editable||q.on("keydown."+n.id,function(a){var b=a.keyCode,c=/^(8|46)$/.test(b);return 27==b?(s.close(),!1):void((32==b||c||!n.open&&s.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?s.clear().close():s.open()))}),c(d,{haspopup:!0,expanded:!1,readonly:!1,owns:d.id+"_root"+(s._hidden?" "+s._hidden.id:"")})}function k(){s.$root.on({focusin:function(a){s.$root.removeClass(p.focused),c(s.$root[0],"selected",!1),a.stopPropagation()},"mousedown click":function(b){var c=b.target;c!=s.$root.children()[0]&&(b.stopPropagation(),"mousedown"!=b.type||a(c).is(":input")||"OPTION"==c.nodeName||(b.preventDefault(),d.focus()))}}).on("click","[data-pick], [data-nav], [data-clear]",function(){var c=a(this),e=c.data(),f=c.hasClass(p.navDisabled)||c.hasClass(p.disabled),g=document.activeElement;g=g&&(g.type||g.href)&&g,(f||g&&!a.contains(s.$root[0],g))&&d.focus(),e.nav&&!f?s.set("highlight",s.component.item.highlight,{nav:e.nav}):b._.isInteger(e.pick)&&!f?s.set("select",e.pick).close(!0):e.clear&&s.clear().close(!0)}),c(s.$root[0],"hidden",!0)}function l(){var b=["string"==typeof o.hiddenPrefix?o.hiddenPrefix:"","string"==typeof o.hiddenSuffix?o.hiddenSuffix:"_submit"];s._hidden=a('")[0],q.on("change."+n.id,function(){s._hidden.value=d.value?s.get("select",o.formatSubmit):""}).after(s._hidden)}function m(a){a.stopPropagation(),"focus"==a.type&&(s.$root.addClass(p.focused),c(s.$root[0],"selected",!0)),s.open()}if(!d)return b;var n={id:d.id||"P"+Math.abs(~~(Math.random()*new Date))},o=g?a.extend(!0,{},g.defaults,h):h||{},p=a.extend({},b.klasses(),o.klass),q=a(d),r=function(){return this.start()},s=r.prototype={constructor:r,$node:q,start:function(){return n&&n.start?s:(n.methods={},n.start=!0,n.open=!1,n.type=d.type,d.autofocus=d==document.activeElement,d.type="text",d.readOnly=!o.editable,d.id=d.id||n.id,s.component=new g(s,o),s.$root=a(b._.node("div",i(),p.picker,'id="'+d.id+'_root"')),k(),o.formatSubmit&&l(),j(),o.container?a(o.container).append(s.$root):q.after(s.$root),s.on({start:s.component.onStart,render:s.component.onRender,stop:s.component.onStop,open:s.component.onOpen,close:s.component.onClose,set:s.component.onSet}).on({start:o.onStart,render:o.onRender,stop:o.onStop,open:o.onOpen,close:o.onClose,set:o.onSet}),d.autofocus&&s.open(),s.trigger("start").trigger("render"))},render:function(a){return a?s.$root.html(i()):s.$root.find("."+p.box).html(s.component.nodes(n.open)),s.trigger("render")},stop:function(){return n.start?(s.close(),s._hidden&&s._hidden.parentNode.removeChild(s._hidden),s.$root.remove(),q.removeClass(p.input).removeData(e),setTimeout(function(){q.off("."+n.id)},0),d.type=n.type,d.readOnly=!1,s.trigger("stop"),n.methods={},n.start=!1,s):s},open:function(e){return n.open?s:(q.addClass(p.active),c(d,"expanded",!0),s.$root.addClass(p.opened),c(s.$root[0],"hidden",!1),e!==!1&&(n.open=!0,q.trigger("focus"),f.on("click."+n.id+" focusin."+n.id,function(a){var b=a.target;b!=d&&b!=document&&3!=a.which&&s.close(b===s.$root.children()[0])}).on("keydown."+n.id,function(c){var e=c.keyCode,f=s.component.key[e],g=c.target;27==e?s.close(!0):g!=d||!f&&13!=e?a.contains(s.$root[0],g)&&13==e&&(c.preventDefault(),g.click()):(c.preventDefault(),f?b._.trigger(s.component.key.go,s,[b._.trigger(f)]):s.$root.find("."+p.highlighted).hasClass(p.disabled)||s.set("select",s.component.item.highlight).close())})),s.trigger("open"))},close:function(a){return a&&(q.off("focus."+n.id).trigger("focus"),setTimeout(function(){q.on("focus."+n.id,m)},0)),q.removeClass(p.active),c(d,"expanded",!1),s.$root.removeClass(p.opened+" "+p.focused),c(s.$root[0],"hidden",!0),c(s.$root[0],"selected",!1),n.open?(n.open=!1,f.off("."+n.id),s.trigger("close")):s},clear:function(){return s.set("clear")},set:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(d=g&&a.isPlainObject(c)?c:d||{},b){g||(h[b]=c);for(e in h)f=h[e],e in s.component.item&&s.component.set(e,f,d),("select"==e||"clear"==e)&&q.val("clear"==e?"":s.get(e,o.format)).trigger("change");s.render()}return d.muted?s:s.trigger("set",h)},get:function(a,c){return a=a||"value",null!=n[a]?n[a]:"value"==a?d.value:a in s.component.item?"string"==typeof c?b._.trigger(s.component.formats.toString,s.component,[c,s.component.get(a)]):s.component.get(a):void 0},on:function(b,c){var d,e,f=a.isPlainObject(b),g=f?b:{};if(b){f||(g[b]=c);for(d in g)e=g[d],n.methods[d]=n.methods[d]||[],n.methods[d].push(e)}return s},off:function(){var a,b,c=arguments;for(a=0,namesCount=c.length;namesCount>a;a+=1)b=c[a],b in n.methods&&delete n.methods[b];return s},trigger:function(a,c){var d=n.methods[a];return d&&d.map(function(a){b._.trigger(a,s,[c])}),s}};return new r}function c(b,c,e){if(a.isPlainObject(c))for(var f in c)d(b,f,c[f]);else d(b,c,e)}function d(a,b,c){a.setAttribute(("role"==b?"":"aria-")+b,c)}function e(b,c){a.isPlainObject(b)||(b={attribute:c}),c="";for(var d in b){var e=("role"==d?"":"aria-")+d,f=b[d];c+=null==f?"":e+'="'+b[d]+'"'}return c}var f=a(document);return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+""):""},lead:function(a){return(10>a?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&a%1===0},ariaAttr:e},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?(b._.trigger(g[e],g,[f]),this):this.each(function(){var f=a(this);f.data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b});; /*! * Date picker for pickadate.js v3.4.0 * http://amsul.github.io/pickadate.js/date.htm */ !function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0].value,e=a.$node.data("value"),f=e||d,g=e?b.formatSubmit:b.format,h=function(){return"rtl"===getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),f?c.set("select",f,{format:g,fromValue:!!d}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return h()?-1:1},37:function(){return h()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(b.year,b.month,b.date+a);c.set("highlight",[d.getFullYear(),d.getMonth(),d.getDate()],{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})}).on("open",function(){a.$root.find("button, select").attr("disabled",!1)}).on("close",function(){a.$root.find("button, select").attr("disabled",!0)})}var d=7,e=6,f=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?(e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,d){var e,g=this;return c=void 0===c?a:c,c==-1/0||1/0==c?e=c:b.isPlainObject(c)&&f.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=f.isDate(c)?c:g.create().obj):c=f.isInteger(c)||f.isDate(c)?g.normalize(new Date(c),d):g.now(a,c,d),{year:e||c.getFullYear(),month:e||c.getMonth(),date:e||c.getDate(),day:e||c.getDay(),obj:e||c,pick:e||c.getTime()}},c.prototype.createRange=function(a,c){var d=this,e=function(a){return a===!0||b.isArray(a)||f.isDate(a)?d.create(a):a};return f.isInteger(a)||(a=e(a)),f.isInteger(c)||(c=e(c)),f.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:f.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:e(a),to:e(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(f,g+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth();new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return b?f.isInteger(b)&&(b=c.now(a,b,{rel:b})):b="min"==a?-1/0:1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,d){var e,g,h,i,j=this,k=c,l=d&&d.interval?d.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var d=j.create(a).pick;dc.pick&&(g=!0)}return f.isInteger(a)}).length;if((!d||!d.nav)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||e||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!e&&0>l)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.monthk.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date-1])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+1])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return f.isInteger(d)?a.day===(c.settings.firstDay?d:d-1)%7:b.isArray(d)||f.isDate(d)?a.pick===c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pickc.item.max.pick},c.prototype.parse=function(a,c,d){var e,g=this,h={};return!c||f.isInteger(c)||b.isArray(c)||f.isDate(c)||b.isPlainObject(c)&&f.isInteger(c.pick)?c:(d&&d.format||(d=d||{},d.format=g.settings.format),e="string"!=typeof c||d.fromValue?0:1,g.formats.toArray(d.format).map(function(a){var b=g.formats[a],d=b?f.trigger(b,g,[c,h]):a.replace(/^!/,"").length;b&&(h[a]=c.substr(0,d)),c=c.substr(d)}),[h.yyyy||h.yy,+(h.mm||h.m)-e,h.dd||h.d])},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?f.digits(a):b.date},dd:function(a,b){return a?2:f.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?f.digits(a):b.month+1},mm:function(a,b){return a?2:f.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return f.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var d=this;return f.isInteger(a)&&f.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(f.isDate(a)||b.isArray(a))&&(f.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:b.isPlainObject(a)&&b.isPlainObject(c)?d.isDateExact(a.from,c.from)&&d.isDateExact(a.to,c.to):!1},c.prototype.isDateOverlap=function(a,c){var d=this;return f.isInteger(a)&&(f.isDate(c)||b.isArray(c))?a===d.create(c).day+1:f.isInteger(c)&&(f.isDate(a)||b.isArray(a))?c===d.create(a).day+1:b.isPlainObject(a)&&b.isPlainObject(c)?d.overlapRanges(a,c):!1},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():c===!1?(d.flipEnable(1),e=[]):c===!0?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,g=0;gi;i+=1){if(h=e[i],d.isDateExact(h,a)){c=e[i]=null,j=!0;break}if(d.isDateOverlap(h,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[3]||c.push("inverted")):f.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;g>i;i+=1)if(d.isDateExact(e[i],a)){e[i]=null;break}if(j)for(i=0;g>i;i+=1)if(d.isDateOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.nodes=function(a){var b=this,c=b.settings,g=b.item,h=g.now,i=g.select,j=g.highlight,k=g.view,l=g.disable,m=g.min,n=g.max,o=function(a){return c.firstDay&&a.push(a.shift()),f.node("thead",f.node("tr",f.group({min:0,max:d-1,i:1,node:"th",item:function(b){return[a[b],c.klass.weekdays]}})))}((c.showWeekdaysFull?c.weekdaysFull:c.weekdaysShort).slice(0)),p=function(a){return f.node("div"," ",c.klass["nav"+(a?"Next":"Prev")]+(a&&k.year>=n.year&&k.month>=n.month||!a&&k.year<=m.year&&k.month<=m.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1))},q=function(b){return c.selectMonths?f.node("select",f.group({min:0,max:11,i:1,node:"option",item:function(a){return[b[a],0,"value="+a+(k.month==a?" selected":"")+(k.year==m.year&&an.month?" disabled":"")]}}),c.klass.selectMonth,a?"":"disabled"):f.node("div",b[k.month],c.klass.month)},r=function(){var b=k.year,d=c.selectYears===!0?5:~~(c.selectYears/2);if(d){var e=m.year,g=n.year,h=b-d,i=b+d;if(e>h&&(i+=e-h,h=e),i>g){var j=h-e,l=i-g;h-=j>l?l:j,i=g}return f.node("select",f.group({min:h,max:i,i:1,node:"option",item:function(a){return[a,0,"value="+a+(b==a?" selected":"")]}}),c.klass.selectYear,a?"":"disabled")}return f.node("div",b,c.klass.year)};return f.node("div",p()+p(1)+q(c.showMonthsShort?c.monthsShort:c.monthsFull)+r(),c.klass.header)+f.node("table",o+f.node("tbody",f.group({min:0,max:e-1,i:1,node:"tr",item:function(a){var e=c.firstDay&&0===b.create([k.year,k.month,1]).day?-7:0;return[f.group({min:d*a-k.day+e+1,max:function(){return this.min+d-1},i:1,node:"td",item:function(a){a=b.create([k.year,k.month,a+(c.firstDay?1:0)]);var d=i&&i.pick==a.pick,e=j&&j.pick==a.pick,g=l&&b.disabled(a)||a.pickn.pick;return[f.node("div",a.date,function(b){return b.push(k.month==a.month?c.klass.infocus:c.klass.outfocus),h.pick==a.pick&&b.push(c.klass.now),d&&b.push(c.klass.selected),e&&b.push(c.klass.highlighted),g&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+f.ariaAttr({role:"button",controls:b.$node[0].id,checked:d&&b.$node.val()===f.trigger(b.formats.toString,b,[c.format,a])?!0:null,activedescendant:e?!0:null,disabled:g?!0:null}))]}})]}})),c.klass.table)+f.node("div",f.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+h.pick+(a?"":" disabled"))+f.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")),c.klass.footer)},c.defaults=function(a){return{monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)});;!function(e){function t(t,n,o){if("object"!=typeof t&&(t={}),o){if("boolean"!=typeof t.isMenu){var s=o.children();t.isMenu=1==s.length&&s.is(n.panelNodetype)}return t}if("object"!=typeof t.onClick&&(t.onClick={}),"undefined"!=typeof t.onClick.setLocationHref&&(e[a].deprecated("onClick.setLocationHref option","!onClick.preventDefault"),"boolean"==typeof t.onClick.setLocationHref&&(t.onClick.preventDefault=!t.onClick.setLocationHref)),t=e.extend(!0,{},e[a].defaults,t),e[a].useOverflowScrollingFallback()){switch(t.position){case"top":case"right":case"bottom":e[a].debug('position: "'+t.position+'" not supported when using the overflowScrolling-fallback.'),t.position="left"}switch(t.zposition){case"front":case"next":e[a].debug('z-position: "'+t.zposition+'" not supported when using the overflowScrolling-fallback.'),t.zposition="back"}}return t}function n(t){return"object"!=typeof t&&(t={}),"undefined"!=typeof t.panelNodeType&&(e[a].deprecated("panelNodeType configuration option","panelNodetype"),t.panelNodetype=t.panelNodeType),t=e.extend(!0,{},e[a].configuration,t),"string"!=typeof t.pageSelector&&(t.pageSelector="> "+t.pageNodetype),t}function o(){d.$wndw=e(window),d.$html=e("html"),d.$body=e("body"),d.$allMenus=e(),e.each([c,u,p],function(e,t){t.add=function(e){e=e.split(" ");for(var n in e)t[e[n]]=t.mm(e[n])}}),c.mm=function(e){return"mm-"+e},c.add("menu ismenu panel list subtitle selected label spacer current highest hidden page blocker modal background opened opening subopened subopen fullsubopen subclose nooverflowscrolling"),c.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},u.mm=function(e){return"mm-"+e},u.add("parent style scrollTop offetLeft"),p.mm=function(e){return e+".mm"},p.add("toggle open opening opened close closing closed update setPage setSelected transitionend touchstart touchend mousedown mouseup click keydown keyup resize"),e[a]._c=c,e[a]._d=u,e[a]._e=p,e[a].glbl=d,e[a].useOverflowScrollingFallback(h)}function s(t,n){if(t.hasClass(c.current))return!1;var o=e("."+c.panel,n),s=o.filter("."+c.current);return o.removeClass(c.highest).removeClass(c.current).not(t).not(s).addClass(c.hidden),t.hasClass(c.opened)?s.addClass(c.highest).removeClass(c.opened).removeClass(c.subopened):(t.addClass(c.highest),s.addClass(c.subopened)),t.removeClass(c.hidden).removeClass(c.subopened).addClass(c.current).addClass(c.opened),"open"}function i(){return d.$scrollTopNode||(0!=d.$html.scrollTop()?d.$scrollTopNode=d.$html:0!=d.$body.scrollTop()&&(d.$scrollTopNode=d.$body)),d.$scrollTopNode?d.$scrollTopNode.scrollTop():0}function l(t,n,o){var s=e[a].support.transition;"webkitTransition"==s?t.one("webkitTransitionEnd",n):s?t.one(p.transitionend,n):setTimeout(n,o)}var a="mmenu",r="4.1.6";if(!e[a]){var d={$wndw:null,$html:null,$body:null,$page:null,$blck:null,$allMenus:null,$scrollTopNode:null},c={},p={},u={},f=0;e[a]=function(e,t,n){return d.$allMenus=d.$allMenus.add(e),this.$menu=e,this.opts=t,this.conf=n,this.serialnr=f++,this._init(),this},e[a].prototype={open:function(){return this._openSetup(),this._openFinish(),"open"},_openSetup:function(){var e=i();this.$menu.addClass(c.current),d.$allMenus.not(this.$menu).trigger(p.close),d.$page.data(u.style,d.$page.attr("style")||"").data(u.scrollTop,e).data(u.offetLeft,d.$page.offset().left);var t=0;d.$wndw.off(p.resize).on(p.resize,function(e,n){if(n||d.$html.hasClass(c.opened)){var o=d.$wndw.width();o!=t&&(t=o,d.$page.width(o-d.$page.data(u.offetLeft)))}}).trigger(p.resize,[!0]),this.conf.preventTabbing&&d.$wndw.off(p.keydown).on(p.keydown,function(e){return 9==e.keyCode?(e.preventDefault(),!1):void 0}),this.opts.modal&&d.$html.addClass(c.modal),this.opts.moveBackground&&d.$html.addClass(c.background),"left"!=this.opts.position&&d.$html.addClass(c.mm(this.opts.position)),"back"!=this.opts.zposition&&d.$html.addClass(c.mm(this.opts.zposition)),this.opts.classes&&d.$html.addClass(this.opts.classes),d.$html.addClass(c.opened),this.$menu.addClass(c.opened),d.$page.scrollTop(e),this.$menu.scrollTop(0)},_openFinish:function(){var e=this;l(d.$page,function(){e.$menu.trigger(p.opened)},this.conf.transitionDuration),d.$html.addClass(c.opening),this.$menu.trigger(p.opening),window.scrollTo(0,1)},close:function(){var e=this;return l(d.$page,function(){e.$menu.removeClass(c.current).removeClass(c.opened),d.$html.removeClass(c.opened).removeClass(c.modal).removeClass(c.background).removeClass(c.mm(e.opts.position)).removeClass(c.mm(e.opts.zposition)),e.opts.classes&&d.$html.removeClass(e.opts.classes),d.$wndw.off(p.resize).off(p.keydown),d.$page.attr("style",d.$page.data(u.style)),d.$scrollTopNode&&d.$scrollTopNode.scrollTop(d.$page.data(u.scrollTop)),e.$menu.trigger(p.closed)},this.conf.transitionDuration),d.$html.removeClass(c.opening),this.$menu.trigger(p.closing),"close"},_init:function(){if(this.opts=t(this.opts,this.conf,this.$menu),this.direction=this.opts.slidingSubmenus?"horizontal":"vertical",this._initPage(d.$page),this._initMenu(),this._initBlocker(),this._initPanles(),this._initLinks(),this._initOpenClose(),this._bindCustomEvents(),e[a].addons)for(var n=0;n').css("opacity",0).appendTo(d.$body)),d.$blck.off(p.touchstart).on(p.touchstart,function(e){e.preventDefault(),e.stopPropagation(),d.$blck.trigger(p.mousedown)}).on(p.mousedown,function(e){e.preventDefault(),d.$html.hasClass(c.modal)||t.$menu.trigger(p.close)})},_initPage:function(t){t||(t=e(this.conf.pageSelector,d.$body),t.length>1&&(e[a].debug("Multiple nodes found for the page-node, all nodes are wrapped in one <"+this.conf.pageNodetype+">."),t=t.wrapAll("<"+this.conf.pageNodetype+" />").parent())),t.addClass(c.page),d.$page=t},_initMenu:function(){this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("*")).filter("[id]").each(function(){e(this).attr("id",c.mm(e(this).attr("id")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$menu.prependTo("body").addClass(c.menu),this.$menu.addClass(c.mm(this.direction)),this.opts.classes&&this.$menu.addClass(this.opts.classes),this.opts.isMenu&&this.$menu.addClass(c.ismenu),"left"!=this.opts.position&&this.$menu.addClass(c.mm(this.opts.position)),"back"!=this.opts.zposition&&this.$menu.addClass(c.mm(this.opts.zposition))},_initPanles:function(){var t=this;this.__refactorClass(e("."+this.conf.listClass,this.$menu),"list"),this.opts.isMenu&&e("ul, ol",this.$menu).not(".mm-nolist").addClass(c.list);var n=e("."+c.list+" > li",this.$menu);this.__refactorClass(n.filter("."+this.conf.selectedClass),"selected"),this.__refactorClass(n.filter("."+this.conf.labelClass),"label"),this.__refactorClass(n.filter("."+this.conf.spacerClass),"spacer"),n.off(p.setSelected).on(p.setSelected,function(t,o){t.stopPropagation(),n.removeClass(c.selected),"boolean"!=typeof o&&(o=!0),o&&e(this).addClass(c.selected)}),this.__refactorClass(e("."+this.conf.panelClass,this.$menu),"panel"),this.$menu.children().filter(this.conf.panelNodetype).add(this.$menu.find("."+c.list).children().children().filter(this.conf.panelNodetype)).addClass(c.panel);var o=e("."+c.panel,this.$menu);o.each(function(n){var o=e(this),s=o.attr("id")||c.mm("m"+t.serialnr+"-p"+n);o.attr("id",s)}),o.find("."+c.panel).each(function(){var n=e(this),o=n.is("ul, ol")?n:n.find("ul ,ol").first(),s=n.parent(),i=s.find("> a, > span"),l=s.closest("."+c.panel);if(n.data(u.parent,s),s.parent().is("."+c.list)){var a=e('').insertBefore(i);i.is("a")||a.addClass(c.fullsubopen),"horizontal"==t.direction&&o.prepend('
  • '+i.text()+"
  • ")}});var s="horizontal"==this.direction?p.open:p.toggle;if(o.each(function(){var n=e(this),o=n.attr("id");e('a[href="#'+o+'"]',t.$menu).off(p.click).on(p.click,function(e){e.preventDefault(),n.trigger(s)})}),"horizontal"==this.direction){var i=e("."+c.list+" > li."+c.selected,this.$menu);i.add(i.parents("li")).parents("li").removeClass(c.selected).end().each(function(){var t=e(this),n=t.find("> ."+c.panel);n.length&&(t.parents("."+c.panel).addClass(c.subopened),n.addClass(c.opened))}).closest("."+c.panel).addClass(c.opened).parents("."+c.panel).addClass(c.subopened)}else e("li."+c.selected,this.$menu).addClass(c.opened).parents("."+c.selected).removeClass(c.selected);var l=o.filter("."+c.opened);l.length||(l=o.first()),l.addClass(c.opened).last().addClass(c.current),"horizontal"==this.direction&&o.find("."+c.panel).appendTo(this.$menu)},_initLinks:function(){var t=this;e("."+c.list+" > li > a",this.$menu).not("."+c.subopen).not("."+c.subclose).not('[rel="external"]').not('[target="_blank"]').off(p.click).on(p.click,function(n){var o=e(this),s=o.attr("href");t.__valueOrFn(t.opts.onClick.setSelected,o)&&o.parent().trigger(p.setSelected);var i=t.__valueOrFn(t.opts.onClick.preventDefault,o,"#"==s.slice(0,1));i&&n.preventDefault(),t.__valueOrFn(t.opts.onClick.blockUI,o,!i)&&d.$html.addClass(c.blocking),t.__valueOrFn(t.opts.onClick.close,o,i)&&t.$menu.triggerHandler(p.close)})},_initOpenClose:function(){var t=this,n=this.$menu.attr("id");n&&n.length&&(this.conf.clone&&(n=c.umm(n)),e('a[href="#'+n+'"]').off(p.click).on(p.click,function(e){e.preventDefault(),t.$menu.trigger(p.open)}));var n=d.$page.attr("id");n&&n.length&&e('a[href="#'+n+'"]').off(p.click).on(p.click,function(e){e.preventDefault(),t.$menu.trigger(p.close)})},__valueOrFn:function(e,t,n){return"function"==typeof e?e.call(t[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,t){e.removeClass(this.conf[t+"Class"]).addClass(c[t])}},e.fn[a]=function(s,i){return d.$wndw||o(),s=t(s,i),i=n(i),this.each(function(){var t=e(this);t.data(a)||t.data(a,new e[a](t,s,i))})},e[a].version=r,e[a].defaults={position:"left",zposition:"back",moveBackground:!0,slidingSubmenus:!0,modal:!1,classes:"",onClick:{setSelected:!0}},e[a].configuration={preventTabbing:!0,panelClass:"Panel",listClass:"List",selectedClass:"Selected",labelClass:"Label",spacerClass:"Spacer",pageNodetype:"div",panelNodetype:"ul, ol, div",transitionDuration:400},function(){var t=window.document,n=window.navigator.userAgent,o=document.createElement("div").style,s="ontouchstart"in t,i="WebkitOverflowScrolling"in t.documentElement.style,l=function(){return"webkitTransition"in o?"webkitTransition":"transition"in o}(),r=function(){return n.indexOf("Android")>=0?2.4>parseFloat(n.slice(n.indexOf("Android")+8)):!1}();e[a].support={touch:s,transition:l,oldAndroidBrowser:r,overflowscrolling:function(){return s?i?!0:r?!1:!0:!0}()}}(),e[a].useOverflowScrollingFallback=function(e){return d.$html?("boolean"==typeof e&&d.$html[e?"addClass":"removeClass"](c.nooverflowscrolling),d.$html.hasClass(c.nooverflowscrolling)):(h=e,e)},e[a].debug=function(){},e[a].deprecated=function(e,t){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn("MMENU: "+e+" is deprecated, use "+t+" instead.")};var h=!e[a].support.overflowscrolling}}(jQuery);!function(t){var e="mmenu",n="counters";t[e].prototype["_addon_"+n]=function(){var o=this,u=this.opts[n],a=t[e]._c,r=t[e]._d,d=t[e]._e;a.add("counter noresults"),d.add("updatecounters"),"boolean"==typeof u&&(u={add:u,update:u}),"object"!=typeof u&&(u={}),u=t.extend(!0,{},t[e].defaults[n],u),u.count&&(t[e].deprecated('the option "count" for counters, the option "update"'),u.update=u.count),this.__refactorClass(t("em."+this.conf.counterClass,this.$menu),"counter");var s=t("."+a.panel,this.$menu);if(u.add&&s.each(function(){var e=t(this),n=e.data(r.parent);if(n){var o=t(''),u=n.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),u.update){var c=t("em."+a.counter,this.$menu);c.off(d.updatecounters).on(d.updatecounters,function(t){t.stopPropagation()}).each(function(){var e=t(this),n=t(e.next().attr("href"),o.$menu);n.is("."+a.list)||(n=n.find("> ."+a.list)),n.length&&e.on(d.updatecounters,function(){var t=n.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.noresults);e.html(t.length)})}).trigger(d.updatecounters),this.$menu.on(d.update,function(){c.trigger(d.updatecounters)})}},t[e].defaults[n]={add:!1,update:!1},t[e].configuration.counterClass="Counter",t[e].addons=t[e].addons||[],t[e].addons.push(n)}(jQuery);!function(e){function t(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var a="mmenu",o="dragOpen";e[a].prototype["_addon_"+o]=function(){var n=this,r=this.opts[o];if(e.fn.hammer){var d=e[a]._c,i=(e[a]._d,e[a]._e);d.add("dragging"),i.add("dragleft dragright dragup dragdown dragend");var s=e[a].glbl;if("boolean"==typeof r&&(r={open:r}),"object"!=typeof r&&(r={}),"number"!=typeof r.maxStartPos&&(r.maxStartPos="left"==this.opts.position||"right"==this.opts.position?150:50),r=e.extend(!0,{},e[a].defaults[o],r),r.open){var g=0,p=!1,c=0,h=0,l="width";switch(this.opts.position){case"left":case"right":l="width";break;default:l="height"}switch(this.opts.position){case"left":var u={events:i.dragleft+" "+i.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var u={events:i.dragleft+" "+i.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var u={events:i.dragup+" "+i.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var u={events:i.dragup+" "+i.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}$dragNode=this.__valueOrFn(r.pageNode,this.$menu,s.$page),"string"==typeof $dragNode&&($dragNode=e($dragNode)),$dragNode.hammer().on(i.touchstart+" "+i.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[u.page];else if("mousedown"==e.type)var a=e[u.page];switch(n.opts.position){case"right":case"bottom":a>=s.$wndw[l]()-r.maxStartPos&&(g=1);break;default:a<=r.maxStartPos&&(g=1)}}).on(u.events+" "+i.dragend,function(e){g>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(u.events,function(e){var a=u.negative?-e.gesture[u.delta]:e.gesture[u.delta];if(p=a>c?u.open_dir:u.close_dir,c=a,c>r.threshold&&1==g){if(s.$html.hasClass(d.opened))return;g=2,n._openSetup(),s.$html.addClass(d.dragging),h=t(s.$wndw[l]()*n.conf[o][l].perc,n.conf[o][l].min,n.conf[o][l].max)}if(2==g){var i=s.$page;switch(n.opts.zposition){case"front":i=n.$menu;break;case"next":i=i.add(n.$menu)}i.css(n.opts.position,t(c,10,h))}}).on(i.dragend,function(){if(2==g){var e=s.$page;switch(n.opts.zposition){case"front":e=n.$menu;break;case"next":e=e.add(n.$menu)}s.$html.removeClass(d.dragging),e.css(n.opts.position,""),p==u.open_dir?n._openFinish():n.close()}g=0})}}},e[a].defaults[o]={open:!1,threshold:50},e[a].configuration[o]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},e[a].addons=e[a].addons||[],e[a].addons.push(o)}(jQuery);!function(e){var t="mmenu",a="header";e[t].prototype["_addon_"+a]=function(){var n=this,r=this.opts[a],d=this.conf[a],s=e[t]._c,i=(e[t]._d,e[t]._e);s.add("header hasheader prev next title titletext"),i.add("updateheader");var o=e[t].glbl;if("boolean"==typeof r&&(r={add:r,update:r}),"object"!=typeof r&&(r={}),r=e.extend(!0,{},e[t].defaults[a],r),r.add){var h=r.content?r.content:'';e('
    ').prependTo(this.$menu).append(h)}var p=e("div."+s.header,this.$menu);if(p.length&&this.$menu.addClass(s.hasheader),r.update&&p.length){var l=p.find("."+s.title),u=p.find("."+s.prev),f=p.find("."+s.next),c="#"+o.$page.attr("id");u.add(f).on(i.click,function(t){t.preventDefault(),t.stopPropagation();var a=e(this).attr("href");"#"!==a&&(a==c?n.$menu.trigger(i.close):e(a,n.$menu).trigger(i.open))}),e("."+s.panel,this.$menu).each(function(){var t=e(this),a=e("."+d.panelHeaderClass,t).text(),n=e("."+d.panelPrevClass,t).attr("href"),o=e("."+d.panelNextClass,t).attr("href");a||(a=e("."+s.subclose,t).text()),a||(a=r.title),n||(n=e("."+s.subclose,t).attr("href")),t.off(i.updateheader).on(i.updateheader,function(e){e.stopPropagation(),l[a?"show":"hide"]().text(a),u[n?"show":"hide"]().attr("href",n),f[o?"show":"hide"]().attr("href",o)}),t.on(i.open,function(){e(this).trigger(i.updateheader)})}).filter("."+s.current).trigger(i.updateheader)}},e[t].defaults[a]={add:!1,content:!1,update:!1,title:"Menu"},e[t].configuration[a]={panelHeaderClass:"Header",panelNextClass:"Next",panelPrevClass:"Prev"},e[t].addons=e[t].addons||[],e[t].addons.push(a)}(jQuery);!function(e){var l="mmenu",s="labels";e[l].prototype["_addon_"+s]=function(){var a=this,o=this.opts[s],n=e[l]._c,t=(e[l]._d,e[l]._e);if(n.add("collapsed"),n.add("fixedlabels original clone"),t.add("updatelabels position scroll"),e[l].support.touch&&(t.scroll+=" "+t.mm("touchmove")),"boolean"==typeof o&&(o={collapse:o}),"object"!=typeof o&&(o={}),o=e.extend(!0,{},e[l].defaults[s],o),o.collapse){this.__refactorClass(e("li."+this.conf.collapsedClass,this.$menu),"collapsed");var i=e("."+n.label,this.$menu);i.each(function(){var l=e(this),s=l.nextUntil("."+n.label,"all"==o.collapse?null:"."+n.collapsed);"all"==o.collapse&&(l.addClass(n.opened),s.removeClass(n.collapsed)),s.length&&(l.wrapInner(""),e('').prependTo(l).on(t.click,function(e){e.preventDefault(),l.toggleClass(n.opened),s[l.hasClass(n.opened)?"removeClass":"addClass"](n.collapsed)}))})}else if(o.fixed){if("horizontal"!=this.direction)return;this.$menu.addClass(n.fixedlabels);var d=e("."+n.panel,this.$menu),i=e("."+n.label,this.$menu);d.add(i).off(t.updatelabels+" "+t.position+" "+t.scroll).on(t.updatelabels+" "+t.position+" "+t.scroll,function(e){e.stopPropagation()}),d.each(function(){var l=e(this),s=l.find("."+n.label);if(s.length){var o=l.scrollTop(),i=n.hassearch&&a.$menu.hasClass(n.hassearch),d=n.hasheader&&a.$menu.hasClass(n.hasheader),r=i?d?100:50:d?60:0;s.each(function(){var s=e(this);s.wrapInner("
    ").wrapInner("
    ");var a,i,d,p=s.find("> div"),c=e();s.on(t.updatelabels,function(){o=l.scrollTop(),s.hasClass(n.hidden)||(c=s.nextAll("."+n.label).not("."+n.hidden).first(),a=s.offset().top+o,i=c.length?c.offset().top+o:!1,d=p.height(),s.trigger(t.position))}),s.on(t.position,function(){var e=0;i&&o+r>i-d?e=i-a-d:o+r>a&&(e=o-a+r),p.css("top",e)})}),l.on(t.updatelabels,function(){o=l.scrollTop(),s.trigger(t.position)}).on(t.scroll,function(){s.trigger(t.updatelabels)})}}),this.$menu.on(t.update,function(){d.trigger(t.updatelabels)}).on(t.opening,function(){d.trigger(t.updatelabels).trigger(t.scroll)})}},e[l].defaults[s]={fixed:!1,collapse:!1},e[l].configuration.collapsedClass="Collapsed",e[l].addons=e[l].addons||[],e[l].addons.push(s)}(jQuery);!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",t="searchfield";e[n].prototype["_addon_"+t]=function(){var a=this,r=this.opts[t],o=e[n]._c,l=e[n]._d,d=e[n]._e;if(o.add("search hassearch noresults nosubresults counter"),d.add("search reset change"),"boolean"==typeof r&&(r={add:r,search:r}),"object"!=typeof r&&(r={}),r=e.extend(!0,{},e[n].defaults[t],r),r.add&&(e('
    ').prependTo(this.$menu).append(''),r.noResults&&e("ul, ol",this.$menu).first().append('
  • '+r.noResults+"
  • ")),e("div."+o.search,this.$menu).length&&this.$menu.addClass(o.hassearch),r.search){var i=e("div."+o.search,this.$menu).find("input");if(i.length){var u=e("."+o.panel,this.$menu),h=e("."+o.list+"> li."+o.label,this.$menu),c=e("."+o.list+"> li",this.$menu).not("."+o.subtitle).not("."+o.label).not("."+o.noresults),f="> a";r.showLinksOnly||(f+=", > span"),i.off(d.keyup+" "+d.change).on(d.keyup,function(e){s(e.keyCode)||a.$menu.trigger(d.search)}).on(d.change,function(){a.$menu.trigger(d.search)}),this.$menu.off(d.reset+" "+d.search).on(d.reset+" "+d.search,function(e){e.stopPropagation()}).on(d.reset,function(){a.$menu.trigger(d.search,[""])}).on(d.search,function(s,n){"string"==typeof n?i.val(n):n=i.val(),n=n.toLowerCase(),u.scrollTop(0),c.add(h).addClass(o.hidden),c.each(function(){var s=e(this);e(f,s).text().toLowerCase().indexOf(n)>-1&&s.add(s.prevAll("."+o.label).first()).removeClass(o.hidden)}),e(u.get().reverse()).each(function(){var s=e(this),n=s.data(l.parent);if(n){var t=s.add(s.find("> ."+o.list)).find("> li").not("."+o.subtitle).not("."+o.label).not("."+o.hidden);t.length?n.removeClass(o.hidden).removeClass(o.nosubresults).prevAll("."+o.label).first().removeClass(o.hidden):(s.hasClass(o.current)&&n.trigger(d.open),n.addClass(o.nosubresults))}}),a.$menu[c.not("."+o.hidden).length?"removeClass":"addClass"](o.noresults),a.$menu.trigger(d.update)})}}},e[n].defaults[t]={add:!1,search:!1,showLinksOnly:!0,placeholder:"Search",noResults:"No results found."},e[n].addons=e[n].addons||[],e[n].addons.push(t)}(jQuery);;(function($){var settings={};$.fn.accentRemover=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.accentRemover');}};var methods={init:function(options){settings=$.extend({'cssAttribute':'text-transform','cssValue':'uppercase','findArray':["Ά","Έ","Ύ","Ί","Ό","Ή","Ώ","ά","έ","ή","ί","ό","ύ","ώ"],'replaceArray':["Α","Ε","Υ","Ι","Ο","Η","Ω","α","ε","η","ι","ο","υ","ω"]},options);var elements=this.filter(function(){var Element=$(this).css(settings.cssAttribute);var result=false;if(Element) result=$(this).css(settings.cssAttribute).toLowerCase()==settings.cssValue.toLowerCase();if(result) {if($(this).html()) $(this).html(_removeAccents($(this).html()));if($(this).val()) $(this).val(_removeAccents($(this).val()));} return result;});return elements;}};function _removeAccents(str) {return _replaceArray(settings.findArray,settings.replaceArray,str);};function _replaceArray(find,replace,subject){var regex;for(var i=0;imaxHeight) maxHeight=$(domEle).height();});if(maxHeight');} YiiForm_errorSummaries[formId].foundation('reveal','open');YiiForm_errorSummaries[formId].on('click',function(){$(this).foundation('reveal','close');return false;});} return!hasError;} function truncate(text,limit,strict,append){if(typeof text!=='string') return'';if(typeof append=='undefined') append='...';var parts=text.split(' ');if(parts.length>limit){for(var i=parts.length-1;i>-1;--i){if(i+1>limit){parts.length=i;}} parts.push(append);} var result=parts.join(' ');if(strict&&result.length>limit) result=result.substr(0,limit)+append;return result;} function scrollCListView(id,data) {if($('#'+id).offset().top-$(window).scrollTop()<0) {var extraTop=50;if($('section.wide header.dummy').length) {extraTop+=$('section.wide header.dummy').innerHeight();} $('html, body').animate({scrollTop:$('#'+id).offset().top-extraTop},500);} return true;} function componentToHex(c){c=parseInt(c);var hex=c.toString(16);return hex.length==1?"0"+hex:hex;} function rgbToHex(r,g,b){return"#"+componentToHex(r)+componentToHex(g)+componentToHex(b);} function getElPercWidth(el,decimalPlaces) {if(decimalPlaces==null) decimalPlaces=0;var perc=100*parseFloat(el.css('width'))/parseFloat(el.parent().css('width'));var rounded=Math.round(perc*10)/10;var fixed=rounded.toFixed(decimalPlaces);return(fixed)+'%';} function valign(el,cssAttr,parentSel) {if(!cssAttr) cssAttr='margin-top';var parent=null;el.each(function(index){if(!parentSel) parent=$(this).parent();else parent=$(this).parents(parentSel);$(this).css(cssAttr,'');$(this).css(cssAttr,(parent.innerHeight()/2-$(this).innerHeight()/2)+'px');});} function halign(el,cssAttr,parentSel) {if(!cssAttr) cssAttr='margin-left';var parent=null;el.each(function(index){if(!parentSel) parent=$(this).parent();else parent=$(this).parents(parentSel);$(this).css(cssAttr,'');$(this).css(cssAttr,(parent.innerWidth()/2-$(this).innerWidth()/2)+'px');});} function fixedTable(tableEl,maxHeight) {var columns=new Array();tableEl.find('tr').eq(0).find('th,td').each(function(index){columns.push($(this).innerWidth());});tableEl.find('thead tr').eq(0).find('th,td').each(function(index){$(this).css('width',columns[$(this).index()]+'px');});tableEl.find('tbody tr').eq(0).find('td').each(function(index){$(this).css('width',columns[$(this).index()]+'px');});tableEl.find('tfoot tr').eq(0).find('th,td').each(function(index){$(this).css('width',columns[$(this).index()]+'px');});tableEl.find('thead,tbody,tfoot').css('display','block');tableEl.find('tbody').css('max-height',maxHeight-(tableEl.find('thead').innerHeight()+tableEl.find('tfoot').innerHeight())+'px').css('overflow-y','auto');} function getMobiscrollTheme() {var isAndroid=navigator.userAgent.toLowerCase().indexOf("android");var isiPhone=navigator.userAgent.toLowerCase().indexOf("iphone");var isiPad=navigator.userAgent.toLowerCase().indexOf("ipad");var isiPod=navigator.userAgent.toLowerCase().indexOf("ipod");var isWindowsPhone=navigator.userAgent.toLowerCase().indexOf("windows phone");if(isAndroid>-1) {return'android';} else if(isiPhone>-1||isiPad>-1||isiPod>-1) {return'ios';} else if(isWindowsPhone>-1) {return'wp';} else {return'android';}} function truncateDropdownList(selectEl) {selectEl.each(function(index){$(this).children('option').each(function(i,o){$(this).html(truncate($(this).html(),20,true));});});} function findActiveScrollEl() {var y=$(document).scrollTop();var h=$(window).height();var screenPerc=75;$.each(scrollElements,function(i,o){if($(o).length) {var elementTop=$(o).offset().top;var elementBottom=$(o).offset().top+$(o).innerHeight();var screenTopEdge=y;var screenBottomView=y+(h*screenPerc*0.01);var screenBottomEdge=y+h;if((elementTop>=screenTopEdge&&elementTop<=screenBottomView)||(elementBottom>(screenTopEdge+scrollOffset)&&elementBottom<=screenBottomView)||(elementTop<=screenTopEdge&&elementBottom>=screenBottomView)) {scrollElements[o]=2;} else if((elementTop>=screenTopEdge&&elementTop<=screenBottomEdge)||(elementBottom>=screenTopEdge&&elementBottom<=screenBottomEdge)) {scrollElements[o]=1;} else {scrollElements[o]=0;}}});} function scrollElUp() {var element=false;$.each(scrollElements,function(i,o){if($(o).length) {if(scrollElements[o]==2) {if(element) {$('body,html').clearQueue().animate({scrollTop:element.offset().top-scrollOffset},800);element=null;} return false;} element=$(o);}});if(element!=null) {$('body,html').clearQueue().animate({scrollTop:0},800);}} function scrollElDown() {var element=false;$.each(scrollElements,function(i,o){if($(o).length) {if(element&&scrollElements[o]<2) {$('body,html').clearQueue().animate({scrollTop:$(o).offset().top-scrollOffset},800);element=null;return false;} if(scrollElements[o]>0) {element=true;}}});if(element!=null) {$('body,html').clearQueue().animate({scrollTop:$(document).height()},800);}} function scrollToTop() {$('body,html').clearQueue().animate({scrollTop:0},800);} function bindImages(iSelector) {if(!$(iSelector).length) {return null;} if(!Modernizr.touch) {$(iSelector).fancybox({'helpers':{title:{type:'inside'}},beforeShow:function(){var title=this.element.attr('data-title');var descr=this.element.attr('data-descr');var sharehref=this.element.attr('data-sharehref');var href=this.element.attr('href');if($.type(title)==="undefined"||$.type(title)==="null"){title='';} if($.type(descr)==="undefined"||$.type(descr)==="null"){descr='';} if($.type(sharehref)==="undefined"||$.type(sharehref)==="null"){sharehref='';} if(sharehref!=''){href=sharehref+'?t='+encodeURIComponent(title+descr);} this.title='
    ';if(title&&title.length) {this.title+='
    '+title+'
    ';} if(descr&&descr.length) {this.title+='
    '+descr+'
    ';}},'afterShow':function(){addthis.toolbox($(".addthis").get());$('a.fancybox-nav.fancybox-prev span').html(svgArrowLeft);$('a.fancybox-nav.fancybox-next span').html(svgArrowRight);$('a.fancybox-item.fancybox-close').html(svgX);},padding:0,margin:90});} else {$(iSelector).photoSwipe({enableMouseWheel:false,enableKeyboard:false});}};var svgArrowLeft=''+''+''+''+''+''+''+''+''+''+''+''+'';var svgArrowRight=''+''+''+''+''+''+''+''+''+''+''+''+'';var svgX=''+''+''+'';$(window).load(function(){if($(document).width()>1023&&!Modernizr.touch) {$('body.master-layout .wide-slideshow .overlay').each(function(){$(this).fadeIn();});} if(!Modernizr.touch) {} $('#ui-datepicker-div,#EBookingFormWidgetModal,#errorSummary,.picker').appendTo('body');});$(document).ready(function(){if($(document).width()>767) {}else{} if($(document).width()<=1023) {$(function(){$('nav#menu-left').mmenu({classes:"mm-gray",header:true},{selectedClass:"active"});});$(function(){var $menu=$('nav#menu-right');$menu.mmenu({position:'right',classes:'mm-gray',dragOpen:false,counters:false,labels:{fixed:!$.mmenu.support.touch}});});$('body a.toggle-left,body a.toggle-right').on('click',function(e){e.preventDefault();if($("nav#menu-right").hasClass('mm-opened')){$('#menu-right').trigger('close');} if($("nav#menu-left").hasClass('mm-opened')){$('#menu-left').trigger('close');}});} $('a.booking-form-toggle,.closeBookingForm').on('click',function(){$('div.booking-form-wrapper').slideToggle();if($(this).find('i.icon-arrow-down').length) {$(this).find('i.icon-arrow-down').removeClass('icon-arrow-down').addClass('icon-arrow-up');} else {$(this).find('i.icon-arrow-up').removeClass('icon-arrow-up').addClass('icon-arrow-down');} return false;});if($(document).width()>767) {$('.wide-slideshow').flexslider({animation:"fade",easing:'linear',direction:"horizontal",animationLoop:true,pauseOnAction:false,pauseOnHover:false,useCSS:false,touch:false,controlNav:(($(document).width()<=767)?false:true),directionNav:false,animationSpeed:2000,slideshowSpeed:5000,minItems:1,maxItems:1,slideshow:true,start:function(){if($('body.master-layout .wide-slideshow .captionWrapper').length==0){$('body.master-layout .wide-slideshow .controlsWrapper').css({'visibility':'hidden','display':'none','opacity':'0'});} $('body.master-layout .wide-slideshow').css('opacity',100);},manualControls:'.wide-slideshow.home .custom-flexnav li'});}else{} if($('.slide-offers ul li ').length>=1){$('.slide-offers').flexslider({animation:"fade",animationLoop:true,pauseOnAction:false,pauseOnHover:false,useCSS:true,touch:true,controlNav:(($(document).width()<=767)?false:true),directionNav:false,minItems:1,maxItems:1,slideshow:true,start:function(){$('body.master-layout div.banners').css('opacity',100);}});}else{$('body.master-layout div.banners').css('opacity',100);} $('.newsletter.small').on('click',function(event){var input=$(this).find('input[type=text]');input.addClass('doNotZoomInputs');$('.mm-page').addClass('hideme');$.fancybox({href:'div.newsletter.large',padding:0,margin:0,width:'100%',height:'100%',maxWidth:300,maxHeight:450,autoSize:false,closeBtn:false,closeClick:false,modal:true,type:'inline',wrapCSS:'newsletter'});event.preventDefault();}).on('blur',function(){var input=$(this).find('input[type=text]');input.removeClass('doNotZoomInputs');});$('div.newsletter.large .close.button').on('click',function(event){$('.mm-page').removeClass('hideme');$.fancybox.close();event.preventDefault();});if($(document).width()>767) {var itemWidth=($('.gallery.carousel.everslider').width()/4);var itemHeight=itemWidth*0.69;}else{var itemWidth=($('.gallery.carousel.everslider').width()/2);var itemHeight=itemWidth*0.69;} if($(document).width()>767){$('.gallery-wrapper .gallery.carousel.everslider').everslider({itemWidth:itemWidth+'px',itemHeight:itemHeight+'px',mode:'carousel',maxWidth:'100%',maxVisible:0,moveSlides:1,effect:'slide',slideEasing:'easeInOutCubic',slideDuration:700,navigation:true,keyboard:true,itemKeepRatio:true,nextNav:'',prevNav:'',slidesReady:function(){$('.gallery-wrapper-thumb .gallery.everslider').everslider({itemWidth:$('body.simple .gallery-wrapper-thumb').width()+'px',itemHeight:$('.gallery-wrapper-thumb').width()*0.8+'px',mode:'carousel',maxWidth:'100%',maxVisible:0,moveSlides:1,effect:'slide',slideEasing:'easeInOutCubic',slideDuration:700,navigation:true,keyboard:true,itemKeepRatio:false,nextNav:'',prevNav:'',slidesReady:function(){$('.gallery-container .gallery-wrapper').slideToggle("slow");$('div.gallery-container footer').find('.icon-angle-up,span.hide-thumbs').hide();$('div.gallery-container footer').on('click','a',function(){$(this).parent().parent().find('.gallery-wrapper').slideToggle("slow");$(this).parent().find('.icon-angle-up,span.hide-thumbs').toggle();$(this).parent().find('.icon-angle-down,span.show-thumbs').toggle();});bindImages('.gallery li a');$('.carousel.galleries').css({'opacity':1});}});}});}else{$('.gallery-wrapper-thumb .gallery.everslider').everslider({itemWidth:$('.gallery-wrapper-thumb').width()+'px',itemHeight:$('.gallery-wrapper-thumb').width()*0.8+'px',mode:'carousel',maxWidth:'100%',maxVisible:0,moveSlides:1,effect:'slide',slideEasing:'easeInOutCubic',slideDuration:700,navigation:true,keyboard:true,itemKeepRatio:false,nextNav:'',prevNav:'',slidesReady:function(){bindImages('.gallery li a');$('.carousel.galleries').css({'opacity':1});}});} bindImages('body.list section.list a.popup');bindImages('.clearing-galleries .gallery li a');if($(document).width()<768) {$('.gallery .more a,.gallery .less a').addClass('button');} $('.gallery .more a').bind('click',function(){$(this).parent('.more').hide().parent('.gallery').find('.more-images').slideToggle();$(this).parent('.more').siblings('.less').show();return false;});$('.gallery .less a').bind('click',function(){$(this).parent('.less').hide().parent('.gallery').find('.more-images').slideToggle();$(this).parent('.less').siblings('.more').show();return false;});var InputDateFormat='dd/mm/y';var PostDateFormat='yy-mm-dd';if(!Modernizr.touch) {$('body.book form#book-form input.hasDatePicker').datepicker({dateFormat:InputDateFormat,minDate:new Date()});} $("body.book form#book-form i.fromdate").click(function(){$("body.book form#book-form input.fromdate").focus();});if($("body.book form#book-form i.todate").length) $("body.book form#book-form i.todate").click(function(){$("body.book form#book-form input.todate").focus();});if($('body.book form#book-form input.fromdate').length||$('form.booking-form input.todate').length) {$('body.book form#book-form input.fromdate, body.book form#book-form input.todate').change(function(){if(isDate($(this).val())&&(cdate=$.datepicker.parseDate(InputDateFormat,$(this).val()))) {var id=$(this).attr('name');id=id.substr(0,id.length-2);cdate=$.datepicker.formatDate(PostDateFormat,cdate);$(this).parents('body.book form#book-form').find('input[name="'+id+'"]').val(cdate);}});}});function resizeElements(event) {if(event!='scroll') {$('.slide-banners ul.slides li.banner').minColumnHeight();if($(document).width()>767){valign($('footer.main .row .columns.small-12 .valign'),'padding-top');$('.heightfix').minColumnHeight();}else{} replaceYiiPagerArrows();$('.title span.arrow').css('height',$('.title span.arrow').width()+'px');$('.title span.arrow i').css('font-size',($('.title span.arrow').width()/37)*1.8+'em');$('.overlay span.arrow').css('height',$('.overlay span.arrow').width()+'px');$('.overlay span.arrow i').css('font-size',($('.overlay span.arrow').width()/37)*1.8+'em');$('ul.social.auto i.bg').css('font-size',($('ul.social.auto li a').width()/92)*4+'em');$('ul.social.auto i.icon').css('font-size',($('ul.social.auto li a').width()/92)*1.5+'em');$('ul.social.auto li>a').height($('ul.social.auto i').innerHeight()+'px');halign($('ul.social.auto i'),'left');valign($('ul.social.auto i'),'top');if($(document).width()>767){valign($('div.row').find('.valign'),'padding-top');$('form.custom.booking-form .custom.dropdown').each(function(index){$(this).parent().css('width',$(this).parent().innerWidth()+'px');});} $('ul.social').css('visibility','visible');halign($('.slider.gallery .nav i'),'left');valign($('.slider.gallery .nav i'),'top');} $(".custom.dropdown ul").removeClass('mm-list');if(event=='resize'||event=='load') {setTimeout(function(){resizeElements('resizeDelay');},250);}} function replaceYiiPagerArrows() {var pager=$('div.pager ul.yiiPager');pager.find('li.first a').html('');pager.find('li.previous a').html('');pager.find('li.last a').html('');pager.find('li.next a').html('');} $(function(){$('body').find('[target="_blank"]').not('.ignoreGlobal').each(function(i,v){var aElem=$(this),aRel=aElem.attr('rel');if(typeof aRel=='undefined'){aRel=''};aElem.attr('rel',aRel+' noopener noreferrer');});});;var CookieNelios=function(){if(document.cookie.indexOf('marketingRevoked')==-1){document.cookie="marketing=accepted";} var p="accepted",n="revoked",v=null,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Math.uuid=function(t,e){var o,c,n=r,i=[];if(e=e||n.length,t) for(o=0;o',iconRight:'',iconClose:'',iconLink:'',iconWarning:'',};var s=document.body,T=document.createElement("section");T.id="cookie",T.style.zIndex=21474836475,T.innerHTML=''+''+''+'';var I={title:T.querySelector("#cookie-title"),intro:T.querySelector("#cookie-intro"),necessaryTitle:T.querySelector("#cookie-necessary-title"),necessaryDescription:T.querySelector("#cookie-necessary-description"),optionalCookies:T.querySelector("#cookie-optional-categories"),hrs:T.querySelectorAll("hr"),widget:T.querySelector("#cookie-modal"),button:T.querySelector("#cookie-icon"),content:T.querySelector("#cookie-main"),close:T.querySelector("#cookie-close"),overlay:T.querySelector("#cookie-over"),aboutInfo:T.querySelector("#cookie-info"),statement:T.querySelector("#cookie-statement"),notify:T.querySelector("#cookie-note"),recommendedSettings:T.querySelector("#cookie-recommended")},M={title:I.title,intro:I.intro,necessaryTitle:I.necessaryTitle,necessaryDescription:I.necessaryDescription,acceptRecommended:I.recommendedSettings};function A(){T.setAttribute("open",""),T.removeAttribute("closed"),I.notify.removeAttribute("visible"),localStorage.removeItem("ccClosed")} function z(){T.setAttribute("closed",""),T.removeAttribute("open"),localStorage.setItem("ccClosed",!0)} function u(){} function c(t){var e=d(),o="false";for(var c in e) if(c===t){o=e[c];break} return o} function O(t){return c(t).toLowerCase()===p} function d(){var t={};if(!document.cookie.trim())return{};for(var e=document.cookie.split(/\s*;\s*/),o=0;o"+N("thirdPartyTitle")+'";for(var c=0;c'+n.name+''+L.iconLink+"",o.appendChild(i)}}(t),null!=o.onRevoke&&o.onRevoke(),w.optionalCookies[o.name]=n,!0===e&&u(),!1===e&&(c.checked=!1)} function b(t){var e;(true)?(e="true",function(t,e){if(function(t,e){var o="Greece",c="GR";if(""===c||""===o)return!1;if(0<=a.indexOf(c)||0<=l.indexOf(o))return!1;if(0<=t.indexOf("all")||0<=t.indexOf(c)||0<=t.indexOf(o)){void 0===e&&(e=[]);for(var n=0;n',I.button.style.width=t.branding.buttonIconWidth,I.button.style.height=t.branding.buttonIconHeight),I.button.innerHTML=r} if(null!=t.locales){var a=window.navigator.userLanguage||window.navigator.language,l=$('html').attr('lang'),s=t.locales.filter(function(t){return t.locale.toLowerCase()===a}),d=t.locales.filter(function(t){return t.locale.toLowerCase()===l});0'+f+''+'
    '+' '+'
    '+'

    '+h+'


    ';var m=g.querySelector("input");g.querySelector(".toggle");O(u.name)&&(m.setAttribute("checked",""),null!=u.onAccept&&u.onAccept()),I.optionalCookies.appendChild(g)}else console.warn("Please provide at least one optional cookie category.");var b=t.statement;null!=v&&null!=v.text&&null!=v.text.statement&&(b=v.text.statement);if(null!=b&&null!=b.description&&null!=b.name&&null!=b.url&&null!=b.updated){w.statement={shown:!0,updated:b.updated};var k=document.createElement("p");k.innerHTML=b.description+' '+b.name+''+L.iconLink+"",I.statement.innerHTML="",I.statement.appendChild(k)} if(null!=b&&null!=b.updated){var y=b.updated.split("/"),x=new Date(y[2],parseInt(y[1])-1,y[0]).getTime();x>w.consentDate&&(E(!0),localStorage.removeItem("ccConsentState"),localStorage.removeItem("ccClosed"))}"open"!==t.initialState.toLowerCase()||localStorage.getItem("ccClosed")?"notify"!==t.initialState.toLocaleLowerCase()||localStorage.getItem("ccClosed")?(w.initialState.type="closed",z()):(window.setTimeout(function(){I.notify.innerHTML=''+'",I.notify.setAttribute("visible","")},800),w.initialState.type="notify"):(window.setTimeout(function(){A()},800),w.initialState.type="open")}(H),E()} function N(t){return(null!=v&&null!=v.text?v.text:H.text)[t]||H.text[t]} return{info:function(){return"Cookie Nelios Version: "+1.0.toFixed(1)},load:function(t){return b(t)},update:function(t){return k(t),"Cookie Nelios - update complete"},getCookie:function(t){return c(t)},getAllCookies:function(){return d()},delete:function(t){return g(t),"Cookie Nelios - "+t+" cookie successfully deleted."},deleteAll:function(t){return E(t),"Cookie Nelios - all cookies successfully deleted."},toggleCategory:function(t,e){var count=parseInt(document.getElementsByClassName("toggleData")[0].getAttribute("data-count"));document.getElementsByClassName("toggleData")[0].setAttribute("data-count",count+1);var o,c;void 0===e&&(e=!1),o=t,c=e,O(H.optionalCookies[o].name)?m(o,c):h(o,c)},config:function(){return H},open:function(){return A(),"Cookie Nelios Opened"},hide:function(){return z(),"Cookie Nelios Closed"},notifyAccept:function(){return function(){if(I.notify.removeAttribute("visible"),w.initialState.action="accepted",null!=H.optionalCookies&&0