function sizeSidebar(){var a=(jQuery(document).height()-40)+"px";jQuery(".sidebar").css({height:a,"min-height":a})}jQuery(document).bind("ready",sizeSidebar);jQuery(document).ready(function(){jQuery("a.tech-specs").hover(function(){jQuery("#product-info-tech-specs").toggle("fast")},function(){jQuery("#product-info-tech-specs").toggle("fast")});jQuery("a.cvv").hover(function(){jQuery("#cvv").toggle("fast")},function(){jQuery("#cvv").toggle("fast")});function a(b){rel="#"+jQuery(b).attr("rel");jQuery(rel).animate({opacity:"toggle"},"slow")}jQuery(".product-image-link").hover(a(this),a(this))});jQuery(window).load(sizeSidebar);jQuery(window).resize(sizeSidebar);jQuery("#slideout-close").click(function(){jQuery("#shopping-cart").slideToggle("slow");return false});(function(b){b.fn.radiobuttons=function(c){var d;d=b.extend({labels:"#product-info-size label"},c||{});d.labels=b(d.labels);this.css("visibility","hidden");d.labels.first().addClass("radio-active");d.labels.hover(function(){b(this).addClass("radio-hover")},function(){b(this).removeClass("radio-hover")});d.labels.click(function(){d.labels.each(function(e){b(this).removeClass("radio-active")});b(this).addClass("radio-active");a(this)});return this};var a=function(c){b("#"+b(c).attr("for")).attr("checked",true)}})(jQuery);(function(a){a.setProductImages=function(b){a.jjproductimgs=b};return this})(jQuery);(function(c){c.fn.jjproduct=function(e){var f;f=c.extend({productId:0,productLink:null,nameEl:"#product-info-name",nameVal:null,priceEl:"#product-info-price",priceVal:null,descEl:"#product-info-description",descVal:null,specsEl:"#product-info-tech-specs",specsVal:null,configureLink:"#configure-link",outofstock:0,outofstockEl:"#product-info-outofstock",cartstuff:"#cartstuff",customDress:0,returnPolicyLink:"/assistance/return-policy/",variantsEl:"#product-info-variants",sizeEl:"#product-info-size",sizeLink:"/assistance/size-chart/",colorEl:"#product-info-color",colorLabelEl:".colorlabel",rhinestoneEl:"#product-info-rhinestones",variantsData:null,qtyEl:"#product-info-quantity",qtyDT:"#product-info-qty-dt",qtyDD:"#product-info-qty-dd",hCatEl:"#product-info-hidden-category",hProdEl:"#product-info-hidden-product",waitingEl:".waitingtoship",imgC:"#product-image-carousel",imgEl:"#product-images",imgVals:null,imgsCallback:function(){}},e||{});d(f.imgC,f.imgEl,f.imgVals);c(f.nameEl).html(f.nameVal);c(f.priceEl).html(f.priceVal);c(f.waitingEl).remove();c(f.descEl).html(f.descVal);c(f.specsEl).html(f.specsVal);c(f.configureLink).attr("href",f.productLink+"?step=2#product-info-variants");c(f.qtyEl).attr("name","products["+f.productId+"][quantity]");c(f.hCatEl).attr("name","products["+f.productId+"][category]");c(f.hProdEl).attr("name","products["+f.productId+"][product]");c(f.hProdEl).val(f.productId);f.imgsCallback.call(this,f.imgEl);c(f.variantsEl+" dt:not('"+f.qtyDT+"'),"+f.variantsEl+" dd:not('"+f.qtyDD+"')").remove();b(f.variantsEl,f.variantsData,f.productId,f.sizeLink+"?return="+f.productLink);c(f.sizeEl+" input:radio").radiobuttons({labels:f.sizeEl+" label"});c(f.colorEl+" input:radio").radiobuttons({labels:f.colorEl+" label"});c(f.colorLabelEl).html(c(f.colorEl+" label[for="+c(f.colorEl+" input:radio").filter(":checked").attr("id")+"]").text());c(f.imgEl+" li").jjproductrotate();if(f.outofstock){c(f.outofstockEl).show();c(f.qtyDT+", "+f.qtyDD+", "+f.cartstuff).hide()}else{c(f.outofstockEl).hide();c(f.qtyDT+", "+f.qtyDD+", "+f.cartstuff).show()}if(f.customDress){a(f.variantsEl,f.productId,f.productLink,f.returnPolicyLink,f.sizeLink)}return this};var d=function(f,g,e){c(g).empty();c(f).removeAttr("style");c(g).removeAttr("style");c.each(e,function(h,j){c(g).append('<li><img src="'+j.imgpath+'" title="'+j.imgname+'" /></li>')})};var b=function(f,e,g,i){var h="";c.each(e,function(k,j){switch(j.kind){case"size":h=h+'<dt class="full"><label for="size">'+j.kindName+': <a href="'+i+'" class="italic-link">Size Chart</a></label></dt><dd class="full"><div id="product-info-size" class="size">';c.each(j.variantData,function(m,l){checked=(m==0)?'checked="checked"':"";h=h+'<label for="radio-'+g+"-"+l.ID+'" class="'+l.css+'" id="radio-l-'+g+"-"+l.ID+'">'+l.nameVal+"</label>";h=h+'<input type="radio" id="radio-'+g+"-"+l.ID+'" name="products['+g+"][options]["+k+']"  value="'+l.val+'" '+checked+" />"});h=h+"</div>";break;case"color":h=h+'<dt class="full"><label for="color">'+j.kindName+': <span class="colorlabel"></span></label></dt><dd class="full"><div id="product-info-color" class="color">';c.each(j.variantData,function(m,l){checked=(m==0)?'checked="checked"':"";h=h+'<label for="radio-'+g+"-"+l.ID+'" class="'+l.css+'" id="radio-l-'+g+"-"+l.ID+'">'+l.labelText+"</label>";h=h+'<input type="radio" id="radio-'+g+"-"+l.ID+'" name="products['+g+"][options]["+k+']" rel="'+l.nameVal+'" value="'+l.val+'" '+checked+" />"});h=h+"</div>";break;case"rhinestone":h=h+'<dt class="full"><label for="product-info-rhinestones">'+j.kindName+':</label></dt><dd class="full"><select id="product-info-rhinestones" name="products['+g+'][options][]">';c.each(j.variantData,function(m,l){selected=(m==0)?'selected="slected"':"";h=h+'<option value="'+l.val+'" '+selected+">"+l.nameVal+"</option>"});h=h+"</select></dd>";break;case"hem":h=h+'<dt class="full"><label for="product-info-hems">'+j.kindName+':</label></dt><dd class="full"><select id="product-info-hems" name="products['+g+'][options][]">';c.each(j.variantData,function(m,l){selected=(m==0)?'selected="slected"':"";h=h+'<option value="'+l.val+'" '+selected+">"+l.nameVal+"</option>"});h=h+"</select></dd>";break;case"bra":h=h+'<dt class="full"><label for="product-info-bras">'+j.kindName+':</label></dt><dd class="full"><select id="product-info-bras" name="products['+g+'][options][]">';c.each(j.variantData,function(m,l){selected=(m==0)?'selected="slected"':"";h=h+'<option value="'+l.val+'" '+selected+">"+l.nameVal+"</option>"});h=h+"</select></dd>";break;case"colorcombo":h=h+'<dt class="full"><label for="product-info-colorcombos">'+j.kindName+':</label></dt><dd class="full"><select id="product-info-colorcombos" name="products['+g+'][options][]">';c.each(j.variantData,function(m,l){selected=(m==0)?'selected="slected"':"";h=h+'<option value="'+l.val+'" '+selected+">"+l.nameVal+"</option>"});h=h+"</select></dd>";break;case"logo":h=h+'<dt class="full"><label for="product-info-logos">'+j.kindName+':</label></dt><dd class="full"><select id="product-info-logos" name="products['+g+'][options][]">';c.each(j.variantData,function(m,l){selected=(m==0)?'selected="slected"':"";h=h+'<option value="'+l.val+'" '+selected+">"+l.nameVal+"</option>"});h=h+"</select></dd>";break;default:h="<!-- No Variants? -->";break}});c(f).append(h)};var a=function(e,f,h,i,g){customHtml='<dt class="full" id="product-info-measurements">Measurements</dt><dd class="full">In order to create your Custom Dress, we will need you to <a href="'+g+"?return="+h+'">take some measurements</a> for us and enter them below.</dd><dt><label for="data-torso">Torso:</label></dt><dd><input type="text" maxlength="5" size="5" class="shortinput measurement" id="data-torso" name="products['+f+'][data][Torso]" /></dd><dt><label for="data-bust">Bust:</label></dt><dd><input type="text" maxlength="5" size="5" class="shortinput measurement" id="data-bust" name="products['+f+'][data][Bust]" /></dd><dt><label for="data-waist">Waist</label></dt><dd><input type="text" maxlength="5" size="5" class="shortinput measurement" id="data-waist" name="products['+f+'][data][Waist]" /></dd><dt><label for="data-hips">Hips</label></dt><dd><input type="text" maxlength="5" size="5" class="shortinput measurement" id="data-hips" name="products['+f+'][data][Hips]" /></dd><dt><label for="data-arm">Arm</label></dt><dd><input type="text" maxlength="5" size="5" class="shortinput" id="data-arm" name="products['+f+'][data][Arm]" /></dd><dt class="full"><label for="data-confirm">Confirm</label></dt><dd class="full"><input type="checkbox" id="data-confirm" name="products['+f+'][data][confirm]" /> I confirm that I have made accurate measurements and input them in the boxes provided to the nearest half inch. I understand that this product is made to order and is not covered by our <a href="'+i+"?return="+h+'">Return Policy</a>.</dd>';c(e).prepend(customHtml)}})(jQuery);(function(c){c.fn.jjproductimages=function(d){var e;e=c.extend({block:null,imgs:c.jjproductimgs},d||{});if(!e.block){imgpaths=e.imgs[0].paths}else{imgpaths=b(e.block,e.imgs)}a(this,imgpaths);return this};var a=function(e,d){var g=/\d+/g.exec(e.children("li").css("top"))/530;var f=e.children("li").css("top");c(e).empty();c.each(d,function(h,j){c(e).append('<li><img src="'+j+'" /></li>')});e.children("li").css("top",f);e.children("li").jjproductrotate({curr:g})};var b=function(f,e){var d=c.grep(e,function(g,h){return g.color===f});return d[0].paths}})(jQuery);(function(b){b.fn.jjproductrotate=function(d){var e;e=b.extend({listEL:this,prevEl:".arrows-col1-left",nextEl:".arrows-col1-right",curr:/\d+/g.exec(this.css("top"))/530},d||{});var c=this.length;var f=this;b(e.prevEl).click(function(){e.curr=(c+e.curr-1)%c;a(f,e.curr);return false});b(e.nextEl).click(function(){e.curr=(e.curr+1)%c;a(f,e.curr);return false});a(f,e.curr);return this};var a=function(d,e){var c="-"+(e*530)+"px";d.css("top",c)}})(jQuery);var ShoppCartAjaxHandler=function(a){jQuery(".addtocart").removeClass("ajax-button-1").removeClass("ajax-button-2").addClass("ajax-button-3");jQuery("#cart-toggle").fadeOut("slow",function(){jQuery.post("/wp-admin/admin-ajax.php",{action:"jjcarterrors",dataType:"html"},function(b){if(b){alert(b)}});jQuery("#drawer").load("/wp-admin/admin-ajax.php",{action:"jj_cart_ajax"},function(){jQuery("#cart-toggle").click(function(){jQuery("#shopping-cart").slideToggle("slow");return false})})}).fadeIn("slow",function(){jQuery(".addtocart").delay(1000).removeClass("ajax-button-3").addClass("ajax-button-1")})};jQuery("#loading").delay(1000).fadeOut("fast",function(){sizeSidebar});