// source --> https://mycomputer.com.gr/forma-ftiaksto-monos-sou/wp-content/plugins/WP_Estimation_Form/assets/js/lfb_form.min.js?ver=9.588 var lfb_lastStepID=0;var lfb_lastSteps=new Array();var lfb_plannedSteps;var lfb_gmapService=false;var tld_selectionMode=false;jQuery(document).ready(function(){if(jQuery("#estimation_popup").length>0){if(document.location.href.indexOf("lfb_action=preview")>-1){jQuery("#estimation_popup:not(.wpe_fullscreen)").remove()}window.Dropzone.autoDiscover=false;initFlatUI();wpe_initForms()}});jQuery(window).load(function(){if(jQuery("#estimation_popup").length>0){jQuery.each(wpe_forms,function(){var a=this;wpe_checkItems(a.formID);wpe_initListeners(a.formID)});lfb_onResize();jQuery(window).resize(lfb_onResize);jQuery(window).on("popstate",function(a){if(a.originalEvent.state!==null){a.preventDefault();wpe_previousStep(wpe_forms[0].formID)}})}jQuery("#ajax-loading-screen").fadeOut();jQuery("#ajax-content-wrap >.container-wrap").css({opacity:1,display:"block"})});function wpe_getForm(b){var a=false;jQuery.each(wpe_forms,function(){if(this.formID==b){a=this}});return a}function lfb_changeCaptcha(c){var b=wpe_getForm(c);var a=Math.floor((Math.random()*100000)+1);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #lfb_captcha').attr("src",b.captchaUrl+"?tmp="+a)}function lfb_onResize(){jQuery("#estimation_popup.wpe_fullscreen").css({minHeight:jQuery(window).height()});if(jQuery(window).width()<=768){jQuery("#estimation_popup .lfb_stepDescription").each(function(){jQuery(this).css({top:jQuery(this).closest(".genSlide").find(".stepTitle").height()+60})});jQuery("#estimation_popup .genContent ").each(function(){jQuery(this).css({paddingTop:jQuery(this).closest(".genSlide").find(".stepTitle").height()+jQuery(this).closest(".genSlide").find(".lfb_stepDescription").height()+70})})}else{jQuery("#estimation_popup .lfb_stepDescription").each(function(){jQuery(this).css({top:jQuery(this).closest(".genSlide").find(".stepTitle").height()+60})});jQuery("#estimation_popup .genContent ").each(function(){jQuery(this).css({paddingTop:jQuery(this).closest(".genSlide").find(".stepTitle").height()+jQuery(this).closest(".genSlide").find(".lfb_stepDescription").height()+70})})}}function wpe_updatePlannedSteps(a){var b=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-start="1"]').attr("data-stepid"));lfb_plannedSteps=new Array();lfb_plannedSteps.push(b);lfb_plannedSteps=wpe_scanPlannedSteps(b,a)}function wpe_scanPlannedSteps(d,c){var a=new Array();var b=wpe_findPotentialsSteps(d,c);if(b.length>0&&b[0]!="final"){lfb_plannedSteps.push(b[0]);wpe_scanPlannedSteps(b[0],c)}else{return lfb_plannedSteps}return lfb_plannedSteps}function wpe_getTotalQuantities(d){var b=wpe_getForm(d);var c=wpe_getFormContent(d,true);var a=c[2];var e=0;jQuery.each(a,function(){var f=this;if(isNaN(f.quantity)){e++}else{e+=f.quantity}});return e}function wpe_itemClick(k,e,c){var b=wpe_getForm(c);var i=false;var j=k;var d=false;if(e){jQuery('#estimation_popup[data-form="'+b.formID+'"] .quantityBtns').removeClass("open");jQuery('#estimation_popup[data-form="'+b.formID+'"] .quantityBtns').fadeOut(250);var f=navigator.userAgent.toLowerCase();var h=f.match(/(iPad|iPhone|iPod)/i);if(h){jQuery("body :not(.ui-slider-handle) > .tooltip").remove();jQuery("body > .tooltip").remove();jQuery('#estimation_popup[data-form="'+b.formID+'"] > .tooltip').remove()}}if(e){j.addClass("action")}if((e)||(!j.is(".action"))){if(b.imgIconStyle!="zoom"){j.find("span.icon_select").animate({bottom:160,opacity:0},200)}if(j.is(".checked")){if((e)&&(j.data("required"))){}else{if(b.imgIconStyle=="zoom"){j.delay(200).css("transition-delay","0.2s");j.find("span.icon_select").css("transition-delay","0s")}else{j.css("transition-delay","0s")}var a=220;if(b.imgIconStyle=="zoom"){a=0}j.delay(a).removeClass("checked");if(b.imgIconStyle!="zoom"){j.delay(220).find("span.icon_select").removeClass("fui-check").addClass("fui-cross")}else{j.find("span.icon_select").css("transition-delay","0s")}j.delay(400).css("transition-delay","0s");j.find(".icon_quantity").delay(300).fadeOut(200)}}else{j.css("transition-delay","0s");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!k.is('[data-type="slider"]')){k.b_tooltip("show")}}d=true;if(b.imgIconStyle=="zoom"){j.find("span.icon_select").css("transition-delay",".5s")}j.delay(220).addClass("checked");if(b.imgIconStyle!="zoom"){j.delay(220).find("span.icon_select").removeClass("fui-cross").addClass("fui-check")}if(j.find(".quantityBtns").length>0&&!j.is("[data-distanceqt]")){j.find(".icon_quantity").delay(300).fadeIn(200);j.find(".quantityBtns").delay(500).addClass("open");j.find(".quantityBtns").delay(500).fadeIn("200")}if(j.data("urltarget")&&j.data("urltarget")!=""){var g=window.open(j.data("urltarget"),"_blank");g.focus()}}if(b.imgIconStyle=="zoom"){}else{j.find("span.icon_select").delay(300).animate({bottom:0,opacity:1},200)}if((e)&&(j.data("group"))){j.closest(".genSlide").find('div.selectable.checked[data-group="'+j.data("group")+'"]').each(function(){wpe_itemClick(jQuery(this),false,c)});j.closest(".genSlide").find('input[type=checkbox][data-group="'+j.data("group")+'"]:checked').trigger("click.auto");if(b.groupAutoClick=="1"&&j.is(".checked")&&j.closest(".genSlide").is("[data-required=true]")){if(j.closest(".genSlide").find("[data-itemid]").not('[data-group="'+j.data("group")+'"]').not(".lfb_disabled").length==0&&j.closest(".genSlide").find('[data-group="'+j.data("group")+'"] .quantityBtns').length==0&&j.closest(".genSlide").find('[data-group="'+j.data("group")+'"] .wpe_qtfield').length==0){setTimeout(function(){wpe_nextStep(b.formID)},250)}}}setTimeout(function(){wpe_updatePrice(c);j.removeClass("action")},420)}setTimeout(function(){if(j.is('[data-usedistance="true"]')){lfb_removeDistanceError(j.attr("data-itemid"),c)}},200)}function wpe_nl2br(c,b){c=c.replace(/\n\n/g,"\n");var a=(b||typeof b==="undefined")?"
":"
";return(c+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+a+"$2")}function wpe_initForms(){jQuery.each(wpe_forms,function(){var b=this;b.price=0;b.priceSingle=0;b.priceMax=0;b.step=0;b.gFormDesignCheck=0;b.timer_gFormSubmit=null;b.timer_gFormDesign=null;b.animationsSpeed*=1000;b.reductionResult=0;b.reduction=0;b.discountCode="";b.discountCodeDisplayed=false;b.initialPrice=parseFloat(b.initialPrice);b.contactSent=0;b.gravitySent=false;b.shineFxIndex=0;b.subscriptionText=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalPrice span:eq(1)').html();var c=b.formID;if(b.save_to_cart==1){b.save_to_cart=true}else{b.save_to_cart=false}if(b.save_to_cart_edd==1){b.save_to_cart_edd=true}else{b.save_to_cart_edd=false}if(b.gravityFormID>0){jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"get_currentRef",formID:c},success:function(d){b.current_ref=d}})}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide .genContent div.selectable span.icon_select.lfb_fxZoom').css({textShadow:"-2px 0px "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel').css("background-color")});if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').is(".wpe_popup")&&!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').closest("#lfb_bootstraped").parent().is("body")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').closest("#lfb_bootstraped").detach().appendTo("body")}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').length>0){Stripe.setPublishableKey(b.stripePubKey)}if(jQuery('#estimation_popup[data-form="'+b.formID+'"]').is(".wpe_fullscreen")){jQuery("html,body").css("overflow-y","hidden")}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').length>0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').attr("target","_self")}if(b.intro_enabled=="0"){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #btnStart,#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #startInfos').hide();if(b.showSteps!="2"){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .genPrice').fadeIn(500)}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .genPrice').hide()}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel').fadeIn(b.animationsSpeed,function(){wpe_nextStep(b.formID)})}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] input:not([type=checkbox])').change(function(){wpe_updatePrice(c)});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] textarea').change(function(){wpe_updatePrice(c)});if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_captcha').length>0){lfb_changeCaptcha(c)}if(b.enableShineFxBtn==1){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').find("a.btn-primary").append('');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').find("a.btn-primary").mouseover(function(){if(b.shineFxIndex==0){lfb_shineBtn(c,jQuery(this).find(".lfb_shineCanvas"))}})}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .lfb_dropzone').each(function(){var e=null;if(jQuery(this).attr("data-maxfiles")>0){e=jQuery(this).attr("data-maxfiles")}var d=jQuery(this);jQuery(this).dropzone({url:b.ajaxurl,paramName:"file",maxFilesize:jQuery(this).attr("data-filesize"),maxFiles:e,addRemoveLinks:true,dictRemoveFile:"",dictCancelUpload:"",acceptedFiles:jQuery(this).attr("data-allowedfiles"),dictDefaultMessage:b.filesUpload_text,dictFileTooBig:b.filesUploadSize_text,dictInvalidFileType:b.filesUploadType_text,dictMaxFilesExceeded:b.filesUploadLimit_text,init:function(){this.on("thumbnail",function(g,h){var f=jQuery(g.previewElement);f.attr("data-file",g)});this.on("sending",function(f,h,g){d.closest(".genSlide").find(".btn-next").fadeOut();d.closest(".genSlide").find(".btn-primary").fadeOut();g.append("action","lfb_upload_form");g.append("formSession",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-formsession"));g.append("itemID",d.attr("data-itemid"))}),this.on("complete",function(f,g){if(d.find(".dz-preview:not(.dz-complete)").length==0||d.find(".dz-preview").length==0){d.closest(".genSlide").find(".btn-next").fadeIn();d.closest(".genSlide").find(".btn-primary").fadeIn()}wpe_updatePrice(b.formID)});this.on("success",function(g,h){var f=jQuery(g.previewElement);f.attr("data-file",g.name)});this.on("removedfile",function(f,g){wpe_updatePrice(b.formID)})}})});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] [data-itemid][data-type="slider"]').each(function(){var f=parseInt(jQuery(this).attr("data-min"));if(f==0){f=0}var d=parseInt(jQuery(this).attr("data-max"));if(d==0){d=30}var h=jQuery('").css({position:"absolute",top:-55,left:-20,opacity:1}).hide();var g=1;if(jQuery(this).is("[data-stepslider]")&&parseInt(jQuery(this).attr("data-stepslider"))>0){g=parseInt(jQuery(this).attr("data-stepslider"))}var e=false;if(jQuery(this).is("[data-usecalculationqt]")){e=true}jQuery(this).slider({min:f,max:d,value:f,step:g,disabled:e,orientation:"horizontal",range:"min",change:function(i,j){if(!tld_selectionMode){h.find(".tooltip-inner").html(j.value);if(i.originalEvent){wpe_updatePrice(c)}}},start:function(i,j){if(tld_selectionMode){return false}},slide:function(i,j){if(tld_selectionMode){return false}h.find(".tooltip-inner").html(j.value);if(i.originalEvent){setTimeout(function(){wpe_updatePrice(c)},30);h.show()}wpe_updatePrice(c)},stop:function(i,j){h.find(".tooltip-inner").html(j.value);wpe_updatePrice(c);h.hide()}}).find(".ui-slider-handle").append(h).hover(function(){if(!tld_selectionMode){h.show()}},function(){h.hide()})});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .lfb_colorpicker').each(function(){var d=jQuery(this);jQuery(this).prev(".lfb_colorPreview").click(function(){if(!tld_selectionMode){jQuery(this).next(".lfb_colorpicker").trigger("click")}});jQuery(this).prev(".lfb_colorPreview").css({backgroundColor:b.colorA});jQuery(this).colpick({color:b.colorA,layout:"hex",onSubmit:function(){jQuery("body > .colpick").fadeOut()},onChange:function(e,i,g,h,f){jQuery(h).val("#"+i);jQuery(h).prev(".lfb_colorPreview").css({backgroundColor:"#"+i})}})});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').find('.lfb_colorPreview[data-urltarget],input[type="text"][data-itemid]:not(.lfb_colorpicker)[data-urltarget],textarea[data-itemid][data-urltarget],select[data-itemid][data-urltarget]').each(function(){jQuery(this).click(function(){if(!tld_selectionMode){var d=window.open(jQuery(this).attr("data-urltarget"),"_blank");d.focus()}})});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').find('[data-autocomplete="1"]').each(function(){var d={};if(jQuery(this).attr("data-fieldtype")=="city"){d.types=["(cities)"]}else{if(jQuery(this).attr("data-fieldtype")=="address"){if(jQuery(this).closest(".genContent").find('[data-fieldtype="city"]').length>0){d.types=["address"]}}else{if(jQuery(this).attr("data-fieldtype")=="country"){d.types=["country"]}else{if(jQuery(this).attr("data-fieldtype")=="zip"){d.types=["zip"]}}}}new google.maps.places.Autocomplete(jQuery(this).get(0),d)});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide .lfb_timepicker').each(function(){jQuery(this).timepicker({showMeridian:parseInt(b.timeModeAM),appendWidgetTo:'#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]'});jQuery(this).click(function(){jQuery(this).timepicker("showWidget")});jQuery(this).timepicker().on("changeTime.timepicker",function(j){var f=jQuery(this).attr("data-mintime");var g=jQuery(this).attr("data-maxtime");if(f!=""&&f.indexOf(":")>0){var h=parseInt(f.substr(0,f.indexOf(":")));var k=parseInt(f.substr(f.indexOf(":")+1,2));if(f.indexOf("PM")>0&&h!=12){h+=12}if(j.time.meridian=="PM"){j.time.hours+=12}if(j.time.hours0){var i=parseInt(g.substr(0,g.indexOf(":")));var d=parseInt(g.substr(g.indexOf(":")+1,2));if(g.indexOf("PM")>0&&i!=12){i+=12}if(j.time.meridian=="PM"){j.time.hours+=12}if(j.time.hours>i||(j.time.hours==i&&j.time.minutes>d)){jQuery(this).val("")}}})});var a=wpe_forms[0].dateFormat;a=a.replace(/\\\//g,"/");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide .lfb_datepicker').each(function(){var d=0;if(jQuery(this).is('[data-allowpast="1"]')){d=null}jQuery(this).datepicker({dateFormat:a,onClose:function(f,e){jQuery(this).attr("disabled",false);jQuery(this).closest(".form-group").removeClass("lfb_focus")},beforeShow:function(f,e){jQuery(this).attr("disabled",true);jQuery(this).closest(".form-group").addClass("lfb_focus");jQuery(this).blur();jQuery("#ui-datepicker-div").addClass("lfb_datepickerContainer");if(parseInt(jQuery(this).attr("data-showmonths"))==1||parseInt(jQuery(this).attr("data-showmonths"))==1){jQuery("#ui-datepicker-div").addClass("lfb_datepickerHasMenu")}},minDate:d,changeMonth:parseInt(jQuery(this).attr("data-showmonths")),changeYear:parseInt(jQuery(this).attr("data-showyears"))})});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide .lfb_datepicker').keypress(function(d){d.preventDefault()});if(wpe_forms[0].datepickerLang==""){wpe_forms[0].datepickerLang="en"}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide .lfb_datepicker').datepicker("option",jQuery.datepicker.regional[wpe_forms[0].datePickerLanguage]);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide .lfb_datepicker').datepicker("option","dateFormat",a);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide [data-group]').each(function(){var d=jQuery(this);if(b.groupAutoClick=="1"&&d.prop("data-group")!=""&&d.closest(".genSlide").is("[data-required=true]")){if(d.closest(".genSlide").find("[data-itemid]:not(.lfb_disabled)").not('[data-group="'+d.data("group")+'"]').not(".lfb_disabled").length==0&&d.closest(".genSlide").find('[data-group="'+d.data("group")+'"] .quantityBtns').length==0&&d.closest(".genSlide").find('[data-group="'+d.data("group")+'"] .wpe_qtfield').length==0){d.closest(".genSlide").find(".btn-next").addClass("lfb-hidden")}}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide div.selectable.prechecked,#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #mainPanel .genSlide input[type=checkbox][data-price].prechecked').each(function(){wpe_itemClick(jQuery(this),false,c)});wpe_initPrice(c);wpe_updatePrice(c);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #btnStart').click(function(){if(!tld_selectionMode){wpe_openGenerator(c)}});wpe_initGform(c);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').length>0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').attr("target","_self")}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .quantityBtns > a').click(function(){if(!tld_selectionMode){if(jQuery(this).attr("data-btn")=="less"){wpe_quantity_less(this,c)}else{wpe_quantity_more(this,c)}}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .linkPrevious').click(function(){if(!tld_selectionMode){wpe_previousStep(c)}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .btn-next').click(function(){if(!tld_selectionMode){wpe_nextStep(c)}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #btnOrderPaypal').click(function(){if(!tld_selectionMode){wpe_order(c)}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide [data-toggle="switch"]').change(function(){var d=jQuery(this).attr("data-fieldid");wpe_toggleField(d,c)});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').submit(function(g){var f=false;var d=lfb_checkStepItemsValid("final",c);if(!d){f=true}var e=true;if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] [data-activatePaypal="true"]:not(:checked)').length>0){e=false}if(!e){g.preventDefault();wpe_order(c)}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="number"]').closest(".form-group").removeClass("has-error");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="exp_month"]').closest(".form-group").removeClass("has-error");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="exp_year"]').closest(".form-group").removeClass("has-error");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="cvc"]').closest(".form-group").removeClass("has-error");if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="number"]').val().length<5){f=true;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="number"]').closest(".form-group").addClass("has-error")}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="exp_month"]').val().length<2){f=true;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="exp_month"]').closest(".form-group").addClass("has-error")}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="exp_year"]').val().length<2){f=true;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="exp_year"]').closest(".form-group").addClass("has-error")}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="cvc"]').val().length<2){f=true;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm [data-stripe="cvc"]').closest(".form-group").addClass("has-error")}if(!f){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_captcha').length>0){jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"lfb_checkCaptcha",formID:c,captcha:jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_captchaField').val()},success:function(h){if(h=="1"){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm #wpe_btnOrderStripe').prop("disabled",true);Stripe.card.createToken(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm'),function(i,j){lfb_stripeResponse(i,j,b.formID)})}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_captchaField').closest(".form-group").addClass("has-error")}}})}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm #wpe_btnOrderStripe').prop("disabled",true);Stripe.card.createToken(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm'),function(h,i){lfb_stripeResponse(h,i,b.formID)})}}return false}});jQuery(".gform_wrapper").each(function(){var d=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1,jQuery(this).attr("id").length);if(d==b.gravityFormID){jQuery(this).detach().insertAfter('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalPrice')}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .wpe_qtfield').attr("type","number");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .wpe_qtfield').keyup(function(){if(jQuery(this).val().indexOf("-")>-1&&(!jQuery(this).is("[min]")||jQuery(this).attr("min").indexOf("-")<0)){jQuery(this).val(parseInt(jQuery(this).attr("min")))}if(parseFloat(jQuery(this).val())parseInt(jQuery(this).attr("max"))){jQuery(this).val(jQuery(this).attr("max"))}wpe_updatePrice(b.formID);wpe_updateSummary(b.formID)});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] input[type="number"][data-itemid]').focusout(function(){if(jQuery(this).val().indexOf("-")>-1&&(!jQuery(this).is("[min]")||jQuery(this).attr("min").indexOf("-")<0)){jQuery(this).val(parseInt(jQuery(this).attr("min")))}if(parseFloat(jQuery(this).val())parseFloat(jQuery(this).attr("max"))){jQuery(this).val(jQuery(this).attr("max"))}if(jQuery(this).val()!=""){jQuery(this).addClass("checked")}wpe_updatePrice(b.formID);wpe_updateSummary(b.formID)});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] .wpe_sliderQt').each(function(){var e=parseInt(jQuery(this).closest(".quantityBtns").attr("data-min"));if(e==0){e=1}var g=jQuery('").css({position:"absolute",top:-55,left:-20,opacity:1}).hide();var f=1;if(jQuery(this).closest(".quantityBtns").is("[data-stepslider]")&&parseInt(jQuery(this).closest(".quantityBtns").attr("data-stepslider"))>0){f=parseInt(jQuery(this).closest(".quantityBtns").attr("data-stepslider"))}var d=false;if(jQuery(this).closest(".selectable").is("[data-usecalculationqt]")){d=true}jQuery(this).slider({min:e,max:parseInt(jQuery(this).closest(".quantityBtns").attr("data-max")),value:parseInt(jQuery(this).closest(".quantityBtns").next(".icon_quantity").html()),orientation:"horizontal",range:"min",disabled:d,step:f,change:function(h,i){g.find(".tooltip-inner").html(i.value);jQuery(this).closest(".quantityBtns").next(".icon_quantity").html(i.value);if(h.originalEvent){wpe_updatePrice(c)}},slide:function(h,i){jQuery(this).closest(".quantityBtns").next(".icon_quantity").html(i.value);g.find(".tooltip-inner").html(i.value);if(h.originalEvent){wpe_updatePrice(c)}}}).find(".ui-slider-handle").append(g).hover(function(){g.show()},function(){g.hide()})});jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_loader').fadeOut()})}function lfb_stripeResponse(a,c,e){var b=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_stripeForm');if(c.error){b.find(".payment-errors").text(c.error.message);b.find(".btn").prop("disabled",false)}else{var d=c.id;if(b.find('[name="stripeToken"]').length==0){b.append(jQuery('').val(d));Stripe.card.createToken(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_stripeForm'),function(g,f){lfb_stripeResponse(g,f,e)})}else{if(b.find('[name="stripeTokenB"]').length==0){b.append(jQuery('').val(d));wpe_order(e)}}}}function lfb_replaceAllBackSlash(b){var a=b.indexOf("\\");while(a>=0){b=b.replace("\\","");a=b.indexOf("\\")}return b}function lfb_shineBtn(g,f){var e=wpe_getForm(g);f.attr({width:f.width(),height:f.height()});f.css({borderRadius:f.parent().css("border-radius")});var c=f.get(0).getContext("2d");c.clearRect(0,0,f.width(),f.height());var b=c.createLinearGradient(0,0,f.width(),f.height());e.shineFxIndex+=0.08;if(e.shineFxIndex>1){c.clearRect(0,0,f.width(),f.height());e.shineFxIndex=0}else{var h=e.shineFxIndex;var a=h-0.1;if(a<0){a=0}var d=h+0.1;if(d>1){d=1}b.addColorStop(0,"transparent");b.addColorStop(a,"rgba(255,255,255,0)");b.addColorStop(h,"rgba(255,255,255,0.3)");b.addColorStop(d,"rgba(255,255,255,0)");b.addColorStop(1,"rgba(255,255,255,0)");c.fillStyle=b;c.fillRect(0,0,f.width(),f.height());setTimeout(function(){lfb_shineBtn(g,f)},30)}}function lfb_updateLayerImages(a){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] .lfb_layeredImage').each(function(){jQuery(this).find("img:not(.lfb_baseLayer)").each(function(){var d=lfb_replaceAllBackSlash(jQuery(this).attr("data-showconditions"));d=d.replace(/'/g,'"');if(d.length>0){try{d=JSON.parse(d);var f=lfb_checkConditions(d,a);var b=jQuery(this).attr("data-showconditionsoperator");if((b=="OR"&&!f.errorOR)||(b!="OR"&&!f.error)){jQuery(this).fadeIn()}else{jQuery(this).fadeOut()}}catch(c){jQuery(this).fadeIn()}}else{jQuery(this).fadeIn()}})})}function lfb_updateShowSteps(a){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] .genSlide[data-useshowconditions]').each(function(){var d=lfb_replaceAllBackSlash(jQuery(this).attr("data-showconditions"));d=d.replace(/'/g,'"');if(d!=""){try{d=JSON.parse(d);var f=lfb_checkConditions(d,a);var b=jQuery(this).attr("data-showconditionsoperator");if((b=="OR"&&!f.errorOR)||(b!="OR"&&!f.error)){if(jQuery(this).is(".lfb_disabled")){jQuery(this).css({opacity:0});jQuery(this).removeClass("lfb_disabled")}}else{if(!jQuery(this).is(".lfb_disabled")){jQuery(this).addClass("lfb_disabled")}}}catch(c){}}})}function lfb_updateShowItems(e){var d=wpe_getForm(e);var a=lfb_lastSteps.slice();var c=0;var b=0;if(d.step!="final"&&jQuery.inArray(parseInt(d.step),a)==-1){a.push(parseInt(d.step))}else{if(d.step=="final"){a.push("final")}}jQuery.each(a,function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] .genSlide[data-stepid="'+this+'"] [data-useshowconditions]').each(function(){var h=lfb_replaceAllBackSlash(jQuery(this).attr("data-showconditions"));h=h.replace(/'/g,'"');if(h!=""){try{h=JSON.parse(h);var i=lfb_checkConditions(h,e);var f=jQuery(this).attr("data-showconditionsoperator");if((f=="OR"&&!i.errorOR)||(f!="OR"&&!i.error)){if(jQuery(this).is(".lfb_disabled")){jQuery(this).css({opacity:0});jQuery(this).removeClass("lfb_disabled");jQuery(this).closest(".itemBloc").removeClass("lfb_disabled");jQuery(this).stop().animate({opacity:1},300);if(jQuery(this).is("input.prechecked")&&!jQuery(this).is(":checked")){wpe_itemClick(jQuery(this),false,e)}if(jQuery(this).is(".selectable.prechecked")&&!jQuery(this).is(".checked")){wpe_itemClick(jQuery(this),false,e)}jQuery(this).closest(".itemBloc").stop().fadeIn(300)}}else{if(!jQuery(this).is(".lfb_disabled")){jQuery(this).css({opacity:1});if(jQuery(this).is(":checked")){wpe_itemClick(jQuery(this),false,e)}if(jQuery(this).is(".checked")){wpe_itemClick(jQuery(this),false,e)}if(jQuery(this).is('input[type="text"]')||jQuery(this).is("textarea")){jQuery(this).val("")}if(jQuery(this).is(".lfb_dropzone")){jQuery(this).find(".dz-preview").remove()}jQuery(this).addClass("lfb_disabled");jQuery(this).closest(".itemBloc").addClass("lfb_disabled");jQuery(this).stop().animate({opacity:0},300);jQuery(this).closest(".itemBloc").stop().fadeOut(300)}}}catch(g){}}})})}function lfb_removeFile(c,a){var b=wpe_getForm(c);jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"lfb_removeFile",formSession:jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-formsession"),file:a}})}function wpe_disablesThemeScripts(){var a=false;jQuery("script").each(function(){if((a)){if(jQuery(this).attr("src")&&jQuery(this).attr("src").indexOf("WP_Helper_Creator")>0){}else{if(jQuery(this).attr("src")&&jQuery(this).attr("src").indexOf("VisitorsTracker")>0){}else{if(jQuery(this).attr("src")&&jQuery(this).attr("src").indexOf("WP_Visual_Chat")>0){}else{if(jQuery(this).attr("src")&&jQuery(this).attr("src").indexOf("gravityforms")>0){}else{var b=this.innerText||this.textContent;if(b.indexOf("analytics")<0&&jQuery(this).parents(".gform_wrapper").length==0){jQuery(this).attr("disabled","disabled")}}}}}}if(jQuery(this).attr("src")&&jQuery(this).attr("src").indexOf("estimation_popup")>0){a=true}})}function wpe_initGform(b){var a=wpe_getForm(b);if(a.gravityFormID>0){a.gravitySent=false;a.gFormDesignCheck++;if(a.timer_gFormDesign){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #finalSlide').delay(100).animate({opacity:1},1000)}jQuery("#gform_wrapper_"+a.gravityFormID+" input[type=radio]").not('[data-toggle="radio"]').attr("data-toggle","radio");jQuery("#gform_wrapper_"+a.gravityFormID+" .ginput_container input,#gform_wrapper_"+a.gravityFormID+" .ginput_container select,#gform_wrapper_"+a.gravityFormID+" .ginput_container textarea").attr("title","control");jQuery("#gform_wrapper_"+a.gravityFormID+" .ginput_container input,#gform_wrapper_"+a.gravityFormID+" .ginput_container textarea, #gform_wrapper_"+a.gravityFormID+" .ginput_container select").not("[type=checkbox]").not("[type=radio]").not("[type=submit]").addClass("form-control");jQuery("#gform_wrapper_"+a.gravityFormID+" .ginput_container").addClass("form-group");jQuery("#gform_wrapper_"+a.gravityFormID+" .gform_button").attr("class","btn btn-wide btn-primary");jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper input[type="radio"]:not(.ready)').each(function(){jQuery(this).addClass("ready");var c=jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').html();jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").css("display","inline-block");jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').append(jQuery(this));jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').addClass("radio");jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').prepend('');if(!jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").next().is("br")){jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").after("
")}if(jQuery(this).is(":checked")){jQuery(this).trigger("click")}});jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper input[type="checkbox"]:not(.ready)').each(function(){jQuery(this).addClass("ready");var c=jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').html();jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").css("display","inline-block");jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').append(jQuery(this));jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').addClass("checkbox");jQuery(this).before('');if(!jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").next().is("br")){jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").after("
")}});jQuery("#gform_wrapper_"+a.gravityFormID+" .gform_wrapper label.checkbox").each(function(){if(jQuery(this).find("[type=checkbox]").length>0){jQuery(this).find("[type=checkbox]").eq(1).remove()}if(jQuery(this).find("[type=checkbox]").is(":checked")){jQuery(this).find("[type=checkbox]").trigger("click")}});if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #wtmt_paypalForm').length>0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #wtmt_paypalForm #btnOrderPaypal').hide()}jQuery(" #gform_submit_button_"+a.gravityFormID).click(function(d){d.preventDefault();if(!tld_selectionMode){if(!a.gravitySent){a.gravitySent=true;jQuery(this).addClass("anim");a.gFormDesignCheck=0;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #finalSlide').delay(1000).animate({opacity:0},1000);var c=jQuery(this);setTimeout(function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #finalSlide .gform_wrapper form').submit();a.timer_gFormDesign=setTimeout(function(){wpe_initGform(b)},2000)},1000)}}})}}function wpe_initPrice(b){var a=wpe_getForm(b);if(a.max_price>0){a.priceMax=a.max_price}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide [data-price]').each(function(){if(jQuery(this).data("price")&&jQuery(this).data("price")>0){if(jQuery(this).find(".icon_quantity").length>0){var c=parseFloat(jQuery(this).find(".icon_quantity").html());if(c>10&&parseFloat(jQuery(this).data("price"))>100){c=10}else{if(c>30){c=30}else{c=parseFloat(jQuery(this).find(".quantityBtns").data("max"))}}if(jQuery(this).data("operation")=="-"||jQuery(this).data("operation")=="/"){}else{a.priceMax+=parseFloat(jQuery(this).data("price"))*c}}else{if(jQuery(this).find(".wpe_qtfield").length>0){var c=parseFloat(jQuery(this).find(".wpe_qtfield").val());if(c>10&&parseFloat(jQuery(this).data("price"))>100){c=10}else{if(c>30){c=30}else{if(parseFloat(jQuery(this).find(".wpe_qtfield").attr("max").length>0)){c=parseFloat(jQuery(this).find(".wpe_qtfield").attr("max"))}else{c=30}}}if(jQuery(this).data("operation")=="-"||jQuery(this).data("operation")=="/"){}else{a.priceMax+=parseFloat(jQuery(this).data("price"))*c}}else{if(jQuery(this).data("operation")=="+"){a.priceMax+=parseFloat(jQuery(this).data("price"))}}}}});a.priceMax+=a.initialPrice;jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide [data-price][data-operation="x"]').each(function(){if(jQuery(this).find(".icon_quantity").length>0){for(var c=0;c').parent().bootstrapSwitch();jQuery("#estimation_popup.wpe_bootstraped input[type=checkbox][data-urltarget]").each(function(){jQuery(this).closest(".switch.has-switch").click(function(){if(!tld_selectionMode){if(jQuery(this).find(".switch-on").length>0){var a=window.open(jQuery(this).find("input[type=checkbox][data-urltarget]").attr("data-urltarget"),"_blank");a.focus()}}})});if(jQuery("#estimation_popup.wpe_bootstraped .lfb_selectpicker").length>0){jQuery("#estimation_popup.wpe_bootstraped .lfb_selectpicker").selectpicker()}}function wpe_getFormContent(c,j){var b=wpe_getForm(c);var f="";var a="";var i="";var h=new Array();a+="

Ref : "+b.current_ref+"

";var k="";var e=lfb_lastSteps.slice();if(j){if(b.step!="final"){e.push(b.step)}}if(b.step=="final"){e.push("final")}var d=new Array();jQuery.each(e,function(){$panel=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+this+'"]');if(($panel.attr("data-stepid")=="final"||jQuery.inArray(parseInt($panel.attr("data-stepid")),lfb_plannedSteps)>=0)&&!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-title][data-stepid="'+this+'"]').is(".lfb_disabled")){f+="

"+$panel.data("title")+" :


";a+="\n\n---------"+$panel.data("title")+" :---------\n";$panel.find(".itemBloc:not(.lfb_disabled)").each(function(){var l=jQuery(this);var q=true;if(l.find("div.selectable.checked").length>0){var v=l.find("div.selectable.checked").get(0);var o="";if(jQuery(v).is("[data-resqt]")){jQuery(v).data("resqt",jQuery(v).attr("data-resqt"))}if(jQuery(v).is("[data-resprice]")){jQuery(v).data("resprice",jQuery(v).attr("data-resprice"))}if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}var p=parseFloat(jQuery(v).data("resqt"));var w=parseFloat(jQuery(v).data("resprice"));if(p==0){p=1}if(p>1){o=p+"X "}if(jQuery(v).data("price")){if(jQuery(v).data("operation")=="+"){if(b.currencyPosition=="left"){w=b.currency+w}else{w+=b.currency}}else{if(jQuery(v).data("operation")=="-"){if(b.currencyPosition=="left"){w="-"+b.currency+w}else{w+="-"+b.currency}}else{if(jQuery(v).data("operation")=="/"){w="-"+jQuery(v).data("price")+"%"}else{w="+"+jQuery(v).data("price")+"%"}}}if(q){f+=" - "+o+jQuery(v).data("originaltitle")+" : "+w+"
";a+=" - "+o+jQuery(v).data("originaltitle")+" : "+w+"\n"}}else{if(q){f+=" - "+o+jQuery(v).data("originaltitle")+"
";a+=" - "+o+jQuery(v).data("originaltitle")+"\n"}}var m=parseFloat(jQuery(v).data("resprice"));if(isNaN(m)){m=parseFloat(jQuery(v).data("price"))}var r=false;if(jQuery(v).is('[data-singleprice="true"]')){r=true}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));var u=jQuery(v).attr("data-title");if(jQuery(v).is("[data-original-title]")&&jQuery(v).is("[data-reducqt]")){u=jQuery(v).attr("data-original-title")}if(jQuery(v).is("[data-originaltitle]")&&jQuery(v).is('[data-showprice="1"]')){u=jQuery(v).attr("data-originaltitle")}h.push({label:u,itemid:jQuery(v).attr("data-itemid"),price:m,quantity:p,step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q,isSinglePrice:r})}}if(l.find("input[type=checkbox]:checked").length>0){var v=l.find("input[type=checkbox]:checked").get(0);var w=parseFloat(jQuery(v).data("price"));if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(jQuery(v).data("price")){if(jQuery(v).data("operation")=="+"){if(b.currencyPosition=="left"){w=b.currency+w}else{w+=b.currency}}else{if(jQuery(v).data("operation")=="-"){if(b.currencyPosition=="left"){w="-"+b.currency+w}else{w+="-"+b.currency}}else{if(jQuery(v).data("operation")=="/"){w="-"+w+"%"}else{w="+"+w+"%"}}}var t=jQuery(v).attr("data-originaltitle");if(jQuery(v).is("select")){t+=" ("+jQuery(v).val()+")"}if(q){f+=" - "+t+" : "+w+"
";a+=" - "+t+" : "+w+"\n"}}else{var t=jQuery(v).attr("data-originaltitle");if(jQuery(v).is("select")){t+=" : "+jQuery(v).val()+""}if(q){f+=" - "+t+"
";a+=" - "+t+"\n"}}var u=jQuery(v).attr("data-title");if(jQuery(v).is("[data-originaltitle]")&&jQuery(v).is('[data-showprice="1"]')){u=jQuery(v).attr("data-originaltitle")}if(jQuery(v).is("select")){u+=" : "+jQuery(v).val()}var r=false;if(jQuery(v).is('[data-singleprice="true"]')){r=true}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:u,itemid:jQuery(v).attr("data-itemid"),price:parseFloat(jQuery(v).data("resprice")),quantity:1,step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q,isSinglePrice:r})}}if(l.find('div[data-type="slider"]').length>0){var v=l.find('div[data-type="slider"]').get(0);var w=parseFloat(jQuery(v).data("price"));if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(jQuery(v).data("price")){if(jQuery(v).data("operation")=="+"){if(b.currencyPosition=="left"){w=b.currency+w}else{w+=b.currency}}else{if(jQuery(v).data("operation")=="-"){if(b.currencyPosition=="left"){w="-"+b.currency+w}else{w+="-"+b.currency}}else{if(jQuery(v).data("operation")=="/"){w="-"+w+"%"}else{w="+"+w+"%"}}}var t=jQuery(v).attr("data-originaltitle");if(jQuery(v).is("select")){t+=" ("+jQuery(v).val()+")"}if(q){f+=" - "+t+" : "+w+"
";a+=" - "+t+" : "+w+"\n"}}else{var t=jQuery(v).attr("data-originaltitle");if(jQuery(v).is("select")){t+=" : "+jQuery(v).val()+""}if(q){f+=" - "+t+"
";a+=" - "+t+"\n"}}var u=jQuery(v).attr("data-title");if(jQuery(v).is("[data-originaltitle]")&&jQuery(v).is('[data-showprice="1"]')){u=jQuery(v).attr("data-originaltitle")}if(jQuery(v).is("select")){u+=" : "+jQuery(v).val()}var r=false;if(jQuery(v).is('[data-singleprice="true"]')){r=true}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:u,itemid:jQuery(v).attr("data-itemid"),price:parseFloat(jQuery(v).data("resprice")),quantity:parseFloat(jQuery(v).slider("value")),step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q,isSinglePrice:r})}}if(l.find("select[data-itemid]").length>0){var v=l.find("select[data-itemid]").get(0);var w=parseFloat(jQuery(v).data("price"));if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(jQuery(v).data("price")){if(jQuery(v).data("operation")=="+"){if(b.currencyPosition=="left"){w=b.currency+w}else{w+=b.currency}}else{if(jQuery(v).data("operation")=="-"){if(b.currencyPosition=="left"){w="-"+b.currency+w}else{w+="-"+b.currency}}else{if(jQuery(v).data("operation")=="/"){w="-"+w+"%"}else{w="+"+w+"%"}}}var t=jQuery(v).attr("data-originaltitle");if(jQuery(v).is("select")){t+=" ("+jQuery(v).val()+")"}if(q){f+=" - "+t+" : "+w+"
";a+=" - "+t+" : "+w+"\n"}}else{var t=jQuery(v).attr("data-originaltitle");if(jQuery(v).is("select")){t+=" : "+jQuery(v).val()+""}if(q){f+=" - "+t+"
";a+=" - "+t+"\n"}}var u=jQuery(v).attr("data-title");var r=false;if(jQuery(v).is('[data-singleprice="true"]')){r=true}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:u,itemid:jQuery(v).attr("data-itemid"),price:parseFloat(jQuery(v).data("resprice")),value:jQuery(v).val(),quantity:1,step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q,isSinglePrice:r})}}if(l.find("input[type=file]").length>0){var v=l.find("input[type=file]").get(0);if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(q){f+=' - '+jQuery(v).data("originaltitle")+" : "+jQuery(v).val().replace(/ /g,"_")+"
";a+=" - "+jQuery(v).data("originaltitle")+" : "+jQuery(v).val().replace(/ /g,"_")+"\n"}if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:jQuery(v).data("title"),itemid:jQuery(v).attr("data-itemid"),value:jQuery(v).val(),step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q,isFile:true})}}if(l.find(".lfb_dropzone").length>0){var v=l.find(".lfb_dropzone").get(0);if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}var s="";var n="";jQuery(v).find(".dz-preview[data-file]").each(function(){s+=' - '+jQuery(this).attr("data-file").replace(/ /g,"_")+"
";n+=" - "+jQuery(this).attr("data-file").replace(/ /g,"_")+"\n"});if(q){f+=' - '+jQuery(v).data("originaltitle")+" : "+s+"
";a+=" - "+jQuery(v).data("originaltitle")+" : "+n+"\n\n"}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:jQuery(v).data("title"),itemid:jQuery(v).attr("data-itemid"),value:s,step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q,isFile:true})}}if(l.find("input[type=text]:not(.lfb_colorpicker)").length>0){var v=l.find("input[type=text]:not(.lfb_colorpicker)").get(0);if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(q){f+=" - "+jQuery(v).data("title")+" : "+jQuery(v).val()+"
";a+=" - "+jQuery(v).data("title")+" : "+jQuery(v).val()+" \n"}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:jQuery(v).data("title"),itemid:jQuery(v).attr("data-itemid"),value:jQuery(v).val(),step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q})}}if(l.find("input[type=number]:not(.lfb_colorpicker)").length>0){var v=l.find("input[type=number]:not(.lfb_colorpicker)").get(0);if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(q){f+=" - "+jQuery(v).data("title")+" : "+jQuery(v).val()+"
";a+=" - "+jQuery(v).data("title")+" : "+jQuery(v).val()+" \n"}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:jQuery(v).data("title"),itemid:jQuery(v).attr("data-itemid"),value:jQuery(v).val(),step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q})}}if(l.find(".lfb_colorPreview").length>0){var v=l.find(".lfb_colorPreview").get(0);if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(q){f+=" - "+jQuery(v).data("title")+" : "+jQuery(v).next(".lfb_colorpicker").val()+"
";a+=" - "+jQuery(v).data("title")+" : "+jQuery(v).next(".lfb_colorpicker").val()+" \n"}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:jQuery(v).data("title"),itemid:jQuery(v).attr("data-itemid"),value:jQuery(v).next(".lfb_colorpicker").val(),step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q})}}if(l.find("textarea").length>0){var v=l.find("textarea").get(0);if($panel.is('[data-showstepsum="0"]')||!jQuery(v).is('[data-showinsummary="true"]')){q=false}if(q){f+=" - "+jQuery(v).data("title")+" : "+jQuery(v).val()+"
";a+=" - "+jQuery(v).data("title")+" : "+jQuery(v).val()+" \n"}if(jQuery.inArray(jQuery(v).attr("data-itemid"),d)==-1){d.push(jQuery(v).attr("data-itemid"));h.push({label:jQuery(v).data("title"),itemid:jQuery(v).attr("data-itemid"),value:wpe_nl2br(jQuery(v).val()),step:$panel.attr("data-title"),stepid:parseInt($panel.attr("data-stepid")),showInSummary:q})}}})}});if(!b.price||b.price<0){b.price=0}var g=/^\d+(\.\d{2})?$/;if(!g.test(b.price)){b.price=parseFloat(b.price).toFixed(2)}if(b.currencyPosition=="left"){i+=b.currency+b.price;a+="\n\nTotal : "+b.currency+b.price}else{i+=b.price+b.currency;a+="\n\nTotal : "+b.price+b.currency}return new Array(f,i,h,a)}function wpe_check_gform_response(d){var c=wpe_getForm(d);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #gforms_confirmation_message').length>0){clearInterval(c.timer_gFormSubmit);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm').length>0&&c.price>0){var b=c.price;b=parseFloat(b)*(parseFloat(c.percentToPay)/100);b=parseFloat(b).toFixed(2);if(c.priceSingle>0){var a=parseFloat(c.priceSingle)*(parseFloat(c.percentToPay)/100);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=a1]').length==0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm').append('');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm').append('');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm').append('')}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=a1]').val(a);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=p1]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=p3]').val())}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=a1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=t1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=p1]').remove()}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=amount]').val(b);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=a3]').val(b);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=item_number]').val(c.current_ref);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=item_name]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [name=item_name]').val()+" - "+c.current_ref);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #wtmt_paypalForm [type="submit"]').trigger("click")}else{jQuery("#finalText").html(jQuery("#gform_wrapper_"+c.gravityFormID+" .gforms_confirmation_message").html());jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #finalSlide #gforms_confirmation_message').fadeIn();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #finalSlide #lfb_summary').fadeOut();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #finalSlide #lfb_couponContainer').fadeOut();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #finalSlide #lfb_legalNoticeContent').fadeOut();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c.formID+'"] #finalSlide .linkPrevious').fadeOut();wpe_finalStep(d)}}}function wpe_quantity_less(c,e){var a=jQuery(c).parent().parent().find(".icon_quantity");var b=parseFloat(jQuery(c).parent().data("min"));var d=parseInt(a.html());if(d>1&&d>b){d--;a.html(d);wpe_updatePrice(e)}}function wpe_quantity_more(c,e){var b=jQuery(c).parent().parent().find(".icon_quantity");var a=parseFloat(jQuery(c).parent().data("max"));var d=parseFloat(b.html());if(d tr > th:eq(1)').is(".lfb-hidden")){b.find("table thead > tr > th:eq(1)").remove();b.find("table tbody td.lfb_valueTd").remove()}b.find("th.sfb_summaryStep").css({fontSize:22});b.find("th.sfb_summaryStep").attr("align","center");b.find("table").attr("width","90%");b.find("table").css("width","90%");b.find("table").attr("border","1");b.find("table").attr("bordercolor",lfb_rgb2hex(b.find("table").css("border-color")));b.find("table").attr("style","width:90%;margin:0 auto;");b.find("thead td, thead th").each(function(){jQuery(this).attr("bgcolor",lfb_rgb2hex(b.find("thead").css("background-color")));jQuery(this).css("background",lfb_rgb2hex(b.find("thead").css("background-color")))});b.find("td,th").each(function(){var e=(jQuery(this).width()*100)/b.find("table").width();jQuery(this).css("width",parseInt(e)+"%")});b.find("th.sfb_summaryStep").each(function(){jQuery(this).attr("bgcolor",lfb_rgb2hex(jQuery(this).css("background-color")))});b.find("td,th").each(function(){jQuery(this).attr("color",lfb_rgb2hex(jQuery(this).css("color")));jQuery(this).html(''+jQuery(this).html()+"")});b.find("table .lfb-hidden").remove();b.find("table").attr("cellspacing","0");b.find("table").attr("cellpadding","8");b.find("table").attr("bgcolor","#FFFFFF");b.find("td,th").each(function(){jQuery(this).attr("align",jQuery(this).css("text-align"));jQuery(this).css("padding",jQuery(this).css("padding"))});b.find("thead > tr th:eq(0)").css({minWidth:500});if(a==3){b.find("td:not(:first-child)").each(function(){jQuery(this).attr("width","164")});b.find("th:not(:first-child)").each(function(){jQuery(this).attr("width","164")});b.find("tr>td:first-child").each(function(){jQuery(this).attr("width","340")});b.find("tr>th:first-child").each(function(){jQuery(this).attr("width","340")})}else{b.find("td:not(:first-child)").each(function(){jQuery(this).attr("width","103")});b.find("th:not(:first-child)").each(function(){jQuery(this).attr("width","103")});b.find("tr>td:first-child").each(function(){jQuery(this).attr("width","332")});b.find("tr>th:first-child").each(function(){jQuery(this).attr("width","332")})}b.find("*").each(function(){var e=lfb_rgb2hex(jQuery(this).css("color"));jQuery(this).css({color:""});jQuery(this).attr("style",jQuery(this).attr("style")+";color:"+e);if(jQuery(this).attr("style").length>0){jQuery(this).attr("style",jQuery(this).attr("style")+";color:"+e)}else{jQuery(this).attr("style","color:"+e)}});b.find(".lfb_file").each(function(){jQuery(this).removeAttr("style");jQuery(this).removeAttr("data-tldinit")});b.html('
'+b.html()+"
");return b}function wpe_getContactInformations(d){var g=new Array();g.email="";g.phone="";g.firstName="";g.lastName="";g.address="";g.city="";g.state="";g.zip="";g.country="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="email"]').each(function(){if(jQuery(this).val().length>0&&wpe_checkEmail(jQuery(this).val())){g.email=jQuery(this).val()}});var f="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="phone"]').each(function(){if(jQuery(this).val().length>3){g.phone=jQuery(this).val()}});var i="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="firstName"]').each(function(){if(jQuery(this).val().length>0){g.firstName=jQuery(this).val()}});var j="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="lastName"]').each(function(){if(jQuery(this).val().length>0){g.lastName=jQuery(this).val()}});var h="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="address"]').each(function(){if(jQuery(this).val().length>0){g.address=jQuery(this).val()}});var e="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="city"]').each(function(){if(jQuery(this).val().length>0){g.city=jQuery(this).val()}});var a="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="state"]').each(function(){if(jQuery(this).val().length>0){g.state=jQuery(this).val()}});var b="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="zip"]').each(function(){if(jQuery(this).val().length>0){g.zip=jQuery(this).val()}});var c="";jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-fieldtype="country"]').each(function(){if(jQuery(this).val().length>0){g.country=jQuery(this).val()}});return g}function wpe_orderSend(l,c,m,k){var b=wpe_getForm(l);var p=wpe_getFormContent(l);var o=p[0];o=o.replace(//g,"[n]");var r=p[1];var h=p[2];if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"]').is("[data-subs]")){r+=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"]').attr("data-subs")}var d=0;var e=true;if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"] [data-activatePaypal="true"]:not(:checked)').length>0){e=false}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"] #wtmt_paypalForm').is('[data-useipn="1"]')){d=1}var i=wpe_cloneSummary(false,l);var s=i.html();i.remove();var n=wpe_getContactInformations(l);m=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"] .emailField').val();if(wpe_checkEmail(n.email)){m=n.email}var v=parseFloat(b.price);var j=0;var t="";var q=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-formtitle");if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').is('[data-isSubs="true"]')){v=parseFloat(b.priceSingle);j=parseFloat(b.price);t=b.subscriptionText}var u="";if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] [name="stripeToken"]').length>0&&e){u=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] [name="stripeToken"]').val()}var g="";if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] [name="stripeTokenB"]').length>0&&e){g=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] [name="stripeTokenB"]').val()}var a=new Array();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide input[type=text],#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide input[type=email], #estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide textarea').each(function(){if(jQuery(this).closest("#lfb_stripeForm").length==0&&jQuery(this).closest("#wtmt_paypalForm").length==0){a.push({fieldID:jQuery(this).prop("id").substr(6,9),value:wpe_nl2br(jQuery(this).val())})}});var e=1;if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"] [data-activatePaypal="true"]:not(:checked)').length>0){e=0}var f="";if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_captcha').length>0){f=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_captchaField').val()}jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"send_email",formID:b.formID,informations:c,email:m,lastName:n.lastName,firstName:n.firstName,phone:n.phone,country:n.country,zip:n.zip,state:n.state,city:n.city,address:n.address,summary:s,stripeToken:u,stripeTokenB:g,totalTxt:r,email_toUser:b.email_toUser,usePaypalIpn:d,discountCode:b.discountCode,formSession:jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_formSession').val(),total:v,totalSub:j,subFrequency:t,formTitle:q,contactSent:b.contactSent,contentTxt:o,items:h,fieldsLast:a,activatePaypal:e,captcha:f,useRtl:jQuery("body").is(".rtl")},success:function(z){i.remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+l+'"] #lfb_loader').delay(400).fadeOut();if(e&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').length>0&&(b.price>0||b.priceSingle>0)){var x=b.price;x=parseFloat(x)*(parseFloat(b.percentToPay)/100);x=parseFloat(x).toFixed(2);if(b.priceSingle>0){var w=parseFloat(b.priceSingle)*(parseFloat(b.percentToPay)/100);w=parseFloat(w).toFixed(2);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=a1]').length==0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').append('');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').append('');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').append('')}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=a1]').val(w);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=p1]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=p3]').val());if(x<=0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=cmd]').val("_xclick");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=a3]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=t3]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=p3]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=bn]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=no_note]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=src]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=a1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=t1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=p1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm').append('')}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=a1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=t1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=p1]').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=amount]').val(x)}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=return]').val(lfb_getRedirectionURL(l));jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=a3]').val(x);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=custom]').val(z);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=item_number]').val(z);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=item_name]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [name=item_name]').val()+" - "+z);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #wtmt_paypalForm [type="submit"]').trigger("click")}else{if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').length>0&&b.price>0){var x=b.price;x=parseFloat(x)*(parseFloat(b.percentToPay)/100);x=x.toFixed(2);x=x.replace(".","");if(e){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').show()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').hide()}wpe_finalStep(l)}else{if(!b.save_to_cart&&!b.save_to_cart_edd){wpe_finalStep(l)}}}if(b.save_to_cart_edd){var y=new Array();jQuery.each(lfb_lastSteps,function(){$panel=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+l+'"] #mainPanel .genSlide[data-stepid="'+this+'"]');$panel.find('div.selectable.checked:not(.lfb_disabled),input[type=checkbox]:checked:not(.lfb_disabled),[data-type="slider"]:not(.lfb_disabled)').each(function(){var A=1;if(parseInt(jQuery(this).data("resqt"))>0){A=parseInt(jQuery(this).data("resqt"))}if(jQuery(this).is('[data-type="slider"]')){A=parseInt(jQuery(this).slider("value"));if(!isNaN(parseInt(jQuery(this).find(".tooltip-inner").html()))){A=parseInt(jQuery(this).find(".tooltip-inner").html())}}if(parseInt(jQuery(this).data("prodid"))>0){y.push({quantity:A,product_id:parseInt(jQuery(this).data("prodid")),variation:parseInt(jQuery(this).data("eddvar"))})}})});jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"lfb_cartdd_save",products:y},success:function(){wpe_finalStep(l)}})}if(b.save_to_cart){var y=new Array();jQuery.each(lfb_lastSteps,function(){$panel=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+l+'"] #mainPanel .genSlide[data-stepid="'+this+'"]');$panel.find('div.selectable.checked:not(.lfb_disabled),input[type=checkbox]:checked:not(.lfb_disabled),[data-type="slider"]:not(.lfb_disabled)').each(function(){var A=1;if(parseInt(jQuery(this).data("resqt"))>0){A=parseInt(jQuery(this).data("resqt"))}if(jQuery(this).is('[data-type="slider"]')){A=parseInt(jQuery(this).slider("value"));if(!isNaN(parseInt(jQuery(this).find(".tooltip-inner").html()))){A=parseInt(jQuery(this).find(".tooltip-inner").html())}}if(parseInt(jQuery(this).data("prodid"))>0){y.push({quantity:A,product_id:parseInt(jQuery(this).data("prodid")),variation:parseInt(jQuery(this).attr("data-woovar"))})}})});jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"lfb_cart_save",ref:z,products:y},success:function(){wpe_finalStep(l)}})}}})}function lfb_checkLastStepFields(c){var b=wpe_getForm(c);var a=true;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide input[type=text],#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide input[type=email], #estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #finalSlide textarea').each(function(){if(jQuery(this).closest("#lfb_stripeForm").length==0&&jQuery(this).closest("#wtmt_paypalForm").length==0){if(jQuery(this).is(".lfb_disabled")){}else{if(jQuery(this).attr("data-required")&&jQuery(this).attr("data-required")=="true"&&jQuery(this).val().length<1){a=false;jQuery(this).closest(".form-group").addClass("has-error");if(!jQuery(this).is("#lfb_captchaField")){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').is(".wpe_fullscreen")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').animate({scrollTop:jQuery(this).parent().offset().top-(80+parseInt(b.scrollTopMargin))},b.animationsSpeed*2)}else{if(b.scrollTopPage=="1"){jQuery("body,html").animate({scrollTop:0},b.animationsSpeed*2)}else{jQuery("body,html").animate({scrollTop:jQuery(this).parent().offset().top-(80+parseInt(b.scrollTopMargin))},b.animationsSpeed*2)}}}}if(jQuery(this).is(".emailField")&&!wpe_checkEmail(jQuery(this).val())){a=false;jQuery(this).closest(".form-group").addClass("has-error");if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').is(".wpe_fullscreen")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').animate({scrollTop:jQuery(this).parent().offset().top-(80+parseInt(b.scrollTopMargin))},b.animationsSpeed*2)}else{if(b.scrollTopPage=="1"){jQuery("body,html").animate({scrollTop:0},b.animationsSpeed*2)}else{jQuery("body,html").animate({scrollTop:jQuery(this).parent().offset().top-(80+parseInt(b.scrollTopMargin))},b.animationsSpeed*2)}}}}}});return a}function wpe_order(f){var e=wpe_getForm(f);var b=true;var d="";var c="";var a=new Array();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #finalSlide .form-group').removeClass("has-error");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #finalSlide').find('.lfb_item input:not([type="checkbox"]),.lfb_item textarea,.lfb_item select').each(function(){if(jQuery(this).closest("#lfb_stripeForm").length==0&&jQuery(this).closest("#wtmt_paypalForm").length==0){if(jQuery(this).is(".lfb_disabled")){}else{if(jQuery(this).is("#lfb_couponField")){}else{if(jQuery(this).is("#lfb_captchaField")){}else{var g=":";if(jQuery(this).closest(".lfb_item").find("label").html().lastIndexOf(":")==jQuery(this).closest(".lfb_item").find("label").html().length-1){g=""}if(jQuery("body").is(".rtl")){d+="

"+jQuery(this).val()+""+g+" "+jQuery(this).closest(".lfb_item").find("label").html()+"

"}else{d+="

"+jQuery(this).closest(".lfb_item").find("label").html()+" "+g+" "+jQuery(this).val()+"

"}}}}}});b=lfb_checkStepItemsValid("final",f);if(e.legalNoticeEnable==1){if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_legalCheckbox').is(":checked")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_legalCheckbox').closest(".form-group").addClass("has-error");b=false}}if(b==true){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_captcha').length>0){jQuery.ajax({url:e.ajaxurl,type:"post",data:{action:"lfb_checkCaptcha",formID:f,captcha:jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_captchaField').val()},success:function(g){if(g=="1"){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #finalSlide').find("#wpe_btnOrder,.linkPrevious").fadeOut(250);wpe_uploadFiles(f,d,c,a)}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_captchaField').closest(".form-group").addClass("has-error")}}})}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #finalSlide').find("#wpe_btnOrder,.linkPrevious").fadeOut(250);wpe_uploadFiles(f,d,c,a)}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #lfb_stripeForm .btn').prop("disabled",false)}}function wpe_previousStep(g){var e=wpe_getForm(g);var b=navigator.userAgent.toLowerCase();var f=b.match(/(iPad|iPhone|iPod)/i);if(f){jQuery("#estimation_popup :not(.ui-slider-handle) > .tooltip").remove();jQuery("body > .tooltip").remove();jQuery('#estimation_popup[data-form="'+e.formID+'"] > .tooltip').remove()}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] .errorMsg').hide();jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-stepid="'+e.step+'"]').find("div.selectable.checked:not(.prechecked)").each(function(){wpe_itemClick(jQuery(this),false,g)});jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-stepid="'+e.step+'"]').find('input[data-toggle="switch"]:checked:not(.prechecked)').each(function(){jQuery(this).trigger("click.auto")});var a=false;var d=0;var c=0;jQuery.each(lfb_lastSteps,function(h){var j=this;if(parseInt(j)==parseInt(e.step)){a=true}if(!a){if((jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-stepid="'+j+'"] .lfb_item:not(.lfb-hidden)').length>0||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-stepid="'+j+'"] .lfb_distanceError').length>0)&&!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-stepid="'+j+'"]').is(".lfb_disabled")){d=j;c=h}}});lfb_lastSteps=jQuery.grep(lfb_lastSteps,function(j,h){if(h<=c){return(j)}});wpe_changeStep(d,g)}function wpe_uploadFiles(e,c,b,a){var d=wpe_getForm(e);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').is(".wpe_fullscreen")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').css("overflow-y","hidden");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').animate({scrollTop:0},d.animationsSpeed*2)}else{if(d.scrollTopPage=="1"){jQuery("body,html").animate({scrollTop:0},d.animationsSpeed*2)}else{jQuery("body,html").animate({scrollTop:jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').offset().top-(80+parseInt(d.scrollTopMargin))},d.animationsSpeed*2)}}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_loader').fadeIn(d.animationsSpeed*2);setTimeout(function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel').fadeOut(d.animationsSpeed*2);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #startInfos').fadeOut(d.animationsSpeed*2);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #genPrice').fadeOut(d.animationsSpeed*2);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel .genSlide').fadeOut(d.animationsSpeed*2);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel .btn-next').fadeOut(d.animationsSpeed);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel .lfb_btnNextContainer').fadeOut(d.animationsSpeed);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #finalText').css({opacity:0,display:"block"});setTimeout(function(){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').is(".wpe_fullscreen")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').animate({scrollTop:0},d.animationsSpeed*2)}else{if(d.scrollTopPage=="1"){jQuery("body,html").animate({scrollTop:0},d.animationsSpeed*2)}else{jQuery("body,html").animate({scrollTop:jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').offset().top-(80+parseInt(d.scrollTopMargin))},d.animationsSpeed*2)}}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #finalText').animate({opacity:1},d.animationsSpeed*2)},d.animationsSpeed*4+50)},d.animationsSpeed*2+50);wpe_orderSend(e,c,b,a)}function wpe_isAnyParentFixed(a,b){if(!b){var b=false}try{if(a.parent().length>0&&a.parent().css("position")=="fixed"){b=true}}catch(c){}if(!b&&a.parent().length>0){b=wpe_isAnyParentFixed(a.parent(),b)}return b}function wpe_is_touch_device(){return(("ontouchstart" in window)||(navigator.MaxTouchPoints>0)||(navigator.msMaxTouchPoints>0))}function wpe_updateSummary(e){var b=wpe_getForm(e);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary').length>0){var p=wpe_getFormContent(e);var k=p[2];var d=-1;var o=false;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr:not(.lfb_static)').remove();var f="";if(b.summary_hidePrices==1){f="lfb-hidden lfb_hidePrice"}jQuery.each(k,function(){var r=this;if(r.label!=undefined&&r.label!=""&&r.label!="undefined"){if(isNaN(r.stepid)){r.stepid="final"}if(r.stepid!="final"||b.summary_hideFinalStep!="1"){if(r.stepid!=d){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before(''+r.step+"")}d=r.stepid;if(isNaN(r.quantity)){r.quantity=1}if(isNaN(r.price)){r.price=0}var s=r.value;if(r.value===undefined){s=""}if(s!=""){o=true}var t=r.price;var w=r.quantity;if(s!=""&&t==0&&w==1){w="";t=""}else{var q=false;if(parseFloat(t)<0){q=true;t*=-1}if(b.currencyPosition=="left"){t=b.currency+""+wpe_formatPrice(parseFloat(t).toFixed(2),e)}else{t=wpe_formatPrice(parseFloat(t).toFixed(2),e)+""+b.currency}if(q){t="- "+t}}var v="";if(r.isFile){}var x="";if(b.summary_hideQt==1){x="lfb-hidden"}if(b.summary_hideZero==1&&r.price==0){t=""}var u="";if(!r.showInSummary){u="lfb-hidden"}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] [data-itemid="'+r.itemid+'"]').is('[data-hideqtsum="true"]')){w=""}if(b.priceSingle>0&&!r.isSinglePrice&&(t!=""||t>0)){t+=" "+b.subscriptionText}if(b.price<=0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary .lfb_subTxt').addClass("lfb-hidden")}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary .lfb_subTxt').removeClass("lfb-hidden")}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before(''+r.label+''+s+''+w+''+t+"")}}});if(b.reductionResult>0){var m=parseFloat(b.reductionResult).toFixed(2)+b.currency;if(b.currencyPosition=="left"){m=b.currency+parseFloat(b.reductionResult).toFixed(2)}m="-"+m;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary #lfb_summaryDiscount>span').html(m);if(!b.discountCodeDisplayed){var i=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html();if(i.indexOf("")<0){if(i.substr(i.length-1,1)==":"){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(i.substr(0,i.length-1)+" ("+b.discountCode+") :")}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(i+" ("+b.discountCode+")")}}}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary #lfb_summaryDiscountTr').slideDown()}if(!b.price||b.price<0){b.price=0}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tr th.sfb_summaryStep').each(function(){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tr[data-itemstep="'+jQuery(this).attr("data-step")+'"]:not(.lfb-hidden)').length==0){jQuery(this).parent().addClass("lfb-hidden")}});var n=b.currency+""+wpe_formatPrice(parseFloat(b.price).toFixed(2),e);var h=b.currency+""+wpe_formatPrice(parseFloat(b.priceSingle).toFixed(2),e);if(b.currencyPosition!="left"){n=wpe_formatPrice(parseFloat(b.price).toFixed(2),e)+""+b.currency;h=wpe_formatPrice(parseFloat(b.priceSingle).toFixed(2),e)+""+b.currency}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(n);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').is("[data-totalrange]")&&parseFloat(b.price)>0){var l=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-rangelabelbetween");var j=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-rangelabeland");var g=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-totalrange"));var a=(parseFloat(b.price)-g/2);if(a<0){a=0}formatedPrice=l+""+b.currency+""+wpe_formatPrice(a,e)+""+j+""+b.currency+""+wpe_formatPrice(parseFloat(b.price)+g/2,e)+"";if(b.currencyPosition!="left"){var g=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"]').attr("data-totalrange"));formatedPrice=l+""+wpe_formatPrice(a,e)+b.currency+""+j+""+wpe_formatPrice(parseFloat(b.price)+g/2,e)+b.currency+""}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(formatedPrice)}var c=4;if(b.summary_hideQt==1){c-=1}if(b.summary_hidePrices==1){c-=1}if(!o){c-=1;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table td.lfb_valueTd').hide();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table thead th:eq(1)').hide().addClass("lfb-hidden");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr#sfb_summaryTotalTr th[colspan]').attr("colspan",c-1);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr#lfb_summaryDiscountTr th[colspan]').attr("colspan",c-1);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr th.sfb_summaryStep').attr("colspan",c)}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table thead th:eq(1)').show().removeClass("lfb-hidden");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr:eq(1)').show();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody td.lfb_valueTd').show();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr#sfb_summaryTotalTr th[colspan]').attr("colspan",c-1);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr#lfb_summaryDiscountTr th[colspan]').attr("colspan",c-1);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] #lfb_summary table tbody tr th.sfb_summaryStep').attr("colspan",c)}}}function wpe_changeStep(o,f){var b=wpe_getForm(f);jQuery("#estimation_popup :not(.ui-slider-handle) > .tooltip").remove();jQuery("body > .tooltip").remove();jQuery('#estimation_popup[data-form="'+b.formID+'"] > .tooltip').remove();if(b.intro_enabled>0||b.step>0){var h=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #genPrice').offset().top-100;if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"]').is(".wpe_fullscreen")){h=0;if(b.intro_enabled>0){h=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #startInfos').height()+100}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"]').animate({scrollTop:h},250)}else{if(jQuery("header").length>0&&wpe_isAnyParentFixed(jQuery("header"))){h-=jQuery("header").height()}h-=(48+parseInt(b.scrollTopMargin));if(b.scrollTopPage=="1"){jQuery("body,html").animate({scrollTop:0},b.animationsSpeed*2)}else{jQuery("body,html").animate({scrollTop:h},250)}}}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] .quantityBtns').removeClass("open");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] .quantityBtns').fadeOut(b.animationsSpeed/4);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide').fadeOut(b.animationsSpeed*2);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .btn-next').fadeOut(b.animationsSpeed/2);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .lfb_btnNextContainer').fadeOut(b.animationsSpeed/2);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .linkPrevious').fadeOut(b.animationsSpeed/2);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .lfb_distanceError').fadeOut(b.animationsSpeed/2);if(o=="final"){wpe_updateSummary(f);var p=true;if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] [data-activatePaypal="true"]:not(:checked)').length>0){p=false}if(p){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').find(".form-group,.payment-errors").show()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b.formID+'"] #lfb_stripeForm').find(".form-group,.payment-errors").hide()}}var m=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').find("h2.stepTitle");var d=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').find("p.lfb_stepDescription");var a=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').find(".genContent");var n=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').find(".lfb_totalBottomContainer");a.find(".genContentSlide").removeClass("active");a.find(".genContentSlide").eq(0).addClass("active");a.animate({opacity:0},b.animationsSpeed);d.animate({opacity:0},b.animationsSpeed);m.removeClass("positioned");m.css({"-webkit-transition":"none",transition:"none"});n.animate({opacity:0},b.animationsSpeed);if(typeof ga!=="undefined"){try{ga("set","page",location.pathname+"#"+encodeURIComponent(m.html()).replace(/%20/g,"+"));ga("send","pageview")}catch(k){}}jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').css("opacity",0).show();var i=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] h2.stepTitle').height();var c=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').outerHeight()+160+i;jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').hide().css("opacity",1);var l=b.animationsSpeed*4.5;if(b.step==1){wpe_initPanelResize(f);l=b.animationsSpeed*2.5;jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').fadeIn(b.animationsSpeed*2)}else{jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').delay(b.animationsSpeed*2).fadeIn(b.animationsSpeed*2)}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #finalSlide .estimation_project').length>0){var g=wpe_getFormContent(f);var j=g[3];jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #finalSlide .estimation_project textarea').val(j);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #finalSlide .estimation_total input').val(b.price)}setTimeout(function(){jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel').css("min-height",c);m.css({"-webkit-transition":"all 0.3s ease-out",transition:"all 0.3s ease-out"}).addClass("positioned");a.css({paddingTop:d.height()+m.height()+70});a.delay(b.animationsSpeed*2).animate({opacity:1},b.animationsSpeed);d.delay(b.animationsSpeed).animate({opacity:1,top:m.height()+60},b.animationsSpeed);n.delay(b.animationsSpeed*2).animate({opacity:1},b.animationsSpeed);if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').is(".lfb_disabledBtn")){jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').css("display","inline-block").hide();setTimeout(function(){if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').is(".lfb_disabledBtn")){jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').fadeIn(500);setTimeout(function(){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').is(".lfb_disabledBtn")){jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').hide()}},550)}},b.animationsSpeed*2)}else{jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .btn-next').hide()}jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .lfb_btnNextContainer').fadeIn(500);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .linkPrevious').delay(b.animationsSpeed*3).fadeIn(500);jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"] .lfb_distanceError').delay(b.animationsSpeed*3).fadeIn(500);if(b.disableTipMobile==0||!wpe_is_touch_device()){var e=navigator.userAgent.toLowerCase();var q=e.match(/(iPad|iPhone|iPod)/i);if(q){a.delay(750).find('[data-toggle="tooltip"]').b_tooltip({html:true,container:"#estimation_popup",trigger:"manual"})}else{a.delay(750).find('[data-toggle="tooltip"]').b_tooltip({html:true,container:"#estimation_popup"})}a.on("enter",function(){if(this.options.trigger=="hover"&&"ontouchstart" in document.documentElement){return}})}setTimeout(function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide.lfb_activeStep').removeClass("lfb_activeStep");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').addClass("lfb_activeStep");a.find(".wpe_itemQtField").each(function(){if(jQuery(this).parent().next().is(".itemDes")){jQuery(this).css({marginTop:20+jQuery(this).parent().next().outerHeight()})}});b.step=o;setTimeout(function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f+'"] #mainPanel .genSlide[data-stepid="'+o+'"]').find('[data-usedistance="true"]').each(function(){lfb_removeDistanceError(jQuery(this).attr("data-itemid"),f)},100);jQuery("#estimation_popup :not(.ui-slider-handle) > .tooltip").remove();jQuery("body > .tooltip").remove();jQuery('#estimation_popup[data-form="'+f+'"] > .tooltip').remove();setTimeout(function(){jQuery(window).trigger("resize");lfb_resize(f)},100)},(b.animationsSpeed*2)+550);wpe_updatePrice(f);if(b.backFomFinal){b.backFomFinal=false}},300)},l);jQuery("#estimation_popup :not(.ui-slider-handle) > .tooltip").remove();jQuery("body > .tooltip").remove();jQuery('#estimation_popup[data-form="'+f+'"] > .tooltip').remove();wpe_updatePrice(f)}function wpe_findPotentialsSteps(e,g){var c=wpe_getForm(g);var b=new Array();var a=new Array();var d=new Array();var f=0;jQuery.each(c.links,function(){var j=this;if(j.originID==e){var i=false;var h=true;if(j.conditions&&j.conditions!="[]"){j.conditionsO=JSON.parse(j.conditions);var k=lfb_checkConditions(j.conditionsO,g);i=k.error;h=k.errorOR}else{d.push(j.destinationID);h=false}if((j.operator=="OR"&&!h)||(j.operator!="OR"&&!i)){j.conditionsO=JSON.parse(j.conditions);a.push({stepID:parseInt(j.destinationID),nbConditions:j.conditionsO.length});if(j.conditionsO.length>f){f=j.conditionsO.length}b.push(parseInt(j.destinationID))}}});if(e==0){b.push(parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-start="1"]').attr("data-stepid")))}if(b.length==0){b.push("final")}else{if(d.length>0&&d.length0){jQuery.each(b,function(h){jQuery.each(a,function(i){if(i.stepID==h&&i.nbConditions-1){if(i.value.substr(0,1)!="_"){var l=i.value.substr(0,i.value.indexOf("_"));var g=i.value.substr(i.value.indexOf("-")+1,i.value.length);if(l==0){l="final"}var o=i.value.substr(i.value.indexOf("_")+1,i.value.indexOf("-")-(i.value.indexOf("_")+1));var j=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+l+'"] .genContent [data-itemid="'+o+'"]');if(j.length>0){if(g==""){i.value=parseFloat(j.data("resprice"))}else{if(g=="quantity"){if(j.find(".wpe_qtfield").length>0){i.value=parseInt(j.find(".wpe_qtfield").val())}else{i.value=parseInt(j.find(".icon_quantity").html())}}else{if(g=="value"){i.value=j.val();i.value=i.value.replace(/\`/g,"'")}}}}}else{if(i.value=="_total"){i.value=form.price}else{if(i.value=="_total_qt"){i.value=wpe_getTotalQuantities(c)}}}}else{if(i.value){i.value=i.value.replace(/\`/g,"'")}}switch(i.action){case"clicked":if(p.is('[type="checkbox"]')){if(!p.is(":checked")){b=true}if(p.is(":checked")){a=false}}else{if(!p.is(".checked")&&!p.is(":checked")){b=true}if(p.is(".checked")||p.is(":checked")){a=false}}break;case"unclicked":if(p.is(':not([type="checkbox"]).checked')||p.is(":checked")){b=true}if(!p.is(':not([type="checkbox"]).checked')&&!p.is(":checked")){a=false}break;case"filled":if(p.is(".lfb_dropzone")){if(p.find(".dz-preview[data-file].dz-success.dz-complete").length==0){b=true}else{a=false}}else{if(p.val().length==0){b=true}else{a=false}}break;case"equal":if(p.val()!=i.value){b=true}else{a=false}break;case"different":if(p.val()==i.value){b=true}else{a=false}break;case"PriceSuperior":var k=parseFloat(p.data("resprice"));if(p.is(".selectable:not(.checked)")||p.is("input[type=checkbox]:not(:checked)")||k<=i.value){b=true}if((p.is(".checked")||p.is(":checked"))&&k>i.value){a=false}break;case"PriceInferior":var k=parseFloat(p.data("resprice"));if(p.is(".selectable:not(.checked)")||p.is("input[type=checkbox]:not(:checked)")||k>=i.value){b=true}if((p.is(".checked")||p.is(":checked"))&&k0&&parseInt(p.find(".icon_quantity").html())<=i.value)||(p.find(".wpe_qtfield").length>0&&parseInt(p.find(".wpe_qtfield").val())<=i.value)||(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))<=i.value)){b=true}if(p.is(".selectable")){if(p.is(".selectable.checked")&&(parseInt(p.find(".icon_quantity").html())>i.value)||(parseInt(p.find(".wpe_qtfield").val())>i.value)){a=false}}else{if(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))>i.value){a=false}}if(p.is("input")){if(parseInt(p.val())<=i.value){b=true}if(parseInt(p.val())>i.value){a=false}}break;case"QtInferior":if(p.is(".selectable:not(.checked)")||(p.find(".icon_quantity").length>0&&parseInt(p.find(".icon_quantity").html())>=i.value)||(p.find(".wpe_qtfield").length>0&&parseInt(p.find(".wpe_qtfield").val())>=i.value)||(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))>=i.value)){b=true}if(p.is(".selectable")){if(p.is(".selectable.checked")&&(parseInt(p.find(".icon_quantity").html())=i.value){b=true}if(parseInt(p.val())0&&parseInt(p.find(".icon_quantity").html())!=i.value)||(p.find(".wpe_qtfield").length>0&&parseInt(p.find(".wpe_qtfield").val())!=i.value)||(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))!=i.value)){b=true}if(p.is(".selectable")){if(p.is(".selectable.checked")&&(parseInt(p.find(".icon_quantity").html())==i.value)||(parseInt(p.find(".wpe_qtfield").val())==i.value)){a=false}}else{if(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))==i.value){a=false}}if(p.is("input")){if(parseInt(p.val())!=i.value){b=true}if(parseInt(p.val())==i.value){a=false}}break;case"QtDifferent":if(p.is(".selectable:not(.checked)")||(p.find(".icon_quantity").length>0&&parseInt(p.find(".icon_quantity").html())==i.value)||(p.find(".wpe_qtfield").length>0&&parseInt(p.find(".wpe_qtfield").val())==i.value)||(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))==i.value)){b=true}if(p.is(".selectable")){if(p.is(".selectable.checked")&&(parseInt(p.find(".icon_quantity").html())!=i.value)||(parseInt(p.find(".wpe_qtfield").val())!=i.value)){a=false}}else{if(p.is('[data-type="slider"]')&&p.is(".ui-slider")&&parseInt(p.slider("value"))!=i.value){a=false}}if(p.is("input")){if(parseInt(p.val())==i.value){b=true}if(parseInt(p.val())!=i.value){a=false}}break;case"superior":if(p.is(".lfb_datepicker")){if(jQuery.datepicker.formatDate("yy-mm-dd",p.datepicker("getDate"))<=i.value){b=true}if(jQuery.datepicker.formatDate("yy-mm-dd",p.datepicker("getDate"))>i.value){a=false}}else{if(p.is(".lfb_timepicker")){var r=parseInt(i.value.substr(0,i.value.indexOf(":")));var m=parseInt(i.value.substr(i.value.indexOf(":")+1,2));if(i.value.indexOf("PM")>0&&r!=12){r+=12}var h=parseInt(p.val().substr(0,p.val().indexOf(":")));var e=parseInt(p.val().substr(p.val().indexOf(":")+1,2));if(p.val().indexOf("PM")>0&&h!=12){h+=12}if(hr||(h==r&&e>m)){a=false}}else{if(p.is('input[type="number"]')){if(parseFloat(p.val())<=parseFloat(i.value)){b=true}if(parseFloat(p.val())>parseFloat(i.value)){a=false}}}}break;case"inferior":if(p.is(".lfb_datepicker")){if(jQuery.datepicker.formatDate("yy-mm-dd",p.datepicker("getDate"))>=i.value){b=true}if(jQuery.datepicker.formatDate("yy-mm-dd",p.datepicker("getDate"))0&&r!=12){r+=12}var h=parseInt(p.val().substr(0,p.val().indexOf(":")));var e=parseInt(p.val().substr(p.val().indexOf(":")+1,2));if(p.val().indexOf("PM")>0&&h!=12){h+=12}if(h>r||(h==r&&e>=m)){b=true}if(h=parseFloat(i.value)){b=true}if(parseFloat(p.val())0&&r!=12){r+=12}var h=parseInt(p.val().substr(0,p.val().indexOf(":")));var e=parseInt(p.val().substr(p.val().indexOf(":")+1,2));if(p.val().indexOf("PM")>0&&h!=12){h+=12}if(h!=r){b=true}if(h==r){a=false}}else{if(p.is('input[type="number"]')){if(parseFloat(p.val())!=parseFloat(i.value)){b=true}if(parseFloat(p.val())==parseFloat(i.value)){a=false}}}}break;case"different":if(p.is(".lfb_datepicker")){if(jQuery.datepicker.formatDate("yy-mm-dd",p.datepicker("getDate"))==i.value){b=true}if(jQuery.datepicker.formatDate("yy-mm-dd",p.datepicker("getDate"))!=i.value){a=false}}else{if(p.is(".lfb_timepicker")){var r=parseInt(i.value.substr(0,i.value.indexOf(":")));var m=parseInt(i.value.substr(i.value.indexOf(":")+1,2));if(i.value.indexOf("PM")>0&&r!=12){r+=12}var h=parseInt(p.val().substr(0,p.val().indexOf(":")));var e=parseInt(p.val().substr(p.val().indexOf(":")+1,2));if(p.val().indexOf("PM")>0&&h!=12){h+=12}if(h==r){b=true}if(h!=r){a=false}}else{if(p.is('input[type="number"]')){if(parseFloat(p.val())==parseFloat(i.value)){b=true}if(parseFloat(p.val())!=parseFloat(i.value)){a=false}}}}break}}}else{if(i.interaction=="_total"){switch(i.action){case"superior":if(parseFloat(form.price)<=parseFloat(i.value)){b=true}if(parseFloat(form.price)>parseFloat(i.value)){a=false}break;case"inferior":if(parseFloat(form.price)>=parseFloat(i.value)){b=true}if(parseFloat(form.price)i.value){a=false}break;case"inferior":if(q>=i.value){b=true}if(form.price0&&(jQuery(this).val().length<5||/^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d?)\)?)?[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$/i.test(jQuery(this).val())==false)){a=false;jQuery(this).closest(".form-group").addClass("has-error");lfb_scrollToItem(jQuery(this),c,b)}else{if(jQuery(this).is('[data-validation="email"]')&&jQuery(this).val().length>0&&!wpe_checkEmail(jQuery(this).val())){a=false;jQuery(this).closest(".form-group").addClass("has-error");lfb_scrollToItem(jQuery(this),c,b)}else{if(jQuery(this).is('[data-validation="fill"]')&&jQuery(this).val().length==0){a=false;jQuery(this).closest(".form-group").addClass("has-error");lfb_scrollToItem(jQuery(this),c,b)}else{if(jQuery(this).is('[data-validation="custom"]')&&jQuery(this).val().length>0){var d=false;if(parseInt(jQuery(this).attr("data-validmin"))>0&&jQuery(this).val().length0&&jQuery(this).val().length>parseInt(jQuery(this).attr("data-validmax"))){d=true}if(jQuery(this).attr("data-validcar")!=""){var f=jQuery(this);if(jQuery(this).attr("data-validcar").indexOf(",")>-1){var e=jQuery(this).attr("data-validcar").split(",");jQuery.each(e,function(){if(f.val().indexOf(this)==-1){d=true}})}else{if(f.val().indexOf(jQuery(this).attr("data-validcar"))==-1){d=true}}}if(d){a=false;jQuery(this).closest(".form-group").addClass("has-error");lfb_scrollToItem(jQuery(this),c,b)}}}}}}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel .genSlide[data-stepid="'+c+'"]').find("input[type=text][minlength]:not(.lfb_disabled)").each(function(){if(jQuery(this).val().length .tooltip").remove();jQuery('#estimation_popup[data-form="'+b.formID+'"] > .tooltip').remove();var f=navigator.userAgent.toLowerCase();var i=f.match(/(iPad|iPhone|iPod)/i);if(i){setTimeout(function(){jQuery("#lfb_bootstraped :not(.ui-slider-handle) > .tooltip").remove()},500)}lfb_updateShowSteps(c);jQuery(".errorMsg").hide();var e=true;var k=true;var h=0;var a=wpe_findPotentialsSteps(b.step,c);if(b.step>0){if(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').data("required")==true){e=false;if((jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find('select:not(.lfb_disabled):not([data-firstvaluedisabled="true"])').length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find("div.selectable.checked:not(.lfb_disabled)").length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find('input[data-toggle="switch"]:checked:not(.lfb_disabled)').length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find("input[type=text][data-title].checked:not(.lfb_disabled)").length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find("input[type=number][data-itemid].checked:not(.lfb_disabled)").length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find("input[type=file].checked:not(.lfb_disabled)").length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find(".lfb_colorPreview:not(.lfb_disabled)").length>0)||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find(".dz-preview[data-file].dz-success.dz-complete").length>0)){e=true}if(!e){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"]').find('select:not(.lfb_disabled)[data-firstvaluedisabled="true"]').each(function(){if(((!jQuery(this).is(".lfb_selectpicker")&&jQuery(this).find("option:selected").index()>0)||((jQuery(this).is(".lfb_selectpicker")&&jQuery(this).find("option:selected").index()>1)))){e=true}})}}k=lfb_checkStepItemsValid(b.step,c)}if(e&&k){lfb_lastStepID=b.step;if((parseFloat(lfb_lastStepID)==parseInt(lfb_lastStepID))&&!isNaN(lfb_lastStepID)){if(jQuery.inArray(parseInt(b.step),lfb_lastSteps)==-1){lfb_lastSteps.push(parseInt(b.step))}}var j=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+lfb_lastStepID+'"] .stepTitle').html();history.pushState({id:lfb_lastStepID},"","");var d=a[0];if(d!="final"){d=wpe_getNextEnabledStep(c,a);if(d==-1){d="final"}}if(b.sendContactASAP==1&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"] [data-fieldtype="email"]').length>0&&wpe_checkEmail(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+b.step+'"] [data-fieldtype="email"]').val())){b.contactSent=1;var g=wpe_getContactInformations(c);jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"lfb_sendCt",formID:c,email:g.email,lastName:g.lastName,firstName:g.firstName,phone:g.phone,country:g.country,zip:g.zip,state:g.state,city:g.city,address:g.address},success:function(l){}})}wpe_changeStep(d,c)}else{if(!e){jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] .errorMsg').slideDown()}}}function wpe_getNextEnabledStep(d,a){var b=-1;var c=a[0];if(c!="final"){if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #mainPanel .genSlide[data-stepid="'+c+'"]').is(".lfb_disabled")&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #mainPanel .genSlide[data-stepid="'+c+'"] .lfb_item:not(.lfb-hidden)').length>0||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #mainPanel .genSlide[data-stepid="'+c+'"] .lfb_distanceError').length>0)){b=c}else{lfb_lastSteps.push(parseInt(c));wpe_updatePrice(d);b=wpe_getNextEnabledStep(d,wpe_findPotentialsSteps(parseInt(c),d))}}return b}function wpe_openGenerator(b){var a=wpe_getForm(b);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] #startInfos > p').slideDown();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #btnStart').parent().fadeOut(a.animationsSpeed,function(){if(a.showSteps!="2"){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] .genPrice').fadeIn(a.animationsSpeed)}jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel').fadeIn(a.animationsSpeed+a.animationsSpeed/2,function(){wpe_nextStep(b)})})}function wpe_initListeners(b){var a=wpe_getForm(b);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel .genSlide div.selectable .img, #estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel .genSlide div.selectable .icon_select').click(function(){if(!tld_selectionMode){wpe_itemClick(jQuery(this).parent(),true,b)}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel input[type=checkbox][data-price]').change(function(){if(jQuery(this).is('[data-usedistance="true"]')){lfb_removeDistanceError(jQuery(this).attr("data-itemid"),b)}wpe_updatePrice(b)});jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel input[type=checkbox][data-group]').change(function(f){var c=jQuery(this);if(c.is(":checked")){jQuery(this).closest(".genSlide").find('div.selectable.checked[data-group="'+c.data("group")+'"]').each(function(){wpe_itemClick(jQuery(this),false,b)});jQuery(this).closest(".genSlide").find('input[type=checkbox][data-group="'+c.data("group")+'"]:checked').each(function(){if(!jQuery(this).is(c)){jQuery(this).trigger("click.auto")}});if(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+b+'"]').is('[data-autoclick="1"]')&&c.closest(".genSlide").find("[data-itemid]").not('[data-group="'+c.data("group")+'"]').length==0){var d=wpe_getForm(b);wpe_nextStep(d.formID)}}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel .genSlide select[data-itemid]').change(function(){var d=jQuery(this).val();var c=0;jQuery(this).find("option").each(function(){if(jQuery(this).attr("value")==d){c=jQuery(this).attr("data-price")}});jQuery(this).attr("data-price",c);wpe_updatePrice(b)});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel .genSlide select[data-itemid]').trigger("change");jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel input[type=checkbox][data-price]').change(function(){});jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide input.wpe_qtfield').change(function(){wpe_updatePrice(b)});jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide').find("input[type=text][data-title],textarea[data-title],input[type=file][data-title],input[type=number][data-title]").change(function(){if(jQuery(this).val().length>0){jQuery(this).addClass("checked")}else{jQuery(this).removeClass("checked")}});jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide div.selectable .icon_quantity').click(function(){if(!tld_selectionMode){jQuery(".quantityBtns").not(jQuery(this).parent().find(".quantityBtns")).removeClass("open");jQuery(".quantityBtns").not(jQuery(this).parent().find(".quantityBtns")).fadeOut(250);if(!jQuery(this).parent().find(".quantityBtns").is(".open")&&jQuery(this).parent().is(".checked")){if(jQuery(this).parent().find(".quantityBtns .tooltip-inner").length>0){jQuery(this).parent().find(".quantityBtns .tooltip-inner").html(parseInt(jQuery(this).parent().find(".icon_quantity").html()))}jQuery(this).parent().find(".quantityBtns").addClass("open");jQuery(this).parent().find(".quantityBtns").fadeIn(250)}else{jQuery(this).parent().find(".quantityBtns").removeClass("open");jQuery(this).parent().find(".quantityBtns").fadeOut(250)}}});jQuery("#wpe_orderMessageCheck").change(function(){if(jQuery(this).is(":checked")){jQuery("#wpe_orderMessage").slideDown(250)}else{jQuery("#wpe_orderMessage").slideUp(250)}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #wpe_btnOrder').click(function(){if(!tld_selectionMode){wpe_order(b)}});jQuery("#gform_wrapper_"+a.gravityFormID+" form").submit(function(f){var d=jQuery(this);if(!jQuery(this).is(".submit")){f.preventDefault();jQuery(this).addClass("submit");if(a.save_to_cart){var c=new Array();jQuery.each(lfb_lastSteps,function(){$panel=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+b+'"] #mainPanel .genSlide[data-stepid="'+this+'"]');$panel.find('div.selectable.checked:not(.lfb_disabled),input[type=checkbox]:checked:not(.lfb_disabled),[data-type="slider"]:not(.lfb_disabled)').each(function(){var e=1;if(parseInt(jQuery(this).data("resqt"))>0){e=parseInt(jQuery(this).data("resqt"))}if(jQuery(this).is('[data-type="slider"]')){e=parseInt(jQuery(this).slider("value"));if(!isNaN(parseInt(jQuery(this).find(".tooltip-inner").html()))){e=parseInt(jQuery(this).find(".tooltip-inner").html())}}if(parseInt(jQuery(this).data("prodid"))>0){c.push({quantity:e,product_id:parseInt(jQuery(this).data("prodid")),variation:parseInt(jQuery(this).attr("data-woovar"))})}})});jQuery.ajax({url:a.ajaxurl,type:"post",data:{action:"lfb_cart_save",ref:a.current_ref,products:c},success:function(){a.timer_gFormSubmit=setInterval(function(){wpe_check_gform_response(a.formID)},300);setTimeout(function(){d.submit()},700)}})}else{a.timer_gFormSubmit=setInterval(function(){wpe_check_gform_response(a.formID)},300);setTimeout(function(){d.submit()},700)}}else{jQuery(this).removeClass("submit")}})}function wpe_checkItems(b){var a=wpe_getForm(b);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide div.selectable img[data-tint="true"]').each(function(){jQuery(this).css("opacity",0);jQuery(this).show();var e=jQuery('');e.css({width:jQuery(this).get(0).width,height:jQuery(this).get(0).height});jQuery(this).hide();jQuery(this).after(e);var c=e.get(0).getContext("2d");var d=new Image();d.onload=function(){c.fillStyle=a.colorA;c.fillRect(0,0,e.get(0).width,e.get(0).height);c.fill();c.globalCompositeOperation="destination-in";c.drawImage(d,0,0,e.get(0).width,e.get(0).height)};d.src=jQuery(this).attr("src")});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide div.selectable img[data-tint="false"]').each(function(){if(jQuery(this).is("[data-src]")){jQuery(this).attr("src",jQuery(this).attr("data-src"))}});jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide div.selectable.checked , #estimation_popup.wpe_bootstraped[data-form="'+a.formID+'"] #mainPanel .genSlide input[type=checkbox]:checked').hover(function(){jQuery(this).addClass("lfb_hover")},function(){jQuery(this).removeClass("lfb_hover")})}function lfb_getDistanceCalc(a,g,f,d,b,h){var e=0;var c=google.maps.UnitSystem.METRIC;lfb_gmapService=new google.maps.DistanceMatrixService();lfb_gmapService.getDistanceMatrix({origins:[d],destinations:[b],travelMode:google.maps.TravelMode.DRIVING,unitSystem:google.maps.UnitSystem.METRIC,avoidHighways:false,avoidTolls:false,},function(k,i){var l=false;if(i==google.maps.DistanceMatrixStatus.OK){var n=0;if(k.rows[0].elements[0].distance){n=k.rows[0].elements[0].distance.value;n=n/1000;if(h=="miles"){n=n*0.62}}else{l=true}var j=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] [data-itemid="'+f+'"]');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] [data-itemid="'+f+'"]').attr("data-distance",n);var m=wpe_getForm(g);wpe_updateSummary(g);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] #lfb_summary table tr[data-itemstep="'+f+'"] td:eq(2)').html(n);wpe_updatePrice(g);lfb_removeDistanceError(f,g)}else{l=true}if(l){lfb_showDistanceError(f,g)}});return e}function lfb_executeCalculation(calculation,formID,targetID){calculation=calculation.replace(/\\/g,"");var form=wpe_getForm(formID);var price=0;var i=0;var elementsToReplace=new Array();var $target=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+targetID+'"]');while((i=calculation.indexOf("item-",i+1))!=-1){var itemID=calculation.substr(i+5,calculation.indexOf("_",i)-(i+5));var action=calculation.substr(calculation.indexOf("_",i)+1,(calculation.indexOf("]",i)-1)-(calculation.indexOf("_",i)));var value=0;var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]');if(action=="isChecked"){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(".checked")||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(":checked")){value="1==1"}else{value="1==0"}}if(action=="isUnchecked"){if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(".checked")&&!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(":checked")){value="1==1"}else{value="1==0"}}if(action=="isFilled"){if($item.is(".lfb_dropzone")){if($item.find(".dz-preview[data-file].dz-success.dz-complete").length>0){value="1==1"}else{value="1==0"}}else{if($item.val().length>0){value="1==1"}else{value="1==0"}}}if(action=="price"){value=0;if(itemID=="total"){value=form.price}else{if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(".checked")||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(":checked")||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is("select")||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is('[data-type="slider"]')){value=parseFloat(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').data("resprice"));if(isNaN(value)){value=0}}}}if(action=="quantity"){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(".checked")||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is(":checked")){if($item.find(".icon_quantity").length>0){value=parseFloat($item.find(".icon_quantity").html())}else{value=$item.find(".wpe_qtfield").val()}if(isNaN(value)){value=0}}else{if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is('[data-type="slider"]')){value=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').slider("value")}}}if(action=="value"){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').is("select")){value='"'+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').val()+'"'}else{value=parseFloat(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+itemID+'"]').val());if(isNaN(value)){value=0}}}if(action=="date"){if($item.is(".lfb_datepicker")&&$item.datepicker("getDate")!=null){value="'"+jQuery.datepicker.formatDate("yy-mm-dd",$item.datepicker("getDate"))+"'"}else{value="null"}}elementsToReplace.push({oldValue:calculation.substr(i-1,(calculation.indexOf("]",i)+1)-(i-1)),newValue:value})}var todayDate=new Date();var month=todayDate.getMonth()+1;if(month<10){month="0"+month}var today=todayDate.getFullYear().toString()+month.toString()+todayDate.getDate().toString();calculation=calculation.replace(/\[currentDate\]/g,today);if(calculation.indexOf("dateDifference-")>-1){while((i=calculation.indexOf("dateDifference-",i+1))!=-1){var startDateAdPosEnd=calculation.indexOf("_",i+15)+1;var startDate=calculation.substr(i+15,calculation.indexOf("_",i)-(i+15));var endDate=calculation.substr(startDateAdPosEnd,calculation.indexOf("]",startDateAdPosEnd)-(startDateAdPosEnd));if(startDate=="currentDate"){startDate=todayDate}else{if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+startDate+'"]').length>0&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+startDate+'"]').val().length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+startDate+'"]');startDate=$item.datepicker("getDate")}else{startDate=todayDate}}if(endDate=="currentDate"){endDate=today}else{if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+endDate+'"]').length>0&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+endDate+'"]').val().length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+endDate+'"]');endDate=$item.datepicker("getDate")}else{endDate=todayDate}}var timeDiff=Math.abs(endDate.getTime()-startDate.getTime());var result=Math.ceil(timeDiff/(1000*3600*24));if(result<0){result=0}elementsToReplace.push({oldValue:calculation.substr(i-1,(calculation.indexOf("]",i)+1)-(i-1)),newValue:result})}}if(calculation.indexOf("distance_")>-1){$target.attr("data-usedistance","true");while((i=calculation.indexOf("distance_",i+1))!=-1){var distanceType="km";var departAdPosEnd=calculation.indexOf("-",i+9)+1;var departAdress=calculation.substr(i+9,calculation.indexOf("-",i)-(i+9));var departCityPosEnd=calculation.indexOf("-",departAdPosEnd)+1;var departCity=calculation.substr(departAdPosEnd,calculation.indexOf("-",departAdPosEnd)-(departAdPosEnd));var departZipPosEnd=calculation.indexOf("-",departCityPosEnd)+1;var departZip=calculation.substr(departCityPosEnd,calculation.indexOf("-",departCityPosEnd)-(departCityPosEnd));var departCountryPosEnd=calculation.indexOf("_",departZipPosEnd)+1;var departCountry=calculation.substr(departZipPosEnd,calculation.indexOf("_",departZipPosEnd)-(departZipPosEnd));var arrivalAdPosEnd=calculation.indexOf("-",departCountryPosEnd)+1;var arrivalAdress=calculation.substr(departCountryPosEnd,calculation.indexOf("-",departCountryPosEnd)-(departCountryPosEnd));var arrivalCityPosEnd=calculation.indexOf("-",arrivalAdPosEnd)+1;var arrivalCity=calculation.substr(arrivalAdPosEnd,calculation.indexOf("-",arrivalAdPosEnd)-(arrivalAdPosEnd));var arrivalZipPosEnd=calculation.indexOf("-",arrivalCityPosEnd)+1;var arrivalZip=calculation.substr(arrivalCityPosEnd,calculation.indexOf("-",arrivalCityPosEnd)-(arrivalCityPosEnd));var arrivalCountryPosEnd=calculation.indexOf("_",arrivalZipPosEnd)+1;var arrivalCountry=calculation.substr(arrivalZipPosEnd,calculation.indexOf("_",arrivalZipPosEnd)-(arrivalZipPosEnd));distanceType=calculation.substr(arrivalCountryPosEnd,calculation.indexOf("]",arrivalCountryPosEnd)-(arrivalCountryPosEnd));if(departAdress!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departAdress+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departAdress+'"]');departAdress=$item.val()}else{departAdress=0}}if(departCity!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departCity+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departCity+'"]');departCity=$item.val()}else{departCity=0}}if(departZip!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departZip+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departZip+'"]');departZip=$item.val()}else{departZip=0}}if(departCountry!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departCountry+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+departCountry+'"]');departCountry=$item.val()}else{departCountry=0}}if(arrivalAdress!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalAdress+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalAdress+'"]');arrivalAdress=$item.val()}else{arrivalAdress=0}}if(arrivalCity!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalCity+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalCity+'"]');arrivalCity=$item.val()}else{arrivalCity=0}}if(arrivalZip!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalZip+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalZip+'"]');arrivalZip=$item.val()}else{arrivalZip=0}}if(arrivalCountry!=""){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalCountry+'"]').length>0){var $item=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+formID+'"] #mainPanel .genSlide [data-itemid="'+arrivalCountry+'"]');arrivalCountry=$item.val()}else{arrivalCountry=0}}if($target.closest(".genSlide").find(".lfb_distanceError").length>0){lfb_removeDistanceError(targetID,formID)}var distanceCode=calculation.substr(i-1,(calculation.indexOf("]",i)+1)-(i-1));var distance=0;if($target.attr("data-distance")!=""){distance=parseFloat($target.attr("data-distance"))}if(departAdress==""&&departCity==""&&departCountry==""&&arrivalAdress==""&&arrivalCity==""&&arrivalCountry==""&&departZip==""&&arrivalZip==""){lfb_showDistanceError(targetID,formID)}else{if(form.gmap_key==""){lfb_showDistanceError(targetID,formID);console.log("invalid gmap api key")}else{var depart=departAdress+" "+departZip+" "+departCity+" "+departCountry;var arrival=arrivalAdress+" "+arrivalZip+" "+arrivalCity+" "+arrivalCountry;if($target.attr("data-departure")!=depart||arrival!=$target.attr("data-arrival")){$target.attr("data-departure",depart);$target.attr("data-arrival",arrival);lfb_getDistanceCalc(distanceCode,formID,targetID,depart,arrival,distanceType)}}}elementsToReplace.push({oldValue:calculation.substr(i-1,(calculation.indexOf("]",i)+1)-(i-1)),newValue:distance})}}jQuery.each(elementsToReplace,function(){calculation=calculation.replace(this.oldValue,this.newValue)});calculation=calculation.replace(/\[total\]/g,form.price);calculation=calculation.replace(/\[total_quantity\]/g,wpe_getTotalQuantities(formID));i=0;while((i=calculation.indexOf("{",i+1))!=-1){var charsToEnd=calculation.substr(i+1,(calculation.indexOf("}",i+1)-(i+1)));if(/\S/.test(charsToEnd)){calculation=calculation.substr(0,i+1)+" price ="+calculation.substr(i+1,calculation.length);i+=8}}if(calculation.indexOf("if")<0){calculation="price = "+calculation}else{var charsToStart=calculation.substr(0,calculation.indexOf("if"));if(/\S/.test(charsToStart)){calculation="price = "+calculation}}calculation=lfb_removeDoubleSpaces(calculation);calculation=calculation.replace(/price =\n if/g,"\nif");calculation=calculation.replace(/price = if/g,"if");calculation=calculation.replace(/price = \nif/g,"\nif");calculation=calculation.replace(/price = \n if/g,"\n if");try{eval(calculation)}catch(e){console.log("wrong calculation")}return parseFloat(price)}function lfb_removeDoubleSpaces(a){a=a.replace(/\t/g,"");a=a.replace(/ /g," ");if(a.indexOf(" ")>-1){lfb_removeDoubleSpaces(a)}return a}function lfb_removeDistanceError(d,c){var a=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide [data-itemid="'+d+'"]');if(a.closest(".genSlide").find('[data-itemid][data-usedistance="true"]:not([data-distance]):not([type="checkbox"]).checked,[data-itemid][data-usedistance="true"]:not([data-distance]):checked,[data-itemid][data-usedistance="true"]:not([data-distance])[data-type="slider"]').length==0&&a.closest(".genSlide").find('[data-itemid][data-usedistance="true"][data-distance="0"]:not([type="checkbox"]).checked,[data-itemid][data-usedistance="true"][data-distance="0"]:checked,[data-itemid][data-usedistance="true"][data-distance="0"][data-type="slider"]').length==0){a.closest(".genSlide").find(".btn-next").fadeIn();a.closest(".genSlide").find(".lfb_btnNextContainer").fadeIn();a.closest(".genSlide").find(".btn-next").removeClass("lfb_disabledBtn");var b=a.closest(".genSlide").find(".lfb_distanceError");b.fadeOut();setTimeout(function(){b.remove()},300)}}function lfb_showDistanceError(e,d){var b=wpe_getForm(d);var a=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #mainPanel .genSlide [data-itemid="'+e+'"]');a.closest(".genSlide").find(".btn-next").addClass("lfb_disabledBtn");a.closest(".genSlide").find(".btn-next").hide();if(a.closest(".genSlide").find(".lfb_distanceError").length==0){a.closest(".genSlide").find(".lfb_btnNextContainer").before('

'+b.txtDistanceError+"

")}var c=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-itemid="'+e+'"]').closest(".genSlide").attr("data-stepid");if(b.step=="final"&&!b.backFomFinal){b.backFomFinal=true;wpe_changeStep(c,d)}}function wpe_updateLabelItem(a,b){form=wpe_getForm(b);if(!a.is(".dropzone")){a.closest(".itemBloc").find("label").each(function(){if(jQuery(this).html().indexOf(":")>-1&&jQuery(this).closest(".switch").length==0){jQuery(this).html(a.attr("data-original-title"))}})}}function wpe_updatePrice(d){var c=false;lfb_updateShowSteps(d);lfb_updateShowItems(d);lfb_updateLayerImages(d);form=wpe_getForm(d);form.lastPrice=form.price;form.price=form.initialPrice;form.priceSingle=0;wpe_updatePlannedSteps(d);wpe_updateStep(d);var k=lfb_lastSteps.slice();var f=0;var q=0;if(form.step!="final"&&jQuery.inArray(parseInt(form.step),k)==-1){k.push(parseInt(form.step))}else{if(form.step=="final"&&jQuery.inArray("final",k)==-1){k.push("final")}}jQuery.each(k,function(){var e=this;if((e=="final"||parseInt(e)!=0)&&!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #mainPanel .genSlide[data-stepid="'+e+'"]').is(".lfb_disabled")){$panel=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #mainPanel .genSlide[data-stepid="'+e+'"]');$panel.find('div.selectable.checked, input[type=checkbox]:checked,select[data-itemid][data-price],div[data-type="slider"]').each(function(){if(!jQuery(this).is(".lfb_disabled")&&jQuery(this).closest(".itemBloc.lfb_disabled").length==0){if(!jQuery(this).is(".lfb_disabled")){if(jQuery(this).is('[data-singleprice="true"]')){c=true}jQuery(this).data("price",jQuery(this).attr("data-price"));if(jQuery(this).is("[data-usecalculation]")){if(form.step!="final"||lfb_executeCalculation(jQuery(this).attr("data-calculation"),d,jQuery(this).attr("data-itemid"))!=0){jQuery(this).data("price",lfb_executeCalculation(jQuery(this).attr("data-calculation"),d,jQuery(this).attr("data-itemid")))}}if((jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #mainPanel').data("savecart")=="0")||(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #mainPanel').data("savecart")=="1"&&jQuery(this).data("prodid")>0)){if(jQuery(this).find(".icon_quantity").length>0||jQuery(this).find(".wpe_qtfield").length>0||jQuery(this).is('[data-type="slider"]')){var r="";var u=0;var x=99999999999999;if(jQuery(this).find(".icon_quantity").length>0){r=jQuery(this).find(".icon_quantity").html();u=jQuery(this).find(".quantityBtns").attr("data-min");x=jQuery(this).find(".quantityBtns").attr("data-max")}else{if(jQuery(this).find(".wpe_qtfield").length>0){r=jQuery(this).find(".wpe_qtfield").val();u=jQuery(this).find(".wpe_qtfield").attr("min");x=jQuery(this).find(".wpe_qtfield").attr("max")}else{if(jQuery(this).is('[data-type="slider"]')){r=parseInt(jQuery(this).slider("value"));if(!isNaN(parseInt(jQuery(this).find(".tooltip-inner").html()))){r=parseInt(jQuery(this).find(".tooltip-inner").html())}u=jQuery(this).attr("data-min");x=jQuery(this).attr("data-max")}}}if(jQuery(this).is("[data-usecalculationqt]")){r=lfb_executeCalculation(jQuery(this).attr("data-calculationqt"),d,jQuery(this).attr("data-itemid"));if(isNaN(r)){r=0}if(r>x){r=x}if(r0){jQuery(this).find(".icon_quantity").html(r);if(jQuery(this).find(".wpe_sliderQt").length>0){jQuery(this).find(".wpe_sliderQt").slider("value",parseInt(r))}jQuery(this).find(".quantityBtns").addClass("lfb-hidden")}else{if(jQuery(this).find(".wpe_qtfield").length>0){jQuery(this).find(".wpe_qtfield").val(r)}else{if(jQuery(this).is('[data-type="slider"]')){jQuery(this).slider("value",parseInt(r))}}}}if(jQuery(this).is("[data-distanceqt]")){lfb_executeCalculation(jQuery(this).attr("data-distanceqt"),d,jQuery(this).attr("data-itemid"));if(jQuery(this).is("[data-distance]")){r=parseFloat(jQuery(this).attr("data-distance")).toFixed(2)}if(rx){r=x}}if(jQuery(this).find(".wpe_qtfield").length>0){jQuery(this).find(".wpe_qtfield").val(r)}else{if(jQuery(this).find(".wpe_sliderQt").length>0){jQuery(this).find(".wpe_sliderQt").slider("value",r);jQuery(this).find(".icon_quantity").html(r)}else{if(jQuery(this).find(".quantityBtns").length>0){jQuery(this).find(".icon_quantity").html(r)}else{if(jQuery(this).is('[data-type="slider"]')){jQuery(this).slider("value",r)}}}}if(jQuery(this).is("[data-usecalculation]")){jQuery(this).data("price",lfb_executeCalculation(jQuery(this).attr("data-calculation"),d,jQuery(this).attr("data-itemid")))}}jQuery(this).attr("data-resqt",r);if(jQuery(this).data("price")){if(jQuery(this).data("operation")=="-"){jQuery(this).data("resprice",0-parseFloat(jQuery(this).data("price"))*parseFloat(r));if(jQuery(this).is('[data-singleprice="true"]')){form.priceSingle-=parseFloat(jQuery(this).data("price"))*parseFloat(r)}else{form.price-=parseFloat(jQuery(this).data("price"))*parseFloat(r)}}else{if(jQuery(this).data("operation")=="x"){for(var v=0;v0){var A=this;var z=jQuery(this).data("reducqt");z=z.split("*");var w=new Array();var s=0;jQuery.each(z,function(B){var C=z[B].split("|");w.push(C[1]);if(parseFloat(C[0])<=parseFloat(r)){y=B}if(parseFloat(C[0])=0){var t=parseFloat(w[y])*parseFloat(r);if(jQuery(this).attr("data-price")=="0"){t=parseFloat(w[y])*(parseFloat(r)-s)}jQuery(this).data("resprice",t);if(jQuery(this).is('[data-singleprice="true"]')){if(jQuery(this).is('[data-addtototal!="1"]')){form.priceSingle+=parseFloat(t)}}else{if(jQuery(this).is('[data-addtototal!="1"]')){form.price+=parseFloat(t)}}if(form.currencyPosition=="left"){if(jQuery(this).is('[data-showprice="1"]')){if(jQuery(this).data("operation")=="+"){jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : "+form.currency+(wpe_formatPrice(w[y],d)));jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : "+form.currency+(wpe_formatPrice(w[y],d)));if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}else{if(jQuery(this).data("operation")=="-"){jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+form.currency+(wpe_formatPrice(w[y],d)));if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+form.currency+(wpe_formatPrice(w[y],d)));if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}else{if(jQuery(this).data("operation")=="x"){jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : +"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : +"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}else{jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}}}}else{jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle"))}if(jQuery(this).find(".quantityBtns").is(".open")){if(form.disableTipMobile==0||!wpe_is_touch_device()){jQuery(this).b_tooltip("show")}}}else{if(jQuery(this).is('[data-showprice="1"]')){if(jQuery(this).attr("data-operation")=="+"){jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : "+(wpe_formatPrice(w[y],d))+form.currency);jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : "+(wpe_formatPrice(w[y],d))+form.currency);if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}else{if(jQuery(this).attr("data-operation")=="-"){jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+ +(wpe_formatPrice(w[y],d)));jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+(wpe_formatPrice(w[y],d))+form.currency);if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}else{if(jQuery(this).attr("data-operation")=="x"){jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : +"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : +"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}else{jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+(wpe_formatPrice(w[y],d))+"%");if(form.disableTipMobile==0||!wpe_is_touch_device()){if(!jQuery(this).is('[data-type="slider"]')){jQuery(this).b_tooltip("fixTitle")}}wpe_updateLabelItem(jQuery(this),d)}}}}else{jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle"))}if(jQuery(this).find(".quantityBtns").is(".open")){if(form.disableTipMobile==0||!wpe_is_touch_device()){jQuery(this).b_tooltip("show")}}}}else{jQuery(this).data("resprice",parseFloat(jQuery(this).data("price"))*parseFloat(r));form.price=parseFloat(form.price);form.priceSingle=parseFloat(form.priceSingle);if(jQuery(this).is('[data-singleprice="true"]')){if(jQuery(this).is('[data-addtototal!="1"]')){form.priceSingle+=parseFloat(jQuery(this).data("price"))*parseFloat(r)}}else{if(jQuery(this).is('[data-addtototal!="1"]')){form.price+=parseFloat(jQuery(this).data("price"))*parseFloat(r)}}wpe_updateItemTitleNoReduc(jQuery(this),form);if(jQuery(this).find(".quantityBtns").is(".open")){if(form.disableTipMobile==0||!wpe_is_touch_device()){jQuery(this).b_tooltip("show")}}}}}}}else{jQuery(this).data("resprice","0")}}else{jQuery(this).data("resqt","0");if(jQuery(this).data("price")){if(jQuery(this).data("operation")=="-"){jQuery(this).data("resprice",0-parseFloat(jQuery(this).data("price")));if(jQuery(this).is('[data-singleprice="true"]')){if(jQuery(this).is('[data-addtototal!="1"]')){form.priceSingle-=parseFloat(jQuery(this).data("price"))}}else{if(jQuery(this).is('[data-addtototal!="1"]')){form.price-=parseFloat(jQuery(this).data("price"))}}}else{if(jQuery(this).data("operation")=="x"){if(jQuery(this).is('[data-singleprice="true"]')){jQuery(this).data("resprice",(form.priceSingle*parseFloat(jQuery(this).data("price")))/100);if(jQuery(this).is('[data-addtototal!="1"]')){form.priceSingle=form.priceSingle+(form.priceSingle*parseFloat(jQuery(this).data("price")))/100}}else{jQuery(this).data("resprice",(form.price*parseFloat(jQuery(this).data("price")))/100);if(jQuery(this).is('[data-addtototal!="1"]')){form.price=form.price+(form.price*parseFloat(jQuery(this).data("price")))/100}}}else{if(jQuery(this).attr("data-operation")=="/"){if(jQuery(this).is('[data-singleprice="true"]')){jQuery(this).data("resprice",0-(form.priceSingle*parseFloat(jQuery(this).data("price")))/100);if(jQuery(this).is('[data-addtototal!="1"]')){form.priceSingle=form.priceSingle-(form.priceSingle*parseFloat(jQuery(this).data("price")))/100}}else{jQuery(this).data("resprice",0-(form.price*parseFloat(jQuery(this).data("price")))/100);if(jQuery(this).is('[data-addtototal!="1"]')){form.price=form.price-(form.price*parseFloat(jQuery(this).data("price")))/100}}}else{jQuery(this).data("resprice",jQuery(this).data("price"));if(jQuery(this).is('[data-singleprice="true"]')){if(jQuery(this).is('[data-addtototal!="1"]')){form.priceSingle+=parseFloat(jQuery(this).data("price"))}}else{if(jQuery(this).is('[data-addtototal!="1"]')){form.price=parseFloat(form.price)+parseFloat(jQuery(this).data("price"))}}}}}wpe_updateItemTitleNoReduc(jQuery(this),form)}else{jQuery(this).data("resprice","0")}}}}}})}f=form.price;q=form.priceSingle});if(form.reduction>0){if(form.reductionType&&form.reductionType=="%"){if(form.priceSingle>0){form.reductionResult=(form.priceSingle*form.reduction)/100}else{form.reductionResult=(form.price*form.reduction)/100}}else{form.reductionResult=form.reduction}form.reductionResult=parseFloat(form.reductionResult);if(form.priceSingle==0){form.price-=form.reductionResult}else{form.priceSingle-=form.reductionResult}}if(!form.price||form.price<0){form.price=0}if(!c||!form.priceSingle||form.priceSingle<0){form.priceSingle=0}var m=/^\d+(\.\d{2})?$/;if(!m.test(form.price)){form.price=parseFloat(form.price).toFixed(2)}try{if(!m.test(form.priceSingle)){form.priceSingle=parseFloat(form.priceSingle).toFixed(2)}}catch(j){}var o=form.currency+""+wpe_formatPrice(parseFloat(form.priceSingle),d);var b=form.currency+""+wpe_formatPrice(parseFloat(form.price),d);var n=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-rangelabelbetween");var l=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-rangelabeland");if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is("[data-totalrange]")&&parseFloat(form.price)>0){if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').is(".lfb_notNull")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_notNull")}var g=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-totalrange"));var a=(parseFloat(form.price)-g/2);if(a<0){a=0}b=n+"
"+form.currency+""+wpe_formatPrice(a,d)+"
"+l+"
"+form.currency+""+wpe_formatPrice(parseFloat(form.price)+g/2,d)+""}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_notNull")}if(form.currencyPosition!="left"){b=wpe_formatPrice(form.price,d)+""+form.currency;o=wpe_formatPrice(form.priceSingle,d)+""+form.currency;if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is("[data-totalrange]")&&parseFloat(form.price)>0){if(!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').is(".lfb_notNull")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_notNull")}var g=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-totalrange"));var a=(parseFloat(form.price)-g/2);if(a<0){a=0}b=n+"
"+wpe_formatPrice(a,d)+form.currency+"
"+l+"
"+wpe_formatPrice(parseFloat(form.price)+g/2,d)+form.currency+""}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_notNull")}}if(form.showTotalBottom==1){if(c&&form.priceSingle>0){if(form.price<0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom').removeClass("lfb_priceSingle");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom>span.lfb_subPrice').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom>br').remove()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom').addClass("lfb_priceSingle");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom').each(function(){if(jQuery(this).find(".lfb_subPrice").length==0){jQuery(this).find(">span:eq(0)").after('
+ '+b+"")}})}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom').removeClass("lfb_priceSingle");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom>span.lfb_subPrice').remove();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom>br').remove()}if(c&&form.priceSingle>0){if(form.price<=0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:first-child').html(o);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span.lfb_subPrice').hide();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:eq(2)').hide()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span.lfb_subPrice').show();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:eq(2)').show();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:first-child').html(o);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span.lfb_subPrice').html("+ "+b)}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:first-child').html(b)}}if(form.showSteps==0){if(c&&form.priceSingle>0){if(form.price<0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_priceSingle");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price>span.lfb_subPrice').remove()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_priceSingle");if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').length==0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price>span:eq(0)').after('+ '+b+"")}}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_priceSingle");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price>span.lfb_subPrice').remove()}if(c&&form.priceSingle>0){if(form.price<=0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("top","6px");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(o);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').hide();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(2)').hide()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("top","-5px");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').show();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(2)').show();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(o);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').html("+ "+b)}}else{if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is('[data-isSubs="true"]')){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","6px")}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","0px")}if(form.price>0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","0px");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(1)').show()}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(1)').hide()}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(b)}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').length>0){if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html().length>8){if(parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))>=16){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","16px")}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","18px")}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price > span:first-child').html().length>9){if(parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))>=14){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","14px")}}if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price > span:first-child').html().length>10){if(parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))>=11){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","11px")}}}var i=(form.price*100)/form.priceMax;if(form.showInitialPrice==1){i=((form.price-parseFloat(form.initialPrice))*100)/form.priceMax}if(i>100){i=100}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar').css("width",i+"%");if(jQuery("body").is(".rtl")){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').animate({right:i+"%"},70)}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').animate({left:i+"%"},70)}}var p=form.currency+""+wpe_formatPrice(parseFloat(form.price).toFixed(2),d);var h=form.currency+""+wpe_formatPrice(parseFloat(form.priceSingle).toFixed(2),d);if(form.currencyPosition!="left"){p=wpe_formatPrice(parseFloat(form.price).toFixed(2),d)+""+form.currency;h=wpe_formatPrice(parseFloat(form.priceSingle).toFixed(2),d)+""+form.currency}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(p);if(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is("[data-totalrange]")&&parseFloat(form.price)>0){var n=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-rangelabelbetween");var l=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-rangelabeland");var g=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-totalrange"));var a=(parseFloat(form.price)-g/2);if(a<0){a=0}b=n+"
"+form.currency+""+wpe_formatPrice(a,d)+"
"+l+"
"+form.currency+""+wpe_formatPrice(parseFloat(form.price)+g/2,d)+"";if(form.currencyPosition!="left"){var g=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-totalrange"));b=n+"
"+wpe_formatPrice(a,d)+form.currency+"
"+l+"
"+wpe_formatPrice(parseFloat(form.price)+g/2,d)+form.currency+""}jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(b.replace(//g," "))}wpe_updateSummary(d);if(c&&form.priceSingle>0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(0)').html(o);if(form.price<=0){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').css("display","none");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(2)').css("display","none");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(""+h+"")}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(2)').css("display","inline-block");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').html("+"+b+form.subscriptionText);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').css("display","block");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(""+h+"
+"+p)}}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(2)').css("display","inline-block");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').css("display","inline-block");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(0)').html(b)}wpe_updateStep(d)}function wpe_updateItemTitleNoReduc(a,b){var c=b.formID;if(b.currencyPosition=="left"){if(a.is('[data-showprice="1"]')){if(a.data("operation")=="+"){a.attr("title",a.data("originaltitle")+" : "+b.currency+(wpe_formatPrice(a.data("price"),c)));a.attr("data-original-title",a.data("originaltitle")+" : "+b.currency+(wpe_formatPrice(a.data("price"),c)));if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}else{if(a.data("operation")=="-"){a.attr("title",a.data("originaltitle")+" : -"+b.currency+(wpe_formatPrice(a.data("price"),c)));if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}a.attr("data-original-title",a.data("originaltitle")+" : -"+b.currency+(wpe_formatPrice(a.data("price"),c)));if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}else{if(a.data("operation")=="x"){a.attr("title",a.data("originaltitle")+" : +"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}a.attr("data-original-title",a.data("originaltitle")+" : +"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}else{a.attr("title",a.data("originaltitle")+" : -"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}a.attr("data-original-title",a.data("originaltitle")+" : -"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}}}}else{a.attr("data-original-title",a.data("originaltitle"))}}else{if(a.is('[data-showprice="1"]')){if(a.attr("data-operation")=="+"){a.attr("title",a.data("originaltitle")+" : "+(wpe_formatPrice(a.data("price"),c))+b.currency);a.attr("data-original-title",a.data("originaltitle")+" : "+(wpe_formatPrice(a.data("price"),c))+b.currency);if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}else{if(a.attr("data-operation")=="-"){a.attr("title",a.data("originaltitle")+" : -"+ +(wpe_formatPrice(a.data("price"),c)));if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}a.attr("data-original-title",a.data("originaltitle")+" : -"+(wpe_formatPrice(a.data("price"),c))+b.currency);if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}else{if(a.attr("data-operation")=="x"){a.attr("title",a.data("originaltitle")+" : +"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}a.attr("data-original-title",a.data("originaltitle")+" : +"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}else{a.attr("title",a.data("originaltitle")+" : -"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}a.attr("data-original-title",a.data("originaltitle")+" : -"+(wpe_formatPrice(a.data("price"),c))+"%");if(b.disableTipMobile==0||!wpe_is_touch_device()){if(!a.is('[data-type="slider"]')){a.b_tooltip("fixTitle")}}wpe_updateLabelItem(a,c)}}}}else{a.attr("data-original-title",a.data("originaltitle"))}}}function wpe_isDecimal(c){if(c==""){return false}var a="0123456789";var b;for(b in c){if(a.indexOf(c[b])==-1){return false}}return true}function wpe_changeContentSlide(b,c){var a=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+form.step+'"]').find(".genContent").find(".genContentSlide.active").index();if(b=="left"){if(a>0){a--}else{a=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+c+'"] #mainPanel .genSlide[data-stepid="'+form.step+'"]').find(".genContent").find(".genContentSlide").length}}else{if(a0||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] #mainPanel .genSlide[data-stepid="'+this+'"] .lfb_distanceError').length>0)){e.push(this)}});var a=0;jQuery.each(e,function(j,h){if(parseInt(h)==parseInt(f.step)){a=j}});a++;if(a==0){a=1}if(f.step=="final"){a=e.length+1}var b=e.length+1;if(a>b){a=b}var d=((a)*100)/b;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] .genPrice .progress .progress-bar-price> span:first-child').html((a)+"/"+b);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+g+'"] .genPrice .progress .progress-bar').css("width",d+"%")}}function wpe_initPanelResize(b){var a=wpe_getForm(b);jQuery(window).resize(function(){lfb_resize(b)})}function lfb_resize(a){var c=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+form.step+'"] h2.stepTitle').height();var b=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+form.step+'"]').outerHeight()+160+c;jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel').css("min-height",b)}function lfb_rgb2hex(a){if(a.indexOf("rgb")>-1){try{a=a.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);function b(d){return("0"+parseInt(d).toString(16)).slice(-2)}return"#"+b(a[1])+b(a[2])+b(a[3])}catch(c){return a}}else{return a}}function wpe_formatPrice(h,e){if(!h){h=0}var a=h.toString();if(a.indexOf(".")>-1){a=parseFloat(h).toFixed(2).toString()}var b=wpe_getForm(e);if(b.summary_noDecimals=="1"){a=Math.round(a).toString()}var c=b.decimalsSeparator;var g=b.thousandsSeparator;var i=a;var f=b.millionSeparator;var d="";if(a.indexOf(".")>-1){i=a.substr(0,a.indexOf("."));d=a.substr(a.indexOf(".")+1,2);a=a.replace(".",b.decimalsSeparator);if(d.toString().length==1){d=d.toString()+"0"}if(i.length>6){a=i.substr(0,i.length-6)+f+i.substr(i.length-6,3)+g+i.substr(i.length-3,i.length)+b.decimalsSeparator+d}else{if(i.length>3){a=i.substr(0,i.length-3)+g+i.substr(i.length-3,i.length)+b.decimalsSeparator+d}}}else{if(i.length>6){a=i.substr(0,i.length-6)+f+i.substr(i.length-6,3)+g+i.substr(i.length-3,i.length)}else{if(i.length>3){a=i.substr(0,i.length-3)+g+i.substr(i.length-3,i.length)}}}return a}function lfb_applyCouponCode(c){var b=wpe_getForm(c);var a=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #lfb_couponField').val();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #lfb_couponField').closest(".form-group").removeClass("has-error");if(a.length<3){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #lfb_couponField').closest(".form-group").addClass("has-error")}else{jQuery.ajax({url:b.ajaxurl,type:"post",data:{action:"lfb_applyCouponCode",formID:c,code:a},success:function(d){if(d=="0"||d==""){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #lfb_couponField').closest(".form-group").addClass("has-error")}else{jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #lfb_couponContainer').slideUp();var e=d;if(d.indexOf("%")>0){e=d.substr(0,d.length-1);b.reductionType="%"}b.discountCode=a;b.reduction=e;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+c+'"] #finalSlide .genContent').animate({opacity:0},b.animationsSpeed);setTimeout(function(){wpe_updatePrice(c);wpe_changeStep("final",c)},b.animationsSpeed+100)}}})}}function lfb_getRedirectionURL(c){var a=wpe_getForm(c);var b=a.close_url;if(a.useRedirectionConditions==1){jQuery.each(a.redirections,function(){var d=this.conditions.replace(/'/g,'"');d=d.replace(/\\"/g,'"');d=JSON.parse(d);var e=lfb_checkConditions(d,c);error=e.error;errorOR=e.errorOR;if((this.conditionsOperator=="OR"&&!errorOR)||(this.conditionsOperator!="OR"&&!error)){b=this.url}})}return b}function lfb_startFormIntro(a){if(!tld_selectionMode){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #startInfos > p').slideDown()}}; // source --> https://mycomputer.com.gr/forma-ftiaksto-monos-sou/wp-content/plugins/WP_Estimation_Form/assets/js/lfb_frontend.min.js?ver=9.588 jQuery(document).ready(function(){jQuery(".open-estimation-form").click(wpe_popup_estimation)});var wpe_initial_overflowBody="auto";var wpe_initial_overflowHtml="auto";function wpe_popup_estimation(){var b=0;var a=jQuery(this).attr("class");a=a.split(" ");jQuery.each(a,function(d){d=a[d];if(d.indexOf("form-")>-1){b=d.substr(d.indexOf("-")+1,d.length)}});wpe_initial_overflowBody=jQuery("body").css("overflow-y");wpe_initial_overflowHtml=jQuery("html").css("overflow-y");jQuery("body,html").css("overflow-y","hidden");jQuery('#estimation_popup[data-form="'+b+'"]').show().animate({left:0,top:0,width:"100%",height:"100%",opacity:1},500,function(){jQuery('#estimation_popup[data-form="'+b+'"] #wpe_close_btn').delay(500).fadeIn(500);jQuery('#estimation_popup[data-form="'+b+'"] #wpe_close_btn').click(function(){wpe_close_popup_estimation(b)});setTimeout(lfb_onResize,250)})}function wpe_close_popup_estimation(a){jQuery('#estimation_popup[data-form="'+a+'"]').animate({top:"50%",left:"50%",width:"0px",height:"0px",opacity:0},500,function(){jQuery("body").css("overflow-y",wpe_initial_overflowBody);jQuery("html").css("overflow-y",wpe_initial_overflowHtml);location.reload()})}; // source --> https://mycomputer.com.gr/forma-ftiaksto-monos-sou/wp-content/plugins/revslider/public/assets/js/jquery.themepunch.tools.min.js?ver=5.3.1.5 /******************************************** - THEMEPUNCH TOOLS Ver. 1.0 - Last Update of Tools 27.02.2015 *********************************************/ /* * @fileOverview TouchSwipe - jQuery Plugin * @version 1.6.9 * * @author Matt Bryson http://www.github.com/mattbryson * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin * @see http://labs.skinkers.com/touchSwipe/ * @see http://plugins.jquery.com/project/touchSwipe * * Copyright (c) 2010 Matt Bryson * Dual licensed under the MIT or GPL Version 2 licenses. * */ (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var y="1.6.9",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipetp=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipetp")}}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}return G};f.fn.swipetp.version=y;f.fn.swipetp.defaults=n;f.fn.swipetp.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipetp.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipetp.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipetp.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipetp.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,aw){var aA=(a||d||!aw.fallbackToMouseEvents),K=aA?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",az=aA?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=aA?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=aA?null:"mouseleave",aE=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ah=0,aQ=null,ac=0,a2=0,a0=0,H=1,ar=0,aK=0,N=null;var aS=f(a5);var aa="start";var X=0;var aR=null;var U=0,a3=0,a6=0,ae=0,O=0;var aX=null,ag=null;try{aS.bind(K,aO);aS.bind(aE,ba)}catch(al){f.error("events not supported "+K+","+aE+" on jQuery.swipetp")}this.enable=function(){aS.bind(K,aO);aS.bind(aE,ba);return aS};this.disable=function(){aL();return aS};this.destroy=function(){aL();aS.data(C,null);aS=null};this.option=function(bd,bc){if(aw[bd]!==undefined){if(bc===undefined){return aw[bd]}else{aw[bd]=bc}}else{f.error("Option "+bd+" does not exist on jQuery.swipetp.options")}return null};function aO(be){if(aC()){return}if(f(be.target).closest(aw.excludedElements,aS).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{be.preventDefault()}ah=0;aQ=null;aK=null;ac=0;a2=0;a0=0;H=1;ar=0;aR=ak();N=ab();S();if(!bg||(X===aw.fingers||aw.fingers===i)||aY()){aj(0,bc);U=au();if(X==2){aj(1,bg[1]);a2=a0=av(aR[0].start,aR[1].start)}if(aw.swipeStatus||aw.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(aw.hold){ag=setTimeout(f.proxy(function(){aS.trigger("hold",[bf.target]);if(aw.hold){bd=aw.hold.call(aS,bf,bf.target)}},this),aw.longTapThreshold)}ap(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||an()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aI(bd);a3=au();if(bj){X=bj.length}if(aw.hold){clearTimeout(ag)}aa=k;if(X==2){if(a2==0){aj(1,bj[1]);a2=a0=av(aR[0].start,aR[1].start)}else{aI(bj[1]);a0=av(aR[0].end,aR[1].end);aK=at(aR[0].end,aR[1].end)}H=a8(a2,a0);ar=Math.abs(a2-a0)}if((X===aw.fingers||aw.fingers===i)||!bj||aY()){aQ=aM(bg.start,bg.end);am(bf,aQ);ah=aT(bg.start,bg.end);ac=aN();aJ(aQ,ah);if(aw.swipeStatus||aw.pinchStatus){be=P(bi,aa)}if(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave){var bc=true;if(aw.triggerOnTouchLeave){var bh=aZ(this);bc=F(bg.end,bh)}if(!aw.triggerOnTouchEnd&&bc){aa=aD(k)}else{if(aw.triggerOnTouchLeave&&!bc){aa=aD(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length){G();return true}}if(an()){X=ae}a3=au();ac=aN();if(bb()||!ao()){aa=q;P(bd,aa)}else{if(aw.triggerOnTouchEnd||(aw.triggerOnTouchEnd==false&&aa===k)){bc.preventDefault();aa=h;P(bd,aa)}else{if(!aw.triggerOnTouchEnd&&a7()){aa=h;aG(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}ap(false);return null}function ba(){X=0;a3=0;U=0;a2=0;a0=0;H=1;S();ap(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(aw.triggerOnTouchLeave){aa=aD(h);P(bd,aa)}}function aL(){aS.unbind(K,aO);aS.unbind(aE,ba);aS.unbind(az,a4);aS.unbind(V,M);if(T){aS.unbind(T,L)}ap(false)}function aD(bg){var bf=bg;var be=aB();var bd=ao();var bc=bb();if(!be||bc){bf=q}else{if(bd&&bg==k&&(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave)){bf=h}else{if(!bd&&bg==h&&aw.triggerOnTouchLeave){bf=q}}}return bf}function P(be,bc){var bd,bf=be.touches;if((J()||W())||(Q()||aY())){if(J()||W()){bd=aG(be,bc,l)}if((Q()||aY())&&bd!==false){bd=aG(be,bc,t)}}else{if(aH()&&bd!==false){bd=aG(be,bc,j)}else{if(aq()&&bd!==false){bd=aG(be,bc,b)}else{if(ai()&&bd!==false){bd=aG(be,bc,B)}}}}if(bc===q){ba(be)}if(bc===h){if(bf){if(!bf.length){ba(be)}}else{ba(be)}}return bd}function aG(bf,bc,be){var bd;if(be==l){aS.trigger("swipeStatus",[bc,aQ||null,ah||0,ac||0,X,aR]);if(aw.swipeStatus){bd=aw.swipeStatus.call(aS,bf,bc,aQ||null,ah||0,ac||0,X,aR);if(bd===false){return false}}if(bc==h&&aW()){aS.trigger("swipe",[aQ,ah,ac,X,aR]);if(aw.swipe){bd=aw.swipe.call(aS,bf,aQ,ah,ac,X,aR);if(bd===false){return false}}switch(aQ){case p:aS.trigger("swipeLeft",[aQ,ah,ac,X,aR]);if(aw.swipeLeft){bd=aw.swipeLeft.call(aS,bf,aQ,ah,ac,X,aR)}break;case o:aS.trigger("swipeRight",[aQ,ah,ac,X,aR]);if(aw.swipeRight){bd=aw.swipeRight.call(aS,bf,aQ,ah,ac,X,aR)}break;case e:aS.trigger("swipeUp",[aQ,ah,ac,X,aR]);if(aw.swipeUp){bd=aw.swipeUp.call(aS,bf,aQ,ah,ac,X,aR)}break;case x:aS.trigger("swipeDown",[aQ,ah,ac,X,aR]);if(aw.swipeDown){bd=aw.swipeDown.call(aS,bf,aQ,ah,ac,X,aR)}break}}}if(be==t){aS.trigger("pinchStatus",[bc,aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchStatus){bd=aw.pinchStatus.call(aS,bf,bc,aK||null,ar||0,ac||0,X,H,aR);if(bd===false){return false}}if(bc==h&&a9()){switch(aK){case c:aS.trigger("pinchIn",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchIn){bd=aw.pinchIn.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break;case A:aS.trigger("pinchOut",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchOut){bd=aw.pinchOut.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break}}}if(be==B){if(bc===q||bc===h){clearTimeout(aX);clearTimeout(ag);if(Z()&&!I()){O=au();aX=setTimeout(f.proxy(function(){O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}},this),aw.doubleTapThreshold)}else{O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}}}}else{if(be==j){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("doubletap",[bf.target]);if(aw.doubleTap){bd=aw.doubleTap.call(aS,bf,bf.target)}}}else{if(be==b){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("longtap",[bf.target]);if(aw.longTap){bd=aw.longTap.call(aS,bf,bf.target)}}}}}return bd}function ao(){var bc=true;if(aw.threshold!==null){bc=ah>=aw.threshold}return bc}function bb(){var bc=false;if(aw.cancelThreshold!==null&&aQ!==null){bc=(aU(aQ)-ah)>=aw.cancelThreshold}return bc}function af(){if(aw.pinchThreshold!==null){return ar>=aw.pinchThreshold}return true}function aB(){var bc;if(aw.maxTimeThreshold){if(ac>=aw.maxTimeThreshold){bc=false}else{bc=true}}else{bc=true}return bc}function am(bc,bd){if(aw.preventDefaultEvents===false){return}if(aw.allowPageScroll===m){bc.preventDefault()}else{var be=aw.allowPageScroll===s;switch(bd){case p:if((aw.swipeLeft&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case o:if((aw.swipeRight&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case e:if((aw.swipeUp&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break;case x:if((aw.swipeDown&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break}}}function a9(){var bd=aP();var bc=Y();var be=af();return bd&&bc&&be}function aY(){return !!(aw.pinchStatus||aw.pinchIn||aw.pinchOut)}function Q(){return !!(a9()&&aY())}function aW(){var bf=aB();var bh=ao();var be=aP();var bc=Y();var bd=bb();var bg=!bd&&bc&&be&&bh&&bf;return bg}function W(){return !!(aw.swipe||aw.swipeStatus||aw.swipeLeft||aw.swipeRight||aw.swipeUp||aw.swipeDown)}function J(){return !!(aW()&&W())}function aP(){return((X===aw.fingers||aw.fingers===i)||!a)}function Y(){return aR[0].end.x!==0}function a7(){return !!(aw.tap)}function Z(){return !!(aw.doubleTap)}function aV(){return !!(aw.longTap)}function R(){if(O==null){return false}var bc=au();return(Z()&&((bc-O)<=aw.doubleTapThreshold))}function I(){return R()}function ay(){return((X===1||!a)&&(isNaN(ah)||ahaw.longTapThreshold)&&(ah=0)){return p}else{if((be<=360)&&(be>=315)){return p}else{if((be>=135)&&(be<=225)){return o}else{if((be>45)&&(be<135)){return x}else{return e}}}}}function au(){var bc=new Date();return bc.getTime()}function aZ(bc){bc=f(bc);var be=bc.offset();var bd={left:be.left,right:be.left+bc.outerWidth(),top:be.top,bottom:be.top+bc.outerHeight()};return bd}function F(bc,bd){return(bc.x>bd.left&&bc.xbd.top&&bc.y-1;)(l=p[f[s]]||new q(f[s],[])).gsClass?(i[s]=l.gsClass,t--):k&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+e).split("."),n=m.pop(),o=j(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(d[n]=c[n]=o,r="undefined"!=typeof module&&module.exports,!r&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+e.split(".").pop(),[],function(){return o});else if(r)if(e===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s-1;)for(f=i[j],e=d?s("easing."+f,null,!0):k.easing[f]||{},g=l.length;--g>-1;)h=l[g],v[f+"."+h]=v[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(g=u.prototype,g._calcEnd=!1,g.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},e=["Linear","Quad","Cubic","Quart","Quint,Strong"],f=e.length;--f>-1;)g=e[f]+",Power"+f,w(new u(null,null,1,f),g,"easeOut",!0),w(new u(null,null,2,f),g,"easeIn"+(0===f?",easeNone":"")),w(new u(null,null,3,f),g,"easeInOut");v.linear=k.easing.Linear.easeIn,v.swing=k.easing.Quad.easeInOut;var x=s("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});g=x.prototype,g.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,j=this._listeners[a],k=0;for(this!==h||i||h.wake(),null==j&&(this._listeners[a]=j=[]),g=j.length;--g>-1;)f=j[g],f.c===b&&f.s===c?j.splice(g,1):0===k&&f.pr-1;)if(d[c].c===b)return void d.splice(c,1)},g.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var y=a.requestAnimationFrame,z=a.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},B=A();for(e=["ms","moz","webkit","o"],f=e.length;--f>-1&&!y;)y=a[e[f]+"RequestAnimationFrame"],z=a[e[f]+"CancelAnimationFrame"]||a[e[f]+"CancelRequestAnimationFrame"];s("Ticker",function(a,b){var c,d,e,f,g,j=this,k=A(),m=b!==!1&&y?"auto":!1,o=500,p=33,q="tick",r=function(a){var b,h,i=A()-B;i>o&&(k+=i-p),B+=i,j.time=(B-k)/1e3,b=j.time-g,(!c||b>0||a===!0)&&(j.frame++,g+=b+(b>=f?.004:f-b),h=!0),a!==!0&&(e=d(r)),h&&j.dispatchEvent(q)};x.call(j),j.time=j.frame=0,j.tick=function(){r(!0)},j.lagSmoothing=function(a,b){o=a||1/l,p=Math.min(b,o,0)},j.sleep=function(){null!=e&&(m&&z?z(e):clearTimeout(e),d=n,e=null,j===h&&(i=!1))},j.wake=function(a){null!==e?j.sleep():a?k+=-B+(B=A()):j.frame>10&&(B=A()-o+5),d=0===c?n:m&&y?y:function(a){return setTimeout(a,1e3*(g-j.time)+1|0)},j===h&&(i=!0),r(2)},j.fps=function(a){return arguments.length?(c=a,f=1/(c||60),g=this.time+f,void j.wake()):c},j.useRAF=function(a){return arguments.length?(j.sleep(),m=a,void j.fps(c)):m},j.fps(a),setTimeout(function(){"auto"===m&&j.frame<5&&"hidden"!==document.visibilityState&&j.useRAF(!1)},1500)}),g=k.Ticker.prototype=new k.events.EventDispatcher,g.constructor=k.Ticker;var C=s("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,V){i||h.wake();var c=this.vars.useFrames?U:V;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});h=C.ticker=new k.Ticker,g=C.prototype,g._dirty=g._gc=g._initted=g._paused=!1,g._totalTime=g._time=0,g._rawPrevTime=-1,g._next=g._last=g._onUpdate=g._timeline=g.timeline=null,g._paused=!1;var D=function(){i&&A()-B>2e3&&h.wake(),setTimeout(D,2e3)};D(),g.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},g.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},g.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},g.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},g.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},g.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},g.render=function(a,b,c){},g.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},g.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime())>=c&&a-1;)"{self}"===a[b]&&(c[b]=this);return c},g._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},g.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=o(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},g.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},g.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:a,b)):this._time},g.totalTime=function(a,b,c){if(i||h.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(I.length&&X(),this.render(a,b,!1),I.length&&X())}return this},g.progress=g.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},g.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},g.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},g.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||l,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},g.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},g.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(i||a||h.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var E=s("core.SimpleTimeline",function(a){C.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});g=E.prototype=new C,g.constructor=E,g.kill()._gc=!1,g._first=g._last=g._recent=null,g._sortChildren=!1,g.add=g.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},g._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},g.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},g.rawTime=function(){return i||h.wake(),this._totalTime};var F=s("TweenLite",function(b,c,d){if(C.call(this,c,d),this.render=F.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:F.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?T[F.defaultOverwrite]:"number"==typeof i?i>>0:T[i],(h||b instanceof Array||b.push&&o(b))&&"number"!=typeof b[0])for(this._targets=g=m(b),this._propLookup=[],this._siblings=[],e=0;e1&&$(f,this,null,1,this._siblings[e])):(f=g[e--]=F.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Y(b,this,!1),1===i&&this._siblings.length>1&&$(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-l,this.render(Math.min(0,-this._delay)))},!0),G=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},H=function(a,b){var c,d={};for(c in a)S[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!P[c]||P[c]&&P[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};g=F.prototype=new C,g.constructor=F,g.kill()._gc=!1,g.ratio=0,g._firstPT=g._targets=g._overwrittenProps=g._startAt=null,g._notifyPluginsOfEnabled=g._lazy=!1,F.version="1.19.0",F.defaultEase=g._ease=new u(null,null,1,1),F.defaultOverwrite="auto",F.ticker=h,F.autoSleep=120,F.lagSmoothing=function(a,b){h.lagSmoothing(a,b)},F.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(F.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)};var I=[],J={},K=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,L=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},M=function(a,b,c,d){var e,f,g,h,i,j,k,l=[a,b],m=0,n="",o=0;for(l.start=a,c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(K)||[],f=b.match(K)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=L,l},N=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k,l="get"===c?a[b]:c,m=typeof a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:l,f:"function"===m,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-l||0};return"number"!==m&&("function"===m&&"get"===c&&(k=b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),o.s=l=g?a[k](g):a[k]()),"string"==typeof l&&(g||isNaN(l))?(o.fp=g,j=M(l,d,h||F.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):n||(o.s=parseFloat(l),o.c=parseFloat(d)-o.s||0)),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},O=F._internals={isArray:o,isSelector:G,lazyTweens:I,blobDif:M},P=F._plugins={},Q=O.tweenLookup={},R=0,S=O.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},T={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},U=C._rootFramesTimeline=new E,V=C._rootTimeline=new E,W=30,X=O.lazyRender=function(){var a,b=I.length;for(J={};--b>-1;)a=I[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);I.length=0};V._startTime=h.time,U._startTime=h.frame,V._active=U._active=!0,setTimeout(X,1),C._updateRoot=F.render=function(){var a,b,c;if(I.length&&X(),V.render((h.time-V._startTime)*V._timeScale,!1,!1),U.render((h.frame-U._startTime)*U._timeScale,!1,!1),I.length&&X(),h.frame>=W){W=h.frame+(parseInt(F.autoSleep,10)||120);for(c in Q){for(b=Q[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete Q[c]}if(c=V._first,(!c||c._paused)&&F.autoSleep&&!U._first&&1===h._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||h.sleep()}}},h.addEventListener("tick",C._updateRoot);var Y=function(a,b,c){var d,e,f=a._gsTweenID;if(Q[f||(a._gsTweenID=f="t"+R++)]||(Q[f]={target:a,tweens:[]}),b&&(d=Q[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return Q[f].tweens},Z=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=F.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},$=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+l,m=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||_(b,0,o),0===_(h,j,o)&&(m[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(m[n++]=h)));for(f=n;--f>-1;)if(h=m[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!Z(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},_=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*l>f-b?l:(f+=a.totalDuration()/a._timeScale/e)>b+l?0:f-b-l};g._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,this._startAt=F.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)S[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=F.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof u?k:"function"==typeof k?new u(k,g.easeParams):v[k]||F.defaultEase:F.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&F._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},g._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;J[b._gsTweenID]&&X(),this.vars.css||b.style&&b!==a&&b.nodeType&&P.css&&this.vars.autoCSS!==!1&&H(this.vars,b);for(g in this.vars)if(l=this.vars[g],S[g])l&&(l instanceof Array||l.push&&o(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(P[g]&&(j=new P[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=N.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&$(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(J[b._gsTweenID]=!0),i)},g.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===l&&"isPause"!==this.data)&&j!==a&&(c=!0,j>l&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:l);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==l||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:l)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,m=this._easeType,n=this._easePower;(1===m||3===m&&k>=.5)&&(k=1-k),3===m&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===m?this.ratio=1-k:2===m?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,I.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===l&&g!==l&&(this._rawPrevTime=0))}},g._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:F.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((o(b)||G(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(F.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!Z(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},g.invalidate=function(){return this._notifyPluginsOfEnabled&&F._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],C.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-l,this.render(Math.min(0,-this._delay))),this},g._enabled=function(a,b){if(i||h.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Y(d[c],this,!0);else this._siblings=Y(this.target,this,!0)}return C.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?F._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},F.to=function(a,b,c){return new F(a,b,c)},F.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new F(a,b,c)},F.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new F(a,b,d)},F.delayedCall=function(a,b,c,d,e){return new F(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},F.set=function(a,b){return new F(a,0,b)},F.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:F.selector(a)||a;var c,d,e,f;if((o(a)||G(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(F.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Y(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},F.killTweensOf=F.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=F.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var aa=s("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=aa.prototype},!0);if(g=aa.prototype,aa.version="1.19.0",aa.API=2,g._firstPT=null,g._addTween=N,g.setRatio=L,g._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},g._mod=g._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},F._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},aa.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===aa.API&&(P[(new a[b])._propName]=a[b]);return!0},r.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=s("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){aa.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new aa(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,aa.activate([g]),g},e=a._gsQueue){for(f=0;ft._rawPrevTime||0===t._rawPrevTime&&a._reversed,_=l?0:r,f=l?r:0;if(e||!this._forcingPlayhead){for(a.pause(h),n=t._prev;n&&n._startTime===h;)n._rawPrevTime=f,n=n._prev;for(n=t._next;n&&n._startTime===h;)n._rawPrevTime=_,n=n._next;e&&e.apply(s||a.vars.callbackScope||a,i||u),(this._forcingPlayhead||!a._paused)&&a.seek(o)}},m=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},d=s.prototype=new e;return s.version="1.17.0",d.constructor=s,d.kill()._gc=d._forcingPlayhead=!1,d.to=function(t,e,s,r){var n=s.repeat&&f.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},d.from=function(t,e,s,r){return this.add((s.repeat&&f.TweenMax||i).from(t,e,s),r)},d.fromTo=function(t,e,s,r,n){var a=r.repeat&&f.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},d.staggerTo=function(t,e,r,n,a,h,l,_){var u,f=new s({onComplete:h,onCompleteParams:l,callbackScope:_,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],o(t)&&(t=m(t)),n=n||0,0>n&&(t=m(t),t.reverse(),n*=-1),u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),f.to(t[u],e,c(r),u*n);return this.add(f,a)},d.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},d.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},d.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},d.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},d.add=function(r,n,a,o){var l,_,u,f,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&h(r)){for(a=a||"normal",o=o||0,l=n,_=r.length,u=0;_>u;u++)h(f=r[u])&&(f=new s({tweens:f})),this.add(f,l),"string"!=typeof f&&"function"!=typeof f&&("sequence"===a?l=f._startTime+f.totalDuration()/f._timeScale:"start"===a&&(f._startTime-=f.delay())),l+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},d.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&h(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},d._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},d.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},d.insert=d.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},d.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},d.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},d.addPause=function(t,e,s,r){var n=i.delayedCall(0,p,["{self}",e,s,r],this);return n.data="isPause",this.add(n,t)},d.removeLabel=function(t){return delete this._labels[t],this},d.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},d._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&h(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},d.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},d.stop=function(){return this.paused(!0)},d.gotoAndPlay=function(t,e){return this.play(t,e)},d.gotoAndStop=function(t,e){return this.pause(t,e)},d.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,h,u=this._dirty?this.totalDuration():this._totalDuration,f=this._time,c=this._startTime,p=this._timeScale,m=this._paused;if(t>=u)this._totalTime=this._time=u,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=u+1e-4;else if(1e-7>t)if(this._totalTime=this._time=0,(0!==f||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=n=!0,o="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,0===t&&n)for(s=this._first;s&&0===s._startTime;)s._duration||(n=!1),s=s._next;t=0,this._initted||(h=!0)}else this._totalTime=this._time=this._rawPrevTime=t;if(this._time!==f&&this._first||i||h){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==f&&t>0&&(this._active=!0),0===f&&this.vars.onStart&&0!==this._time&&(e||this._callback("onStart")),this._time>=f)for(s=this._first;s&&(a=s._next,!this._paused||m);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||m);)(s._active||f>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||(l.length&&_(),this._callback("onUpdate"))),o&&(this._gc||(c===this._startTime||p!==this._timeScale)&&(0===this._time||u>=this.totalDuration())&&(n&&(l.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o)))}},d._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},d.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},d.getTweensOf=function(t,e){var s,r,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=i.getTweensOf(t),r=s.length;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},d.recent=function(){return this._recent},d._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},d.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},d._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},d.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},d.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},d._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},d.totalTime=function(){this._forcingPlayhead=!0;var e=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},d.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},d.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},d.paused=function(e){if(!e)for(var i=this._first,s=this._time;i;)i._startTime===s&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},d.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},d.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("./TweenLite.js"),module.exports=e())}("TimelineLite"); /* EASING PLUGIN*/ /*! * VERSION: 1.15.5 * DATE: 2016-07-08 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2016, GreenSock. All rights reserved. * This work is subject to the terms at http://greensock.com/standard-license or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com **/ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return athis._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(){"use strict";var a=function(){return _gsScope.GreenSockGlobals||_gsScope};"function"==typeof define&&define.amd?define(["TweenLite"],a):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=a())}(); /* CSS PLUGIN */ /*! * VERSION: 1.19.0 * DATE: 2016-07-14 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2016, GreenSock. All rights reserved. * This work is subject to the terms at http://greensock.com/standard-license or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.19.0",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N=document,O=function(a){return N.createElementNS?N.createElementNS("http://www.w3.org/1999/xhtml",a):N.createElement(a)},P=O("div"),Q=O("img"),R=g._internals={_specialProps:i},S=navigator.userAgent,T=function(){var a=S.indexOf("Android"),b=O("a");return m=-1!==S.indexOf("Safari")&&-1===S.indexOf("Chrome")&&(-1===a||Number(S.substr(a+8,1))>3),o=m&&Number(S.substr(S.indexOf("Version/")+8,1))<6,n=-1!==S.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(S)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(S))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),U=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},V=function(a){window.console&&console.log(a)},W="",X="",Y=function(a,b){b=b||P;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(X=3===d?"ms":c[d],W="-"+X.toLowerCase()+"-",X+a):null},Z=N.defaultView?N.defaultView.getComputedStyle:function(){},$=g.getStyle=function(a,b,c,d,e){var f;return T||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||Z(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):U(a)},_=R.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=P.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+$(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||N.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(P),h=parseFloat(P[k?"offsetWidth":"offsetHeight"]),l.removeChild(P),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=_(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},aa=R.calculateOffset=function(a,b,c){if("absolute"!==$(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=$(a,"margin"+d,c);return a["offset"+d]-(_(a,b,parseFloat(e),e.replace(w,""))||0)},ba=function(a,b){var c,d,e,f={};if(b=b||Z(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Ca===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ba===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return T||(f.opacity=U(a)),d=Pa(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Ea&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},ca=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:aa(a,g),void 0!==j[g]&&(h=new ra(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},da={width:["Left","Right"],height:["Top","Bottom"]},ea=["marginLeft","marginRight","marginTop","marginBottom"],fa=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||Z(a))[b]||0;if(a.getBBox&&Ma(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=da[b],f=e.length;for(c=c||Z(a,null);--f>-1;)d-=parseFloat($(a,"padding"+e[f],c,!0))||0,d-=parseFloat($(a,"border"+e[f]+"Width",c,!0))||0;return d},ga=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ha=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ja=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},ka={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},la=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},ma=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),ka[a])c=ka[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(a[3])),c[0]=la(g+1/3,d,e),c[1]=la(g,d,e),c[2]=la(g-1/3,d,e);else c=a.match(s)||ka.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=ka.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},na=function(a,b){var c,d,e,f=a.match(oa)||[],g=0,h=f.length?"":a;for(c=0;c0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;nn--)for(;++nm--)for(;++mi;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},ra=(R._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new ra(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},R.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof sa||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ta=function(a,b,c,d,e,f){var g=new sa(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},ua=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new sa(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&oa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" "),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,oa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ha(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&oa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&T,p=ma(p,C),u=ma(u,C),y=p.length+u.length>6,y&&!T&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(T||(y=!1),C?h.appendXtra(y?"hsla(":"hsl(",p[0],ha(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ha(u[1],p[1]),"%,",!1).appendXtra("",p[2],ha(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(y?"rgba(":"rgb(",p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),oa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n0;)j["xn"+va]=0,j["xs"+va]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new sa(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var wa=function(a,b){b=b||{},this.p=b.prefix?Y(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||pa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},xa=R._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;dh.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return ua(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format($(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){xa(a,{parser:function(a,d,e,f,g,h,i){var j=new sa(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=m||n;var za,Aa="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ba=Y("transform"),Ca=W+"transform",Da=Y("transformOrigin"),Ea=null!==Y("perspective"),Fa=R.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Ea?g.defaultForce3D||"auto":!1},Ga=window.SVGElement,Ha=function(a,b,c){var d,e=N.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ia=N.documentElement,Ja=function(){var a,b,c,d=p||/Android/i.test(S)&&!window.chrome;return N.createElementNS&&!d&&(a=Ha("svg",Ia),b=Ha("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Da]="50% 50%",b.style[Ba]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Ea),Ia.removeChild(a)),d}(),Ka=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Oa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),b=ga(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Na&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},La=function(a){try{return a.getBBox()}catch(a){}},Ma=function(a){return!!(Ga&&a.getBBox&&a.getCTM&&La(a)&&(!a.parentNode||a.parentNode.getBBox&&a.parentNode.getCTM))},Na=[1,0,0,1,0,0],Oa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Fa,j=1e5,k=a.style;if(Ba?d=$(a,Ca,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,c&&Ba&&((h="none"===Z(a).display)||!a.parentNode)&&(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ia.appendChild(a)),d=$(a,Ca,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Ta(k,"display"),g&&Ia.removeChild(a)),(i.svg||a.getBBox&&Ma(a))&&(c&&-1!==(k[Ba]+"").indexOf("matrix")&&(d=k[Ba],c=0),e=a.getAttribute("transform"),c&&e&&(-1!==e.indexOf("matrix")?(d=e,c=0):-1!==e.indexOf("translate")&&(d="matrix(1,0,0,1,"+e.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",c=0))),c)return Na;for(e=(d||"").match(s)||[],va=e.length;--va>-1;)f=Number(e[va]),e[va]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Pa=R.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Fa:new Fa,n=m.scaleX<0,o=2e-5,p=1e5,q=Ea?parseFloat($(a,Da,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getBBox||!Ma(a)),m.svg&&(Ka(a,$(a,Da,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),za=g.useSVGTransformAttr||Ja),f=Oa(a),f!==Na){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),x=x*v+B*w,t=y*v+C*w,C=y*-w+C*v,D=z*-w+D*v,y=t),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),m.scaleX=(Math.sqrt(x*x+y*y)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+G*G)*p+.5|0)/p,m.scaleZ=(Math.sqrt(D*D+H*H)*p+.5|0)/p,m.rotationX||m.rotationY?m.skewX=0:(m.skewX=B||C?Math.atan2(B,C)*L+m.rotation:m.skewX||0,Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180))),m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Ea||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,Math.abs(l)>90&&Math.abs(l)<270&&(n?(i*=-1,l+=0>=k?180:-180,k+=0>=k?180:-180):(j*=-1,l+=0>=l?180:-180)),m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Ea&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}m.zOrigin=q;for(h in m)m[h]-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(za&&a.style[Ba]?b.delayedCall(.001,function(){Ta(a.style,Ba)}):!za&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Qa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),va=0;4>va;va++)z=ea[va],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):_(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>va?-d.ieOffsetX:-d.ieOffsetY:2>va?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===va||2===va?1:B)))+"px"}}},Ra=R.set3DTransformRatio=R.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D;if(((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||za&&L||!Ea)return void(B||z.skewX||L?(B*=K,x=z.skewX*K,y=1e5,b=Math.cos(B)*E,e=Math.sin(B)*E,c=Math.sin(B-x)*-F,f=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(s=Math.tan(x-z.skewY*K),s=Math.sqrt(1+s*s),c*=s,f*=s,z.skewY&&(s=Math.tan(z.skewY*K),s=Math.sqrt(1+s*s),b*=s,e*=s)),L&&(H+=z.xOrigin-(z.xOrigin*b+z.yOrigin*c)+z.xOffset,I+=z.yOrigin-(z.xOrigin*e+z.yOrigin*f)+z.yOffset,za&&(z.xPercent||z.yPercent)&&(p=this.t.getBBox(),H+=.01*z.xPercent*p.width,I+=.01*z.yPercent*p.height),p=1e-6,p>H&&H>-p&&(H=0),p>I&&I>-p&&(I=0)),u=(b*y|0)/y+","+(e*y|0)/y+","+(c*y|0)/y+","+(f*y|0)/y+","+H+","+I+")",L&&za?this.t.setAttribute("transform","matrix("+u):A[Ba]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ba]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(p=1e-4,p>E&&E>-p&&(E=G=2e-5),p>F&&F>-p&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||z.skewX)B*=K,q=b=Math.cos(B),r=e=Math.sin(B),z.skewX&&(B-=z.skewX*K,q=Math.cos(B),r=Math.sin(B),"simple"===z.skewType&&(s=Math.tan((z.skewX-z.skewY)*K),s=Math.sqrt(1+s*s),q*=s,r*=s,z.skewY&&(s=Math.tan(z.skewY*K),s=Math.sqrt(1+s*s),b*=s,e*=s))),c=-r,f=q;else{if(!(D||C||1!==G||M||L))return void(A[Ba]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));b=f=1,c=e=0}j=1,d=g=h=i=k=l=0,m=M?-1/M:0,o=z.zOrigin,p=1e-6,v=",",w="0",B=D*K,B&&(q=Math.cos(B),r=Math.sin(B),h=-r,k=m*-r,d=b*r,g=e*r,j=q,m*=q,b*=q,e*=q),B=C*K,B&&(q=Math.cos(B),r=Math.sin(B),s=c*q+d*r,t=f*q+g*r,i=j*r,l=m*r,d=c*-r+d*q,g=f*-r+g*q,j*=q,m*=q,c=s,f=t),1!==G&&(d*=G,g*=G,j*=G,m*=G),1!==F&&(c*=F,f*=F,i*=F,l*=F),1!==E&&(b*=E,e*=E,h*=E,k*=E),(o||L)&&(o&&(H+=d*-o,I+=g*-o,J+=j*-o+o),L&&(H+=z.xOrigin-(z.xOrigin*b+z.yOrigin*c)+z.xOffset,I+=z.yOrigin-(z.xOrigin*e+z.yOrigin*f)+z.yOffset),p>H&&H>-p&&(H=w),p>I&&I>-p&&(I=w),p>J&&J>-p&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(p>b&&b>-p?w:b)+v+(p>e&&e>-p?w:e)+v+(p>h&&h>-p?w:h),u+=v+(p>k&&k>-p?w:k)+v+(p>c&&c>-p?w:c)+v+(p>f&&f>-p?w:f),C||D||1!==G?(u+=v+(p>i&&i>-p?w:i)+v+(p>l&&l>-p?w:l)+v+(p>d&&d>-p?w:d),u+=v+(p>g&&g>-p?w:g)+v+(p>j&&j>-p?w:j)+v+(p>m&&m>-p?w:m)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ba]=u};j=Fa.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,xa("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j;"function"==typeof i[c]&&(j=i[c],i[c]=b);var k,l,m,n,o,p,s,t,u,v=a._gsTransform,w=a.style,x=1e-6,y=Aa.length,z=i,A={},B="transformOrigin",C=Pa(a,e,!0,z.parseTransform),D=z.transform&&("function"==typeof z.transform?z.transform(r,q):z.transform);if(d._transform=C,D&&"string"==typeof D&&Ba)l=P.style,l[Ba]=D,l.display="block",l.position="absolute",N.body.appendChild(P),k=Pa(P,null,!1),C.svg&&(p=C.xOrigin,s=C.yOrigin,k.x-=C.xOffset,k.y-=C.yOffset,(z.transformOrigin||z.svgOrigin)&&(D={},Ka(a,ga(z.transformOrigin),D,z.svgOrigin,z.smoothOrigin,!0),p=D.xOrigin,s=D.yOrigin,k.x-=D.xOffset-C.xOffset,k.y-=D.yOffset-C.yOffset),(p||s)&&(t=Oa(P,!0),k.x-=p-(p*t[0]+s*t[2]),k.y-=s-(p*t[1]+s*t[3]))),N.body.removeChild(P),k.perspective||(k.perspective=C.perspective),null!=z.xPercent&&(k.xPercent=ia(z.xPercent,C.xPercent)),null!=z.yPercent&&(k.yPercent=ia(z.yPercent,C.yPercent));else if("object"==typeof z){if(k={scaleX:ia(null!=z.scaleX?z.scaleX:z.scale,C.scaleX),scaleY:ia(null!=z.scaleY?z.scaleY:z.scale,C.scaleY),scaleZ:ia(z.scaleZ,C.scaleZ),x:ia(z.x,C.x),y:ia(z.y,C.y),z:ia(z.z,C.z),xPercent:ia(z.xPercent,C.xPercent),yPercent:ia(z.yPercent,C.yPercent),perspective:ia(z.transformPerspective,C.perspective)},o=z.directionalRotation,null!=o)if("object"==typeof o)for(l in o)z[l]=o[l];else z.rotation=o;"string"==typeof z.x&&-1!==z.x.indexOf("%")&&(k.x=0,k.xPercent=ia(z.x,C.xPercent)),"string"==typeof z.y&&-1!==z.y.indexOf("%")&&(k.y=0,k.yPercent=ia(z.y,C.yPercent)),k.rotation=ja("rotation"in z?z.rotation:"shortRotation"in z?z.shortRotation+"_short":"rotationZ"in z?z.rotationZ:C.rotation-C.skewY,C.rotation-C.skewY,"rotation",A),Ea&&(k.rotationX=ja("rotationX"in z?z.rotationX:"shortRotationX"in z?z.shortRotationX+"_short":C.rotationX||0,C.rotationX,"rotationX",A),k.rotationY=ja("rotationY"in z?z.rotationY:"shortRotationY"in z?z.shortRotationY+"_short":C.rotationY||0,C.rotationY,"rotationY",A)),k.skewX=ja(z.skewX,C.skewX-C.skewY),(k.skewY=ja(z.skewY,C.skewY))&&(k.skewX+=k.skewY,k.rotation+=k.skewY)}for(Ea&&null!=z.force3D&&(C.force3D=z.force3D,n=!0),C.skewType=z.skewType||C.skewType||g.defaultSkewType,m=C.force3D||C.z||C.rotationX||C.rotationY||k.z||k.rotationX||k.rotationY||k.perspective,m||null==z.scale||(k.scaleZ=1);--y>-1;)u=Aa[y],D=k[u]-C[u],(D>x||-x>D||null!=z[u]||null!=M[u])&&(n=!0,f=new sa(C,u,C[u],D,f),u in A&&(f.e=A[u]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return D=z.transformOrigin,C.svg&&(D||z.svgOrigin)&&(p=C.xOffset,s=C.yOffset,Ka(a,ga(D),k,z.svgOrigin,z.smoothOrigin),f=ta(C,"xOrigin",(v?C:k).xOrigin,k.xOrigin,f,B),f=ta(C,"yOrigin",(v?C:k).yOrigin,k.yOrigin,f,B),(p!==C.xOffset||s!==C.yOffset)&&(f=ta(C,"xOffset",v?p:C.xOffset,C.xOffset,f,B),f=ta(C,"yOffset",v?s:C.yOffset,C.yOffset,f,B)),D=za?null:"0px 0px"),(D||Ea&&m&&C.zOrigin)&&(Ba?(n=!0,u=Da,D=(D||$(a,u,e,!1,"50% 50%"))+"",f=new sa(w,u,0,0,f,-1,B),f.b=w[u],f.plugin=h,Ea?(l=C.zOrigin,D=D.split(" "),C.zOrigin=(D.length>2&&(0===l||"0px"!==D[2])?parseFloat(D[2]):l)||0,f.xs0=f.e=D[0]+" "+(D[1]||"50%")+" 0px",f=new sa(C,"zOrigin",0,0,f,-1,f.n),f.b=l,f.xs0=f.e=C.zOrigin):f.xs0=f.e=D):ga(D+"",C)),n&&(d._transformType=C.svg&&za||!m&&3!==this._transformType?2:3),j&&(i[c]=j),f},prefix:!0}),xa("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),xa("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;jp?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=_(a,"borderLeft",o,t),w=_(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=_(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=ua(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:pa("0px 0px 0px 0px",!1,!0)}),xa("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return ua(a.style,c,this.format($(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:pa("0px 0px",!1,!0)}),xa("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||Z(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=$(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),Q.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-Q.width:a.offsetHeight-Q.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ga}),xa("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ga(-1===a.indexOf(" ")?a+" "+a:a)}}),xa("perspective",{defaultValue:"0px",prefix:!0}),xa("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),xa("transformStyle",{prefix:!0}),xa("backfaceVisibility",{prefix:!0}),xa("userSelect",{prefix:!0}),xa("margin",{parser:qa("marginTop,marginRight,marginBottom,marginLeft")}),xa("padding",{parser:qa("paddingTop,paddingRight,paddingBottom,paddingLeft")}),xa("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format($(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),xa("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),xa("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),xa("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=$(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/_(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+$(a,"borderTopStyle",e,!1,"solid")+" "+$(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(oa)||["#000"])[0]}}),xa("borderWidth",{ parser:qa("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),xa("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new sa(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Sa=function(a){var b,c=this.t,d=c.filter||$(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!$(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};xa("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat($(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===$(a,"visibility",e)&&0!==b&&(h=0),T?f=new sa(i,"opacity",h,b-h,f):(f=new sa(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Sa),j&&(f=new sa(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Ta=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Ua=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Ta(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};xa("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new sa(a,d,0,0,g,2),g.setRatio=Ua,g.pr=-11,c=!0,g.b=o,k=ba(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=ca(a,k,ba(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Va=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Da:i[c].p),Ta(g,c);e&&(Ta(g,Ba),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(xa("clearProps",{parser:function(a,b,d,e,f){return f=new sa(a,d,0,0,f,2),f.setRatio=Va,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),va=j.length;va--;)ya(j[va]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=Z(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=$(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ba(a,e),A.cssText=t+";"+b,n=ca(a,n,ba(a)).difs,!T&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ba?m&&(l=!0,""===A.zIndex&&(w=$(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new sa(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ba?Ra:Qa,x.data=this._transform||Pa(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b)n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=$(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=ma(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=ua(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=ua(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=fa(a,g,e),o="px"):"left"===g||"top"===g?(j=aa(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&j&&(j=_(a,g,j,o),"%"===p?(j/=_(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=_(a,g,1,p):"px"!==p&&(l=_(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new sa(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):V("invalid "+g+" tween value: "+b[g]):(c=new sa(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d-1;)Xa(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ba(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Xa(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Xa(a,k,m),i.render(c,!0,!0),Xa(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=ca(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define(["TweenLite"],b):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=b())}("CSSPlugin"); /* SPLIT TEXT UTIL */ /*! * VERSION: 0.4.0 * DATE: 2016-07-09 * UPDATES AND DOCS AT: http://greensock.com * * @license Copyright (c) 2008-2016, GreenSock. All rights reserved. * SplitText is a Club GreenSock membership benefit; You must have a valid membership to use * this code without violating the terms of use. Visit http://greensock.com/club/ to sign up or get more details. * This work is subject to the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;!function(a){"use strict";var b=a.GreenSockGlobals||a,c=function(a){var c,d=a.split("."),e=b;for(c=0;cb;b++)if(c=a[b],j(c))for(d=c.length,d=0;d||
)/gi,o=f.all&&!f.addEventListener,p=" style='position:relative;display:inline-block;"+(o?"*display:inline;*zoom:1;'":"'"),q=function(a,b){a=a||"";var c=-1!==a.indexOf("++"),d=1;return c&&(a=a.split("++").join("")),function(){return"<"+b+p+(a?" class='"+a+(c?d++:"")+"'>":">")}},r=d.SplitText=b.SplitText=function(a,b){if("string"==typeof a&&(a=r.selector(a)),!a)throw"cannot split a null element.";this.elements=j(a)?k(a):[a],this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=b||{},this.split(b)},s=function(a,b,c){var d=a.nodeType;if(1===d||9===d||11===d)for(a=a.firstChild;a;a=a.nextSibling)s(a,b,c);else(3===d||4===d)&&(a.nodeValue=a.nodeValue.split(b).join(c))},t=function(a,b){for(var c=b.length;--c>-1;)a.push(b[c])},u=function(a,b,c,d,h){n.test(a.innerHTML)&&(a.innerHTML=a.innerHTML.replace(n,m));var j,k,o,p,r,u,v,w,x,y,z,A,B,C,D=e(a),E=b.span?"span":"div",F=b.type||b.split||"chars,words,lines",G=-1!==F.indexOf("lines")?[]:null,H=-1!==F.indexOf("words"),I=-1!==F.indexOf("chars"),J="absolute"===b.position||b.absolute===!0,K=b.wordDelimiter||" ",L=" "!==K?"":J?"­ ":" ",M=-999,N=g(a),O=i(a,"paddingLeft",N),P=i(a,"borderBottomWidth",N)+i(a,"borderTopWidth",N),Q=i(a,"borderLeftWidth",N)+i(a,"borderRightWidth",N),R=i(a,"paddingTop",N)+i(a,"paddingBottom",N),S=i(a,"paddingLeft",N)+i(a,"paddingRight",N),T=i(a,"textAlign",N,!0),U=.2*i(a,"fontSize"),V=a.clientHeight,W=a.clientWidth,X=b.span?"":"",Y=q(b.wordsClass,E),Z=q(b.charsClass,E),$=-1!==(b.linesClass||"").indexOf("++"),_=b.linesClass,aa=-1!==D.indexOf("<"),ba=!0,ca=[],da=[],ea=[];for(!b.reduceWhiteSpace!=!1&&(D=D.replace(l,"")),$&&(_=_.split("++").join("")),aa&&(D=D.split("<").join("{{LT}}")),j=D.length,p=Y(),r=0;j>r;r++)if(v=D.charAt(r),")"===v&&D.substr(r,20)===m)p+=(ba?X:"")+"
",ba=!1,r!==j-20&&D.substr(r+20,20)!==m&&(p+=" "+Y(),ba=!0),r+=19;else if(v===K&&D.charAt(r-1)!==K&&r!==j-1&&D.substr(r-20,20)!==m){for(p+=ba?X:"",ba=!1;D.charAt(r+1)===K;)p+=L,r++;(")"!==D.charAt(r+1)||D.substr(r+1,20)!==m)&&(p+=L+Y(),ba=!0)}else"{"===v&&"{{LT}}"===D.substr(r,6)?(p+=I?Z()+"{{LT}}":"{{LT}}",r+=5):p+=I&&" "!==v?Z()+v+"":v;for(a.innerHTML=p+(ba?X:""),aa&&s(a,"{{LT}}","<"),u=a.getElementsByTagName("*"),j=u.length,w=[],r=0;j>r;r++)w[r]=u[r];if(G||J)for(r=0;j>r;r++)x=w[r],o=x.parentNode===a,(o||J||I&&!H)&&(y=x.offsetTop,G&&o&&Math.abs(y-M)>U&&"BR"!==x.nodeName&&(k=[],G.push(k),M=y),J&&(x._x=x.offsetLeft,x._y=y,x._w=x.offsetWidth,x._h=x.offsetHeight),G&&(H!==o&&I||(k.push(x),x._x-=O),o&&r&&(w[r-1]._wordEnd=!0),"BR"===x.nodeName&&x.nextSibling&&"BR"===x.nextSibling.nodeName&&G.push([])));for(r=0;j>r;r++)x=w[r],o=x.parentNode===a,"BR"!==x.nodeName?(J&&(A=x.style,H||o||(x._x+=x.parentNode._x,x._y+=x.parentNode._y),A.left=x._x+"px",A.top=x._y+"px",A.position="absolute",A.display="block",A.width=x._w+1+"px",A.height=x._h+"px"),H?o&&""!==x.innerHTML?da.push(x):I&&ca.push(x):o?(a.removeChild(x),w.splice(r--,1),j--):!o&&I&&(y=!G&&!J&&x.nextSibling,a.appendChild(x),y||a.appendChild(f.createTextNode(" ")),ca.push(x))):G||J?(a.removeChild(x),w.splice(r--,1),j--):H||a.appendChild(x);if(G){for(J&&(z=f.createElement(E),a.appendChild(z),B=z.offsetWidth+"px",y=z.offsetParent===a?0:a.offsetLeft,a.removeChild(z)),A=a.style.cssText,a.style.cssText="display:none;";a.firstChild;)a.removeChild(a.firstChild);for(C=" "===K&&(!J||!H&&!I),r=0;ru;u++)"BR"!==k[u].nodeName&&(x=k[u],z.appendChild(x),C&&(x._wordEnd||H)&&z.appendChild(f.createTextNode(" ")),J&&(0===u&&(z.style.top=x._y+"px",z.style.left=O+y+"px"),x.style.top="0px",y&&(x.style.left=x._x-y+"px")));0===j&&(z.innerHTML=" "),H||I||(z.innerHTML=e(z).split(String.fromCharCode(160)).join(" ")),J&&(z.style.width=B,z.style.height=x._h+"px"),a.appendChild(z)}a.style.cssText=A}J&&(V>a.clientHeight&&(a.style.height=V-R+"px",a.clientHeighta.clientWidth&&(a.style.width=W-S+"px",a.clientWidth-1;)this._originals[b]=this.elements[b].innerHTML,u(this.elements[b],this.vars,this.chars,this.words,this.lines);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},v.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var a=this._originals.length;--a>-1;)this.elements[a].innerHTML=this._originals[a];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},r.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(r.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)},r.version="0.4.0"}(_gsScope),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports&&(module.exports=b())}("SplitText"); try{ window.GreenSockGlobals = null; window._gsQueue = null; window._gsDefine = null; delete(window.GreenSockGlobals); delete(window._gsQueue); delete(window._gsDefine); } catch(e) {} try{ window.GreenSockGlobals = oldgs; window._gsQueue = oldgs_queue; } catch(e) {} if (window.tplogs==true) try { console.groupEnd(); } catch(e) {} (function(e,t){ e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};e.expr[":"].uncached=function(t){var n=document.createElement("img");n.src=t.src;return e(t).is('img[src!=""]')&&!n.complete};e.fn.waitForImages=function(t,n,r){if(e.isPlainObject(arguments[0])){n=t.each;r=t.waitForAll;t=t.finished}t=t||e.noop;n=n||e.noop;r=!!r;if(!e.isFunction(t)||!e.isFunction(n)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var i=e(this),s=[];if(r){var o=e.waitForImages.hasImageProperties||[],u=/url\((['"]?)(.*?)\1\)/g;i.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){s.push({src:t.attr("src"),element:t[0]})}e.each(o,function(e,n){var r=t.css(n);if(!r){return true}var i;while(i=u.exec(r)){s.push({src:i[2],element:t[0]})}})})}else{i.find("img:uncached").each(function(){s.push({src:this.src,element:this})})}var f=s.length,l=0;if(f==0){t.call(i[0])}e.each(s,function(r,s){var o=new Image;e(o).bind("load error",function(e){l++;n.call(s.element,l,f,e.type=="load");if(l==f){t.call(i[0]);return false}});o.src=s.src})})}; })(jQuery); // source --> https://mycomputer.com.gr/forma-ftiaksto-monos-sou/wp-content/plugins/revslider/public/assets/js/jquery.themepunch.revolution.min.js?ver=5.3.1.5 /************************************************************************** * jquery.themepunch.revolution.js - jQuery Plugin for Revolution Slider * @version: 5.3.1.5 (08.12.2016) * @requires jQuery v1.7 or later (tested on 1.9) * @author ThemePunch **************************************************************************/ !function(jQuery,undefined){"use strict";var version={core:"5.3.1.4","revolution.extensions.actions.min.js":"2.0.4","revolution.extensions.carousel.min.js":"1.2.1","revolution.extensions.kenburn.min.js":"1.2.0","revolution.extensions.layeranimation.min.js":"3.5.0","revolution.extensions.navigation.min.js":"1.3.2","revolution.extensions.parallax.min.js":"2.2.0","revolution.extensions.slideanims.min.js":"1.6","revolution.extensions.video.min.js":"2.0.2"};jQuery.fn.extend({revolution:function(a){var b={delay:9e3,responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,autoHeight:"off",sliderType:"standard",sliderLayout:"auto",fullScreenAutoWidth:"off",fullScreenAlignForce:"off",fullScreenOffsetContainer:"",fullScreenOffset:"0",hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,disableProgressBar:"off",stopAtSlide:-1,stopAfterLoops:-1,shadow:0,dottedOverlay:"none",startDelay:0,lazyType:"smart",spinner:"spinner0",shuffle:"off",viewPort:{enable:!1,outof:"wait",visible_area:"60%",presize:!1},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:"off",simplifyAll:"on",nextSlideOnWindowFocus:"off",disableFocusListener:!0,ignoreHeightChanges:"off",ignoreHeightChangesSize:0},parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",speed:400,bgparallax:"off",opacity:"on",disable_onmobile:"off",ddd_shadow:"on",ddd_bgfreeze:"off",ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,ddd_path:"mouse"},scrolleffect:{fade:"off",blur:"off",grayscale:"off",maxblur:10,on_layers:"off",on_slidebg:"off",on_static_layers:"off",on_parallax_layers:"off",on_parallax_static_layers:"off",direction:"both",multiplicator:1.35,multiplicator_layers:.5,tilt:30,disable_on_mobile:"on"},carousel:{easing:punchgs.Power3.easeInOut,speed:800,showLayersAllTime:"off",horizontal_align:"center",vertical_align:"center",infinity:"on",space:0,maxVisibleItems:3,stretch:"off",fadeout:"on",maxRotation:0,minScale:0,vary_fade:"off",vary_rotation:"on",vary_scale:"off",border_radius:"0px",padding_top:0,padding_bottom:0},navigation:{keyboardNavigation:"off",keyboard_direction:"horizontal",mouseScrollNavigation:"off",onHoverStop:"on",touch:{touchenabled:"off",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,swipe_direction:"horizontal"},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,tmp:"",rtl:!1,left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0,container:"slider"},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0,container:"slider"}},bullets:{container:"slider",rtl:!1,style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"left",v_align:"center",space:0,h_offset:20,v_offset:0,tmp:''},thumbnails:{container:"slider",rtl:!1,style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"left",v_align:"center",h_offset:20,v_offset:0},tabs:{container:"slider",rtl:!1,style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"left",v_align:"center",h_offset:20,v_offset:0}},extensions:"extensions/",extensions_suffix:".min.js",debugMode:!1};return a=jQuery.extend(!0,{},b,a),this.each(function(){var b=jQuery(this);a.minHeight=a.minHeight!=undefined?parseInt(a.minHeight,0):a.minHeight,a.scrolleffect.on="on"===a.scrolleffect.fade||"on"===a.scrolleffect.blur||"on"===a.scrolleffect.grayscale,"hero"==a.sliderType&&b.find(">ul>li").each(function(a){a>0&&jQuery(this).remove()}),a.jsFileLocation=a.jsFileLocation||getScriptLocation("themepunch.revolution.min.js"),a.jsFileLocation=a.jsFileLocation+a.extensions,a.scriptsneeded=getNeededScripts(a,b),a.curWinRange=0,a.rtl=!0,a.navigation!=undefined&&a.navigation.touch!=undefined&&(a.navigation.touch.swipe_min_touches=a.navigation.touch.swipe_min_touches>5?1:a.navigation.touch.swipe_min_touches),jQuery(this).on("scriptsloaded",function(){return a.modulesfailing?(b.html('
!! Error at loading Slider Revolution 5.0 Extrensions.'+a.errorm+"
").show(),!1):(_R.migration!=undefined&&(a=_R.migration(b,a)),punchgs.force3D=!0,"on"!==a.simplifyAll&&punchgs.TweenLite.lagSmoothing(1e3,16),prepareOptions(b,a),void initSlider(b,a))}),b[0].opt=a,waitForScripts(b,a)})},revremoveslide:function(a){return this.each(function(){var b=jQuery(this),c=b[0].opt;if(!(a<0||a>c.slideamount)&&b!=undefined&&b.length>0&&jQuery("body").find("#"+b.attr("id")).length>0&&c&&c.li.length>0&&(a>0||a<=c.li.length)){var d=jQuery(c.li[a]),e=d.data("index"),f=!1;c.slideamount=c.slideamount-1,c.realslideamount=c.realslideamount-1,removeNavWithLiref(".tp-bullet",e,c),removeNavWithLiref(".tp-tab",e,c),removeNavWithLiref(".tp-thumb",e,c),d.hasClass("active-revslide")&&(f=!0),d.remove(),c.li=removeArray(c.li,a),c.carousel&&c.carousel.slides&&(c.carousel.slides=removeArray(c.carousel.slides,a)),c.thumbs=removeArray(c.thumbs,a),_R.updateNavIndexes&&_R.updateNavIndexes(c),f&&b.revnext(),punchgs.TweenLite.set(c.li,{minWidth:"99%"}),punchgs.TweenLite.set(c.li,{minWidth:"100%"})}})},revaddcallback:function(a){return this.each(function(){this.opt&&(this.opt.callBackArray===undefined&&(this.opt.callBackArray=new Array),this.opt.callBackArray.push(a))})},revgetparallaxproc:function(){return jQuery(this)[0].opt.scrollproc},revdebugmode:function(){return this.each(function(){var a=jQuery(this);a[0].opt.debugMode=!0,containerResized(a,a[0].opt)})},revscroll:function(a){return this.each(function(){var b=jQuery(this);jQuery("body,html").animate({scrollTop:b.offset().top+b.height()-a+"px"},{duration:400})})},revredraw:function(a){return this.each(function(){var a=jQuery(this);containerResized(a,a[0].opt)})},revkill:function(a){var b=this,c=jQuery(this);if(punchgs.TweenLite.killDelayedCallsTo(_R.showHideNavElements),c!=undefined&&c.length>0&&jQuery("body").find("#"+c.attr("id")).length>0){c.data("conthover",1),c.data("conthover-changed",1),c.trigger("revolution.slide.onpause");var d=c.parent().find(".tp-bannertimer"),e=c[0].opt;e.tonpause=!0,c.trigger("stoptimer"),punchgs.TweenLite.killTweensOf(c.find("*"),!1),punchgs.TweenLite.killTweensOf(c,!1),c.unbind("hover, mouseover, mouseenter,mouseleave, resize");var f="resize.revslider-"+c.attr("id");jQuery(window).off(f),c.find("*").each(function(){var a=jQuery(this);a.unbind("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),a.off("on, hover, mouseenter,mouseleave,mouseover, resize"),a.data("mySplitText",null),a.data("ctl",null),a.data("tween")!=undefined&&a.data("tween").kill(),a.data("kenburn")!=undefined&&a.data("kenburn").kill(),a.data("timeline_out")!=undefined&&a.data("timeline_out").kill(),a.data("timeline")!=undefined&&a.data("timeline").kill(),a.remove(),a.empty(),a=null}),punchgs.TweenLite.killTweensOf(c.find("*"),!1),punchgs.TweenLite.killTweensOf(c,!1),d.remove();try{c.closest(".forcefullwidth_wrapper_tp_banner").remove()}catch(a){}try{c.closest(".rev_slider_wrapper").remove()}catch(a){}try{c.remove()}catch(a){}return c.empty(),c.html(),c=null,e=null,delete b.c,delete b.opt,!0}return!1},revpause:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&(a.data("conthover",1),a.data("conthover-changed",1),a.trigger("revolution.slide.onpause"),a[0].opt.tonpause=!0,a.trigger("stoptimer"))})},revresume:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&(a.data("conthover",0),a.data("conthover-changed",1),a.trigger("revolution.slide.onresume"),a[0].opt.tonpause=!1,a.trigger("starttimer"))})},revstart:function(){var a=jQuery(this);if(a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&a[0].opt!==undefined)return a[0].opt.sliderisrunning?(console.log("Slider Is Running Already"),!1):(runSlider(a,a[0].opt),!0)},revnext:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&_R.callingNewSlide(a,1)})},revprev:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&_R.callingNewSlide(a,-1)})},revmaxslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revcurrentslide:function(){var a=jQuery(this);if(a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0)return parseInt(a[0].opt.act,0)+1},revlastslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revshowslide:function(a){return this.each(function(){var b=jQuery(this);b!=undefined&&b.length>0&&jQuery("body").find("#"+b.attr("id")).length>0&&_R.callingNewSlide(b,"to"+(a-1))})},revcallslidewithid:function(a){return this.each(function(){var b=jQuery(this);b!=undefined&&b.length>0&&jQuery("body").find("#"+b.attr("id")).length>0&&_R.callingNewSlide(b,a)})}});var _R=jQuery.fn.revolution;jQuery.extend(!0,_R,{getversion:function(){return version},compare_version:function(a){return"stop"!=a.check&&(_R.getversion().core').appendTo(jQuery("body"));c.html("");var d=c.find("a").length;return c.remove(),d},is_mobile:function(){var a=["android","webos","iphone","ipad","blackberry","Android","webos",,"iPod","iPhone","iPad","Blackberry","BlackBerry"],b=!1;for(var c in a)navigator.userAgent.split(a[c]).length>1&&(b=!0);return b},callBackHandling:function(a,b,c){try{a.callBackArray&&jQuery.each(a.callBackArray,function(a,d){d&&d.inmodule&&d.inmodule===b&&d.atposition&&d.atposition===c&&d.callback&&d.callback.call()})}catch(a){console.log("Call Back Failed")}},get_browser:function(){var c,a=navigator.appName,b=navigator.userAgent,d=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return d&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(d[2]=c[1]),d=d?[d[1],d[2]]:[a,navigator.appVersion,"-?"],d[0]},get_browser_version:function(){var c,a=navigator.appName,b=navigator.userAgent,d=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return d&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(d[2]=c[1]),d=d?[d[1],d[2]]:[a,navigator.appVersion,"-?"],d[1]},getHorizontalOffset:function(a,b){var c=gWiderOut(a,".outer-left"),d=gWiderOut(a,".outer-right");switch(b){case"left":return c;case"right":return d;case"both":return c+d}},callingNewSlide:function(a,b){var c=a.find(".next-revslide").length>0?a.find(".next-revslide").index():a.find(".processing-revslide").length>0?a.find(".processing-revslide").index():a.find(".active-revslide").index(),d=0,e=a[0].opt;a.find(".next-revslide").removeClass("next-revslide"),a.find(".active-revslide").hasClass("tp-invisible-slide")&&(c=e.last_shown_slide),b&&jQuery.isNumeric(b)||b.match(/to/g)?(1===b||b===-1?(d=c+b,d=d<0?e.slideamount-1:d>=e.slideamount?0:d):(b=jQuery.isNumeric(b)?b:parseInt(b.split("to")[1],0),d=b<0?0:b>e.slideamount-1?e.slideamount-1:b),a.find(".tp-revslider-slidesli:eq("+d+")").addClass("next-revslide")):b&&a.find(".tp-revslider-slidesli").each(function(){var a=jQuery(this);a.data("index")===b&&a.addClass("next-revslide")}),d=a.find(".next-revslide").index(),a.trigger("revolution.nextslide.waiting"),c===d&&c===e.last_shown_slide||d!==c&&d!=-1?swapSlide(a):a.find(".next-revslide").removeClass("next-revslide")},slotSize:function(a,b){b.slotw=Math.ceil(b.width/b.slots),"fullscreen"==b.sliderLayout?b.sloth=Math.ceil(jQuery(window).height()/b.slots):b.sloth=Math.ceil(b.height/b.slots),"on"==b.autoHeight&&a!==undefined&&""!==a&&(b.sloth=Math.ceil(a.height()/b.slots))},setSize:function(a){var b=(a.top_outer||0)+(a.bottom_outer||0),c=parseInt(a.carousel.padding_top||0,0),d=parseInt(a.carousel.padding_bottom||0,0),e=a.gridheight[a.curWinRange],f=0,g=a.nextSlide===-1||a.nextSlide===undefined?0:a.nextSlide;if(a.paddings=a.paddings===undefined?{top:parseInt(a.c.parent().css("paddingTop"),0)||0,bottom:parseInt(a.c.parent().css("paddingBottom"),0)||0}:a.paddings,a.rowzones&&a.rowzones.length>0)for(var h=0;ha.gridheight[a.curWinRange]&&"on"!=a.autoHeight&&(a.height=a.gridheight[a.curWinRange]),"fullscreen"==a.sliderLayout||a.infullscreenmode){a.height=a.bw*a.gridheight[a.curWinRange];var j=(a.c.parent().width(),jQuery(window).height());if(a.fullScreenOffsetContainer!=undefined){try{var k=a.fullScreenOffsetContainer.split(",");k&&jQuery.each(k,function(a,b){j=jQuery(b).length>0?j-jQuery(b).outerHeight(!0):j})}catch(a){}try{a.fullScreenOffset.split("%").length>1&&a.fullScreenOffset!=undefined&&a.fullScreenOffset.length>0?j-=jQuery(window).height()*parseInt(a.fullScreenOffset,0)/100:a.fullScreenOffset!=undefined&&a.fullScreenOffset.length>0&&(j-=parseInt(a.fullScreenOffset,0))}catch(a){}}j=jparseInt(a.height,0)?f:a.height}else a.minHeight!=undefined&&a.heightparseInt(a.height,0)?f:a.height,a.c.height(a.height);var l={height:c+d+b+a.height+a.paddings.top+a.paddings.bottom};a.c.closest(".forcefullwidth_wrapper_tp_banner").find(".tp-fullwidth-forcer").css(l),a.c.closest(".rev_slider_wrapper").css(l),setScale(a)},enterInViewPort:function(a){a.waitForCountDown&&(countDown(a.c,a),a.waitForCountDown=!1),a.waitForFirstSlide&&(swapSlide(a.c),a.waitForFirstSlide=!1,setTimeout(function(){a.c.removeClass("tp-waitforfirststart")},500)),"playing"!=a.sliderlaststatus&&a.sliderlaststatus!=undefined||a.c.trigger("starttimer"),a.lastplayedvideos!=undefined&&a.lastplayedvideos.length>0&&jQuery.each(a.lastplayedvideos,function(b,c){_R.playVideo(c,a)})},leaveViewPort:function(a){a.sliderlaststatus=a.sliderstatus,a.c.trigger("stoptimer"),a.playingvideos!=undefined&&a.playingvideos.length>0&&(a.lastplayedvideos=jQuery.extend(!0,[],a.playingvideos),a.playingvideos&&jQuery.each(a.playingvideos,function(b,c){a.leaveViewPortBasedStop=!0,_R.stopVideo&&_R.stopVideo(c,a)}))},unToggleState:function(a){a!=undefined&&a.length>0&&jQuery.each(a,function(a,b){b.removeClass("rs-toggle-content-active")})},toggleState:function(a){a!=undefined&&a.length>0&&jQuery.each(a,function(a,b){b.addClass("rs-toggle-content-active")})},swaptoggleState:function(a){a!=undefined&&a.length>0&&jQuery.each(a,function(a,b){jQuery(b).hasClass("rs-toggle-content-active")?jQuery(b).removeClass("rs-toggle-content-active"):jQuery(b).addClass("rs-toggle-content-active")})},lastToggleState:function(a){var b=0;return a!=undefined&&a.length>0&&jQuery.each(a,function(a,c){b=c.hasClass("rs-toggle-content-active")}),b}});var _ISM=_R.is_mobile(),checkIDS=function(a,b){a.anyid=a.anyid===undefined?[]:a.anyid;var c=jQuery.inArray(b.attr("id"),a.anyid);if(c!=-1){var d=b.attr("id")+"_"+Math.round(9999*Math.random());b.attr("id",d)}a.anyid.push(b.attr("id"))},removeArray=function(a,b){var c=[];return jQuery.each(a,function(a,d){a!=b&&c.push(d)}),c},removeNavWithLiref=function(a,b,c){c.c.find(a).each(function(){var a=jQuery(this);a.data("liref")===b&&a.remove()})},lAjax=function(a,b){return!jQuery("body").data(a)&&(b.filesystem?(b.errorm===undefined&&(b.errorm="
Local Filesystem Detected !
Put this to your header:"),console.warn("Local Filesystem detected !"),b.errorm=b.errorm+'
<script type="text/javascript" src="'+b.jsFileLocation+a+b.extensions_suffix+'"></script>',console.warn(b.jsFileLocation+a+b.extensions_suffix+" could not be loaded !"),console.warn("Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document."),console.log(" "),b.modulesfailing=!0,!1):(jQuery.ajax({url:b.jsFileLocation+a+b.extensions_suffix+"?version="+version.core,dataType:"script",cache:!0,error:function(c){console.warn("Slider Revolution 5.0 Error !"),console.error("Failure at Loading:"+a+b.extensions_suffix+" on Path:"+b.jsFileLocation),console.info(c)}}),void jQuery("body").data(a,!0)))},getNeededScripts=function(a,b){var c=new Object,d=a.navigation;return c.kenburns=!1,c.parallax=!1,c.carousel=!1,c.navigation=!1,c.videos=!1,c.actions=!1,c.layeranim=!1,c.migration=!1,b.data("version")&&b.data("version").toString().match(/5./gi)?(b.find("img").each(function(){"on"==jQuery(this).data("kenburns")&&(c.kenburns=!0)}),("carousel"==a.sliderType||"on"==d.keyboardNavigation||"on"==d.mouseScrollNavigation||"on"==d.touch.touchenabled||d.arrows.enable||d.bullets.enable||d.thumbnails.enable||d.tabs.enable)&&(c.navigation=!0),b.find(".tp-caption, .tp-static-layer, .rs-background-video-layer").each(function(){var a=jQuery(this);(a.data("ytid")!=undefined||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(c.videos=!0),(a.data("vimeoid")!=undefined||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(c.videos=!0),a.data("actions")!==undefined&&(c.actions=!0),c.layeranim=!0}),b.find("li").each(function(){jQuery(this).data("link")&&jQuery(this).data("link")!=undefined&&(c.layeranim=!0,c.actions=!0)}),!c.videos&&(b.find(".rs-background-video-layer").length>0||b.find(".tp-videolayer").length>0||b.find(".tp-audiolayer").length>0||b.find("iframe").length>0||b.find("video").length>0)&&(c.videos=!0),"carousel"==a.sliderType&&(c.carousel=!0),("off"!==a.parallax.type||a.viewPort.enable||"true"==a.viewPort.enable||"true"===a.scrolleffect.on||a.scrolleffect.on)&&(c.parallax=!0)):(c.kenburns=!0,c.parallax=!0,c.carousel=!1,c.navigation=!0,c.videos=!0,c.actions=!0,c.layeranim=!0,c.migration=!0),"hero"==a.sliderType&&(c.carousel=!1,c.navigation=!1),window.location.href.match(/file:/gi)&&(c.filesystem=!0,a.filesystem=!0),c.videos&&"undefined"==typeof _R.isVideoPlaying&&lAjax("revolution.extension.video",a),c.carousel&&"undefined"==typeof _R.prepareCarousel&&lAjax("revolution.extension.carousel",a),c.carousel||"undefined"!=typeof _R.animateSlide||lAjax("revolution.extension.slideanims",a),c.actions&&"undefined"==typeof _R.checkActions&&lAjax("revolution.extension.actions",a),c.layeranim&&"undefined"==typeof _R.handleStaticLayers&&lAjax("revolution.extension.layeranimation",a),c.kenburns&&"undefined"==typeof _R.stopKenBurn&&lAjax("revolution.extension.kenburn",a),c.navigation&&"undefined"==typeof _R.createNavigation&&lAjax("revolution.extension.navigation",a),c.migration&&"undefined"==typeof _R.migration&&lAjax("revolution.extension.migration",a),c.parallax&&"undefined"==typeof _R.checkForParallax&&lAjax("revolution.extension.parallax",a),a.addons!=undefined&&a.addons.length>0&&jQuery.each(a.addons,function(b,c){"object"==typeof c&&c.fileprefix!=undefined&&lAjax(c.fileprefix,a)}),c},waitForScripts=function(a,b){var c=!0,d=b.scriptsneeded;b.addons!=undefined&&b.addons.length>0&&jQuery.each(b.addons,function(a,b){"object"==typeof b&&b.init!=undefined&&_R[b.init]===undefined&&(c=!1)}),d.filesystem||"undefined"!=typeof punchgs&&c&&(!d.kenburns||d.kenburns&&"undefined"!=typeof _R.stopKenBurn)&&(!d.navigation||d.navigation&&"undefined"!=typeof _R.createNavigation)&&(!d.carousel||d.carousel&&"undefined"!=typeof _R.prepareCarousel)&&(!d.videos||d.videos&&"undefined"!=typeof _R.resetVideo)&&(!d.actions||d.actions&&"undefined"!=typeof _R.checkActions)&&(!d.layeranim||d.layeranim&&"undefined"!=typeof _R.handleStaticLayers)&&(!d.migration||d.migration&&"undefined"!=typeof _R.migration)&&(!d.parallax||d.parallax&&"undefined"!=typeof _R.checkForParallax)&&(d.carousel||!d.carousel&&"undefined"!=typeof _R.animateSlide)?a.trigger("scriptsloaded"):setTimeout(function(){waitForScripts(a,b)},50)},getScriptLocation=function(a){var b=new RegExp("themepunch.revolution.min.js","gi"),c="";return jQuery("script").each(function(){var a=jQuery(this).attr("src");a&&a.match(b)&&(c=a)}),c=c.replace("jquery.themepunch.revolution.min.js",""),c=c.replace("jquery.themepunch.revolution.js",""),c=c.split("?")[0]},setCurWinRange=function(a,b){var d=9999,e=0,f=0,g=0,h=jQuery(window).width(),i=b&&9999==a.responsiveLevels?a.visibilityLevels:a.responsiveLevels;i&&i.length&&jQuery.each(i,function(a,b){hb)&&(d=b,g=a,e=b),h>b&&e'),container.find(">ul").addClass("tp-revslider-mainul"),opt.c=container,opt.ul=container.find(".tp-revslider-mainul"),opt.ul.find(">li").each(function(a){var b=jQuery(this);"on"==b.data("hideslideonmobile")&&_ISM&&b.remove(),(b.data("invisible")||b.data("invisible")===!0)&&(b.addClass("tp-invisible-slide"),b.appendTo(opt.ul))}),opt.addons!=undefined&&opt.addons.length>0&&jQuery.each(opt.addons,function(i,obj){"object"==typeof obj&&obj.init!=undefined&&_R[obj.init](eval(obj.params))}),opt.cid=container.attr("id"),opt.ul.css({visibility:"visible"}),opt.slideamount=opt.ul.find(">li").not(".tp-invisible-slide").length,opt.realslideamount=opt.ul.find(">li").length,opt.slayers=container.find(".tp-static-layers"),opt.slayers.data("index","staticlayers"),void(1!=opt.waitForInit&&(container[0].opt=opt,runSlider(container,opt))))},onFullScreenChange=function(){jQuery("body").data("rs-fullScreenMode",!jQuery("body").data("rs-fullScreenMode")),jQuery("body").data("rs-fullScreenMode")&&setTimeout(function(){jQuery(window).trigger("resize")},200)},runSlider=function(a,b){if(b.sliderisrunning=!0,b.ul.find(">li").each(function(a){jQuery(this).data("originalindex",a)}),"on"==b.shuffle){var c=new Object,d=b.ul.find(">li:first-child");c.fstransition=d.data("fstransition"),c.fsmasterspeed=d.data("fsmasterspeed"),c.fsslotamount=d.data("fsslotamount");for(var e=0;eli:eq("+f+")").prependTo(b.ul)}var g=b.ul.find(">li:first-child");g.data("fstransition",c.fstransition),g.data("fsmasterspeed",c.fsmasterspeed),g.data("fsslotamount",c.fsslotamount),b.li=b.ul.find(">li").not(".tp-invisible-slide")}if(b.allli=b.ul.find(">li"),b.li=b.ul.find(">li").not(".tp-invisible-slide"),b.inli=b.ul.find(">li.tp-invisible-slide"),b.thumbs=new Array,b.slots=4,b.act=-1,b.firststart=1,b.loadqueue=new Array,b.syncload=0,b.conw=a.width(),b.conh=a.height(),b.responsiveLevels.length>1?b.responsiveLevels[0]=9999:b.responsiveLevels=9999,jQuery.each(b.allli,function(a,c){var c=jQuery(c),d=c.find(".rev-slidebg")||c.find("img").first(),e=0;c.addClass("tp-revslider-slidesli"),c.data("index")===undefined&&c.data("index","rs-"+Math.round(999999*Math.random()));var f=new Object;f.params=new Array,f.id=c.data("index"),f.src=c.data("thumb")!==undefined?c.data("thumb"):d.data("lazyload")!==undefined?d.data("lazyload"):d.attr("src"),c.data("title")!==undefined&&f.params.push({from:RegExp("\\{\\{title\\}\\}","g"),to:c.data("title")}),c.data("description")!==undefined&&f.params.push({from:RegExp("\\{\\{description\\}\\}","g"),to:c.data("description")});for(var e=1;e<=10;e++)c.data("param"+e)!==undefined&&f.params.push({from:RegExp("\\{\\{param"+e+"\\}\\}","g"),to:c.data("param"+e)});if(b.thumbs.push(f),c.data("origindex",c.index()),c.data("link")!=undefined){var g=c.data("link"),h=c.data("target")||"_self",i="back"===c.data("slideindex")?0:60,j=c.data("linktoslide"),k=j;j!=undefined&&"next"!=j&&"prev"!=j&&b.allli.each(function(){var a=jQuery(this);a.data("origindex")+1==k&&(j=a.data("index"))}),"slide"!=g&&(j="no");var l='