function DoFirstImg(a){var n="#hWedgeView";var l="hWedge";var s="."+l;var e=500;var i=700;var r=700;var f;var u=1;var m=jQuery(n).width();var c="#multipromo-text";f=parseInt(a);var w=Math.floor(Math.random()*f);w=w+1;u=w;var q=w.toString();var v=jQuery(".lbot1");var t=jQuery(".ltop1");var h=jQuery(".multipromo-desc"+q,jQuery("#multipromo-collectionDetails"));var g=jQuery(".multipromo-title"+q,jQuery("#multipromo-collectionDetails"));var k=jQuery(".multipromo-link"+q,jQuery("#multipromo-collectionDetails"));var p=jQuery(".multipromo-img-back"+q,jQuery("#multipromo-collectionDetails"));var d=jQuery(".multipromo-img-fore"+q,jQuery("#multipromo-collectionDetails"));var j=jQuery(".multipromo-bodycss"+q,jQuery("#multipromo-collectionDetails"));var j=j.html();jQuery(c).addClass(j);v.css({background:"transparent url("+p.html()+") no-repeat top center"});t.css({background:"transparent url("+d.html()+") no-repeat top center"});jQuery(".multipromotitle",jQuery("#multipromo-text")).html(g.html());jQuery(".multipromobody",jQuery("#multipromo-text")).html(h.html());jQuery(".multipromo-detailslink",jQuery("#multipromo-text")).attr("href",k.html());function b(){jQuery(s).css("backgroundImage","none")}function o(D){if(D>0){var A=0;var y=m}else{var A=0;var y=m*-1}jQuery(s+" .lbot2").css({left:A+"px",backgroundImage:jQuery(s+" .lbot1").css("backgroundImage")});jQuery(s+" .ltop2").css({left:A+"px",backgroundImage:jQuery(s+" .ltop1").css("backgroundImage")});jQuery(s+" .ltxt2").html(jQuery(s+" .ltxt1").html());jQuery(s+" .lbot2").css("left",A+"px").stop().animate({left:y+"px"},e,"swing",function(){b()});jQuery(s+" .ltop2").css("left",A+"px").stop().animate({left:y+"px"},i,"swing",function(){});jQuery(s+" .ltxt2").css("left",A+"px").stop().animate({left:y+"px"},r,"swing",function(){});var F=jQuery(".lbot1");var G=jQuery(".ltop1");var H=jQuery(".multipromo-desc"+u,jQuery("#multipromo-collectionDetails"));var x=jQuery(".multipromo-title"+u,jQuery("#multipromo-collectionDetails"));var B=jQuery(".multipromo-link"+u,jQuery("#multipromo-collectionDetails"));var z=jQuery(".multipromo-img-back"+u,jQuery("#multipromo-collectionDetails"));var E=jQuery(".multipromo-img-fore"+u,jQuery("#multipromo-collectionDetails"));jQuery(c).removeClass(C);var C=jQuery(".multipromo-bodycss"+u,jQuery("#multipromo-collectionDetails"));var C=C.html();jQuery(c).addClass(C);jQuery(".multipromotitle",jQuery("#multipromo-text")).html(x.html());jQuery(".multipromobody",jQuery("#multipromo-text")).html(H.html());jQuery(".multipromo-detailslink",jQuery("#multipromo-text")).attr("href",B.html());if(D>0){var A=m*-1;var y=0}else{var A=m;var y=0}F.css({background:"transparent url("+z.html()+") no-repeat top center"});G.css({background:"transparent url("+E.html()+") no-repeat top center"});jQuery(s+" .lbot1").css("left",A+"px").stop().animate({left:y+"px"},e,"swing",function(){});jQuery(s+" .ltop1").css("left",A+"px").stop().animate({left:y+"px"},i,"swing",function(){});jQuery(s+" .ltxt1").css("left",A+"px").stop().animate({left:y+"px"},r,"swing",function(){});jQuery(s).css("backgroundColor",jQuery(s+" .ltxt1>div>div").css("backgroundColor"))}jQuery("#slide .forward").click(function(){if(u>=f){u=1}else{u++}o(1)});jQuery("#slide .back").click(function(){if(u<=1){u=f}else{u--}o(-1)});setInterval("jQuery('#slide .forward').click();",12000)};
