function loadCarouselImages(){var $img;$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1628_992_0");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1628_992_0","","10010","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1628_992_0-w150-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-4338_8193_16");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("4338_8193_16","","10116","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/4338_8193_16-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-4395_7679_28");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("4395_7679_28","","10128","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/4395_7679_28-w85-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-4371_7588_18");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("4371_7588_18","","10118","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/4371_7588_18-w64-h150-r90.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-4036_7381_0");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("4036_7381_0","","10010","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/4036_7381_0-w150-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-3132_6010_16");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("3132_6010_16","","10116","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/3132_6010_16-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-2442_3665_28");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("2442_3665_28","","10128","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/2442_3665_28-w85-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1586_1882_18");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1586_1882_18","","10118","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1586_1882_18-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-3117_5921_0");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("3117_5921_0","","10010","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/3117_5921_0-w150-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-2461_3866_16");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("2461_3866_16","","10116","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/2461_3866_16-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1685_1653_28");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1685_1653_28","","10128","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1685_1653_28-w85-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1660_1640_18");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1660_1640_18","","10118","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1660_1640_18-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-3132_5384_0");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("3132_5384_0","","10010","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/3132_5384_0-w150-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1641_1763_16");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1641_1763_16","","10116","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1641_1763_16-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1389_1514_28");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1389_1514_28","","10128","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1389_1514_28-w85-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1328_1506_18");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1328_1506_18","","10118","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1328_1506_18-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1868_5099_0");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1868_5099_0","","10010","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1868_5099_0-w85-h150-r90.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1551_1605_16");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1551_1605_16","","10116","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1551_1605_16-w150-h64-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1692_1298_28");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1692_1298_28","","10128","P");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1692_1298_28-w85-h85-r0.jpg");$img=$(new Image());$img.load(function(){var $wrapper=$("#carousel-item-wrapper-1329_1234_18");$(this).css({cursor:"pointer"});$(this).click(function(){onCarouselItemMore("1329_1234_18","","10118","L");});$(this).hide();$wrapper.append(this);$(this).fadeIn(500);});$img.attr("src","/c/i/productcarousel/free/1329_1234_18-w150-h64-r0.jpg");}var overlayURLByIndex=new Object();var overlayURLIndex=0;var $img2;var $img3;var $img4;function beforeSlideNext(){$("#text-overlay").fadeOut(200,function(){$(this).load(overlayURLByIndex[overlayURLIndex],{},function(){$(this).fadeIn(300);overlayURLIndex++;overlayURLIndex=overlayURLIndex%4;});});}function startCycle(){$("#canvas").cycle({fx:"fade",speed:5000,timeout:200,before:beforeSlideNext});$img2.css({visibility:"visible"});$img3.css({visibility:"visible"});$img4.css({visibility:"visible"});}function loadSlideShowImages(){overlayURLByIndex[0]="/home.freeproduct.FreeProductSplashTextOverlayDiv?productCategoryID=1&priceCategoryID=0";overlayURLByIndex[1]="/home.freeproduct.FreeProductSplashTextOverlayDiv?productCategoryID=1&priceCategoryID=0";overlayURLByIndex[2]="/home.freeproduct.FreeProductSplashTextOverlayDiv?productCategoryID=1&priceCategoryID=0";overlayURLByIndex[3]="/home.freeproduct.FreeProductSplashTextOverlayDiv?productCategoryID=1&priceCategoryID=0";$img2=$(new Image());$img3=$(new Image());$img4=$(new Image());$img2.attr("id","img-slideshow-2");$img3.attr("id","img-slideshow-3");$img4.attr("id","img-slideshow-4");$img2.css({visibility:"hidden"});$img3.css({visibility:"hidden"});$img4.css({visibility:"hidden"});function onImg2Loaded(){var $wrapper=$("#canvas");$wrapper.append($img2);$img3.attr("src","/c/i/@producthome/category-business-cards/splash-business-cards-c.jpg");}function onImg3Loaded(){var $wrapper=$("#canvas");$wrapper.append($img3);$img4.attr("src","/c/i/@producthome/category-business-cards/splash-business-cards-d.jpg");}function onImg4Loaded(){startCycle();}function onImg2Error(){$img3.attr("src","/c/i/@producthome/category-business-cards/splash-business-cards-c.jpg");}function onImg3Error(){$img4.attr("src","/c/i/@producthome/category-business-cards/splash-business-cards-d.jpg");}function onImg4Error(){startCycle();}$img2.load(onImg2Loaded);$img2.error(onImg2Error);$img3.load(onImg3Loaded);$img3.error(onImg3Error);$img4.load(onImg4Loaded);$img4.error(onImg4Error);$img2.attr("src","/c/i/@producthome/category-business-cards/splash-business-cards-b.jpg");}function onCarouselItemStart(id,orientation){$.post("/a/editdocument/checkForFreeDesign",{catalogItemID:id},function(){$(document).attr("location","/a/EditDocument/openCopy?catalogItemID="+id+"&catalogItemOrientation="+orientation);});}function onCarouselItemMore(id,industryCategoryMnemonic,productCategoryID,orientation){$.post("/a/home/startCatalog",{productCategoryID:productCategoryID,catalogItemID:id,orientation:orientation},function(){$(document).attr("location","/catalog");});}$("document").ready(function(){loadSlideShowImages();$("#canvas").css({visibility:"visible"});loadCarouselImages();});