document.observe("dom:loaded", function() { $$(".video-render").each(function(videoItem){ var objSplashUrl = videoItem.select("input[name=splash-url]")[0]; var splashUrl = objSplashUrl.getValue(); var objVideoUrl = videoItem.select("input[name=video-url]")[0]; var videoUrl = objVideoUrl.getValue(); var playerWidth = videoItem.getWidth(); if(playerWidth < 1){ playerWidth = 642; } var playerHeight = videoItem.getHeight(); if(playerHeight < 1){ playerHeight = 556; } jwplayer(videoItem).setup({ flashplayer: "/uploads/7e/93/7e93287a223e444d3317e26790af1e50/player.swf", file: videoUrl, height: playerHeight, width: playerWidth, events: { onComplete: function() { showCarousel(); } }, controlbar:"bottom", stretching:"exactfit", autostart:"false", skin:"/uploads/8a/29/8a291fed2c964163bb12d57f31d7680f/glow.zip", frontcolor:"ffffff", lightcolor:"ffffff", image:splashUrl }); }); }) function showCarousel(){ Effect.ScrollTo("content", {duration:0.7}); $('videoBanner').fade(); $('homeBanner').appear(); }