var $$ = jQuery.noConflict();

$$(document).ready(function() {
	
	/*$$('#billboard').jqFancyTransitions({
			width:776,
			height:293,
			strips:20,
			stripDelay:50,
			delay:3000,
			navigation:true,
			links:true,
			position:'curtain',
			direction:'alternate'
	});
	
	var controls = $$('#ft-prev-billboard, #ft-next-billboard, #ft-buttons-billboard').fadeOut(); 
	$$('#homePromoContainer').mouseover(function(e){
		controls.stop(true,true).fadeIn();
	}).mouseleave(function(e){
		controls.stop(true,true).fadeOut();
	});*/
	
	 $$('#blb01 > img').each(function(i,e){
	        rotate($$(this),500,3000,i);
	    });
	    function rotate(elem1,speed,timeout,i){
	        elem1.animate({'marginLeft':'18px','width':'0px'},speed,function(){
	            var other;
	            if(elem1.parent().attr('id') == 'blb02') other = $$('#blb03').children('img').eq(i);
	            //else if(elem1.parent().attr('id') == 'blb02') other = $$('#blb03').children('img').eq(i);
	            	else other = $$('#blb02').children('img').eq(i);
	            
	            	
	            
	            	other.animate({'marginLeft':'0px','width':'31px'},
	                                  speed,function(){
	                var f = function() { rotate(other,speed,timeout,i) };
	                setTimeout(f,timeout);
	            });
	        });
	    }
});
