$(function() {
  $('.mtabMenu > li')
	  .click(function(){
		if (!$(this).hasClass('selected')) {    
			$('.mtabMenu > li').removeClass('selected');
			$(this).addClass('selected');
			$('.tmBoxBody div').slideUp('1500');
			$('.tmBoxBody div:eq(' + $('.mtabMenu > li').index(this) + ')').slideDown('1500');
		}
	  })
	  .mouseover(function() {
		$(this).addClass('mouseover');
		$(this).removeClass('mouseout');   
	  })
	  .mouseout(function() {
		$(this).addClass('mouseout');
		$(this).removeClass('mouseover');    
	  });


  $('.tmBoxBody .links li')
	  .click(function(){
		link = $(this).children().attr('href');
			if(link != null)
				window.location = link;
	  })
	  .mouseover(function() {
		$(this).css('backgroundColor','#e7e7e7');
		$(this).children().animate({paddingLeft:"15px"}, {queue:false, duration:300});
	  })
	  .mouseout(function() {
		$(this).css('backgroundColor','');
		$(this).children().animate({paddingLeft:"0"}, {queue:false, duration:300});
	  });  
	
  $('.tmBoxBody li')
	  .click(function(){
		link = $(this).children().attr('href');
			if(link != null)
				window.location = link;
	  })
	  .mouseover(function() {
		$(this).css('backgroundColor','#e7e7e7');
	  })
	  .mouseout(function() {
		$(this).css('backgroundColor','');
	  });  	
	  		
});

