function setAttributeValue(attri){jQuery(".require_msg").hide();jQuery('.super-attribute-select').val(attri).change();var select_price=jQuery('#sel_'+attri).attr('sel_price');var select_priceOrignal=jQuery('#sel_'+attri).attr('sel_priceOrignal');if(select_priceOrignal>select_price){jQuery(".selectedOrignalPrice").html(jQuery('#sel_'+attri).attr('sel_priceOrignal'));jQuery(".selectedOrignalPrice").show();} else{jQuery(".selectedOrignalPrice").hide();} jQuery('.selectedName').hide();jQuery('.selected-container').show();jQuery(".selName").html(jQuery('#sel_'+attri).attr('sel_value1'));jQuery(".selectedSize").html(jQuery('#sel_'+attri).attr('sel_value2'));jQuery(".selectedPrice").html(jQuery('#sel_'+attri).attr('sel_price'));} function selectedAttribute(attribute,attrDiv){var attrVal=attribute.options[attribute.selectedIndex].value;jQuery("."+attrDiv).html(attribute.options[attribute.selectedIndex].text);jQuery("#total-qty").val(jQuery(".qty-size.size"+attrVal).val());if(parseInt(jQuery("#qty").val())>parseInt(jQuery("#total-qty").val())){jQuery("#qty").val(parseInt(jQuery("#total-qty").val()));}} function changeSlider(sliderVal){for(i=1;i<=3;i++){if(i==sliderVal){jQuery(".sliderHead"+i).addClass("active");jQuery("#product-slider"+i).addClass("productActive");} else{jQuery(".sliderHead"+i).removeClass("active");jQuery("#product-slider"+i).removeClass("productActive");}}} function selectRating(attribute,value,name){for(i=1;i<=5;i++){if(value>=i){jQuery(".rating-"+name+"-"+i).addClass("active");} else{jQuery(".rating-"+name+"-"+i).removeClass("active");}}} function readyFn(jQuery){jQuery('.buttons-twitter-like.rewardssocial-buttons').appendTo('.twitter.icon');var wi=jQuery(window).width();if(wi>767){jQuery('.web-link').show();jQuery('.responsive-link').hide();} else{jQuery('.responsive-link').show();jQuery('.web-link').hide();} jQuery(".share-icons .fb-share a").click(function(){jQuery('.mst-fb-share').click();});jQuery(".share-icons .gplus-share a").click(function(){jQuery('.buttons-googleplus-one a').click();});jQuery(".image-large").click(function(){jQuery(".product-img-box-zoom").animate({"height":"100%","width":"100%",opacity:1},500,function(){jQuery("body").addClass("hidescrol");});});if(document.cookie.indexOf("visited")==-1){jQuery(".newsletter-popup").show();document.cookie="visited=1";} jQuery(".newsletter-popup .close").click(function(){jQuery(".newsletter-popup").hide();});jQuery(".image-close").click(function(){jQuery(".product-img-box-zoom").animate({"height":"0%","width":"0%",opacity:0},500);jQuery("body").removeClass("hidescrol");});jQuery(".cloud-zoom").click(function(){jQuery('body').addClass('hidescrol-popup');});jQuery(".mousetrap").click(function(){jQuery('body').addClass('hidescrol-popup');});jQuery(".social-links li .icon").click(function(){var socialLi=jQuery(this).parent();var socialShow=socialLi.hasClass('active');jQuery(".social-links li").removeClass('active');if(!socialShow){socialLi.addClass('active');}});jQuery(".scrolldown").click(function(e){jQuery('html,body').animate({scrollTop:jQuery("#scrollarea").offset().top},'slow');});jQuery(".down-panal").click(function(e){jQuery('html,body').animate({scrollTop:jQuery(".product-videos").offset().top},'slow');});jQuery(".question-options .option input[type=radio]").click(function(){yes1=document.getElementById("question1[yes]").checked;no1=document.getElementById("question1[no]").checked;yes2=document.getElementById("question2[yes]").checked;no2=document.getElementById("question2[no]").checked;yes3=document.getElementById("question3[yes]").checked;no3=document.getElementById("question3[no]").checked;jQuery(".question-options .option").removeClass("selected");jQuery("#combination-1,#combination-2,#combination-3,#combination-4,#combination-5,#combination-6,#combination-7,#combination-8").hide();var checked=0;if(yes1==true||no1==true){if(yes1==true){document.getElementById("question1[yes]").parentNode.className="option yes selected";} if(no1==true){document.getElementById("question1[no]").parentNode.className="option no selected";} checked++;} if(yes2==true||no2==true){if(yes2==true){document.getElementById("question2[yes]").parentNode.className="option yes selected";} if(no2==true){document.getElementById("question2[no]").parentNode.className="option no selected";} checked++;} if(yes3==true||no3==true){if(yes3==true){document.getElementById("question3[yes]").parentNode.className="option yes selected";} if(no3==true){document.getElementById("question3[no]").parentNode.className="option no selected";} checked++;} if(checked==3){if(yes1==true&&yes2==true&&yes3==true){document.getElementById("question1[yes]").parentNode.className="option yes selected";document.getElementById("question2[yes]").parentNode.className="option yes selected";document.getElementById("question3[yes]").parentNode.className="option yes selected";jQuery("#combination-1").show();} if(yes1==true&&yes2==true&&yes3==false){document.getElementById("question1[yes]").parentNode.className="option yes selected";document.getElementById("question2[yes]").parentNode.className="option yes selected";document.getElementById("question3[no]").parentNode.className="option no selected";jQuery("#combination-2").show();} if(yes1==true&&yes2==false&&yes3==true){document.getElementById("question1[yes]").parentNode.className="option yes selected";document.getElementById("question2[no]").parentNode.className="option no selected";document.getElementById("question3[yes]").parentNode.className="option yes selected";jQuery("#combination-3").show();} if(yes1==true&&yes2==false&&yes3==false){document.getElementById("question1[yes]").parentNode.className="option yes selected";document.getElementById("question2[no]").parentNode.className="option no selected";document.getElementById("question3[no]").parentNode.className="option no selected";jQuery("#combination-4").show();} if(yes1==false&&yes2==false&&yes3==false){document.getElementById("question1[no]").parentNode.className="option no selected";document.getElementById("question2[no]").parentNode.className="option no selected";document.getElementById("question3[no]").parentNode.className="option no selected";jQuery("#combination-5").show();} if(yes1==false&&yes2==true&&yes3==true){document.getElementById("question1[no]").parentNode.className="option no selected";document.getElementById("question2[yes]").parentNode.className="option yes selected";document.getElementById("question3[yes]").parentNode.className="option yes selected";jQuery("#combination-6").show();} if(yes1==false&&yes2==true&&yes3==false){document.getElementById("question1[no]").parentNode.className="option no selected";document.getElementById("question2[yes]").parentNode.className="option yes selected";document.getElementById("question3[no]").parentNode.className="option no selected";jQuery("#combination-7").show();} if(yes1==false&&yes2==false&&yes3==true){document.getElementById("question1[no]").parentNode.className="option no selected";document.getElementById("question2[no]").parentNode.className="option no selected";document.getElementById("question3[yes]").parentNode.className="option yes selected";jQuery("#combination-8").show();}}});jQuery('.product-features .features').owlCarousel({items:4,loop:true,autoplay:true,autoplayTimeout:3000,autoplayHoverPause:true,nav:true,navText:["",""],dots:false,responsive:{0:{items:1,loop:true},480:{items:1,loop:true},768:{items:2},1024:{items:3},1200:{items:3}}});jQuery("#header-search input#search").focus(function(){jQuery("#header-search").addClass("search-active");jQuery('#header-nav').animate({scrollTop:jQuery("#header-search").offset().top},'slow');});jQuery("#header-search input#search").focusout(function(){jQuery("#header-search").removeClass("search-active");});jQuery('#applybuttom').live('click',function(event){event.preventDefault();event.stopPropagation();jQuery('#coupon_code').addClass('required-entry');jQuery('#remove-coupone').val('0');url=jQuery('#coupon_url').html();jQuery.post(url,jQuery('#discount-coupon-form').serialize(),function(data){jQuery("#payment-reload").click();setTimeout(function(){jQuery('#coupon_msg').html(data.message);},3000);}).done(function(){jQuery("#payment-reload").click();});});jQuery('#cancelbutton').live('click',function(event){event.preventDefault();event.stopPropagation();jQuery('#coupon_code').removeClass('required-entry');jQuery('#remove-coupone').val('1');url=jQuery('#coupon_url').html();jQuery.post(url,jQuery('#discount-coupon-form').serialize(),function(data){jQuery("#payment-reload").click();setTimeout(function(){jQuery('#coupon_msg').html(data.message);},3000);}).done(function(){jQuery("#payment-reload").click();});});jQuery('#discount-coupon-form').submit(function(){return false;});jQuery('.form-list li label').click(function(){jQuery(this).parent().find('.input-text').focus();jQuery(this).parent().find('textarea').focus();jQuery(this).parent().find('select').focus();});jQuery(".form-list li .input-box input").focus(function(){jQuery(this).parent().parent().addClass("focused");});jQuery(".form-list li .input-box input").focusout(function(){jQuery(this).parent().parent().removeClass("focused");});jQuery(".form-list li .input-box textarea").focus(function(){jQuery(this).parent().parent().addClass("focused");});jQuery(".form-list li .input-box textarea").focusout(function(){jQuery(this).parent().parent().removeClass("focused");});jQuery(".form-list li .input-box select").focus(function(){jQuery(this).parent().parent().addClass("focused");});jQuery(".form-list li .input-box select").focusout(function(){jQuery(this).parent().parent().removeClass("focused");});jQuery(".form-list li .input-box input").blur(function(){var inputVal=jQuery(this).val();var inputContainer=jQuery(this).parent().parent();var inputContainerClass=inputContainer.hasClass('has-value');if(inputVal==''){inputContainer.removeClass('has-value');}else{inputContainer.addClass('has-value');}});jQuery(".form-list li .input-box textarea").blur(function(){var inputVal=jQuery(this).val();var inputContainer=jQuery(this).parent().parent();var inputContainerClass=inputContainer.hasClass('has-value');if(inputVal==''){inputContainer.removeClass('has-value');}else{inputContainer.addClass('has-value');}});jQuery(".form-list li .input-box select").blur(function(){var selectVal=jQuery(this).val();var selectContainer=jQuery(this).parent().parent();selectContainer.addClass('has-value');});var setHasclass=setInterval(function(){var objs=jQuery(".form-list li .input-box select").parent().parent();var curL=objs.length;objs.addClass('has-value');if(jQuery(".form-list li .input-box select").closest('.has-value').length==curL) clearInterval(setHasclass);},500);jQuery(".form-list li .input-box input").filter(function(){var inputValLoad=jQuery(this).val();var inputContainerLoad=jQuery(this).parent().parent();var inputContainerClassLoad=inputContainerLoad.hasClass('has-value');if(inputValLoad==''){inputContainerLoad.removeClass('has-value');}else{inputContainerLoad.addClass('has-value');}});jQuery(".form-list li .input-box textarea").filter(function(){var inputValLoad=jQuery(this).val();var inputContainerLoad=jQuery(this).parent().parent();var inputContainerClassLoad=inputContainerLoad.hasClass('has-value');if(inputValLoad==''){inputContainerLoad.removeClass('has-value');}else{inputContainerLoad.addClass('has-value');}});jQuery(".form-list li .input-box select").filter(function(){var selectValLoad=jQuery(this).val();var selectContainerLoad=jQuery(this).parent().parent();var selectContainerClassLoad=selectContainerLoad.hasClass('has-value');if(selectValLoad==''){selectContainerLoad.removeClass('has-value');}else{selectContainerLoad.addClass('has-value');}});setTimeout(function(){jQuery(".form-list li .input-box input").blur();},1000);jQuery('input:checkbox').change(function(){if(jQuery(this).is(':checked')) jQuery(this).parent().addClass('checked');else jQuery(this).parent().removeClass('checked')});jQuery('.dropdown-wrapper').click(function(){jQuery(this).toggleClass('active');});jQuery('.nav-container .nav-primary li.level0.parent a.level0').click(function(){var elem=jQuery(this).parent();var nav=jQuery('#nav');var alreadyExpanded=elem.hasClass('menu-active');nav.find('li.level0').removeClass('menu-active');if(!alreadyExpanded){elem.addClass('menu-active');}});jQuery('input:radio').change(function(){var radioList=jQuery(this).parent().parent();radioList.find('.radio-control').removeClass('selected');if(jQuery(this).is(':checked')) jQuery(this).parent().addClass('selected');else jQuery(this).parent().removeClass('selected');});jQuery(".product-image.product-image-zoom .mousetrap").live('click',function(){jQuery(".cloud-zoom",jQuery(this).parent()).click();});jQuery('.videos-section-wrapper .videos-section').owlCarousel({items:3,autoPlay:false,stopOnHover:false,nav:true,navText:["",""],dots:true,loop:false,margin:70,responsive:{0:{items:1},480:{items:1},600:{items:2},980:{items:3},1200:{items:3}}});jQuery('.slider-wrapper').owlCarousel({items:1,autoPlay:false,stopOnHover:false,nav:true,navText:["",""],dots:true,loop:false,margin:70,responsive:{0:{items:1},480:{items:1},600:{items:1},980:{items:1},1200:{items:1}}});jQuery(".video-wrapper .video-thumbnail-wrapper").click(function(){jQuery(".video-popup-wrapper").addClass('active');var thumbID=jQuery(this).parent().attr("id");console.log(thumbID);jQuery(".video-popup-wrapper .video-container").css("display","none");jQuery(".video-popup-wrapper #"+thumbID+".video-container").css("display","block");});jQuery(".video-popup-wrapper .close-video").click(function(){jQuery(this).parent().removeClass('active');});} function changeReviewQty(id,quan,data){jQuery("#"+id).val(quan);var form_key=jQuery("#form_key").val();var url=document.getElementById("qinput-"+data).getAttribute("data-link");jQuery('.opc-ajax-loader').show();jQuery.ajax({url:url,data:"qty="+quan+"&form_key="+form_key,success:function(response){totalPrice=jQuery(response.content).find(".subtotal-wrapper .price").html();totalQty=response.qty;if(response.notice!=undefined){var oldId="old-qty-"+data;jQuery.ajax({url:url,data:"qty="+jQuery("#"+oldId).html()+"&form_key="+form_key,success:function(response){alert(response.notice);}})} else{IWD.OPC.Checkout.pullReview();IWD.OPC.Billing.validateForm();} jQuery('.header-minicart #header-cart .minicart-wrapper').html(response.content);jQuery(".header-minicart .replace-content .cart-price").html(totalPrice);jQuery(".header-minicart .replace-content .cart-count").html(totalQty+" Items");}})} function removeCartItem(url,form_key){jQuery('.opc-ajax-loader').show();jQuery.ajax({url:url,data:"form_key="+form_key,success:function(response){totalPrice=jQuery(response.content).find(".subtotal-wrapper .price").html();totalQty=response.qty;if(totalQty!=0){IWD.OPC.Checkout.pullReview();jQuery('.opc-ajax-loader').hide();jQuery('.header-minicart #header-cart .minicart-wrapper').html(response.content);jQuery(".header-minicart .replace-content .cart-price").html(totalPrice);jQuery(".header-minicart .replace-content .cart-count").html(totalQty+" Items");} else{location.reload();}}})}