
/* - carousel.js - */
// http://www.rebelx.nl/portal_javascripts/carousel.js?original=1
jQuery(function($){var resizeCarousel=function(carousel,scrollable,elems){var base_height=Math.max.apply(null,$(elems).map(function(){return $(this).height()}).get());if(base_height<$(carousel).height()){base_height=$(carousel).height()-$(".navi").outerHeight(true)}
$(elems).height(base_height);var scrollable_height=$(elems).eq(0).outerHeight(true);$(scrollable).height(scrollable_height);var outer_height=$(scrollable).outerHeight(true)+$(".navi").outerHeight(true);var $carousel=$(carousel);if($carousel.height()<outer_height){$carousel.height(outer_height).trigger('resized.carousel',[outer_height])}};$(".toolBar").hide();var carousels=$(".carousel");carousels.each( function(i){var carousel=this;var scrollable=$(this).find(".scrollable").eq(0);var elems=$(scrollable).find('.tileItem');scrollable_width=$(scrollable).width();for(i=0;i<elems.length;i++){$(elems[i]).css({width:scrollable_width})};setTimeout(function(){resizeCarousel(carousel,scrollable,elems)},0);$(scrollable).find("img").load(function(event){resizeCarousel(carousel,scrollable,elems)})})
var ap=(carousels.length==1)?true:false;var api=$("div.scrollable").scrollable({size:1,clickable:false,loop:true}).circular().autoscroll({autoplay:ap,steps:1,interval:12000}).navigator({api:true});$(".carousel").hover(
function(){$(this).find(".toolBar").eq(0).slideToggle('fast').show()},
function(){$(this).find(".toolBar").eq(0).slideToggle('fast').hide()})})

