<script type="text/javascript">
/*<![CDATA[*/
animateDirection_latest_prod = "left";
maxShow_latest_prod = 5;
intervals = [];
allAmount_latest_prod = 10;
function buildCarousel_latest_prod(){
switch(animateDirection_latest_prod){
case "left":
slideWidth = $("overall_container_latest_prod").offsetWidth - 106;
itemWidth_latest_prod = Math.ceil(slideWidth / maxShow_latest_prod);
$$("#overall_container_latest_prod .yjwm_showcase_holder").setStyle("width", (slideWidth) + "px");
$$("#overall_container_latest_prod .yjwm_scproduct").setStyle("width",itemWidth_latest_prod+"px");
$$("#overall_container_latest_prod .yjwm_sc_in,#overall_container_latest_prod .yjwm_showcase_holder h3").setStyle("width",(itemWidth_latest_prod-5)+"px");
break;
case "top":
var maxHeight = 0;
var elts = $$("#overall_container_latest_prod .yjwm_scproduct ");
if(elts && typeof elts.length != "undefined" && elts.length){
itemWidth_latest_prod = 0;
var l = elts.length;
for(var i=0;i<l;i++){
var item = elts[i];
if(typeof item.offsetHeight != "undefined"
&& item.offsetHeight
&& item.offsetHeight > maxHeight){
maxHeight = item.offsetHeight;
};
};
maxHeight += 10;
if(maxHeight){
slideHeight = maxShow_latest_prod * maxHeight;
$$("#overall_container_latest_prod").setStyle("height", (slideHeight + 106) + "px");
$$("#overall_container_latest_prod .yjwm_showcase_holder,#overall_container_latest_prod .yjwm_showcase_holder_out").setStyle("height", slideHeight + "px");
itemWidth_latest_prod = maxHeight;
$$("#overall_container_latest_prod .yjwm_scproduct,#overall_container_latest_prod .yjwm_sc_in").setStyle("height", maxHeight + "px");
};
};
break;
};
if(typeof itemWidth_latest_prod != "undefined" && itemWidth_latest_prod && allAmount_latest_prod > 1){
(773 строка, где-то отсюда начинается ошибка) new slider({
container : "overall_container_latest_prod",
items :".yjwm_scproduct",
itemWidth : itemWidth_latest_prod,
visibleItems: 5,
effectDuration : 500,
autoSlide : 0,
mouseEventSlide: 3000,
navigation: {
"forward":"linkForward_latest_prod",
"back":"linkBackward_latest_prod"
},
animateDirection: "left"
});
};
$("overall_wrapper_latest_prod").setStyle("visibility","visible");
};
if(typeof isLoaded_latest_prod == "undefined"){
window.addEvent("load",buildCarousel_latest_prod);
};
/* ]]>*/
</script>