function scrollCarousel(){$('.jcarousel-next').trigger('click');}
jQuery(function($){var carousel_arr=[];var form_data=[];var new_item;var msie=$.browser.msie;function carouselInitCallback(carousel){$.each($('#carousel ul').children(),function(){carousel_arr.push($(this).html());});$('.jcarousel-next,.jcarousel-prev').insertAfter('#carousel-wrap');var auto_carousel=setInterval("scrollCarousel()",5000);$('#carousel, .jcarousel-next, .jcarousel-prev').mouseover(function(e){e.stopPropagation();carousel.options.animation=1000;carousel.options.easing='easeOutCubic';clearInterval(auto_carousel);carousel.startAuto(0);$('body').mouseover(function(){carousel.options.animation=1500;carousel.options.easing='easeInOutCubic';$('.jcarousel-next').trigger('click');auto_carousel=setInterval("scrollCarousel()",5000);$(this).unbind('mouseover');});});}
function carouselInCallback(carousel,item,i,state,evt){var idx=carousel.index(i,carousel_arr.length);new_item=carousel.add(i,carousel_arr[idx-1]);$('#carousel .desc-wrap, #carousel .lbl').ifixpng();}
function carouselOutCallback(carousel,item,i,state,evt){carousel.remove(i);}
$('#home #carousel ul').jcarousel({scroll:1,auto:5,wrap:'circular',initCallback:carouselInitCallback,itemVisibleInCallback:{onBeforeAnimation:carouselInCallback},itemVisibleOutCallback:{onAfterAnimation:carouselOutCallback},easing:'easeInOutCubic',animation:1500});if(msie){$('#carousel .desc-wrap, #carousel .lbl, .jcarousel-prev, .jcarousel-next').ifixpng();$('.jcarousel-prev,.jcarousel-next').hover(function(){$(this).iunfixpng().css('background-position','-50px 0');},function(){$(this).css('background-position','0 0').ifixpng();});}
$('#carousel .attend-event').live("click",function(e){e.preventDefault();var item=$(this).parents('.item');var event_pnl=$(this).parents('li').find('.pnl-event');if(!msie){item.fadeOut("medium",function(){event_pnl.fadeIn("medium");});}else{item.hide();event_pnl.show();}});$('#carousel .close').live("click",function(e){e.preventDefault();var item=$(this).parents('li').find('.item');var event_pnl=$(this).parents('.pnl-event');if(!msie){event_pnl.fadeOut("medium",function(){item.fadeIn("medium");});}else{event_pnl.hide();item.show();}});});
