/*
 * This function rotates our promotion cards
 * It provides our first set of functionality:
 * 1) promotional design fading slideshow
 */
function promotionRotate() {
   	var $active = $('.promotion_slide_show img.active');
	if ($active.length == 0) {
		$active = $('.promotion_slide_show img:last');
	}
	var $next =  $active.next().length ? $active.next() : $('.promotion_slide_show img:first');
	$active.addClass('last-active');
	$next.css({opacity: 0.0})
       	.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
			$active.removeClass('active last-active');
	});
}


$(document).ready(function() {
});

$(window).load(function () {
   // We setup our promotion to rotate every 2 seconds
   // It provides our first set of functionality:
   setInterval("promotionRotate()", 4000 );
});

at_attach("menu_parent", "menu_child", "hover", "y", "pointer");

