var maxWidth = 152;
var minWidth = 27;	
var orginWidth = 58;

accordion_reset = function() {
    $('.t1').animate({width: orginWidth+"px"}, {queue:false, duration:400});
    $('.t2').animate({width: orginWidth+"px"}, {queue:false, duration:400});
    $('.t3').animate({width: orginWidth+"px"}, {queue:false, duration:400});
    $('.t4').animate({width: orginWidth+"px"}, {queue:false, duration:400});    
}

accordion_start = function() {

    $("#accordion ul li.t1 *").hover(
      function(){
        $('.t1').animate({width: maxWidth+"px"}, {queue:false, duration:400});
        $('.t2').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t3').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t4').animate({width: minWidth+"px"}, {queue:false, duration:400});            
      }
    );

    $("#accordion ul li.t2 *").hover(
      function(){
        $('.t2').animate({width: maxWidth+"px"}, {queue:false, duration:400});
        $('.t1').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t3').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t4').animate({width: minWidth+"px"}, {queue:false, duration:400});            
      }
    );

    $("#accordion ul li.t3 *").hover(
      function(){
        $('.t3').animate({width: maxWidth+"px"}, {queue:false, duration:400});
        $('.t1').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t2').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t4').animate({width: minWidth+"px"}, {queue:false, duration:400});            
      }
    );

    $("#accordion ul li.t4 *").hover(
      function(){
        $('.t4').animate({width: maxWidth+"px"}, {queue:false, duration:400});
        $('.t1').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t2').animate({width: minWidth+"px"}, {queue:false, duration:400});
        $('.t3').animate({width: minWidth+"px"}, {queue:false, duration:400});            
      }
    );   
            
    $("#accordion").mouseout(
      function(){          
          accordion_reset();
      }
    );

}




main_accordion_reset = function() {   
    $('.t1').animate({top: "71px"}, {queue:false, duration:400});
    $('.t2').animate({top: "129px"}, {queue:false, duration:400});
    $('.t3').animate({top: "187px"}, {queue:false, duration:400});
    $('.t4').animate({top: "245px"}, {queue:false, duration:400});
}


       
main_accordion_start = function(t1top, t2top, t3top, t4top, offset) {
    
    $("#accordion ul li.t1 *").hover(
      function(){          
          $('.t3').animate({top: (parseInt(t3top) + offset)+"px"}, {queue:false, duration:400});
          $('.t2').animate({top: (parseInt(t2top) + 2*offset)+"px"}, {queue:false, duration:400});
          $('.t1').animate({top: (parseInt(t1top) + 3*offset)+"px"}, {queue:false, duration:400});
      } 
    );
        
    $("#accordion ul li.t2 *").hover(
      function(){          
          $('.t3').animate({top: (parseInt(t3top) + offset)+"px"}, {queue:false, duration:400});
          $('.t2').animate({top: (parseInt(t2top) + 2*offset)+"px"}, {queue:false, duration:400});
          $('.t1').animate({top: (parseInt(t1top) - offset)+"px"}, {queue:false, duration:400});
      }
    );
        
    $("#accordion ul li.t3 *").hover(
      function(){          
          $('.t3').animate({top: (parseInt(t3top) + offset)+"px"}, {queue:false, duration:400});
          $('.t2').animate({top: (parseInt(t2top) - 2*offset)+"px"}, {queue:false, duration:400});
          $('.t1').animate({top: (parseInt(t1top) - offset)+"px"}, {queue:false, duration:400});
      }
    );

    $("#accordion ul li.t4 *").hover(
      function(){          
          $('.t3').animate({top: (parseInt(t3top) - 3*offset)+"px"}, {queue:false, duration:400});
          $('.t2').animate({top: (parseInt(t2top) - 2*offset)+"px"}, {queue:false, duration:400});
          $('.t1').animate({top: (parseInt(t1top) - offset)+"px"}, {queue:false, duration:400});
      }
    );
        
    $("#left_column").mouseout(
      function(){          
          main_accordion_reset();
      }
    );
}
