/***** version 1.2.0 *****/ var gsMainSKU = 'FABR-CH32-U'; var giMainRes = '120'; var gsPipingSKU = 'FABR-CH32-U'; var giPipingRes = '120'; var gsMainTitle = 'White Twill'; var gsMainTitleBuy = ' buy swatch'; var gsPipingTitle = 'White Twill'; var gsPipingTitleBuy = ' buy swatch'; var gsLink = "http://www.serenaandlily.com/Fabric/Fabrics"; var gaMainNames = new Array() var gaPipingNames = new Array() var gsHTML = '
'; var lsBoxWidth = '490'; $(document).ready(function(){ $("#outerwrapper").parent().prepend(gsHTML); $('.close').click(function(){ $('#box_Icon').hide(); $('.option_1_buttons').hide(); $('.option_2_buttons').hide(); $('.option_3_buttons').hide(); $('.option_4_buttons').hide(); $('.option_5_buttons').hide(); $('.option_box').hide(); $('.modal_mask').hide(); $("select").show(); // show all select menus $('#box_Icon .popupFill').empty(); }); $('.popup').click(function(event){ event.preventDefault(); var lsURL = $(this).attr("href"); var lsTop = parseInt($(window).scrollTop()); lsTop += 92; $('#quickLook_Icon .popupMainArea').css({'height' : '405px','width' : lsBoxWidth + 'px'}); $('#quickLook_Icon').css({'height' : '405px','width' : lsBoxWidth + 'px'}); $('#box_Icon').show(); $('.popover_mask').show(); $('#box_Icon .popupFill').load(lsURL); $("select").hide(); // hide all select menus (IE6/7 overrides) $("#slb_menu_tabs div").css({'z-index' : '1'}); // tabs showing up over mask var lsLeft = ($(window).width() - lsBoxWidth)/2 - 5; if(!$.browser.msie){lsLeft = lsLeft + 15;} $('#box_Icon').css({'left' : lsLeft}); var lsHeight = $('#outerwrapper').height() + 20; $('.popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('#box_Icon').css({'top' : lsTop + 'px', 'z-index' : '3'}); }); $('.down_wrap').click(function(event){ $('#quickLook_Icon .popupMainArea').css({'height' : '275px'}); $('#quickLook_Icon').css({'height' : '275px'}); }); $('.slipcover').click(function(event){ $('#quickLook_Icon .popupMainArea').css({'height' : '245px'}); $('#quickLook_Icon').css({'height' : '245px'}); }); $('.option_1').click(function(event){ event.preventDefault(); var lsHeight = $('#outerwrapper').height() + 20; var lsTop = parseInt($(window).scrollTop()); lsTop += 92; $("select").hide(); // hide all select menus (IE6/7 overrides) $("#slb_menu_tabs div").css({'z-index' : '1'}); // tabs showing up over mask var lsLeft = ($(window).width() - lsBoxWidth)/2 - 5; if(!$.browser.msie){lsLeft = lsLeft + 15;} if(!$.browser.msie){ $('.option_box').css({'left' : lsLeft}); $('.option_popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('.option_box').css({'position' : 'absolute', 'top' : lsTop + 'px', 'z-index' : '3'}) $('.option_box').show(); $('.option_1_buttons').show(); $('.option_popover_mask').show(); } else { $('#quickLook_Icon .popupMainArea').css({'height' : '405px','width' : lsBoxWidth + 'px'}); $('#quickLook_Icon').css({'height' : '405px','width' : lsBoxWidth + 'px'}); $('#box_Icon').css({'left' : lsLeft}); $('.popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('#box_Icon').css({'top' : lsTop + 'px', 'z-index' : '3'}); $('#box_Icon').show(); $('.popover_mask').show(); $('#box_Icon .popupFill').html($('.option_1_buttons').html()) $('.listItemOptions a').click(function(event){ event.preventDefault(); return true }) } // if }); // .option_1 $('.option_2').click(function(event){ event.preventDefault(); var lsHeight = $('#outerwrapper').height() + 20; var lsTop = parseInt($(window).scrollTop()); lsTop += 92; $("select").hide(); // hide all select menus (IE6/7 overrides) $("#slb_menu_tabs div").css({'z-index' : '1'}); // tabs showing up over mask var lsLeft = ($(window).width() - lsBoxWidth)/2 - 5; if(!$.browser.msie){lsLeft = lsLeft + 15;} if(!$.browser.msie){ $('.option_box').css({'left' : lsLeft}); $('.option_popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('.option_box').css({'position' : 'absolute', 'top' : lsTop + 'px', 'z-index' : '3'}) $('.option_box').show(); $('.option_2_buttons').show(); $('.option_popover_mask').show(); } else { $('#box_Icon').css({'left' : lsLeft}); $('.popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('#box_Icon').css({'top' : lsTop + 'px', 'z-index' : '3'}); $('#box_Icon').show(); $('.popover_mask').show(); $('#box_Icon .popupFill').html($('.option_2_buttons').html()) } // if }); // .option_2 $('.option_3').click(function(event){ event.preventDefault(); var lsHeight = $('#outerwrapper').height() + 20; var lsTop = parseInt($(window).scrollTop()); lsTop += 92; $("select").hide(); // hide all select menus (IE6/7 overrides) $("#slb_menu_tabs div").css({'z-index' : '1'}); // tabs showing up over mask var lsLeft = ($(window).width() - lsBoxWidth)/2 - 5; if(!$.browser.msie){lsLeft = lsLeft + 15;} if(!$.browser.msie){ $('.option_box').css({'left' : lsLeft}); $('.option_popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('.option_box').css({'position' : 'absolute', 'top' : lsTop + 'px', 'z-index' : '3'}) $('.option_box').show(); $('.option_3_buttons').show(); $('.option_popover_mask').show(); } else { $('#box_Icon').css({'left' : lsLeft}); $('.popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('#box_Icon').css({'top' : lsTop + 'px', 'z-index' : '3'}); $('#box_Icon').show(); $('.popover_mask').show(); $('#box_Icon .popupFill').html($('.option_3_buttons').html()) } // if }); // .option_3 $('.option_4').click(function(event){ event.preventDefault(); var lsHeight = $('#outerwrapper').height() + 20; var lsTop = parseInt($(window).scrollTop()); lsTop += 92; $("select").hide(); // hide all select menus (IE6/7 overrides) $("#slb_menu_tabs div").css({'z-index' : '1'}); // tabs showing up over mask var lsLeft = ($(window).width() - lsBoxWidth)/2 - 5; if(!$.browser.msie){lsLeft = lsLeft + 15;} if(!$.browser.msie){ $('.option_box').css({'left' : lsLeft}); $('.option_popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('.option_box').css({'position' : 'absolute', 'top' : lsTop + 'px', 'z-index' : '3'}) $('.option_box').show(); $('.option_4_buttons').show(); $('.option_popover_mask').show(); } else { $('#box_Icon').css({'left' : lsLeft}); $('.popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('#box_Icon').css({'top' : lsTop + 'px', 'z-index' : '3'}); $('#box_Icon').show(); $('.popover_mask').show(); $('#box_Icon .popupFill').html($('.option_4_buttons').html()) } // if }); // .option_4 $('.option_5').click(function(event){ event.preventDefault(); var lsHeight = $('#outerwrapper').height() + 20; var lsTop = parseInt($(window).scrollTop()); lsTop += 92; $("select").hide(); // hide all select menus (IE6/7 overrides) $("#slb_menu_tabs div").css({'z-index' : '1'}); // tabs showing up over mask var lsLeft = ($(window).width() - lsBoxWidth)/2 - 5; if(!$.browser.msie){lsLeft = lsLeft + 15;} if(!$.browser.msie){ $('.option_box').css({'left' : lsLeft}); $('.option_popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('.option_box').css({'position' : 'absolute', 'top' : lsTop + 'px', 'z-index' : '3'}) $('.option_box').show(); $('.option_5_buttons').show(); $('.option_popover_mask').show(); } else { $('#box_Icon').css({'left' : lsLeft}); $('.popover_mask').css({'background' : '#000','height' : lsHeight,'left' : '0','margin' : '0', 'opacity' : '0.2','position' : 'absolute','top' : '0','width' : $(window).width(),'z-index' : '2'}); $('#box_Icon').css({'top' : lsTop + 'px', 'z-index' : '3'}); $('#box_Icon').show(); $('.popover_mask').show(); $('#box_Icon .popupFill').html($('.option_5_buttons').html()) } // if }); // .option_5 $(".scene_7_popup_cust").click(function(event){ event.preventDefault(); var lsURL = $(this).attr('href'); var laSKUFull = lsURL.split("&"); var laSKU = laSKUFull[1].replace(/sku=/,"").split("_"); var lsSKU = "sku=" + laSKU[0]; laSKUFull[1] = lsSKU; lsURL = laSKUFull.join("&"); window.open(lsURL,'_blank','width=810,height=810'); }); $("#custcol_cover_fabric option").each(function(i){ // main fabric var lsMainClass = $(this).text(); var lsMainClassNospace = lsMainClass.replace(/ /ig,"_"); var lsMainClassNospace = lsMainClassNospace.replace(/\//ig,"_"); $(this).addClass("dm_" + lsMainClassNospace); gaMainNames[i] = lsMainClass; }); $("#custcol_piping_fabric option").each(function(i){ // piping fabric var lsPipingClass = $(this).text(); var lsPipingClassNospace = lsPipingClass.replace(/ /ig,"_"); var lsPipingClassNospace = lsPipingClassNospace.replace(/\//ig,"_"); $(this).addClass("dp_" + lsPipingClassNospace); gaPipingNames[i] = lsPipingClass; }); jQuery.get("http://www.serenaandlily.com/site/xml/fabrics.xml",{},function(xml) { $('fabric_item',xml).each(function() { lsItemName = $(this).find("name").text(); for(i=0;i