$(function() {
        $('.ofrBusImg').hover(function() {
            $(this).children('.front').stop().animate({ "opacity" : '0'}, 700);   
        }, function() {
            $(this).children('.front').stop().animate({ "opacity" : '1'}, 400);       
        });
		
	    $('.ofrBusImg').click(function() {
            var clickedID = $(this).attr("id");
			var busNo = clickedID.substring(4);
			
			$(".ofrBusImg").each(function() {
			  var ImageToCheck = $(this).children(".front");
			  if(!ImageToCheck.is(':visible')) ImageToCheck.fadeIn("slow");
			});
 
			$(this).children('.front').hide();  
			loadDscr(busNo);  
        });
    });
	
	$(function(){
	
	var $lefty = $("#left");
    var $righty = $("#right");

  	//$righty.css("top",$lefty.children("#banner").outerHeight()+21) 

    var animTime = 2000;
    $("#wrapper").animate({ 
			 opacity: 'show' 
		 }, animTime);
    $lefty.animate({
      left: parseInt($lefty.css('left'),10) == 0 ?
        -$lefty.outerWidth() : 0
    }, animTime);
  
  $righty.animate({
      right: parseInt($righty.css('right'),10) == 0 ?
        -$righty.outerWidth() : 0
    }, animTime);
});    
	
	
