function InfoBubble(n){this.extend(InfoBubble,google.maps.OverlayView);this.tabs_=[];this.activeTab_=null;this.baseZIndex_=100;this.isOpen_=!1;var t=n||{};t.backgroundColor==undefined&&(t.backgroundColor=this.BACKGROUND_COLOR_);t.borderColor==undefined&&(t.borderColor=this.BORDER_COLOR_);t.borderRadius==undefined&&(t.borderRadius=this.BORDER_RADIUS_);t.borderWidth==undefined&&(t.borderWidth=this.BORDER_WIDTH_);t.padding==undefined&&(t.padding=this.PADDING_);t.arrowPosition==undefined&&(t.arrowPosition=this.ARROW_POSITION_);t.disableAutoPan==undefined&&(t.disableAutoPan=!1);t.disableAnimation==undefined&&(t.disableAnimation=!1);t.minWidth==undefined&&(t.minWidth=this.MIN_WIDTH_);t.shadowStyle==undefined&&(t.shadowStyle=this.SHADOW_STYLE_);t.arrowSize==undefined&&(t.arrowSize=this.ARROW_SIZE_);t.arrowStyle==undefined&&(t.arrowStyle=this.ARROW_STYLE_);t.closeSrc==undefined&&(t.closeSrc=this.CLOSE_SRC_);this.buildDom_();this.setValues(t)}function PhoneCounter(n,t,i){var r=new ShowNumberRequest;r.Supplier=n;r.Category=t;r.Region=i;r.Source="P";$.ajax({type:"POST",url:"/api/EasyDirectoryAPI/ShowNumber",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),success:function(){},error:function(){}})}function PopulateEnquiryUserData(n,t,i){if(n!=null){var r=$(i.target).attr("id");form=t?r=="btnSubmitContactForm"?$("#contact-form-package"):$("#appointment-form"):$("#appointment-form-mobile");$(form).find('[data-ew-input="txtName"]').val(n.DisplayName);$(form).find('[data-ew-input="txtEmail"]').val(n.Email);$(form).find('[data-ew-input="txtPhone"]').val(n.Phone);$(form).find('[data-ew-input="txtWeddingDate"]').val(moment(n.WeddingDate).format("DD/MM/YYYY"))}}function getEnquiryInfo(n,t,i,r){return{categoryId:n,regionId:t,supplier:i,SupplierId:r}}function submitEnquiry(n,t,i,r){var tt,h,it,rt,ut,c,ft,k,a,d,e,v,ot,st,g,lt,o;$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","none");quickLoginCallbackFunction=null;var u=new EmailBrochureRequest,f=null,nt=$(r.target).attr("id");u.IsLongForm=!1;n?nt=="btnSubmitContactForm"?(f=$("#contact-form-package"),u.IsLongForm=!0):f=$("#appointment-form"):(f=$("#appointment-form-mobile"),u.IsLongForm=!0);tt=$(f).find('[data-ew-input="txtName"]');u.Name=$(f).find('[data-ew-input="txtName"]').val().trim();h=$(f).find('[data-ew-input="txtEmail"]');u.Email=$(f).find('[data-ew-input="txtEmail"]').val().trim();it=$(f).find('[data-ew-input="txtPhone"]');u.Phone=$(f).find('[data-ew-input="txtPhone"]').val();rt=$(f).find('[data-ew-input="txtWeddingDate"]');u.WeddingDate=$(f).find('[data-ew-input="txtWeddingDate"]').val();ut=$(f).find('[data-ew-input="txtNumberOfGuests"]');u.numberOfGuests=$(f).find('[data-ew-input="txtNumberOfGuests"]').val();u.WeddingDate.indexOf("-")!==-1&&(c=u.WeddingDate.split("-"),u.WeddingDate=c[2]+"/"+c[1]+"/"+c[0],console.log(u.WeddingDate));u.WeddingLocation="";ft=$(f).find('[data-ew-input="inputComments"]');u.Comment=$(f).find('[data-ew-input="inputComments"]').val();u.Comment=u.Comment.replace(/(\r\n|\n|\r)/gm," ");u.Brochure=$(f).find('[data-ew-input="chkBrochure"]').parent().hasClass("checked")?!0:!1;u.DownloadBrochure=$(f).find('[data-ew-input="chkDownloadBrochure"]').parent().hasClass("checked")?!0:!1;u.Price=$(f).find('[data-ew-input="chkPriceRequest"]').parent().hasClass("checked")?!0:!1;u.Availability=$(f).find('[data-ew-input="chkAvailability"]').parent().hasClass("checked")?!0:!1;u.NominatedDates=$(f).find('[data-ew-input="txtNominatedDates"]').val();u.WeddingLocation=$(f).find('[data-ew-input="txtWeddingLocation"]').val();u.QAs=[];$.cookie.raw=!0;$.cookie("ew_UserLocation",u.WeddingLocation,{path:"/"});$.cookie("ew_UserDisplayName",u.Name,{path:"/"});$.cookie("ew_UserEmail",u.Email,{path:"/"});$.cookie("ew_UserWeddingDate",u.WeddingDate,{path:"/"});$.cookie("ew_UserPhone",u.Phone,{path:"/"});$.cookie("ew_UserComment",u.Comment,{path:"/"});$.cookie("ew_UserNominatedDates",u.NominatedDates,{path:"/"});$.cookie("ew_UserBrochure",u.Brochure,{path:"/"});$.cookie("ew_UserPrice",u.Price,{path:"/"});$.cookie("ew_UserAvailability",u.Availability,{path:"/"});var p=$("#checkAppointment").hasClass("active"),w=$(f).find('[data-ew-input="txtNumberOfGuests"]').attr("data-enforcevalidate-value"),l=$(f).find('[data-ew-input="txtNumberOfGuests"]').attr("data-maxGuest-value"),s=$(f).find('[data-ew-input="txtNumberOfGuests"]').attr("data-minGuest-value"),et=$(f).find('[data-ew-input="txtNominatedDates"]'),at=new Date,b=moment(u.WeddingDate,"DD/MM/YYYY");b=moment(b).toDate();k=moment(b).isBefore(at);a=[{selector:tt,content:u.Name},{selector:h,content:u.Email},{selector:rt,content:u.WeddingDate},{selector:it,content:u.Phone},{selector:ft,content:u.Comment}];w&&s&&a.push({selector:ut,content:u.numberOfGuests});d={};e=!0;ValidateEmailAddress(u.Email)==!1&&(e=!1);v=function(n,t){n!==""&&(d={Question:t.attr("data-ew-question"),QuestionId:t.attr("id"),Answer:t.val()},u.QAs.push(d))};ot=$("[data-ew-input='QaContactForm']").length>1;nt=="btnSubmitContactForm"&&(ot?$("[data-ew-input='QaContactForm']").each(function(){var n=$(this).val();v(n,$(this))}):(st=$("[data-ew-input='QaContactForm']").val(),v(st,$("[data-ew-input='QaContactForm']"))));$(f).find('[data-ew-input="txtNumberOfGuests"]').length>0&&$(f).find('[data-ew-input="txtNumberOfGuests"]').each(function(){var n=$(this).val();v(n,$(this))});var vt=$(f).find('button[data-input="submit"]').attr("ew-data-cpa"),ht="",y="",ct={};if(u.CategorySlug=$(f).find('button[data-input="submit"]').attr("data-input-categoryslug"),u.CategoryId=$(f).find('button[data-input="submit"]').attr("data-input-categoryid"),u.StateId=$(f).find('button[data-input="submit"]').attr("data-input-stateid"),u.RegionId=$(f).find('button[data-input="submit"]').attr("data-input-regionid"),u.SupplierId=$(f).find('button[data-input="submit"]').attr("data-input-supplierid"),ht=$(f).find('button[data-input="submit"]').attr("data-input-suppliername"),y=$(f).find('button[data-input="submit"]').attr("data-input-supplierslug"),ct=getEnquiryInfo(u.CategoryId,u.RegionId,y,u.SupplierId),g=$(f).find('button[data-input="submit"]').attr("data-input-source"),g&&u&&(u.EnquirySource=g),lt=function(){return $(a).each(function(n,t){t.content=$.trim(t.content);t.content==""&&(e=!1)}),p&&u.NominatedDates==""&&(e=!1),k&&(e=!1),w==="True"&&s!==""&&u.numberOfGuests!==""&&(Number(u.numberOfGuests)>Number(l)&&Number(l)!==0||Number(u.numberOfGuests)<Number(s)||isNaN(u.numberOfGuests))&&(e=!1),e},lt())$("#btnSubmitMobile").length&&$("#btnSubmitMobile").addClass("disabled"),$("#enquiryModalListing").modal("hide"),$(f).find(".ew-onboarding-input-validation-false.date").css("display","none"),$(f).find(".ew-onboarding-input-validation-false").css("display","none"),$.ajax({type:"POST",url:"/api/EasyDirectoryAPI/RequestBrochure",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u),beforeSend:function(){ewLoadingOverlay.show()},complete:function(){n||ewLoadingOverlay.hide();$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled")},success:function(n){if(n.HasError)toastr.warning(n.ErrorMessage,"Enquiry sent error:"),window._mfq=window._mfq||[],function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)}(),window._mfq.push(["setVariable","errorResponse",JSON.stringify(n)]),window._mfq.push(["setVariable","errorRequest",JSON.stringify(u)]),window._mfq.push(["tag","form-submission-error"]);else{n.IsNewUser&&($.cookie("EWLoginUserDetails","LoginUserApiSessionId="+n.NewUserSessionId,{path:"/"}),$.cookie("ewIsNewUser",u.Email,{path:"/"}),typeof initNewRegistrationAlert=="function"&&initNewRegistrationAlert(),ga("send","event","profile-page","new-user-registration"));SupplierBrochureRequestCounter(JSON.parse(this.data).SupplierId);ga("send","pageview",{page:"/brochure-request/form-success"});p&&ga("send","event","profile-page","appointment-request",y);ga("send","event","profile-page","enquiry-submitted",y);try{window.Intercom("trackEvent",u.CategorySlug+"_Enquiry",{enquirySent:new Date,supplierName:ht,url:window.location.href})}catch(i){}try{__adroll.record_user({adroll_segments:"4d02c2bb"})}catch(i){}typeof sendCriteoSale=="function"&&sendCriteoSale(u.SupplierId,vt);fbq("track","Lead");window.optimizely=window.optimizely||[];window.optimizely.push({type:"event",eventName:"enquiry-submitted"});window._mfq=window._mfq||[],function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)}();window._mfq.push(["tag","form-submission-success"]);$('[data-ew-input="relatedSupplierComments"]').val(u.Comment);t&&t(ct)}ewLoadingOverlay.hide();$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled")},error:function(n,t,r){i&&i(n,t,r);toastr.error("Enquiry sent error, please try again.");ewLoadingOverlay.hide();$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled");window._mfq=window._mfq||[],function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)}();window._mfq.push(["setVariable","errorStatus",t]);window._mfq.push(["setVariable","error",n.responseText]);window._mfq.push(["setVariable","errorRequest",JSON.stringify(n)]);window._mfq.push(["tag","form-submission-error"])}});else return o=0,$(a).each(function(n,t){t.content==""?(t.selector.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"),o++):t.selector.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none")}),ValidateEmailAddress(u.Email)==!1?(h.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"),o++):h.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none"),p&&u.NominatedDates==""?(et.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"),o++):et.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none"),k&&u.WeddingDate!==""?($(f).find(".ew-onboarding-input-validation-false.date").css("display","block"),o++):$(f).find(".ew-onboarding-input-validation-false.date").css("display","none"),w==="True"&&s!==""&&u.numberOfGuests!==""&&(Number(u.numberOfGuests)>Number(l)&&Number(l)!==0||Number(u.numberOfGuests)<Number(s)||isNaN(u.numberOfGuests))?($(f).find(".ew-onboarding-input-validation-false.guest").css("display","block"),o++):$(f).find(".ew-onboarding-input-validation-false.guest").css("display","none"),o>0?$(f).find(".ew-validation-errors").css("display","block"):$(f).find(".ew-validation-errors").css("display","none"),$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled"),!1}function submitFashionEnquiry(n,t,i,r){var b,o,k,a,s,h,d,p,rt,ut,w,et;$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","none");quickLoginCallbackFunction=null;var u=new EmailBrochureRequest,f=null,l=$(r.target).attr("id");u.IsLongForm=!1;n?l=="btnSubmitContactForm"||l=="btnSubmitFashionContactForm"?(f=$("#contact-form-package"),u.IsLongForm=!0):f=$("#appointment-form"):(f=$("#appointment-form-mobile"),u.IsLongForm=!0);b=$(f).find('[data-ew-input="txtName"]');u.Name=$(f).find('[data-ew-input="txtName"]').val();o=$(f).find('[data-ew-input="txtEmail"]');u.Email=$(f).find('[data-ew-input="txtEmail"]').val().trim();k=$(f).find('[data-ew-input="txtPhone"]');u.Phone=$(f).find('[data-ew-input="txtPhone"]').val();a=$(f).find('[data-ew-input="txtWeddingDate"]');u.WeddingDate=$(f).find('[data-ew-input="txtWeddingDate"]').val();u.WeddingDate.indexOf("-")!==-1&&(s=u.WeddingDate.split("-"),u.WeddingDate=s[2]+"/"+s[1]+"/"+s[0],console.log(u.WeddingDate));typeof items!="undefined"&&(h={},h.text="The following items have been selected for this request:",h.items=items);u.WeddingLocation="";d=$(f).find('[data-ew-input="inputComments"]');u.Comment=$(f).find('[data-ew-input="inputComments"]').val();u.Comment=u.Comment.replace(/(\r\n|\n|\r)/gm," ");u.Brochure=$(f).find('[data-ew-input="chkBrochure"]').parent().hasClass("checked")?!0:!1;u.Price=$(f).find('[data-ew-input="chkPriceRequest"]').parent().hasClass("checked")?!0:!1;u.Availability=$(f).find('[data-ew-input="chkAvailability"]').parent().hasClass("checked")?!0:!1;u.NominatedDates=$(f).find('[data-ew-input="txtNominatedDates"]').val();u.WeddingLocation=$(f).find('[data-ew-input="txtWeddingLocation"]').val();u.QAs=[];$.cookie.raw=!0;$.cookie("ew_UserLocation",u.WeddingLocation,{path:"/"});$.cookie("ew_UserDisplayName",u.Name,{path:"/"});$.cookie("ew_UserEmail",u.Email,{path:"/"});$.cookie("ew_UserWeddingDate",u.WeddingDate,{path:"/"});$.cookie("ew_UserPhone",u.Phone,{path:"/"});$.cookie("ew_UserComment",u.Comment,{path:"/"});$.cookie("ew_UserNominatedDates",u.NominatedDates,{path:"/"});$.cookie("ew_UserBrochure",u.Brochure,{path:"/"});$.cookie("ew_UserPrice",u.Price,{path:"/"});$.cookie("ew_UserAvailability",u.Availability,{path:"/"});var v=$("#checkAppointment").hasClass("active"),g=$(f).find('[data-ew-input="txtNominatedDates"]'),ot=new Date,y=moment(u.WeddingDate,"DD/MM/YYYY");y=moment(y).toDate();var nt=moment(y).isBefore(ot),tt=[{selector:b,content:u.Name},{selector:o,content:u.Email},{selector:a,content:u.WeddingDate},{selector:k,content:u.Phone},{selector:d,content:u.Comment},{selector:a,content:u.WeddingDate}],it={},e=!0;ValidateEmailAddress(u.Email)==!1&&(e=!1);p=function(n,t){n!==""&&(it={Question:t.attr("data-ew-question"),QuestionId:t.attr("id"),Answer:t.val()},u.QAs.push(it))};rt=$("[data-ew-input='QaContactForm']").length>1;l=="btnSubmitContactForm"&&(rt?$("[data-ew-input='QaContactForm']").each(function(){var n=$(this).val();p(n,$(this))}):(ut=$("[data-ew-input='QaContactForm']").val(),p(ut,$("[data-ew-input='QaContactForm']"))));var st=$(f).find('button[data-input="submit"]').attr("ew-data-cpa"),ht="",c="",ft={};if(u.CategoryId=$(f).find('button[data-input="submit"]').attr("data-input-categoryid"),u.StateId=$(f).find('button[data-input="submit"]').attr("data-input-stateid"),u.RegionId=$(f).find('button[data-input="submit"]').attr("data-input-regionid"),u.SupplierId=$(f).find('button[data-input="submit"]').attr("data-input-supplierid"),ht=$(f).find('button[data-input="submit"]').attr("data-input-suppliername"),c=$(f).find('button[data-input="submit"]').attr("data-input-supplierslug"),ft=getEnquiryInfo(u.CategoryId,u.RegionId,c,u.SupplierId),w=$(f).find('button[data-input="submit"]').attr("data-input-source"),w&&u&&(u.EnquirySource=w),et=function(){return $(tt).each(function(n,t){t.content=$.trim(t.content);t.content==""&&(e=!1)}),v&&u.NominatedDates==""&&(e=!1),nt&&(e=!1),e},et())$("#enquiryModalListing").modal("hide"),$(f).find(".ew-onboarding-input-validation-false.date").css("display","none"),$(f).find(".ew-onboarding-input-validation-false").css("display","none"),ajax_data={enquiry:u,data:h},$.ajax({type:"POST",url:"/api/EasyDirectoryAPI/RequestFashionAppointment",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(ajax_data),beforeSend:function(){ewLoadingOverlay.show()},complete:function(){n||ewLoadingOverlay.hide();$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled")},success:function(n){n.HasError?(toastr.warning(n.ErrorMessage,"Enquiry sent error:"),window._mfq=window._mfq||[],function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)}(),window._mfq.push(["setVariable","errorResponse",JSON.stringify(n)]),window._mfq.push(["setVariable","errorRequest",JSON.stringify(ajax_data)]),window._mfq.push(["tag","form-submission-error"])):(n.IsNewUser&&($.cookie("EWLoginUserDetails","LoginUserApiSessionId="+n.NewUserSessionId,{path:"/"}),$.cookie("ewIsNewUser",u.Email,{path:"/"}),typeof initNewRegistrationAlert=="function"&&initNewRegistrationAlert(),ga("send","event","profile-page","new-user-registration")),SupplierBrochureRequestCounter(JSON.parse(this.data).SupplierId),ga("send","pageview",{page:"/brochure-request/form-success"}),v&&ga("send","event","profile-page","appointment-request",c),ga("send","event","profile-page","enquiry-submitted",c),typeof sendCriteoSale=="function"&&sendCriteoSale(u.SupplierId,st),fbq("track","Lead"),window.optimizely=window.optimizely||[],window.optimizely.push({type:"event",eventName:"enquiry-submitted"}),window._mfq=window._mfq||[],function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)}(),window._mfq.push(["tag","form-submission-success"]),$('[data-ew-input="relatedSupplierComments"]').val(u.Comment),t&&t(ft));ewLoadingOverlay.hide();$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled")},error:function(n,t,r){i&&i(n,t,r);toastr.error("Enquiry sent error, please try again.");ewLoadingOverlay.hide();$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled");window._mfq=window._mfq||[],function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)}();window._mfq.push(["setVariable","errorStatus",t]);window._mfq.push(["setVariable","error",n.responseText]);window._mfq.push(["setVariable","errorRequest",JSON.stringify(n)]);window._mfq.push(["tag","form-submission-error"])}});else return $(tt).each(function(n,t){t.content==""?t.selector.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"):t.selector.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none")}),ValidateEmailAddress(u.Email)==!1?o.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"):o.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none"),v&&u.NominatedDates==""?g.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"):g.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none"),nt&&u.WeddingDate!==""?$(f).find(".ew-onboarding-input-validation-false.date").css("display","block"):$(f).find(".ew-onboarding-input-validation-false.date").css("display","none"),$("#btnSubmit, #btnSubmitMobile, #btnSubmitContactForm").css("pointer-events","initial").removeClass("disabled"),!1}function firstStepFormValidation(){var n=new FirstStepValidationRequest,r,t,u,o;form=$("#contact-form-package");r=$(form).find('[data-ew-input="txtName"]');n.Name=$(form).find('[data-ew-input="txtName"]').val().trim();t=$(form).find('[data-ew-input="txtEmail"]');n.Email=$(form).find('[data-ew-input="txtEmail"]').val().trim();u=$(form).find('[data-ew-input="txtPhone"]');n.Phone=$(form).find('[data-ew-input="txtPhone"]').val();o=$(form).find('[data-ew-input="txtNominatedDates"]');n.NominatedDates=$(form).find('[data-ew-input="txtNominatedDates"]').val();var f=$("#checkAppointment").hasClass("active"),h=new Date,e=[{selector:r,content:n.Name},{selector:t,content:n.Email},{selector:u,content:n.Phone}],i=!0,s=function(){return ValidateEmailAddress(n.Email)==!1&&(i=!1),$(e).each(function(n,t){t.content=$.trim(t.content);t.content==""&&(i=!1)}),f&&n.NominatedDates==""&&(i=!1),$(e).each(function(n,t){t.content==""?t.selector.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"):t.selector.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none")}),ValidateEmailAddress(n.Email)==!1?t.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","block"):t.parents(".form-group").next(".ew-onboarding-input-validation-false").css("display","none"),f&&n.NominatedDates==""?$("#bookAppointmentDatepickerValidation .ew-onboarding-input-validation-false").css("display","block"):$("#bookAppointmentDatepickerValidation .ew-onboarding-input-validation-false").css("display","none"),i};s()&&($("#step1, #step2, #step3").collapse("hide"),$("#step4").collapse("show"))}var OneClickEnquiryForm,mobileOneClickEnquiryForm,desktopOneClickEnquiryForm,activateMouseflow,initCarousel,div;window.InfoBubble=InfoBubble;InfoBubble.prototype.ARROW_SIZE_=15;InfoBubble.prototype.ARROW_STYLE_=0;InfoBubble.prototype.SHADOW_STYLE_=1;InfoBubble.prototype.MIN_WIDTH_=50;InfoBubble.prototype.ARROW_POSITION_=50;InfoBubble.prototype.PADDING_=10;InfoBubble.prototype.BORDER_WIDTH_=1;InfoBubble.prototype.BORDER_COLOR_="#ccc";InfoBubble.prototype.BORDER_RADIUS_=10;InfoBubble.prototype.BACKGROUND_COLOR_="#fff";InfoBubble.prototype.CLOSE_SRC_="https://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif";InfoBubble.prototype.extend=function(n,t){return function(n){for(var t in n.prototype)this.prototype[t]=n.prototype[t];return this}.apply(n,[t])};InfoBubble.prototype.buildDom_=function(){var r=this.bubble_=document.createElement("DIV"),h,n,o,t,c,u,s,e,a;r.style.position="absolute";r.style.zIndex=this.baseZIndex_;h=this.tabsContainer_=document.createElement("DIV");h.style.position="relative";n=this.close_=document.createElement("IMG");n.style.position="absolute";n.style.border=0;n.style.zIndex=this.baseZIndex_+1;n.style.cursor="pointer";n.src=this.get("closeSrc");o=this;google.maps.event.addDomListener(n,"click",function(){o.close();google.maps.event.trigger(o,"closeclick")});t=this.contentContainer_=document.createElement("DIV");t.style.overflowX="auto";t.style.overflowY="auto";t.style.cursor="default";t.style.clear="both";t.style.position="relative";c=this.content_=document.createElement("DIV");t.appendChild(c);u=this.arrow_=document.createElement("DIV");u.style.position="relative";var i=this.arrowOuter_=document.createElement("DIV"),f=this.arrowInner_=document.createElement("DIV"),l=this.getArrowSize_();i.style.position=f.style.position="absolute";i.style.left=f.style.left="50%";i.style.height=f.style.height="0";i.style.width=f.style.width="0";i.style.marginLeft=this.px(-l);i.style.borderWidth=this.px(l);i.style.borderBottomWidth=0;s=this.bubbleShadow_=document.createElement("DIV");s.style.position="absolute";r.style.display=s.style.display="none";r.appendChild(this.tabsContainer_);r.appendChild(n);r.appendChild(t);u.appendChild(i);u.appendChild(f);r.appendChild(u);e=document.createElement("style");e.setAttribute("type","text/css");this.animationName_="_ibani_"+Math.round(Math.random()*1e4);a="."+this.animationName_+"{-webkit-animation-name:"+this.animationName_+";-webkit-animation-duration:0.5s;-webkit-animation-iteration-count:1;}@-webkit-keyframes "+this.animationName_+" {from {-webkit-transform: scale(0)}50% {-webkit-transform: scale(1.2)}90% {-webkit-transform: scale(0.95)}to {-webkit-transform: scale(1)}}";e.textContent=a;document.getElementsByTagName("head")[0].appendChild(e)};InfoBubble.prototype.setBackgroundClassName=function(n){this.set("backgroundClassName",n)};InfoBubble.prototype.setBackgroundClassName=InfoBubble.prototype.setBackgroundClassName;InfoBubble.prototype.backgroundClassName_changed=function(){this.content_.className=this.get("backgroundClassName")};InfoBubble.prototype.backgroundClassName_changed=InfoBubble.prototype.backgroundClassName_changed;InfoBubble.prototype.setTabClassName=function(n){this.set("tabClassName",n)};InfoBubble.prototype.setTabClassName=InfoBubble.prototype.setTabClassName;InfoBubble.prototype.tabClassName_changed=function(){this.updateTabStyles_()};InfoBubble.prototype.tabClassName_changed=InfoBubble.prototype.tabClassName_changed;InfoBubble.prototype.getArrowStyle_=function(){return parseInt(this.get("arrowStyle"),10)||0};InfoBubble.prototype.setArrowStyle=function(n){this.set("arrowStyle",n)};InfoBubble.prototype.setArrowStyle=InfoBubble.prototype.setArrowStyle;InfoBubble.prototype.arrowStyle_changed=function(){this.arrowSize_changed()};InfoBubble.prototype.arrowStyle_changed=InfoBubble.prototype.arrowStyle_changed;InfoBubble.prototype.getArrowSize_=function(){return parseInt(this.get("arrowSize"),10)||0};InfoBubble.prototype.setArrowSize=function(n){this.set("arrowSize",n)};InfoBubble.prototype.setArrowSize=InfoBubble.prototype.setArrowSize;InfoBubble.prototype.arrowSize_changed=function(){this.borderWidth_changed()};InfoBubble.prototype.arrowSize_changed=InfoBubble.prototype.arrowSize_changed;InfoBubble.prototype.setArrowPosition=function(n){this.set("arrowPosition",n)};InfoBubble.prototype.setArrowPosition=InfoBubble.prototype.setArrowPosition;InfoBubble.prototype.getArrowPosition_=function(){return parseInt(this.get("arrowPosition"),10)||0};InfoBubble.prototype.arrowPosition_changed=function(){var n=this.getArrowPosition_();this.arrowOuter_.style.left=this.arrowInner_.style.left=n+"%";this.redraw_()};InfoBubble.prototype.arrowPosition_changed=InfoBubble.prototype.arrowPosition_changed;InfoBubble.prototype.setZIndex=function(n){this.set("zIndex",n)};InfoBubble.prototype.setZIndex=InfoBubble.prototype.setZIndex;InfoBubble.prototype.getZIndex=function(){return parseInt(this.get("zIndex"),10)||this.baseZIndex_};InfoBubble.prototype.zIndex_changed=function(){var n=this.getZIndex();this.bubble_.style.zIndex=this.baseZIndex_=n;this.close_.style.zIndex=n+1};InfoBubble.prototype.zIndex_changed=InfoBubble.prototype.zIndex_changed;InfoBubble.prototype.setShadowStyle=function(n){this.set("shadowStyle",n)};InfoBubble.prototype.setShadowStyle=InfoBubble.prototype.setShadowStyle;InfoBubble.prototype.getShadowStyle_=function(){return parseInt(this.get("shadowStyle"),10)||0};InfoBubble.prototype.shadowStyle_changed=function(){var r=this.getShadowStyle_(),i="",n="",t="";switch(r){case 0:i="none";break;case 1:n="40px 15px 10px rgba(33,33,33,0.3)";t="transparent";break;case 2:n="0 0 2px rgba(33,33,33,0.3)";t="rgba(33,33,33,0.35)"}this.bubbleShadow_.style.boxShadow=this.bubbleShadow_.style.webkitBoxShadow=this.bubbleShadow_.style.MozBoxShadow=n;this.bubbleShadow_.style.backgroundColor=t;this.isOpen_&&(this.bubbleShadow_.style.display=i,this.draw())};InfoBubble.prototype.shadowStyle_changed=InfoBubble.prototype.shadowStyle_changed;InfoBubble.prototype.showCloseButton=function(){this.set("hideCloseButton",!1)};InfoBubble.prototype.showCloseButton=InfoBubble.prototype.showCloseButton;InfoBubble.prototype.hideCloseButton=function(){this.set("hideCloseButton",!0)};InfoBubble.prototype.hideCloseButton=InfoBubble.prototype.hideCloseButton;InfoBubble.prototype.hideCloseButton_changed=function(){this.close_.style.display=this.get("hideCloseButton")?"none":""};InfoBubble.prototype.hideCloseButton_changed=InfoBubble.prototype.hideCloseButton_changed;InfoBubble.prototype.setBackgroundColor=function(n){n&&this.set("backgroundColor",n)};InfoBubble.prototype.setBackgroundColor=InfoBubble.prototype.setBackgroundColor;InfoBubble.prototype.backgroundColor_changed=function(){var n=this.get("backgroundColor");this.contentContainer_.style.backgroundColor=n;this.arrowInner_.style.borderColor=n+" transparent transparent";this.updateTabStyles_()};InfoBubble.prototype.backgroundColor_changed=InfoBubble.prototype.backgroundColor_changed;InfoBubble.prototype.setBorderColor=function(n){n&&this.set("borderColor",n)};InfoBubble.prototype.setBorderColor=InfoBubble.prototype.setBorderColor;InfoBubble.prototype.borderColor_changed=function(){var n=this.get("borderColor"),t=this.contentContainer_,i=this.arrowOuter_;t.style.borderColor=n;i.style.borderColor=n+" transparent transparent";t.style.borderStyle=i.style.borderStyle=this.arrowInner_.style.borderStyle="solid";this.updateTabStyles_()};InfoBubble.prototype.borderColor_changed=InfoBubble.prototype.borderColor_changed;InfoBubble.prototype.setBorderRadius=function(n){this.set("borderRadius",n)};InfoBubble.prototype.setBorderRadius=InfoBubble.prototype.setBorderRadius;InfoBubble.prototype.getBorderRadius_=function(){return parseInt(this.get("borderRadius"),10)||0};InfoBubble.prototype.borderRadius_changed=function(){var n=this.getBorderRadius_(),t=this.getBorderWidth_();this.contentContainer_.style.borderRadius=this.contentContainer_.style.MozBorderRadius=this.contentContainer_.style.webkitBorderRadius=this.bubbleShadow_.style.borderRadius=this.bubbleShadow_.style.MozBorderRadius=this.bubbleShadow_.style.webkitBorderRadius=this.px(n);this.tabsContainer_.style.paddingLeft=this.tabsContainer_.style.paddingRight=this.px(n+t);this.redraw_()};InfoBubble.prototype.borderRadius_changed=InfoBubble.prototype.borderRadius_changed;InfoBubble.prototype.getBorderWidth_=function(){return parseInt(this.get("borderWidth"),10)||0};InfoBubble.prototype.setBorderWidth=function(n){this.set("borderWidth",n)};InfoBubble.prototype.setBorderWidth=InfoBubble.prototype.setBorderWidth;InfoBubble.prototype.borderWidth_changed=function(){var n=this.getBorderWidth_();this.contentContainer_.style.borderWidth=this.px(n);this.tabsContainer_.style.top=this.px(n);this.updateArrowStyle_();this.updateTabStyles_();this.borderRadius_changed();this.redraw_()};InfoBubble.prototype.borderWidth_changed=InfoBubble.prototype.borderWidth_changed;InfoBubble.prototype.updateArrowStyle_=function(){var r=this.getBorderWidth_(),u=this.getArrowSize_(),i=this.getArrowStyle_(),f=this.px(u),e=this.px(Math.max(0,u-r)),n=this.arrowOuter_,t=this.arrowInner_;this.arrow_.style.marginTop=this.px(-r);n.style.borderTopWidth=f;t.style.borderTopWidth=e;i==0||i==1?(n.style.borderLeftWidth=f,t.style.borderLeftWidth=e):n.style.borderLeftWidth=t.style.borderLeftWidth=0;i==0||i==2?(n.style.borderRightWidth=f,t.style.borderRightWidth=e):n.style.borderRightWidth=t.style.borderRightWidth=0;i<2?(n.style.marginLeft=this.px(-u),t.style.marginLeft=this.px(-(u-r))):n.style.marginLeft=t.style.marginLeft=0;n.style.display=r==0?"none":""};InfoBubble.prototype.setPadding=function(n){this.set("padding",n)};InfoBubble.prototype.setPadding=InfoBubble.prototype.setPadding;InfoBubble.prototype.setCloseSrc=function(n){n&&this.close_&&(this.close_.src=n)};InfoBubble.prototype.setCloseSrc=InfoBubble.prototype.setCloseSrc;InfoBubble.prototype.getPadding_=function(){return parseInt(this.get("padding"),10)||0};InfoBubble.prototype.padding_changed=function(){var n=this.getPadding_();this.contentContainer_.style.padding=this.px(n);this.updateTabStyles_();this.redraw_()};InfoBubble.prototype.padding_changed=InfoBubble.prototype.padding_changed;InfoBubble.prototype.px=function(n){return n?n+"px":n};InfoBubble.prototype.addEvents_=function(){var i=["mousedown","mousemove","mouseover","mouseout","mouseup","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","dblclick","contextmenu","click"],r=this.bubble_,n,t;for(this.listeners_=[],n=0;t=i[n];n++)this.listeners_.push(google.maps.event.addDomListener(r,t,function(n){n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()}))};InfoBubble.prototype.onAdd=function(){this.bubble_||this.buildDom_();this.addEvents_();var n=this.getPanes();n&&(n.floatPane.appendChild(this.bubble_),n.floatShadow.appendChild(this.bubbleShadow_));google.maps.event.trigger(this,"domready")};InfoBubble.prototype.onAdd=InfoBubble.prototype.onAdd;InfoBubble.prototype.draw=function(){var h=this.getProjection(),u,f,r,s,c;if(h){if(u=this.get("position"),!u){this.close();return}f=0;this.activeTab_&&(f=this.activeTab_.offsetHeight);var e=this.getAnchorHeight_(),o=this.getArrowSize_(),i=this.getArrowPosition_();i=i/100;var t=h.fromLatLngToDivPixel(u),n=this.contentContainer_.offsetWidth,l=this.bubble_.offsetHeight;if(n){r=t.y-(l+o);e&&(r-=e);s=t.x-n*i;this.bubble_.style.top=this.px(r);this.bubble_.style.left=this.px(s);c=parseInt(this.get("shadowStyle"),10);switch(c){case 1:this.bubbleShadow_.style.top=this.px(r+f-1);this.bubbleShadow_.style.left=this.px(s);this.bubbleShadow_.style.width=this.px(n);this.bubbleShadow_.style.height=this.px(this.contentContainer_.offsetHeight-o);break;case 2:n=n*.8;this.bubbleShadow_.style.top=e?this.px(t.y):this.px(t.y+o);this.bubbleShadow_.style.left=this.px(t.x-n*i);this.bubbleShadow_.style.width=this.px(n);this.bubbleShadow_.style.height=this.px(2)}}}};InfoBubble.prototype.draw=InfoBubble.prototype.draw;InfoBubble.prototype.onRemove=function(){this.bubble_&&this.bubble_.parentNode&&this.bubble_.parentNode.removeChild(this.bubble_);this.bubbleShadow_&&this.bubbleShadow_.parentNode&&this.bubbleShadow_.parentNode.removeChild(this.bubbleShadow_);for(var n=0,t;t=this.listeners_[n];n++)google.maps.event.removeListener(t)};InfoBubble.prototype.onRemove=InfoBubble.prototype.onRemove;InfoBubble.prototype.isOpen=function(){return this.isOpen_};InfoBubble.prototype.isOpen=InfoBubble.prototype.isOpen;InfoBubble.prototype.close=function(){this.bubble_&&(this.bubble_.style.display="none",this.bubble_.className=this.bubble_.className.replace(this.animationName_,""));this.bubbleShadow_&&(this.bubbleShadow_.style.display="none",this.bubbleShadow_.className=this.bubbleShadow_.className.replace(this.animationName_,""));this.isOpen_=!1};InfoBubble.prototype.close=InfoBubble.prototype.close;InfoBubble.prototype.open=function(n,t){var i=this;window.setTimeout(function(){i.open_(n,t)},0)};InfoBubble.prototype.open_=function(n,t){var i,r,u;this.updateContent_();n&&this.setMap(n);t&&(this.set("anchor",t),this.bindTo("anchorPoint",t),this.bindTo("position",t));this.bubble_.style.display=this.bubbleShadow_.style.display="";i=!this.get("disableAnimation");i&&(this.bubble_.className+=" "+this.animationName_,this.bubbleShadow_.className+=" "+this.animationName_);this.redraw_();this.isOpen_=!0;r=!this.get("disableAutoPan");r&&(u=this,window.setTimeout(function(){u.panToView()},200))};InfoBubble.prototype.open=InfoBubble.prototype.open;InfoBubble.prototype.setPosition=function(n){n&&this.set("position",n)};InfoBubble.prototype.setPosition=InfoBubble.prototype.setPosition;InfoBubble.prototype.getPosition=function(){return this.get("position")};InfoBubble.prototype.getPosition=InfoBubble.prototype.getPosition;InfoBubble.prototype.position_changed=function(){this.draw()};InfoBubble.prototype.position_changed=InfoBubble.prototype.position_changed;InfoBubble.prototype.panToView=function(){var n=this.getProjection();if(n&&this.bubble_){var o=this.getAnchorHeight_(),s=this.bubble_.offsetHeight+o,t=this.get("map"),h=t.getDiv(),c=h.offsetHeight,i=this.getPosition(),u=n.fromLatLngToContainerPixel(t.getCenter()),f=n.fromLatLngToContainerPixel(i),r=u.y-s,l=c-u.y,a=r<0,e=0;a&&(r*=-1,e=(r+l)/2);f.y-=e;i=n.fromContainerPixelToLatLng(f);t.getCenter()!=i&&t.panTo(i)}};InfoBubble.prototype.panToView=InfoBubble.prototype.panToView;InfoBubble.prototype.htmlToDocumentFragment_=function(n){var t,i;if(n=n.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),t=document.createElement("DIV"),t.innerHTML=n,t.childNodes.length==1)return t.removeChild(t.firstChild);for(i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i};InfoBubble.prototype.removeChildren_=function(n){if(n)for(var t;t=n.firstChild;)n.removeChild(t)};InfoBubble.prototype.setContent=function(n){this.set("content",n)};InfoBubble.prototype.setContent=InfoBubble.prototype.setContent;InfoBubble.prototype.getContent=function(){return this.get("content")};InfoBubble.prototype.getContent=InfoBubble.prototype.getContent;InfoBubble.prototype.updateContent_=function(){var n,i,r,t,u;if(this.content_){if(this.removeChildren_(this.content_),n=this.getContent(),n)for(typeof n=="string"&&(n=this.htmlToDocumentFragment_(n)),this.content_.appendChild(n),i=this,r=this.content_.getElementsByTagName("IMG"),t=0;u=r[t];t++)google.maps.event.addDomListener(u,"load",function(){i.imageLoaded_()});this.redraw_()}};InfoBubble.prototype.imageLoaded_=function(){var n=!this.get("disableAutoPan");this.redraw_();n&&(this.tabs_.length==0||this.activeTab_.index==0)&&this.panToView()};InfoBubble.prototype.updateTabStyles_=function(){var n,t,i,r;if(this.tabs_&&this.tabs_.length){for(n=0;t=this.tabs_[n];n++)this.setTabStyle_(t.tab);this.activeTab_.style.zIndex=this.baseZIndex_;i=this.getBorderWidth_();r=this.getPadding_()/2;this.activeTab_.style.borderBottomWidth=0;this.activeTab_.style.paddingBottom=this.px(r+i)}};InfoBubble.prototype.setTabStyle_=function(n){var s=this.get("backgroundColor"),h=this.get("borderColor"),e=this.getBorderRadius_(),c=this.getBorderWidth_(),i=this.getPadding_(),l=this.px(-Math.max(i,e)),t=this.px(e),o=this.baseZIndex_,r,u,f;n.index&&(o-=n.index);r={cssFloat:"left",position:"relative",cursor:"pointer",backgroundColor:s,border:this.px(c)+" solid "+h,padding:this.px(i/2)+" "+this.px(i),marginRight:l,whiteSpace:"nowrap",borderRadiusTopLeft:t,MozBorderRadiusTopleft:t,webkitBorderTopLeftRadius:t,borderRadiusTopRight:t,MozBorderRadiusTopright:t,webkitBorderTopRightRadius:t,zIndex:o,display:"inline"};for(u in r)n.style[u]=r[u];f=this.get("tabClassName");f!=undefined&&(n.className+=" "+f)};InfoBubble.prototype.addTabActions_=function(n){var t=this;n.listener_=google.maps.event.addDomListener(n,"click",function(){t.setTabActive_(this)})};InfoBubble.prototype.setTabActive=function(n){var t=this.tabs_[n-1];t&&this.setTabActive_(t.tab)};InfoBubble.prototype.setTabActive=InfoBubble.prototype.setTabActive;InfoBubble.prototype.setTabActive_=function(n){var i,r,t;if(!n){this.setContent("");this.updateContent_();return}i=this.getPadding_()/2;r=this.getBorderWidth_();this.activeTab_&&(t=this.activeTab_,t.style.zIndex=this.baseZIndex_-t.index,t.style.paddingBottom=this.px(i),t.style.borderBottomWidth=this.px(r));n.style.zIndex=this.baseZIndex_;n.style.borderBottomWidth=0;n.style.marginBottomWidth="-10px";n.style.paddingBottom=this.px(i+r);this.setContent(this.tabs_[n.index].content);this.updateContent_();this.activeTab_=n;this.redraw_()};InfoBubble.prototype.setMaxWidth=function(n){this.set("maxWidth",n)};InfoBubble.prototype.setMaxWidth=InfoBubble.prototype.setMaxWidth;InfoBubble.prototype.maxWidth_changed=function(){this.redraw_()};InfoBubble.prototype.maxWidth_changed=InfoBubble.prototype.maxWidth_changed;InfoBubble.prototype.setMaxHeight=function(n){this.set("maxHeight",n)};InfoBubble.prototype.setMaxHeight=InfoBubble.prototype.setMaxHeight;InfoBubble.prototype.maxHeight_changed=function(){this.redraw_()};InfoBubble.prototype.maxHeight_changed=InfoBubble.prototype.maxHeight_changed;InfoBubble.prototype.setMinWidth=function(n){this.set("minWidth",n)};InfoBubble.prototype.setMinWidth=InfoBubble.prototype.setMinWidth;InfoBubble.prototype.minWidth_changed=function(){this.redraw_()};InfoBubble.prototype.minWidth_changed=InfoBubble.prototype.minWidth_changed;InfoBubble.prototype.setMinHeight=function(n){this.set("minHeight",n)};InfoBubble.prototype.setMinHeight=InfoBubble.prototype.setMinHeight;InfoBubble.prototype.minHeight_changed=function(){this.redraw_()};InfoBubble.prototype.minHeight_changed=InfoBubble.prototype.minHeight_changed;InfoBubble.prototype.addTab=function(n,t){var i=document.createElement("DIV");i.innerHTML=n;this.setTabStyle_(i);this.addTabActions_(i);this.tabsContainer_.appendChild(i);this.tabs_.push({label:n,content:t,tab:i});i.index=this.tabs_.length-1;i.style.zIndex=this.baseZIndex_-i.index;this.activeTab_||this.setTabActive_(i);i.className=i.className+" "+this.animationName_;this.redraw_()};InfoBubble.prototype.addTab=InfoBubble.prototype.addTab;InfoBubble.prototype.updateTab=function(n,t,i){if(this.tabs_.length&&!(n<0)&&!(n>=this.tabs_.length)){var r=this.tabs_[n];t!=undefined&&(r.tab.innerHTML=r.label=t);i!=undefined&&(r.content=i);this.activeTab_==r.tab&&(this.setContent(r.content),this.updateContent_());this.redraw_()}};InfoBubble.prototype.updateTab=InfoBubble.prototype.updateTab;InfoBubble.prototype.removeTab=function(n){var t,i,r;if(this.tabs_.length&&!(n<0)&&!(n>=this.tabs_.length)){for(t=this.tabs_[n],t.tab.parentNode.removeChild(t.tab),google.maps.event.removeListener(t.tab.listener_),this.tabs_.splice(n,1),delete t,i=0;r=this.tabs_[i];i++)r.tab.index=i;t.tab==this.activeTab_&&(this.activeTab_=this.tabs_[n]?this.tabs_[n].tab:this.tabs_[n-1]?this.tabs_[n-1].tab:undefined,this.setTabActive_(this.activeTab_));this.redraw_()}};InfoBubble.prototype.removeTab=InfoBubble.prototype.removeTab;InfoBubble.prototype.getElementSize_=function(n,t,i){var r=document.createElement("DIV"),u;return r.style.display="inline",r.style.position="absolute",r.style.visibility="hidden",typeof n=="string"?r.innerHTML=n:r.appendChild(n.cloneNode(!0)),document.body.appendChild(r),u=new google.maps.Size(r.offsetWidth,r.offsetHeight),t&&u.width>t&&(r.style.width=this.px(t),u=new google.maps.Size(r.offsetWidth,r.offsetHeight)),i&&u.height>i&&(r.style.height=this.px(i),u=new google.maps.Size(r.offsetWidth,r.offsetHeight)),document.body.removeChild(r),delete r,u};InfoBubble.prototype.redraw_=function(){this.figureOutSize_();this.positionCloseButton_();this.draw()};InfoBubble.prototype.figureOutSize_=function(){var y=this.get("map"),o,a,v,r,e,i;if(y){var b=this.getPadding_(),k=this.getBorderWidth_(),d=this.getBorderRadius_(),s=this.getArrowSize_(),p=y.getDiv(),w=s*2,c=p.offsetWidth-w,l=p.offsetHeight-w-this.getAnchorHeight_(),h=0,n=this.get("minWidth")||0,t=this.get("minHeight")||0,u=this.get("maxWidth")||0,f=this.get("maxHeight")||0;if(u=Math.min(c,u),f=Math.min(l,f),o=0,this.tabs_.length)for(a=0;v=this.tabs_[a];a++)r=this.getElementSize_(v.tab,u,f),i=this.getElementSize_(v.content,u,f),n<r.width&&(n=r.width),o+=r.width,t<r.height&&(t=r.height),r.height>h&&(h=r.height),n<i.width&&(n=i.width),t<i.height&&(t=i.height);else e=this.get("content"),typeof e=="string"&&(e=this.htmlToDocumentFragment_(e)),e&&(i=this.getElementSize_(e,u,f),n<i.width&&(n=i.width),t<i.height&&(t=i.height));u&&(n=Math.min(n,u));f&&(t=Math.min(t,f));n=Math.max(n,o);n==o&&(n=n+2*b);s=s*2;n=Math.max(n,s);n>c&&(n=c);t>l&&(t=l-h);this.tabsContainer_&&(this.tabHeight_=h,this.tabsContainer_.style.width=this.px(o));this.contentContainer_.style.width=this.px(n);this.contentContainer_.style.height=this.px(t)}};InfoBubble.prototype.getAnchorHeight_=function(){var t=this.get("anchor"),n;return t&&(n=this.get("anchorPoint"),n)?-1*n.y:0};InfoBubble.prototype.anchorPoint_changed=function(){this.draw()};InfoBubble.prototype.anchorPoint_changed=InfoBubble.prototype.anchorPoint_changed;InfoBubble.prototype.positionCloseButton_=function(){var u=this.getBorderRadius_(),r=this.getBorderWidth_(),t=2,i=2,n;this.tabs_.length&&this.tabHeight_&&(i+=this.tabHeight_);i+=r;t+=r;n=this.contentContainer_;n&&n.clientHeight<n.scrollHeight&&(t+=15);this.close_.style.right=this.px(t);this.close_.style.top=this.px(i)};OneClickEnquiryForm=function(){var n={init:function(){$(".adaptive-view-related-suppliers input").iCheck({handle:"checkbox",checkboxClass:"icheckbox_square-pink-large"});$(".close-confirmation-modal").click(function(){$("#enquiryModalWrapperLrg-EnquiryConfirmation").modal("hide")});$("[name=suggested-supplier]").click(function(){$(this).find(".adaptive-view-related-suppliers input").iCheck("toggle")});n.initSubmitButton()},initSubmitButton:function(){$("[data-hook='submit-related-suppliers']").click(n.onClick)},onClick:function(){n.disableButton();var t=n.createNewEmailBrochureRequestList();n.validate(t)?n.requestBrochures(t).done(n.handleRequestBrochuresResponses).done(n.enableButton):n.enableButton()},validate:function(n){var t=!0;return $("#relatedSupplierValidationMessage, #relatedSupplierCommentValidationMessage").hide(),n.length||($("#relatedSupplierValidationMessage").show(),t=!1),$('[data-ew-input="relatedSupplierComments"]').val()||($("#relatedSupplierCommentValidationMessage").show(),t=!1),t},disableButton:function(){var n=$('[data-hook="submit-related-suppliers"]');n.css("pointer-events","none")},displaySuccess:function(){$(".category-carousel-bottom, #postEnquiryConfirmation .alert-success").removeClass("hide");$("#first-half-multiple-suppliers-page").hide();$("html, body").animate({scrollTop:$(".enquiry-form-mobile").offset().top},500)},enableButton:function(){var n=$('[data-hook="submit-related-suppliers"]');n.css("pointer-events","auto")},createNewEmailBrochureRequestList:function(){var t=[];return $('[name="suggested-supplier"] .checked').each(function(){var i=$(this).next(),r=n.createNewEmailBrochureRequest(i);t.push(r)}),t},createNewEmailBrochureRequest:function(n){var t=new EmailBrochureRequest;return t.Name=$.cookie("ew_UserDisplayName"),t.Email=$.cookie("ew_UserEmail"),t.Phone=$.cookie("ew_UserPhone"),t.WeddingDate=$.cookie("ew_UserWeddingDate"),t.WeddingLocation=$.cookie("ew_UserLocation"),t.CategoryId=n.attr("ew-data-category-id"),t.StateId=n.attr("ew-data-state-id"),t.RegionId=n.attr("ew-data-region-id"),t.SupplierId=n.attr("ew-data-supplier-id"),t.SupplierName=n.attr("ew-data-supplier-name"),t.IsOneClick=!0,t.Comment=$('[data-ew-input="relatedSupplierComments"]').val(),t.EnquirySource="OneClick",t},requestBrochures:function(t){return $.ajax({type:"POST",url:"/api/EasyDirectoryAPI/RequestBrochures",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",beforeSend:function(){n.showLoadingOverlay(!0)},complete:function(){n.showLoadingOverlay(!1)}})},showLoadingOverlay:function(n){n?ewLoadingOverlay.show():ewLoadingOverlay.hide()},handleRequestBrochuresResponses:function(t){var u=!0,i,r;for(n.initErrorDisplayer(),i=0;i<t.length;i++)r=t[i],r.HasError?(n.addErrorMessage(r.ErrorMessage,"Error sending to supplier: "),u=!1):n.updateStats(r.SupplierId);u&&n.displaySuccess();n.restoreErrorDisplayer()},initErrorDisplayer:function(){n.originalToastrPreventDuplicatesSetting=toastr.options.preventDuplicates;toastr.options.preventDuplicates=!0},restoreErrorDisplayer:function(){toastr.options.preventDuplicates=n.originalToastrPreventDuplicatesSetting},addErrorMessage:function(n,t){toastr.warning(n,t)},updateStats:function(n){SupplierBrochureRequestCounter(n,!0);ga("send","pageview",{page:"/brochure-request/form-success"});ga("send","event","profile-page","enquiry-submitted-oneclick",n);sendCriteoOneClickSale(n);fbq("track","OneClickLead");try{__adroll.record_user({adroll_segments:"4d02c2bb"})}catch(t){}}};return n};mobileOneClickEnquiryForm=new OneClickEnquiryForm;mobileOneClickEnquiryForm.displaySuccess=function(){$(".category-carousel-bottom, #postEnquiryConfirmation .alert-success").removeClass("hide");$("#first-half-multiple-suppliers-page").hide();$("html, body").animate({scrollTop:$(".enquiry-form-mobile").offset().top},500)};mobileOneClickEnquiryForm.display=function(){var n=$("#btnSubmitMobile").attr("ew-data-supplier-url")+"/enquiry/mobile/post";window.location.replace(n)};desktopOneClickEnquiryForm=new OneClickEnquiryForm;desktopOneClickEnquiryForm.displaySuccess=function(){$(".enquiry-form-mobile").is(":visible")||(window.location=$('[data-hook="submit-related-suppliers"]').attr("data-url"))};desktopOneClickEnquiryForm.display=function(n){$("#recommendedSuppliers").load("//"+window.location.hostname+"/directory/partial/profile/enquiry/modal/related?categoryId="+n.categoryId+"&regionId="+n.regionId+"&supplier="+n.supplier+"&supplierId="+n.SupplierId,function(){if(ewLoadingOverlay.hide(),$("[name=suggested-supplier]").length){$("#enquiryModalWrapperLrg-EnquiryConfirmation").on("shown.bs.modal",function(){$("#enquiryModalWrapperLrg-GetInTouchMobile").modal("hide");$(".adaptive-view-related-suppliers input").iCheck({handle:"checkbox",checkboxClass:"icheckbox_square-pink-large"});$("[name=suggested-supplier]").click(function(){$(this).find(".adaptive-view-related-suppliers input").iCheck("toggle")})});$("#enquiryModalWrapperLrg-EnquiryConfirmation").modal({show:!0})}else desktopOneClickEnquiryForm.displaySuccess()})};$(document).ready(function(){var t,r,n;if($.cookie("EWLoginUserDetails")==null){var u=$.cookie("ew_UserEmail"),f=$.cookie("ew_UserDisplayName"),i=$.cookie("ew_UserWeddingDate"),e=$.cookie("ew_UserPhone"),o=$.cookie("ew_UserLocation");typeof i=="undefined"&&(i=moment().format("DD/MM/YYYY"));$(this).find('[data-ew-input="txtName"]').val(f);$(this).find('[data-ew-input="txtEmail"]').val(u);$(this).find('[data-ew-input="txtPhone"]').val(e);$(this).find('[data-ew-input="txtWeddingDate"]').val(i);$(this).find('[data-ew-input="txtWeddingLocation"]').val(o)}else t=$(this),$.get("/api/EasyDirectoryAPI/GetUserDetails?sessionId="+$.cookie("EWLoginUserDetails").replace("LoginUserApiSessionId=",""),function(n){t.find('[data-ew-input="txtName"]').val(n.DisplayName);t.find('[data-ew-input="txtEmail"]').val(n.Email);t.find('[data-ew-input="txtPhone"]').val(n.Phone);t.find('[data-ew-input="txtWeddingDate"]').val(moment(n.WeddingDate).format("DD/MM/YYYY"));t.find('[data-ew-input="txtWeddingLocation"]').val(n.WeddingLocation)});r=function(){console.log("scroll");var n=$(document).height();$("html, body").animate({scrollTop:n-1500},"slow");$("#contact-form-package").effect("highlight",{color:"#fad6e4"},2e3).focus()};$('[data-hook="jump-to-enquiry-form"]').on("click",r);n=[];$("#contact-form-package").on("ifChanged",function(){setTimeout(function(){n.Brochure=$("#contact-form-package").find('[data-ew-input="chkBrochure"]').parent().hasClass("checked")?!0:!1;n.DownloadBrochure=$("#contact-form-package").find('[data-ew-input="chkDownloadBrochure"]').parent().hasClass("checked")?!0:!1;n.Price=$("#contact-form-package").find('[data-ew-input="chkPriceRequest"]').parent().hasClass("checked")?!0:!1;n.Availability=$("#contact-form-package").find('[data-ew-input="chkAvailability"]').parent().hasClass("checked")?!0:!1;n.Brochure==!0||n.DownloadBrochure==!0||n.Price==!0||n.Availability==!0?$(".toggle-if-valid").slideDown():$(".toggle-if-valid").slideUp()},1)});$(".togglePhoneNumber").click(function(){if(islogin=="False")$("#login-form .modal-content").load(profileLoginActionPath,function(){$("#login-form").modal({show:!0});quickLoginCallbackFunction=function(){$("#collapsePhone").collapse("toggle");$(".togglePhoneNumber").slideUp();var n=$("#collapsePhone").attr("ew-data-supplierId"),t=$("#collapsePhone").attr("ew-data-categoryId"),i=$("#collapsePhone").attr("ew-data-regionId");PhoneCounter(n,t,i);quickLoginCallbackFunction=null}});else{$("#collapsePhone").collapse("toggle");$(".togglePhoneNumber").slideUp();var n=$("#collapsePhone").attr("ew-data-supplierId"),t=$("#collapsePhone").attr("ew-data-categoryId"),i=$("#collapsePhone").attr("ew-data-regionId");PhoneCounter(n,t,i);quickLoginCallbackFunction=null}});$("a#btnWebsite").click(function(n){return quickLoginCallbackFunction=null,console.log(islogin),islogin=="False"?(n.preventDefault(),console.log("non-login"),$("#login-form .modal-content").load(profileLoginActionPath,function(){$("#login-form").modal({show:!0});quickLoginCallbackFunction=function(t){$.get("/api/EasyDirectoryAPI/GetUserDetails?sessionId="+t,function(t){PopulateEnquiryUserData(t,!0,n)})}}),!1):(console.log("login"),!0)});$(".enquiry-form-mobile").is(":visible")?mobileOneClickEnquiryForm.init():desktopOneClickEnquiryForm.init();$("#btnSubmit").click(function(n){submitEnquiry(!0,function(n){desktopOneClickEnquiryForm.display(n)},null,n)});$("#btnSubmitMobile").click(function(n){$("#btnSubmitMobile").hasClass("disabled")||(quickLoginCallbackFunction=submitEnquiry(!1,function(n){mobileOneClickEnquiryForm.display(n)},null,n))});$("#btnSubmitContactForm").click(function(n){submitEnquiry(!0,function(n){desktopOneClickEnquiryForm.display(n)},null,n)});$("#btnSubmitFashionContactForm").click(function(n){submitFashionEnquiry(!0,function(n){desktopOneClickEnquiryForm.display(n)},null,n)});$("#enquiry-next").click(function(){firstStepFormValidation()});$("#enquiry-previous").click(function(){$("#step1, #step2, #step3").collapse("show");$("#step4").collapse("hide")})});$.scrollUp({scrollName:"scrollUp",scrollDistance:500,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationSpeed:200,scrollText:"",zIndex:2147483647});activateMouseflow=function(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="//cdn.mouseflow.com/projects/36f43480-fa51-4699-a55a-a803f3d14b46.js";document.getElementsByTagName("head")[0].appendChild(n)};$("#btnSubmit, #get-in-touch-profile").click(function(){$.cookie("mf_start","1");activateMouseflow()});$.cookie("mf_start")=="1"&&activateMouseflow();initCarousel=function(){var t=$("#SupplierId").val(),i=$("#SupplierId").val(),n=$(".top-banner-hero").css("background-image");n=/^url\((['"]?)(.*)\1\)$/.exec(n);n=n?n[2]:"";$.ajax({method:"GET",url:"/api/EasyDirectoryAPI/SupplierProfileImages?supplierId="+t+"&page=1&rows=100&categorySlug="+i,success:function(t){var r=[],i;for(r.push({href:n}),console.log(r),i=0;i<t.Images.length;i++)r.push({href:t.Images[i].imgurl,title:t.Images[i].description});blueimp.Gallery(r)},error:function(n,t,i){console.log(i)}})};$("#heroCarouselBtn, .top-banner-hero").click(function(){initCarousel()});div=$('a[data-hook="special-offer-link"]').parent();$(div).click(function(){$("html, body").animate({scrollTop:$(".ew-widget.footer-form").offset().top},1500)});!function(n,t,i){"use strict";n.fn.scrollUp=function(t){n.data(i.body,"scrollUp")||(n.data(i.body,"scrollUp",!0),n.fn.scrollUp.init(t))};n.fn.scrollUp.init=function(r){var o,s,e,l,a,h,f,u=n.fn.scrollUp.settings=n.extend({},n.fn.scrollUp.defaults,r),c=!1;switch(f=u.scrollTrigger?n(u.scrollTrigger):n("<a/>",{id:u.scrollName,href:"#top"}),u.scrollTitle&&f.attr("title",u.scrollTitle),f.appendTo("body"),u.scrollImg||u.scrollTrigger||f.html(u.scrollText),f.css({display:"none",position:"fixed",zIndex:u.zIndex}),u.activeOverlay&&n("<div/>",{id:u.scrollName+"-active"}).css({position:"absolute",top:u.scrollDistance+"px",width:"100%",borderTop:"1px dotted"+u.activeOverlay,zIndex:u.zIndex}).appendTo("body"),u.animation){case"fade":o="fadeIn";s="fadeOut";e=u.animationSpeed;break;case"slide":o="slideDown";s="slideUp";e=u.animationSpeed;break;default:o="show";s="hide";e=0}l="top"===u.scrollFrom?u.scrollDistance:n(i).height()-n(t).height()-u.scrollDistance;a=n(t).scroll(function(){n(t).scrollTop()>l?c||(f[o](e),c=!0):c&&(f[s](e),c=!1)});u.scrollTarget?"number"==typeof u.scrollTarget?h=u.scrollTarget:"string"==typeof u.scrollTarget&&(h=Math.floor(n(u.scrollTarget).offset().top)):h=0;f.click(function(t){t.preventDefault();n("html, body").animate({scrollTop:h},u.scrollSpeed,u.easingType)})};n.fn.scrollUp.defaults={scrollName:"scrollUp",scrollDistance:300,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationSpeed:200,scrollTrigger:!1,scrollTarget:!1,scrollText:"Scroll to top",scrollTitle:!1,scrollImg:!1,activeOverlay:!1,zIndex:2147483647};n.fn.scrollUp.destroy=function(r){n.removeData(i.body,"scrollUp");n("#"+n.fn.scrollUp.settings.scrollName).remove();n("#"+n.fn.scrollUp.settings.scrollName+"-active").remove();n.fn.jquery.split(".")[1]>=7?n(t).off("scroll",r):n(t).unbind("scroll",r)};n.scrollUp=n.fn.scrollUp}(jQuery,window,document);!function(){"use strict";function t(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function n(t){if(!this||this.find!==n.prototype.find)return new n(t);if(this.length=0,t)if("string"==typeof t&&(t=this.find(t)),t.nodeType||t===t.window)this.length=1,this[0]=t;else{var i=t.length;for(this.length=i;i;)i-=1,this[i]=t[i]}}n.extend=t;n.contains=function(n,t){do if(t=t.parentNode,t===n)return!0;while(t);return!1};n.parseJSON=function(n){return window.JSON&&JSON.parse(n)};t(n.prototype,{find:function(t){var i=this[0]||document;return"string"==typeof t&&(t=i.querySelectorAll?i.querySelectorAll(t):"#"===t.charAt(0)?i.getElementById(t.slice(1)):i.getElementsByTagName(t)),new n(t)},hasClass:function(n){return this[0]?new RegExp("(^|\\s+)"+n+"(\\s+|$)").test(this[0].className):!1},addClass:function(n){for(var t,i=this.length;i;){if(i-=1,t=this[i],!t.className)return t.className=n,this;if(this.hasClass(n))return this;t.className+=" "+n}return this},removeClass:function(n){for(var t,r=new RegExp("(^|\\s+)"+n+"(\\s+|$)"),i=this.length;i;)i-=1,t=this[i],t.className=t.className.replace(r," ");return this},on:function(n,t){for(var r,i,u=n.split(/\s+/);u.length;)for(n=u.shift(),r=this.length;r;)r-=1,i=this[r],i.addEventListener?i.addEventListener(n,t,!1):i.attachEvent&&i.attachEvent("on"+n,t);return this},off:function(n,t){for(var r,i,u=n.split(/\s+/);u.length;)for(n=u.shift(),r=this.length;r;)r-=1,i=this[r],i.removeEventListener?i.removeEventListener(n,t,!1):i.detachEvent&&i.detachEvent("on"+n,t);return this},empty:function(){for(var n,t=this.length;t;)for(t-=1,n=this[t];n.hasChildNodes();)n.removeChild(n.lastChild);return this},first:function(){return new n(this[0])}});"function"==typeof define&&define.amd?define(function(){return n}):(window.blueimp=window.blueimp||{},window.blueimp.helper=n)}(),function(n){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper"],n):(window.blueimp=window.blueimp||{},window.blueimp.Gallery=n(window.blueimp.helper||window.jQuery))}(function(n){"use strict";function t(n,i){return void 0===document.body.style.maxHeight?null:this&&this.options===t.prototype.options?n&&n.length?(this.list=n,this.num=n.length,this.initOptions(i),void this.initialize()):void this.console.log("blueimp Gallery: No or empty list provided as first argument.",n):new t(n,i)}return n.extend(t.prototype,{options:{container:"#blueimp-gallery",slidesContainer:"div",titleElement:"h3",displayClass:"blueimp-gallery-display",controlsClass:"blueimp-gallery-controls",singleClass:"blueimp-gallery-single",leftEdgeClass:"blueimp-gallery-left",rightEdgeClass:"blueimp-gallery-right",playingClass:"blueimp-gallery-playing",slideClass:"slide",slideLoadingClass:"slide-loading",slideErrorClass:"slide-error",slideContentClass:"slide-content",toggleClass:"toggle",prevClass:"prev",nextClass:"next",closeClass:"close",playPauseClass:"play-pause",typeProperty:"type",titleProperty:"title",urlProperty:"href",srcsetProperty:"urlset",displayTransition:!0,clearSlides:!0,stretchImages:!1,toggleControlsOnReturn:!0,toggleControlsOnSlideClick:!0,toggleSlideshowOnSpace:!0,enableKeyboardNavigation:!0,closeOnEscape:!0,closeOnSlideClick:!0,closeOnSwipeUpOrDown:!0,emulateTouchEvents:!0,stopTouchEventsPropagation:!1,hidePageScrollbars:!0,disableScroll:!0,carousel:!1,continuous:!0,unloadElements:!0,startSlideshow:!1,slideshowInterval:5e3,index:0,preloadRange:2,transitionSpeed:400,slideshowTransitionSpeed:void 0,event:void 0,onopen:void 0,onopened:void 0,onslide:void 0,onslideend:void 0,onslidecomplete:void 0,onclose:void 0,onclosed:void 0},carouselOptions:{hidePageScrollbars:!1,toggleControlsOnReturn:!1,toggleSlideshowOnSpace:!1,enableKeyboardNavigation:!1,closeOnEscape:!1,closeOnSlideClick:!1,closeOnSwipeUpOrDown:!1,disableScroll:!1,startSlideshow:!0},console:window.console&&"function"==typeof window.console.log?window.console:{log:function(){}},support:function(t){function f(){var n,u,r=i.transition;document.body.appendChild(t);r&&(n=r.name.slice(0,-9)+"ransform",void 0!==t.style[n]&&(t.style[n]="translateZ(0)",u=window.getComputedStyle(t).getPropertyValue(r.prefix+"transform"),i.transform={prefix:r.prefix,name:n,translate:!0,translateZ:!!u&&"none"!==u}));void 0!==t.style.backgroundSize&&(i.backgroundSize={},t.style.backgroundSize="contain",i.backgroundSize.contain="contain"===window.getComputedStyle(t).getPropertyValue("background-size"),t.style.backgroundSize="cover",i.backgroundSize.cover="cover"===window.getComputedStyle(t).getPropertyValue("background-size"));document.body.removeChild(t)}var r,i={touch:void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof DocumentTouch},u={webkitTransition:{end:"webkitTransitionEnd",prefix:"-webkit-"},MozTransition:{end:"transitionend",prefix:"-moz-"},OTransition:{end:"otransitionend",prefix:"-o-"},transition:{end:"transitionend",prefix:""}};for(r in u)if(u.hasOwnProperty(r)&&void 0!==t.style[r]){i.transition=u[r];i.transition.name=r;break}return document.body?f():n(document).on("DOMContentLoaded",f),i}(document.createElement("div")),requestAnimationFrame:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,initialize:function(){return this.initStartIndex(),this.initWidget()===!1?!1:(this.initEventListeners(),this.onslide(this.index),this.ontransitionend(),void(this.options.startSlideshow&&this.play()))},slide:function(n,t){window.clearTimeout(this.timeout);var i,f,u,r=this.index;if(r!==n&&1!==this.num){if(t||(t=this.options.transitionSpeed),this.support.transform){for(this.options.continuous||(n=this.circle(n)),i=Math.abs(r-n)/(r-n),this.options.continuous&&(f=i,i=-this.positions[this.circle(n)]/this.slideWidth,i!==f&&(n=-i*this.num+n)),u=Math.abs(r-n)-1;u;)u-=1,this.move(this.circle((n>r?n:r)-u-1),this.slideWidth*i,0);n=this.circle(n);this.move(r,this.slideWidth*i,t);this.move(n,0,t);this.options.continuous&&this.move(this.circle(n-i),-(this.slideWidth*i),0)}else n=this.circle(n),this.animate(r*-this.slideWidth,n*-this.slideWidth,t);this.onslide(n)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index<this.num-1)&&this.slide(this.index+1)},play:function(n){var t=this;window.clearTimeout(this.timeout);this.interval=n||this.options.slideshowInterval;this.elements[this.index]>1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(n,i){t.animationFrameId=t.requestAnimationFrame.call(window,function(){t.slide(n,i)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval));this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout);this.interval=null;this.container.removeClass(this.options.playingClass)},add:function(n){var t;for(n.concat||(n=Array.prototype.slice.call(n)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(n),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),t=this.num-n.length;t<this.num;t+=1)this.addSlide(t),this.positionSlide(t);this.positions.length=this.num;this.initSlides(!0)},resetSlides:function(){this.slidesContainer.empty();this.unloadAllSlides();this.slides=[]},handleClose:function(){var n=this.options;this.destroyEventListeners();this.pause();this.container[0].style.display="none";this.container.removeClass(n.displayClass).removeClass(n.singleClass).removeClass(n.leftEdgeClass).removeClass(n.rightEdgeClass);n.hidePageScrollbars&&(document.body.style.overflow=this.bodyOverflowStyle);this.options.clearSlides&&this.resetSlides();this.options.onclosed&&this.options.onclosed.call(this)},close:function(){function t(i){i.target===n.container[0]&&(n.container.off(n.support.transition.end,t),n.handleClose())}var n=this;this.options.onclose&&this.options.onclose.call(this);this.support.transition&&this.options.displayTransition?(this.container.on(this.support.transition.end,t),this.container.removeClass(this.options.displayClass)):this.handleClose()},circle:function(n){return(this.num+n%this.num)%this.num},move:function(n,t,i){this.translateX(n,t,i);this.positions[n]=t},translate:function(n,t,i,r){var u=this.slides[n].style,e=this.support.transition,f=this.support.transform;u[e.name+"Duration"]=r+"ms";u[f.name]="translate("+t+"px, "+i+"px)"+(f.translateZ?" translateZ(0)":"")},translateX:function(n,t,i){this.translate(n,t,0,i)},translateY:function(n,t,i){this.translate(n,0,t,i)},animate:function(n,t,i){if(!i)return void(this.slidesContainer[0].style.left=t+"px");var r=this,u=(new Date).getTime(),f=window.setInterval(function(){var e=(new Date).getTime()-u;return e>i?(r.slidesContainer[0].style.left=t+"px",r.ontransitionend(),void window.clearInterval(f)):void(r.slidesContainer[0].style.left=(t-n)*(Math.floor(e/i*100)/100)+n+"px")},4)},preventDefault:function(n){n.preventDefault?n.preventDefault():n.returnValue=!1},stopPropagation:function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(n){n.which&&1===n.which&&"VIDEO"!==n.target.nodeName&&(n.preventDefault(),(n.originalEvent||n).touches=[{pageX:n.pageX,pageY:n.pageY}],this.ontouchstart(n))},onmousemove:function(n){this.touchStart&&((n.originalEvent||n).touches=[{pageX:n.pageX,pageY:n.pageY}],this.ontouchmove(n))},onmouseup:function(n){this.touchStart&&(this.ontouchend(n),delete this.touchStart)},onmouseout:function(t){if(this.touchStart){var r=t.target,i=t.relatedTarget;i&&(i===r||n.contains(r,i))||this.onmouseup(t)}},ontouchstart:function(n){this.options.stopTouchEventsPropagation&&this.stopPropagation(n);var t=(n.originalEvent||n).touches[0];this.touchStart={x:t.pageX,y:t.pageY,time:Date.now()};this.isScrolling=void 0;this.touchDelta={}},ontouchmove:function(n){this.options.stopTouchEventsPropagation&&this.stopPropagation(n);var i,r,u=(n.originalEvent||n).touches[0],f=(n.originalEvent||n).scale,t=this.index;if(!(u.length>1||f&&1!==f))if(this.options.disableScroll&&n.preventDefault(),this.touchDelta={x:u.pageX-this.touchStart.x,y:u.pageY-this.touchStart.y},i=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(i)<Math.abs(this.touchDelta.y)),this.isScrolling)this.options.closeOnSwipeUpOrDown&&this.translateY(t,this.touchDelta.y+this.positions[t],0);else for(n.preventDefault(),window.clearTimeout(this.timeout),this.options.continuous?r=[this.circle(t+1),t,this.circle(t-1)]:(this.touchDelta.x=i/=!t&&i>0||t===this.num-1&&0>i?Math.abs(i)/this.slideWidth+1:1,r=[t],t&&r.push(t-1),t<this.num-1&&r.unshift(t+1));r.length;)t=r.pop(),this.translateX(t,i+this.positions[t],0)},ontouchend:function(n){this.options.stopTouchEventsPropagation&&this.stopPropagation(n);var u,f,o,e,s,t=this.index,i=this.options.transitionSpeed,r=this.slideWidth,h=Number(Date.now()-this.touchStart.time)<250,c=h&&Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.x)>r/2,l=!t&&this.touchDelta.x>0||t===this.num-1&&this.touchDelta.x<0,a=!c&&this.options.closeOnSwipeUpOrDown&&(h&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(l=!1);u=this.touchDelta.x<0?-1:1;this.isScrolling?a?this.close():this.translateY(t,0,i):c&&!l?(f=t+u,o=t-u,e=r*u,s=-r*u,this.options.continuous?(this.move(this.circle(f),e,0),this.move(this.circle(t-2*u),s,0)):f>=0&&f<this.num&&this.move(f,e,0),this.move(t,this.positions[t]+e,i),this.move(this.circle(o),this.positions[this.circle(o)]+e,i),t=this.circle(o),this.onslide(t)):this.options.continuous?(this.move(this.circle(t-1),-r,i),this.move(t,0,i),this.move(this.circle(t+1),r,i)):(t&&this.move(t-1,-r,i),this.move(t,0,i),t<this.num-1&&this.move(t+1,r,i))},ontouchcancel:function(n){this.touchStart&&(this.ontouchend(n),delete this.touchStart)},ontransitionend:function(n){var t=this.slides[this.index];n&&t!==n.target||(this.interval&&this.play(),this.setTimeout(this.options.onslideend,[this.index,t]))},oncomplete:function(t){var u,r=t.target||t.srcElement,i=r&&r.parentNode;r&&i&&(u=this.getNodeIndex(i),n(i).removeClass(this.options.slideLoadingClass),"error"===t.type?(n(i).addClass(this.options.slideErrorClass),this.elements[u]=3):this.elements[u]=2,r.clientHeight>this.container[0].clientHeight&&(r.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===i&&this.play(),this.setTimeout(this.options.onslidecomplete,[u,i]))},onload:function(n){this.oncomplete(n)},onerror:function(n){this.oncomplete(n)},onkeydown:function(n){switch(n.which||n.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(n),this.toggleControls());break;case 27:this.options.closeOnEscape&&(this.close(),n.stopImmediatePropagation());break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(n),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(n),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(n),this.next())}},handleClick:function(t){function r(t){return n(f).hasClass(t)||n(u).hasClass(t)}var i=this.options,f=t.target||t.srcElement,u=f.parentNode;r(i.toggleClass)?(this.preventDefault(t),this.toggleControls()):r(i.prevClass)?(this.preventDefault(t),this.prev()):r(i.nextClass)?(this.preventDefault(t),this.next()):r(i.closeClass)?(this.preventDefault(t),this.close()):r(i.playPauseClass)?(this.preventDefault(t),this.toggleSlideshow()):u===this.slidesContainer[0]?i.closeOnSlideClick?(this.preventDefault(t),this.close()):i.toggleControlsOnSlideClick&&(this.preventDefault(t),this.toggleControls()):u.parentNode&&u.parentNode===this.slidesContainer[0]&&i.toggleControlsOnSlideClick&&(this.preventDefault(t),this.toggleControls())},onclick:function(n){return this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)?void delete this.touchDelta:this.handleClick(n)},updateEdgeClasses:function(n){n?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass);n===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(n){this.options.continuous||this.updateEdgeClasses(n);this.loadElements(n);this.options.unloadElements&&this.unloadElements(n);this.setTitle(n)},onslide:function(n){this.index=n;this.handleSlide(n);this.setTimeout(this.options.onslide,[n,this.slides[n]])},setTitle:function(n){var t=this.slides[n].firstChild.title,i=this.titleElement;i.length&&(this.titleElement.empty(),t&&i[0].appendChild(document.createTextNode(t)))},setTimeout:function(n,t,i){var r=this;return n&&window.setTimeout(function(){n.apply(r,t||[])},i||0)},imageFactory:function(t,i){function o(t){if(!h){if(t={type:t.type,target:r},!r.parentNode)return c.setTimeout(o,[t]);h=!0;n(f).off("load error",o);u&&"load"===t.type&&(r.style.background='url("'+e+'") center no-repeat',r.style.backgroundSize=u);i(t)}}var h,r,s,c=this,f=this.imagePrototype.cloneNode(!1),e=t,u=this.options.stretchImages;return"string"!=typeof e&&(e=this.getItemProperty(t,this.options.urlProperty),s=this.getItemProperty(t,this.options.titleProperty)),u===!0&&(u="contain"),u=this.support.backgroundSize&&this.support.backgroundSize[u]&&u,u?r=this.elementPrototype.cloneNode(!1):(r=f,f.draggable=!1),s&&(r.title=s),n(f).on("load error",o),f.src=e,r},createElement:function(t,i){var u=t&&this.getItemProperty(t,this.options.typeProperty),e=u&&this[u.split("/")[0]+"Factory"]||this.imageFactory,r=t&&e.call(this,t,i),f=this.getItemProperty(t,this.options.srcsetProperty);return r||(r=this.elementPrototype.cloneNode(!1),this.setTimeout(i,[{type:"error",target:r}])),f&&r.setAttribute("srcset",f),n(r).addClass(this.options.slideContentClass),r},loadElement:function(t){this.elements[t]||(this.slides[t].firstChild?this.elements[t]=n(this.slides[t]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[t]=1,n(this.slides[t]).addClass(this.options.slideLoadingClass),this.slides[t].appendChild(this.createElement(this.list[t],this.proxyListener))))},loadElements:function(n){for(var r=Math.min(this.num,2*this.options.preloadRange+1),i=n,t=0;r>t;t+=1)i+=t*(t%2==0?-1:1),i=this.circle(i),this.loadElement(i)},unloadElements:function(n){var t,i;for(t in this.elements)this.elements.hasOwnProperty(t)&&(i=Math.abs(n-t),i>this.options.preloadRange&&i+this.options.preloadRange<this.num&&(this.unloadSlide(t),delete this.elements[t]))},addSlide:function(n){var t=this.slidePrototype.cloneNode(!1);t.setAttribute("data-index",n);this.slidesContainer[0].appendChild(t);this.slides.push(t)},positionSlide:function(n){var t=this.slides[n];t.style.width=this.slideWidth+"px";this.support.transform&&(t.style.left=n*-this.slideWidth+"px",this.move(n,this.index>n?-this.slideWidth:this.index<n?this.slideWidth:0,0))},initSlides:function(t){var r,i;for(t||(this.positions=[],this.positions.length=this.num,this.elements={},this.imagePrototype=document.createElement("img"),this.elementPrototype=document.createElement("div"),this.slidePrototype=document.createElement("div"),n(this.slidePrototype).addClass(this.options.slideClass),this.slides=this.slidesContainer[0].children,r=this.options.clearSlides||this.slides.length!==this.num),this.slideWidth=this.container[0].offsetWidth,this.slideHeight=this.container[0].offsetHeight,this.slidesContainer[0].style.width=this.num*this.slideWidth+"px",r&&this.resetSlides(),i=0;i<this.num;i+=1)r&&this.addSlide(i),this.positionSlide(i);this.options.continuous&&this.support.transform&&(this.move(this.circle(this.index-1),-this.slideWidth,0),this.move(this.circle(this.index+1),this.slideWidth,0));this.support.transform||(this.slidesContainer[0].style.left=this.index*-this.slideWidth+"px")},unloadSlide:function(n){var t,i;t=this.slides[n];i=t.firstChild;null!==i&&t.removeChild(i)},unloadAllSlides:function(){for(var n=0,t=this.slides.length;t>n;n++)this.unloadSlide(n)},toggleControls:function(){var n=this.options.controlsClass;this.container.hasClass(n)?this.container.removeClass(n):this.container.addClass(n)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(n){return parseInt(n.getAttribute("data-index"),10)},getNestedProperty:function(n,t){return t.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(t,i,r,u,f){var e=f||i||r||u&&parseInt(u,10);t&&n&&(n=n[e])}),n},getDataProperty:function(t,i){if(t.getAttribute){var r=t.getAttribute("data-"+i.replace(/([A-Z])/g,"-$1").toLowerCase());if("string"==typeof r){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(r))try{return n.parseJSON(r)}catch(u){}return r}}},getItemProperty:function(n,t){var i=n[t];return void 0===i&&(i=this.getDataProperty(n,t),void 0===i&&(i=this.getNestedProperty(n,t))),i},initStartIndex:function(){var n,t=this.options.index,i=this.options.urlProperty;if(t&&"number"!=typeof t)for(n=0;n<this.num;n+=1)if(this.list[n]===t||this.getItemProperty(this.list[n],i)===this.getItemProperty(t,i)){t=n;break}this.index=this.circle(parseInt(t,10)||0)},initEventListeners:function(){function t(n){var t=i.support.transition&&i.support.transition.end===n.type?"transitionend":n.type;i["on"+t](n)}var i=this,r=this.slidesContainer;n(window).on("resize",t);n(document.body).on("keydown",t);this.container.on("click",t);this.support.touch?r.on("touchstart touchmove touchend touchcancel",t):this.options.emulateTouchEvents&&this.support.transition&&r.on("mousedown mousemove mouseup mouseout",t);this.support.transition&&r.on(this.support.transition.end,t);this.proxyListener=t},destroyEventListeners:function(){var i=this.slidesContainer,t=this.proxyListener;n(window).off("resize",t);n(document.body).off("keydown",t);this.container.off("click",t);this.support.touch?i.off("touchstart touchmove touchend touchcancel",t):this.options.emulateTouchEvents&&this.support.transition&&i.off("mousedown mousemove mouseup mouseout",t);this.support.transition&&i.off(this.support.transition.end,t)},handleOpen:function(){this.options.onopened&&this.options.onopened.call(this)},initWidget:function(){function i(n){n.target===t.container[0]&&(t.container.off(t.support.transition.end,i),t.handleOpen())}var t=this;return this.container=n(this.options.container),this.container.length?(this.slidesContainer=this.container.find(this.options.slidesContainer).first(),this.slidesContainer.length?(this.titleElement=this.container.find(this.options.titleElement).first(),1===this.num&&this.container.addClass(this.options.singleClass),this.options.onopen&&this.options.onopen.call(this),this.support.transition&&this.options.displayTransition?this.container.on(this.support.transition.end,i):this.handleOpen(),this.options.hidePageScrollbars&&(this.bodyOverflowStyle=document.body.style.overflow,document.body.style.overflow="hidden"),this.container[0].style.display="block",this.initSlides(),void this.container.addClass(this.options.displayClass)):(this.console.log("blueimp Gallery: Slides container not found.",this.options.slidesContainer),!1)):(this.console.log("blueimp Gallery: Widget container not found.",this.options.container),!1)},initOptions:function(t){this.options=n.extend({},this.options);(t&&t.carousel||this.options.carousel&&(!t||t.carousel!==!1))&&n.extend(this.options,this.carouselOptions);n.extend(this.options,t);this.num<3&&(this.options.continuous=this.options.continuous?null:!1);this.support.transition||(this.options.emulateTouchEvents=!1);this.options.event&&this.preventDefault(this.options.event)}}),t}),function(n){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],n):n(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(n,t){"use strict";n.extend(t.prototype.options,{fullScreen:!1});var i=t.prototype.initialize,r=t.prototype.close;return n.extend(t.prototype,{getFullScreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullScreen:function(n){n.requestFullscreen?n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()},exitFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},initialize:function(){i.call(this);this.options.fullScreen&&!this.getFullScreenElement()&&this.requestFullScreen(this.container[0])},close:function(){this.getFullScreenElement()===this.container[0]&&this.exitFullScreen();r.call(this)}}),t}),function(n){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],n):n(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(n,t){"use strict";n.extend(t.prototype.options,{indicatorContainer:"ol",activeIndicatorClass:"active",thumbnailProperty:"thumbnail",thumbnailIndicators:!0});var i=t.prototype.initSlides,r=t.prototype.addSlide,u=t.prototype.resetSlides,f=t.prototype.handleClick,e=t.prototype.handleSlide,o=t.prototype.handleClose;return n.extend(t.prototype,{createIndicator:function(t){var i,r,u=this.indicatorPrototype.cloneNode(!1),f=this.getItemProperty(t,this.options.titleProperty),e=this.options.thumbnailProperty;return this.options.thumbnailIndicators&&(e&&(i=this.getItemProperty(t,e)),void 0===i&&(r=t.getElementsByTagName&&n(t).find("img")[0],r&&(i=r.src)),i&&(u.style.backgroundImage='url("'+i+'")')),f&&(u.title=f),u},addIndicator:function(n){if(this.indicatorContainer.length){var t=this.createIndicator(this.list[n]);t.setAttribute("data-index",n);this.indicatorContainer[0].appendChild(t);this.indicators.push(t)}},setActiveIndicator:function(t){this.indicators&&(this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),this.activeIndicator=n(this.indicators[t]),this.activeIndicator.addClass(this.options.activeIndicatorClass))},initSlides:function(n){n||(this.indicatorContainer=this.container.find(this.options.indicatorContainer),this.indicatorContainer.length&&(this.indicatorPrototype=document.createElement("li"),this.indicators=this.indicatorContainer[0].children));i.call(this,n)},addSlide:function(n){r.call(this,n);this.addIndicator(n)},resetSlides:function(){u.call(this);this.indicatorContainer.empty();this.indicators=[]},handleClick:function(n){var i=n.target||n.srcElement,t=i.parentNode;if(t===this.indicatorContainer[0])this.preventDefault(n),this.slide(this.getNodeIndex(i));else{if(t.parentNode!==this.indicatorContainer[0])return f.call(this,n);this.preventDefault(n);this.slide(this.getNodeIndex(t))}},handleSlide:function(n){e.call(this,n);this.setActiveIndicator(n)},handleClose:function(){this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass);o.call(this)}}),t}),function(n){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],n):n(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(n,t){"use strict";n.extend(t.prototype.options,{videoContentClass:"video-content",videoLoadingClass:"video-loading",videoPlayingClass:"video-playing",videoPosterProperty:"poster",videoSourcesProperty:"sources"});var i=t.prototype.handleSlide;return n.extend(t.prototype,{handleSlide:function(n){i.call(this,n);this.playingVideo&&this.playingVideo.pause()},videoFactory:function(t,i,r){var c,y,s,a,p,u=this,e=this.options,o=this.elementPrototype.cloneNode(!1),v=n(o),d=[{type:"error",target:o}],f=r||document.createElement("video"),h=this.getItemProperty(t,e.urlProperty),l=this.getItemProperty(t,e.typeProperty),w=this.getItemProperty(t,e.titleProperty),b=this.getItemProperty(t,e.videoPosterProperty),k=this.getItemProperty(t,e.videoSourcesProperty);if(v.addClass(e.videoContentClass),w&&(o.title=w),f.canPlayType)if(h&&l&&f.canPlayType(l))f.src=h;else for(;k&&k.length;)if(y=k.shift(),h=this.getItemProperty(y,e.urlProperty),l=this.getItemProperty(y,e.typeProperty),h&&l&&f.canPlayType(l)){f.src=h;break}return b&&(f.poster=b,c=this.imagePrototype.cloneNode(!1),n(c).addClass(e.toggleClass),c.src=b,c.draggable=!1,o.appendChild(c)),s=document.createElement("a"),s.setAttribute("target","_blank"),r||s.setAttribute("download",w),s.href=h,f.src&&(f.controls=!0,(r||n(f)).on("error",function(){u.setTimeout(i,d)}).on("pause",function(){f.seeking||(a=!1,v.removeClass(u.options.videoLoadingClass).removeClass(u.options.videoPlayingClass),p&&u.container.addClass(u.options.controlsClass),delete u.playingVideo,u.interval&&u.play())}).on("playing",function(){a=!1;v.removeClass(u.options.videoLoadingClass).addClass(u.options.videoPlayingClass);u.container.hasClass(u.options.controlsClass)?(p=!0,u.container.removeClass(u.options.controlsClass)):p=!1}).on("play",function(){window.clearTimeout(u.timeout);a=!0;v.addClass(u.options.videoLoadingClass);u.playingVideo=f}),n(s).on("click",function(n){u.preventDefault(n);a?f.pause():f.play()}),o.appendChild(r&&r.element||f)),o.appendChild(s),this.setTimeout(i,[{type:"load",target:o}]),o}}),t}),function(n){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],n):n(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(n,t){"use strict";if(!window.postMessage)return t;n.extend(t.prototype.options,{vimeoVideoIdProperty:"vimeo",vimeoPlayerUrl:"//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID",vimeoPlayerIdPrefix:"vimeo-player-",vimeoClickToPlay:!0});var u=t.prototype.textFactory||t.prototype.imageFactory,i=function(n,t,i,r){this.url=n;this.videoId=t;this.playerId=i;this.clickToPlay=r;this.element=document.createElement("div");this.listeners={}},r=0;return n.extend(i.prototype,{canPlayType:function(){return!0},on:function(n,t){return this.listeners[n]=t,this},loadAPI:function(){function u(){!f&&e.playOnReady&&e.play();f=!0}for(var t,f,e=this,o="//f.vimeocdn.com/js/froogaloop2.min.js",i=document.getElementsByTagName("script"),r=i.length;r;)if(r-=1,i[r].src===o){t=i[r];break}t||(t=document.createElement("script"),t.src=o);n(t).on("load",u);i[0].parentNode.insertBefore(t,i[0]);/loaded|complete/.test(t.readyState)&&u()},onReady:function(){var n=this;this.ready=!0;this.player.addEvent("play",function(){n.hasPlayed=!0;n.onPlaying()});this.player.addEvent("pause",function(){n.onPause()});this.player.addEvent("finish",function(){n.onPause()});this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){this.listeners.pause();delete this.playStatus},insertIframe:function(){var n=document.createElement("iframe");n.src=this.url.replace("VIDEO_ID",this.videoId).replace("PLAYER_ID",this.playerId);n.id=this.playerId;this.element.parentNode.replaceChild(n,this.element);this.element=n},play:function(){var n=this;this.playStatus||(this.listeners.play(),this.playStatus=1);this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.api("play"):(this.playOnReady=!0,window.$f?this.player||(this.insertIframe(),this.player=$f(this.element),this.player.addEvent("ready",function(){n.onReady()})):this.loadAPI())},pause:function(){this.ready?this.player.api("pause"):this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),n.extend(t.prototype,{VimeoPlayer:i,textFactory:function(n,t){var f=this.options,e=this.getItemProperty(n,f.vimeoVideoIdProperty);return e?(void 0===this.getItemProperty(n,f.urlProperty)&&(n[f.urlProperty]="//vimeo.com/"+e),r+=1,this.videoFactory(n,t,new i(f.vimeoPlayerUrl,e,f.vimeoPlayerIdPrefix+r,f.vimeoClickToPlay))):u.call(this,n,t)}}),t}),function(n){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],n):n(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(n,t){"use strict";if(!window.postMessage)return t;n.extend(t.prototype.options,{youTubeVideoIdProperty:"youtube",youTubePlayerVars:{wmode:"transparent"},youTubeClickToPlay:!0});var r=t.prototype.textFactory||t.prototype.imageFactory,i=function(n,t,i){this.videoId=n;this.playerVars=t;this.clickToPlay=i;this.element=document.createElement("div");this.listeners={}};return n.extend(i.prototype,{canPlayType:function(){return!0},on:function(n,t){return this.listeners[n]=t,this},loadAPI:function(){var t,r=this,u=window.onYouTubeIframeAPIReady,f="//www.youtube.com/iframe_api",n=document.getElementsByTagName("script"),i=n.length;for(window.onYouTubeIframeAPIReady=function(){u&&u.apply(this);r.playOnReady&&r.play()};i;)if(i-=1,n[i].src===f)return;t=document.createElement("script");t.src=f;n[0].parentNode.insertBefore(t,n[0])},onReady:function(){this.ready=!0;this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){t.prototype.setTimeout.call(this,this.checkSeek,null,2e3)},checkSeek:function(){(this.stateChange===YT.PlayerState.PAUSED||this.stateChange===YT.PlayerState.ENDED)&&(this.listeners.pause(),delete this.playStatus)},onStateChange:function(n){switch(n.data){case YT.PlayerState.PLAYING:this.hasPlayed=!0;this.onPlaying();break;case YT.PlayerState.PAUSED:case YT.PlayerState.ENDED:this.onPause()}this.stateChange=n.data},onError:function(n){this.listeners.error(n)},play:function(){var n=this;this.playStatus||(this.listeners.play(),this.playStatus=1);this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.playVideo():(this.playOnReady=!0,window.YT&&YT.Player?this.player||(this.player=new YT.Player(this.element,{videoId:this.videoId,playerVars:this.playerVars,events:{onReady:function(){n.onReady()},onStateChange:function(t){n.onStateChange(t)},onError:function(t){n.onError(t)}}})):this.loadAPI())},pause:function(){this.ready?this.player.pauseVideo():this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),n.extend(t.prototype,{YouTubePlayer:i,textFactory:function(n,t){var u=this.options,f=this.getItemProperty(n,u.youTubeVideoIdProperty);return f?(void 0===this.getItemProperty(n,u.urlProperty)&&(n[u.urlProperty]="//www.youtube.com/watch?v="+f),void 0===this.getItemProperty(n,u.videoPosterProperty)&&(n[u.videoPosterProperty]="//img.youtube.com/vi/"+f+"/maxresdefault.jpg"),this.videoFactory(n,t,new i(f,u.youTubePlayerVars,u.youTubeClickToPlay))):r.call(this,n,t)}}),t}),function(n){"use strict";typeof define=="function"&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],n):n(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(n,t){"use strict";n.extend(t.prototype.options,{videoContentClass:"video-content",videoLoadingClass:"video-loading",videoPlayingClass:"video-playing",videoPosterProperty:"poster",videoSourcesProperty:"sources"});var i=t.prototype.handleSlide;return n.extend(t.prototype,{handleSlide:function(n){i.call(this,n);this.playingVideo&&this.playingVideo.pause()},videoFactory:function(t,i,r){var u=this,e=this.options,o=this.elementPrototype.cloneNode(!1),a=n(o),d=[{type:"error",target:o}],f=r||document.createElement("video"),s=this.getItemProperty(t,e.urlProperty),c=this.getItemProperty(t,e.typeProperty),y=this.getItemProperty(t,e.titleProperty),p=this.getItemProperty(t,e.videoPosterProperty),l,w=this.getItemProperty(t,e.videoSourcesProperty),b,h,v,k;if(a.addClass(e.videoContentClass),y&&(o.title=y),f.canPlayType)if(s&&c&&f.canPlayType(c))f.src=s;else while(w&&w.length)if(b=w.shift(),s=this.getItemProperty(b,e.urlProperty),c=this.getItemProperty(b,e.typeProperty),s&&c&&f.canPlayType(c)){f.src=s;break}if(p&&(f.poster=p,l=this.imagePrototype.cloneNode(!1),n(l).addClass(e.toggleClass),l.src=p,l.draggable=!1,o.appendChild(l)),h=document.createElement("a"),h.setAttribute("target","_blank"),r||h.setAttribute("download",y),h.href=s,f.src){f.controls=!0;(r||n(f)).on("error",function(){u.setTimeout(i,d)}).on("pause",function(){f.seeking||(v=!1,a.removeClass(u.options.videoLoadingClass).removeClass(u.options.videoPlayingClass),k&&u.container.addClass(u.options.controlsClass),delete u.playingVideo,u.interval&&u.play())}).on("playing",function(){v=!1;a.removeClass(u.options.videoLoadingClass).addClass(u.options.videoPlayingClass);u.container.hasClass(u.options.controlsClass)?(k=!0,u.container.removeClass(u.options.controlsClass)):k=!1}).on("play",function(){window.clearTimeout(u.timeout);v=!0;a.addClass(u.options.videoLoadingClass);u.playingVideo=f});n(h).on("click",function(n){u.preventDefault(n);v?f.pause():f.play()});o.appendChild(r&&r.element||f)}return o.appendChild(h),this.setTimeout(i,[{type:"load",target:o}]),o}}),t})