	$(document).ready(function() { 
		if( $('#billboard-images a').length ) {
			function changeBillboardSilde() {
				var active = $('#billboard-images a.active');
				if( !active.length ) {
					active =  $('#billboard-images a:first');					
				}				
				var next = active.next().length ? active.next() : $('#billboard-images a:first');
				
				$("#billboard-placeholder").css("background-image", "url(" + active.attr('href') + ")").fadeTo(0, 1);
				
				var img = new Image(); 
        		img.onload = function() {
        			$("#billboard-image").css("background-image", "url(" + this.src + ")");        				
        			$("#billboard-placeholder").fadeOut( 2000, function() {
        				$.doTimeout( 3000, changeBillboardSilde );
        			});									
        		}; 
        		img.src = next.attr("href");        		
				active.removeClass("active");
				next.addClass("active");				
			}
			$.doTimeout( 1000, changeBillboardSilde );				
		}		
	});	
