"+title+"
");$("#lightboxInner").html('');$("#lightboxInner img").css({opacity:0,display:"block"});$("#lightboxInner img").animate({opacity:1},300)} $('').appendTo("body").load(function(){$("#lightboxContainer").animate({width:$(this).width(),height:$(this).height()},300,cont3);$("#lightboxStuff").animate({width:$(this).width()},300)})} $("#lightboxNext,#lightboxPrev,#lightboxClose").fadeOut(300);$("#lightboxInner img").fadeOut(300,cont4)} function showNav(){$("#lightboxClose").fadeIn();$("#lightboxClose").unbind().click(function(){function cont2(){$("#lightboxOverlay,#lightboxOuter").remove();$('embed, object, select',"#wrapper").css({'visibility':'visible'})} $("#lightboxOverlay,#lightboxOuter").fadeOut(300,cont2);$(".shopGalleryVariant[name="+formName+"]").appendTo("body").hide()});var totalEls=$("#"+parentsId+" .lightbox").length-1;var clickedEl=0;var currentEl=0;$("#"+parentsId+" .lightbox").each(function(){if($(this).hasClass("lightboxCurrent")){clickedEl=currentEl} currentEl++});if(clickedEl!=totalEls){$("#lightboxNext").fadeIn();$("#lightboxNext").unbind().click(function(){var stop=0;var stop2=0;$("#"+parentsId+" .lightbox").each(function(){stop++;if($(this).hasClass("lightboxCurrent")){stop2=stop}});var stop3=0;$("#"+parentsId+" .lightbox").each(function(){if(stop3==stop2){$(".lightboxCurrent").removeClass("lightboxCurrent");$(this).addClass("lightboxCurrent");var href=$(this).attr("href");var title=$(this).attr("title");showImage(href,title)} stop3++})})} if(clickedEl!=0){$("#lightboxPrev").fadeIn();$("#lightboxPrev").unbind().click(function(){var prev=0;var clicked=0;$("#"+parentsId+" .lightbox").each(function(){if($(this).hasClass("lightboxCurrent")){current=prev} prev++});var prev=0;$("#"+parentsId+" .lightbox").each(function(){if(prev==current-1){$(".lightboxCurrent").removeClass("lightboxCurrent");$(this).addClass("lightboxCurrent");var href=$(this).attr("href");var title=$(this).attr("title");showImage(href,title)} prev++})})}} function cont(){$("."+formName+"input").val(clicked.attr("title"));$("input[name=pic_url]",$("#lightboxShop form")).val(clicked.attr("href"));$("#lightboxStuff").css("width",preloader.width+"px");$("#lightboxCaption").html(""+clicked.attr("title")+"
");$("#lightboxStuff").fadeIn();$("#lightboxInner").html('');$("#lightboxInner img").css({opacity:0,display:"block"});$("#lightboxInner img").animate({opacity:1},300);showNav()} var preloader=new Image();preloader.onload=function(){$("#lightboxContainer").animate({width:preloader.width,height:preloader.height},300,cont)};preloader.src=clicked.attr("href");return!1});function assignDatepickerCal(){$("#defaultDatepicker td:not(.unavailable)").click(function(){$(".default_datepicker_target").val($(this).attr("data-date")).change();$("#defaultDatepicker").remove();$("body").removeClass("showingDefaultDatepicker");$(".default_datepicker_target").removeClass("default_datepicker_target");return!1});$("#datepicker_next_month").click(function(){month=$("#datepicker_next_month_val").val();year=$("#datepicker_next_month_year").val();if($(".default_datepicker_target").hasClass("prevent_past")){var more="&cutoff="+$(".default_datepicker_target").data('cutoff')+"&timezone="+$(".default_datepicker_target").data("timezone")}else{var more=""} $("#defaultDatepicker").load("/actions/DefaultDatepicker/?month="+month+"&year="+year+langAppend+more,function(){assignDatepickerCal()});return!1});$("#datepicker_prev_month").click(function(){month=$("#datepicker_prev_month_val").val();year=$("#datepicker_prev_month_year").val();if($(".default_datepicker_target").hasClass("prevent_past")){var more="&cutoff="+$(".default_datepicker_target").data('cutoff')+"&timezone="+$(".default_datepicker_target").data("timezone")}else{var more=""} $("#defaultDatepicker").load("/actions/DefaultDatepicker/?month="+month+"&year="+year+langAppend+more,function(){assignDatepickerCal()});return!1})} function assignBlogCal(){$("#blog_next_month").click(function(){month=$("#blog_next_month_val").val();year=$("#blog_next_month_year").val();$("#blogCal").load("/actions/BlogCal/?month="+month+"&year="+year+langAppend+"&"+catAppend,function(){assignBlogCal()});return!1});$("#blog_prev_month").click(function(){month=$("#blog_prev_month_val").val();year=$("#blog_prev_month_year").val();$("#blogCal").load("/actions/BlogCal/?month="+month+"&year="+year+langAppend+"&"+catAppend,function(){assignBlogCal()});return!1})} var url=window.location.href;url=url.split("/");if(lang==""){var catPrepend="?"}else{var catPrepend="&"} var catAppend="";if(url[4]=="category"&&url[5]!=""){var catAppend="cat="+url[5]} if(url[7]=="category"&&url[8]!=""){var catAppend="cat="+url[8]} if(url[8]=="category"&&url[9]!=""){var catAppend="cat="+url[9]} $("#blogCal").load("/actions/BlogCal/"+lang+catPrepend+catAppend,function(){assignBlogCal()});$("#commentForm").load("/actions/ShowCommentForm/"+lang,function(){if(typeof moduleHeights=='function'){moduleHeights()} $("#commentFormForm a.submitForm").click(function(){$(this).parent().submit();return!1});$("#commentFormForm").submit(function(){$("#loader").fadeIn(300);if($("#name").val()==""){$("#name").addClass("error");$("#name").animate({left:+10},20,function(){$("#name").animate({left:-20},40,function(){$("#name").animate({left:+20},40,function(){$("#name").animate({left:0},20,function(){$("#name").removeClass("error");$("#name").focus();$("#loader").fadeOut(200)})})})});return!1}else if($("#email").val()==""){$("#email").addClass('error');$("#email").animate({left:+10},20,function(){$("#email").animate({left:-20},40,function(){$("#email").animate({left:+20},40,function(){$("#email").animate({left:-0},20,function(){$("#email").removeClass('error');$("#email").focus()})})})});$("#loader").fadeOut(200);return!1}else if($("#comment").val()==""){$("#comment").addClass('error');$("#comment").animate({left:+10},20,function(){$("#comment").animate({left:-20},40,function(){$("#comment").animate({left:+20},40,function(){$("#comment").animate({left:-0},20,function(){$("#comment").removeClass('error');$("#comment").focus()})})})});$("#loader").fadeOut(200);return!1}else{function urlencode(str){var ret=str;ret=ret.toString();ret=encodeURIComponent(ret);ret=ret.replace(/%20/g,'+');return ret} function htmlentities(s){var div=document.createElement('div');var text=document.createTextNode(s);div.appendChild(text);return div.innerHTML} $.ajax({type:"GET",url:"/actions/CheckEmail/",data:"email="+$("#email").val(),success:function(msg){if(msg=="ok"){var validEmail=!0}else{var validEmail=!1} if(validEmail==!1){$("#emailIncorrect").css("display","block");$("#email").addClass('error');$("#email").animate({left:+10},20,function(){$("#email").animate({left:-20},40,function(){$("#email").animate({left:+20},40,function(){$("#email").animate({left:-0},20,function(){$("#email").removeClass('error');$("#email").focus()})})})});$("#loader").fadeOut(200);return!1}else{$("#emailIncorrect").css("display","none");$.ajax({type:"GET",url:"/actions/AddComment/"+lang,data:"name="+$("#name").val()+"&email="+$("#email").val()+"&website="+urlencode($("#website").val())+"&comment="+urlencode($("#comment").val())+"&blogId="+$("#blogId").val(),success:function(msg){$('#commentsList').html(msg);if(typeof moduleHeights=='function'){moduleHeights()} $('#name').val("");$('#email').val("");$('#website').val("");$('#comment').val("");$("#loader").fadeOut(200)}});return!1}}});return!1} return!1})});$("#loginForm").submit(function(){pwhash=hex_hmac_sha1(hex_hmac_sha1($("input[name=password]",$(this)).val(),$("#saltInput").val()),$("#timestampInput").val());$("#hashInput").val(pwhash);$("input[name=password]",$(this)).val("")});if($(".form").length>0){$(".email1,.fakeemail").css({"position":"absolute","top":"-40000px","left":"-50000px"});$(".form:not(.accessible-mode .form)").each(function(){$(this).append("")})} $(".form:not(.accessible-mode .form),.formUsedInCheckout").find("input,textarea,select").change(function(){$(this).parents(".oktosend").removeClass("oktosend")});function invisRecaptcha(token){$('.recaptchaSend').ajaxSubmit(optionsForm)} $(window).load(function(){$(".g-recaptchaload").each(function(){var object=$(this);var rid=grecaptcha.render(object.attr("id"),{"sitekey":$(this).data("sitekey"),"callback":function(token){object.parents('form').find(".g-recaptcha-response").val(token);invisRecaptcha(token)}});$(this).parents('form').attr('recapid',rid)})});window.invisRecaptcha=invisRecaptcha;function showResponseForm(responseText,statusText){var toSend=$('.ajaxSending');if(toSend.hasClass("formUsedInCheckout")){var showErrorIn=$("#paymentGatewayForm")}else{var showErrorIn=toSend} var loader=$("#loader",showErrorIn);if(responseText=="error: recaptcha"){loader.fadeOut(200);$("#recaptcha_error",toSend).fadeIn();if(typeof toSend.attr('recapid')!='undefined'){grecaptcha.reset(toSend.attr('recapid'))}else{grecaptcha.reset()} return!1} if(responseText=="error: duplicate"){loader.fadeOut(200);alert("Error: You've already sent this form");return!1} if(responseText=="error: flood"){loader.fadeOut(200);alert("Error: Please wait 15 seconds between sending forms.");return!1} if(responseText=="formInCheckout"){$("#paymentGatewayForm").addClass("formInCheckoutOK").trigger('submit')}else{if(responseText.substring(0,9)=="redirect:"){var url=responseText.substring(9,responseText.length);var counter=1;$(".input-wrapper input,.input-wrapper textarea,.input-wrapper select",toSend).each(function(){url=url.replace("***FIELD"+counter+"***",encodeURIComponent($(this).val()));counter++});window.location.href=url} if(typeof grecaptcha!="undefined"&&$('.g-recaptcha',$(toSend)).length){grecaptcha.reset()} $("#sending_wait").hide();setTimeout(function(){$(".submit_form",toSend).fadeIn();if(typeof moduleHeights=='function'){moduleHeights()}},2500);loader.fadeOut(200);$(".submit_form",toSend).hide();$("#success",toSend).fadeIn(200,function(){if(typeof moduleHeights=='function'){moduleHeights()}});if(typeof ga==='function'){ga('send','event','Contact Forms','Send','ID: '+$("input[name=formId]",toSend).val())} $(".input:not(.input[name='group'])",toSend).val("");$(".textarea",toSend).val("")}} var optionsForm={success:showResponseForm};$(".form:not(.accessible-mode .form),.formUsedInCheckout").submit(function(){$('.recaptchaSend').removeClass('recaptchaSend');if(!$("#addToBasketId",$(this)).length&&!$(this).hasClass('addToBasketForm')){var ajaxSend=!0}else{var ajaxSend=!1;if($(this).hasClass("oktosend")){return!0}} if($(this).attr("id")=="paymentGatewayForm"){var ajaxSend=!1;if($(this).hasClass("oktosend")){if(typeof ga==='function'){ga('send','event','Checkout','Gone to Payment Gateway',$(this).attr("action"))} if(typeof $(this).data("datalayer-total")!="undefined"){if(readCookie("transid")==$(this).data('transid')){var transid=readCookie("transidvalue")}else{createCookie("transid",$(this).data('transid'));var transid=Math.floor(Math.random()*1000000);createCookie("transidvalue",transid)} dataLayer.push({"transactionId":transid,"transactionTotal":parseFloat($(this).data('datalayer-total')),"transactionTax":parseFloat($(this).data('datalayer-tax')),"transactionShipping":parseFloat($(this).data('datalayer-shipping'))})} if(!$(this).hasClass('formInCheckoutOK')&&$('.formUsedInCheckout').length){$(".form.formUsedInCheckout").trigger('submit');return!1} return!0}} var toSend=$(this);$('.ajaxSending').removeClass('ajaxSending');toSend.addClass('ajaxSending');$(this).addClass("validating");$("#success,.signupFormNeedsEmailOrSMS",$(this)).hide();$(".cf_contains_errors,.cf_contains_errors_captcha",toSend).hide();$(".cf_error").removeClass("cf_error");if(toSend.hasClass("formUsedInCheckout")){var showErrorIn=$("#paymentGatewayForm")}else{var showErrorIn=toSend} var loader=$("#loader",showErrorIn);loader.fadeIn(300);if($("textarea.required,select.required,input.required[type!='checkbox'], .required[type='checkbox']:not(:checked)",$(this)).filter(function(){if(typeof $(this).attr('placeholder')!='undefined'){if($(this).val()!=$(this).attr('placeholder')&&$(this).val()!=''){if($(this).data("required-format")){for(var i=0;i<$(this).data("required-format").length;i++){if($(this).data("required-format")[i]=="#"){if(isNaN($(this).val()[i])){return!0}} if($(this).data("required-format")[i]==" "){if($(this).val()[i]!=" "){return!0}} if($(this).data("required-format")[i]=="-"){if($(this).val()[i]!="-"){return!0}} if($(this).data("required-format")[i]=="/"){if($(this).val()[i]!="/"){return!0}}}}else{return!1}}else{return!0}}else{if($(this).is(':checkbox')){return!0}else{return $(this).val()==""}}}).length>0){$("textarea.required,select.required,input.required[type!='checkbox'], .required[type='checkbox']:not(:checked)",$(this)).filter(function(){if(typeof $(this).attr('placeholder')!='undefined'){if($(this).val()!=$(this).attr('placeholder')&&$(this).val()!=''){if($(this).data("required-format")){for(var i=0;i<$(this).data("required-format").length;i++){if($(this).data("required-format")[i]=="#"){if(isNaN($(this).val()[i])){return!0}} if($(this).data("required-format")[i]==" "){if($(this).val()[i]!=" "){return!0}} if($(this).data("required-format")[i]=="-"){if($(this).val()[i]!="-"){return!0}} if($(this).data("required-format")[i]=="/"){if($(this).val()[i]!="/"){return!0}}}}else{return!1}}else{return!0}}else{if($(this).is(':checkbox')){return!0}else{return $(this).val()==""}}}).addClass('cf_error').first().each(function(){$(this).focus();loader.fadeOut(200);return!1});$(".cf_contains_errors",showErrorIn).slideDown(300,function(){if(typeof moduleHeights=='function'){moduleHeights()}});return!1}else{if($("input[type=email]",$(this)).length>0){if($("input[type=email]",$(this)).hasClass("required")){$.ajax({type:"GET",url:"/actions/CheckEmail/",data:"email="+$("input[type=email]",toSend).val(),success:function(msg){if(msg=="ok"){var validEmail=!0}else{var validEmail=!1} if(validEmail==!1){$("#emailIncorrect",toSend).css("display","block");$("input[type=email]",toSend).addClass('cf_error');$("input[type=email]",toSend).focus();$(".cf_contains_errors",showErrorIn).slideDown(300,function(){if(typeof moduleHeights=='function'){moduleHeights()}});loader.fadeOut(200);return!1}else{$("#emailIncorrect",toSend).css("display","none");if(ajaxSend==!0){if(typeof grecaptcha!="undefined"&&$(toSend).hasClass('withInvisRecaptcha')){grecaptcha.execute(toSend.attr('recapid'));toSend.removeClass("validating").addClass("oktosend").addClass('recaptchaSend')}else{toSend.ajaxSubmit(optionsForm)} return!1} toSend.removeClass("validating").addClass("oktosend");toSend.submit()}}});return!1}else{if($("input[type=email]",toSend).val()!=""){$.ajax({type:"GET",url:"/actions/CheckEmail/",data:"email="+$("input[type=email]",toSend).val(),success:function(msg){if(msg=="ok"){var validEmail=!0}else{var validEmail=!1} if(validEmail==!1){$("#emailIncorrect",toSend).css("display","block");$("input[type=email]",toSend).addClass('cf_error');$("input[type=email]",toSend).focus();$(".cf_contains_errors",showErrorIn).slideDown(300,function(){if(typeof moduleHeights=='function'){moduleHeights()}});loader.fadeOut(200);return!1}else{if(ajaxSend==!0){$("#emailIncorrect",toSend).css("display","none");if(typeof grecaptcha!="undefined"&&$(toSend).hasClass('withInvisRecaptcha')){grecaptcha.execute(toSend.attr('recapid'));toSend.removeClass("validating").addClass("oktosend").addClass('recaptchaSend')}else{$(toSend).ajaxSubmit(optionsForm)} return!1} toSend.removeClass("validating").addClass("oktosend");toSend.submit()}}})}else{if($('.signupFormNeedsEmailOrSMS',toSend).length){if($('input[type=email]',toSend).val()==""&&$('input[name="sms"]',toSend).val()==""){$('.signupFormNeedsEmailOrSMS').show();if(typeof moduleHeights=='function'){moduleHeights()} loader.fadeOut(200);return!1}} if(ajaxSend==!0){$("#emailIncorrect",toSend).css("display","none");if(typeof grecaptcha!="undefined"&&$(toSend).hasClass('withInvisRecaptcha')){grecaptcha.execute(toSend.attr('recapid'));toSend.removeClass("validating").addClass("oktosend").addClass('recaptchaSend')}else{$(toSend).ajaxSubmit(optionsForm)} return!1} toSend.removeClass("validating").addClass("oktosend");toSend.submit();return!1}}}else{if(ajaxSend==!0){$("#emailIncorrect",toSend).css("display","none");if(typeof grecaptcha!="undefined"&&$(toSend).hasClass('withInvisRecaptcha')){grecaptcha.execute(toSend.attr('recapid'));toSend.removeClass("validating").addClass("oktosend").addClass('recaptchaSend')}else{$(toSend).ajaxSubmit(optionsForm)} return!1} toSend.removeClass("validating").addClass("oktosend");toSend.submit()}} return!1});function checkLivechat(){$.ajax({type:"GET",url:"/actions/LivechatStatus/",success:function(msg){if(msg=="online"){$("#livechat").show();if(typeof moduleHeights=='function'){moduleHeights()} $(".livechatWidgetOffline").hide();$(".livechatWidgetOnline").show()}else{$("#livechat").hide();if(typeof moduleHeights=='function'){moduleHeights()} $(".livechatWidgetOffline").show();$(".livechatWidgetOnline").hide()}}});setTimeout(checkLivechat,10000)} checkLivechat();$("#miniBasket").load("/actions/ShowMiniBasket/"+lang);$("#startConvo").click(function(){href=this.href;var popup=window.open(href,'','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=311,height=349');return!1}) $(".shopOptions").change(function(){href=$("#"+$(this).attr("id")+"button").attr("href");href=href.split("&variant=");newHref=href[0]+"&variant="+urlencode($(this).val());$("#"+$(this).attr("id")+"button").attr("href",newHref)});if($(".shopGalleryVariant").length>0){$(".shopGalleryVariant").each(function(){if($("#"+$(this).attr("name")+"gallery").length>0){$(this).prev().prev().data("prodid",$(this).data("datalayer-productid"));$("."+$(this).attr("name")+"title").show();$(this).appendTo('body');$(this).hide()}})} var refpath=document.referrer.split("?");var hpath=document.location.href.split("?");$.ajax({type:"GET",url:"/actions/LogStats/?title="+document.title+"&referrer="+refpath[0]+"&url="+hpath[0]})}) if(typeof Object.create!=="function"){Object.create=function(obj){function F(){} F.prototype=obj;return new F()}}(function($,window,document){var Carousel={init:function(options,el){var base=this;base.$elem=$(el);base.options=$.extend({},$.fn.owlCarousel.options,base.$elem.data(),options);base.userOptions=options;base.loadContent()},loadContent:function(){var base=this,url;function getData(data){var i,content="";if(typeof base.options.jsonSuccess==="function"){base.options.jsonSuccess.apply(this,[data])}else{for(i in data.owl){if(data.owl.hasOwnProperty(i)){content+=data.owl[i].item}} base.$elem.html(content)} base.logIn()} if(typeof base.options.beforeInit==="function"){base.options.beforeInit.apply(this,[base.$elem])} if(typeof base.options.jsonPath==="string"){url=base.options.jsonPath;$.getJSON(url,getData)}else{base.logIn()}},logIn:function(){var base=this;base.$elem.data("owl-originalStyles",base.$elem.attr("style"));base.$elem.data("owl-originalClasses",base.$elem.attr("class"));base.$elem.css({opacity:0});base.orignalItems=base.options.items;base.checkBrowser();base.wrapperWidth=0;base.checkVisible=null;base.setVars()},setVars:function(){var base=this;if(base.$elem.children().length===0){return!1} base.baseClass();base.eventTypes();base.$userItems=base.$elem.children();base.itemsAmount=base.$userItems.length;base.wrapItems();base.$owlItems=base.$elem.find(".owl-item");base.$owlWrapper=base.$elem.find(".owl-wrapper");base.playDirection="next";base.prevItem=0;base.prevArr=[0];base.currentItem=0;base.customEvents();base.onStartup()},onStartup:function(){var base=this;base.updateItems();base.calculateAll();base.buildControls();base.updateControls();base.response();base.moveEvents();base.stopOnHover();base.owlStatus();if(base.options.transitionStyle!==!1){base.transitionTypes(base.options.transitionStyle)} if(base.options.autoPlay===!0){base.options.autoPlay=5000} base.play();base.$elem.find(".owl-wrapper").css("display","block");if(!base.$elem.is(":visible")){base.watchVisibility()}else{base.$elem.css("opacity",1)} base.onstartup=!1;base.eachMoveUpdate();if(typeof base.options.afterInit==="function"){base.options.afterInit.apply(this,[base.$elem])}},eachMoveUpdate:function(){var base=this;if(base.options.lazyLoad===!0){base.lazyLoad()} if(base.options.autoHeight===!0){base.autoHeight()} base.onVisibleItems();if(typeof base.options.afterAction==="function"){base.options.afterAction.apply(this,[base.$elem])}},updateVars:function(){var base=this;if(typeof base.options.beforeUpdate==="function"){base.options.beforeUpdate.apply(this,[base.$elem])} base.watchVisibility();base.updateItems();base.calculateAll();base.updatePosition();base.updateControls();base.eachMoveUpdate();if(typeof base.options.afterUpdate==="function"){base.options.afterUpdate.apply(this,[base.$elem])}},reload:function(){var base=this;window.setTimeout(function(){base.updateVars()},0)},watchVisibility:function(){var base=this;if(base.$elem.is(":visible")===!1){base.$elem.css({opacity:0});window.clearInterval(base.autoPlayInterval);window.clearInterval(base.checkVisible)}else{return!1} base.checkVisible=window.setInterval(function(){if(base.$elem.is(":visible")){base.reload();base.$elem.animate({opacity:1},200);window.clearInterval(base.checkVisible)}},500)},wrapItems:function(){var base=this;base.$userItems.wrapAll(""+title+"
");$("#lightboxInner").html('');$("#lightboxInner img").css({opacity:0,display:"block"});$("#lightboxInner img").animate({opacity:1},300)} $('').appendTo("body").load(function(){var originalWidth=$(this).width();var originalHeight=$(this).height();var ratio=originalWidth/originalHeight;var newMaxWidth=$(window).width()-60;var newHeight=newMaxWidth/ratio;if(originalWidth>newMaxWidth||originalHeight>newHeight){var w=newMaxWidth;var h=newHeight}else{var w=originalWidth;var h=originalHeight} $("#lightboxContainer").stop(!1,!0).animate({width:w,height:h},300,cont3);$("#lightboxStuff").stop(!1,!0).animate({width:w},300)})} $("#lightboxNext,#lightboxPrev,#lightboxClose").fadeOut(300);$("#lightboxInner img").fadeOut(300,cont4)} function showNav(){$("#lightboxClose").fadeIn();$("#lightboxClose").unbind().click(function(){function cont2(){$("#lightboxOverlay,#lightboxOuter").remove();$('embed, object, select',"#wrapper").css({'visibility':'visible'})} $("#lightboxOuter,#lightboxOverlay").fadeOut(300,cont2);$(".shopGalleryVariant[name="+formName+"]").appendTo("body").hide()});var totalEls=$("#"+parentsId+" .responsive_lightbox").length-1;var clickedEl=0;var currentEl=0;$("#"+parentsId+" .responsive_lightbox").each(function(){if($(this).hasClass("lightboxCurrent")){clickedEl=currentEl} currentEl++});if(clickedEl!=totalEls){$("#lightboxNext").fadeIn();$("#lightboxNext").unbind().click(function(){var stop=0;var stop2=0;$("#"+parentsId+" .responsive_lightbox").each(function(){stop++;if($(this).hasClass("lightboxCurrent")){stop2=stop}});var stop3=0;$("#"+parentsId+" .responsive_lightbox").each(function(){if(stop3==stop2){$(".lightboxCurrent").removeClass("lightboxCurrent");$(this).addClass("lightboxCurrent");var href=$(this).attr("href");var title=$(this).attr("title");showImage(href,title,$(this).data('retina'))} stop3++})})} if(clickedEl!=0){$("#lightboxPrev").fadeIn();$("#lightboxPrev").unbind().click(function(){var prev=0;var clicked=0;$("#"+parentsId+" .responsive_lightbox").each(function(){if($(this).hasClass("lightboxCurrent")){current=prev} prev++});var prev=0;$("#"+parentsId+" .responsive_lightbox").each(function(){if(prev==current-1){$(".lightboxCurrent").removeClass("lightboxCurrent");$(this).addClass("lightboxCurrent");var href=$(this).attr("href");var title=$(this).attr("title");showImage(href,title,$(this).data('retina'))} prev++})})}} function cont(){$("."+formName+"input").val(clicked.attr("title"));$("input[name=pic_url]",$("#lightboxShop form")).val(clicked.attr("href"));$("#lightboxCaption").html(""+clicked.attr("title")+"
");$("#lightboxStuff").fadeIn();$("#lightboxInner").html('');$("#lightboxInner img").css({opacity:0,display:"block"});$("#lightboxInner img").animate({opacity:1},300);showNav()} var preloader=new Image();preloader.onload=function(){var originalWidth=preloader.width;if(is_retina()){originalWidth=originalWidth/2} var originalHeight=preloader.height;if(is_retina()){originalHeight=originalHeight/2} var ratio=originalWidth/originalHeight;var newMaxWidth=$(window).width()-60;var newHeight=newMaxWidth/ratio;if(originalWidth>newMaxWidth||originalHeight>newHeight){var w=newMaxWidth;var h=newHeight}else{var w=originalWidth;var h=originalHeight} $("#lightboxStuff").css("width",w+"px");$("#lightboxContainer").stop(!1,!0).animate({width:w,height:h},300,cont)};preloader.src=clicked.attr("href");preloader.srcset=clicked.data("retina")+' 2x';return!1})};function is_retina(){return window.devicePixelRatio>1} function montageLoad(){setMontageMargin();$(".montageSlideshow").hide().css("width","0");setTimeout(function(){$(".montageSlideshow").css("width","100%").show()},1)};function montageReady(){$(".montageSlideshow").each(function(){var formId=$(this).attr("id").replace("gallery","");if($("form[name="+formId+"]").length){$(this).after("");var $wrapper=$(this).next();$wrapper.append($(this));$wrapper.append($("form[name="+formId+"]").show().addClass("montageProductForm"));var $form=$("form",$wrapper);$(".montage-pic",$wrapper).append('');$(".montage-pic:first",$wrapper).addClass("selected");$(".montageSlideshow",$wrapper).addClass("with-product");$form.append("");$("."+formId+"input",$form).val($("img:first",$wrapper).attr("alt"));var href=$("img:first",$wrapper).attr("src").split("?");$("input[name=pic_url]",$form).val(href[0])}});$(".with-product .montage-pic").click(function(){$montage=$(this).parents(".with-product");$(".selected",$montage).removeClass("selected");$(this).addClass("selected");var $form=$(this).parents(".with-product").next();var formId=$(this).parents(".with-product").attr("id").replace("gallery","");$("."+formId+"input",$form).val($("img",$(this)).attr("alt"));var href=$("img",$(this)).attr("src").split("?");$("input[name=pic_url]",$form).val(href[0])})};function montageResize(){setMontageMargin()};function setMontageMargin(){$(".imagesInMontage4").each(function(){var w=$(this).width();var p=$(".item1",$(this)).width()+$(".item2",$(this)).width();var g=w-p;$(".for-margin",$(this)).css("margin-top",g+"px")})} function slideshowReady(){if(!$('body').hasClass("accessible-mode")){$(".banner-feature:not(#content_bar_1_banner_slideshow .banner-feature,#content_bar_2_banner_slideshow .banner-feature,#content_bar_3_banner_slideshow .banner-feature,#content_bar_4_banner_slideshow .banner-feature,#content_bar_5_banner_slideshow .banner-feature,#content_bar_6_banner_slideshow .banner-feature,#content_bar_7_banner_slideshow .banner-feature)").each(function(){if(!$(this).prev().hasClass("banner-feature")){$(this).before("")}});$(".banner-feature-wrap").each(function(){$wrapper=$(this);$(this).nextAll().each(function(){if(!$(this).hasClass("banner-feature")){return!1}else{$(this).appendTo($wrapper)}})});$(".banner-feature-wrap").each(function(){$(this).owlCarousel({navigation:!0,slideSpeed:300,paginationSpeed:400,singleItem:!0,navigationText:["<",">"],afterAction:function(el){this.$owlItems.removeClass('activebanner');this.$owlItems.eq(this.currentItem).addClass('activebanner');setTimeout(function(){moduleHeights()},550)}})});$("#content_bar_1_banner_slideshow,#content_bar_2_banner_slideshow,#content_bar_3_banner_slideshow,#content_bar_4_banner_slideshow,#content_bar_5_banner_slideshow,#content_bar_6_banner_slideshow,#content_bar_7_banner_slideshow").each(function(){var speed=$(this).data("slideshow-speed");var transstyle=$(this).data("slideshow-style");$(" > div > div",$(this)).owlCarousel({navigation:!0,pagination:!1,autoPlay:speed,singleItem:!0,slideSpeed:500,afterMove:function(){setTimeout(function(){moduleHeights()},550)},autoHeight:!1,transitionStyle:transstyle,navigationText:["<",">"],afterAction:function(el){this.$owlItems.removeClass('activebanner');this.$owlItems.eq(this.currentItem).addClass('activebanner');setTimeout(function(){moduleHeights()},550)}})});$(".owl-slideshow-single").each(function(){var speed=$(this).data("speed");$(this).owlCarousel({navigation:!0,slideSpeed:300,autoPlay:speed,stopOnHover:!0,paginationSpeed:400,goToFirstSpeed:2000,singleItem:!0,autoHeight:!0,afterMove:function(){setTimeout(function(){moduleHeights()},550)},transitionStyle:"fade",navigationText:["<",">"],afterAction:function(){setTimeout(function(){moduleHeights()},550)}})});$(".owl-slideshow-multi").each(function(){var speed=$(this).data("speed");$(this).owlCarousel({items:4,slideSpeed:300,autoPlay:speed,stopOnHover:!0,paginationSpeed:400,goToFirstSpeed:2000,navigationText:["<",">"],afterAction:function(){setTimeout(function(){moduleHeights()},550)}})});$(".owl-slideshow-multi,.owl-slideshow-single").each(function(){var formId=$(this).attr("id").replace("gallery","");if($("form[name="+formId+"]").length){$(this).after("");var $wrapper=$(this).next();$wrapper.append($(this));$wrapper.append($("form[name="+formId+"]").show().addClass("slideshowProductForm"));var $form=$("form",$wrapper);$(".item",$wrapper).append('');$(".item:first",$wrapper).addClass("current");$(".owl-slideshow-multi,.owl-slideshow-single",$wrapper).addClass("with-product");$form.append("");$("."+formId+"input",$form).val($(".item:first img",$wrapper).attr("alt"));var href=$("img:first",$wrapper).attr("src").split("?");$("input[name=pic_url]",$form).val(href[0])}});$(".owl-slideshow-multi.with-product .item,.owl-slideshow-single.with-product .item").click(function(){var $galThumbs=$(this).parents(".with-product");$(".current",$galThumbs).removeClass("current");$(this).addClass("current");var $form=$(this).parents(".with-product").next();var formId=$(this).parents(".with-product").attr("id").replace("gallery","");$("."+formId+"input",$form).val($("img",$(this)).attr("alt"));var href=$("img",$(this)).attr("src").split("?");$("input[name=pic_url]",$form).val(href[0])})}};function galThumbResize(){$(".enlarge img").fadeOut();clearTimeout(afterResizingGallery);afterResizingGallery=setTimeout(function(){afterResizeGallery()},400)};var afterResizingGallery;function afterResizeGallery(){$(".galleryWithThumbs").each(function(){var $e=$(".enlarge",$(this));$e.css("height","auto");var $t=$(this);var $a=$("a.current",$t);showPic($a,$e)})} function galThumbReady(){if(!$('body').hasClass("accessible-mode")){$(".owl-gallery-thumbs").each(function(){$(this).owlCarousel({items:10,slideSpeed:300,paginationSpeed:400,navigationText:["<",">"],itemsDesktop:[1000,8],itemsDesktopSmall:[768,6],itemsTablet:[480,5],itemsMobile:!1})});$(".galleryWithThumbs").each(function(){var $e=$(".enlarge",$(this));var $t=$(this);var $a=$("a:first",$t);showPic($a,$e);$("a",$t).click(function(){$(".current",$t).removeClass("current");showPic($(this),$e);return!1})})}else{$(".enlarge").remove()} $(".galleryWithThumbs").each(function(){var formId=$(this).attr("id").replace("gallery","");if($("form[name="+formId+"]").length){$(this).after("");var $wrapper=$(this).next();$wrapper.append($(this));$wrapper.append($("form[name="+formId+"]").show().addClass("galleryThumbsProductForm"));var $form=$("form",$wrapper);$(".galleryWithThumbs",$wrapper).addClass("with-product");$form.append("");$("."+formId+"input",$form).val($(".owl-gallery-thumbs img:first",$wrapper).attr("alt"));var href=$("img:first",$wrapper).attr("src").split("?");$("input[name=pic_url]",$form).val(href[0])}});$(".galleryWithThumbs.with-product .owl-gallery-thumbs a").click(function(){var $galThumbs=$(this).parents(".with-product");var $form=$(this).parents(".with-product").next();var formId=$(this).parents(".with-product").attr("id").replace("gallery","");$("."+formId+"input",$form).val($("img",$(this)).attr("alt"));var href=$("img",$(this)).attr("src").split("?");$("input[name=pic_url]",$form).val(href[0])})};function showPic($a,$e){$a.addClass("current");$(".captionWrap,.caption,img",$e).fadeOut().remove();var $img=$("");if($("img",$a).attr("alt")!=""){var $i=$(" ");$img.prependTo($i)}else{var $i=$img} $e.append($i);$img.one('load',function(){$e.css("height",$(this).height()+"px");$img.fadeIn();setTimeout(function(){moduleHeights();setFixedHeader()},500)}).each(function(){if(this.complete)$(this).load()})} function carouselReady(){if(!$('body').hasClass("accessible-mode")){$(".carousel_slide").each(function(){if(!$(this).prev().hasClass("carousel_slide")){if($(this).hasClass("carousel_slide_autoscroll")){$(this).before("")}else{$(this).before("")}}});$(".owl-carousel").each(function(){$wrapper=$(this);$(this).nextAll().each(function(){if(!$(this).hasClass("carousel_slide")){return!1}else{$(this).appendTo($wrapper)}})});$(".owl-carousel").each(function(){if($(this).hasClass("owl-carousel-autoscroll")){var speed=$(this).data("speed");$(this).owlCarousel({navigation:!0,slideSpeed:300,autoPlay:speed,paginationSpeed:300,singleItem:!0,navigationText:["<",">"]})}else{$(this).owlCarousel({navigation:!0,slideSpeed:300,paginationSpeed:400,singleItem:!0,navigationText:["<",">"]})}})}};function showCounts(){$(".chekoutcount").load("/actions/ShowMiniBasket/"+lang+"&count=true",function(){modules()})} function bindMiniBasket(){var options={success:function(){$("#miniBasket2").load("/actions/ShowMiniBasket/"+lang,function(){bindMiniBasket();$("#loading").stop(!0,!1).fadeOut();$('.formloader,#loader:visible').fadeOut();moduleHeights();setFixedHeader()})}};$("#miniBasket2 #updateQuantities").click(function(){$("#miniBasketForm").submit();return!1});$("#miniBasket2 .quantity").blur(function(e){if($(e.target).attr("id")!="updateQuantities"){$("#miniBasketForm").submit()}});$("#miniBasket2 #miniBasketForm").submit(function(){$("#loading").fadeIn();$("#miniBasketForm").ajaxSubmit(options);return!1});$("#miniBasket2 .removeCell a").click(function(){$("#loading").fadeIn();$.ajax({url:$(this).attr("href"),success:function(){$("#miniBasket2").load("/actions/ShowMiniBasket/"+lang,function(){bindMiniBasket();$("#loading").stop(!0,!1).fadeOut();moduleHeights();setFixedHeader()});showCounts()}});return!1})} function productQuanReady(){$('input[name="giftcardme"]').change(function(){if($(this).val()=='else'){$('.giftcard_someoneelse',$(this).parents('form')).show()} else{$('.giftcard_someoneelse',$(this).parents('form')).hide()} moduleHeights()});$('.product-quantity-input').on("click",function(){$(this)[0].select()});$('.product-quantity-input').on("keyup change",function(){if($(this).parents(".addToBasketForm.multi.only-sell-if-in-stock").length&&typeof $("option:selected",$(this).parents(".addToBasketForm.multi")).attr("data-stock")!="undefined"){if(parseInt($("option:selected",$(this).parents(".addToBasketForm.multi")).attr("data-stock"))