$(document).ready(function() {

	$("#t4").show();
	  
	var config = {    
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		interval: 0, // number = milliseconds for onMouseOver polling interval    
		over:  function () {
			$(this).find('a:first').addClass('tempActive');
        	//$(this).find('.popup').fadeIn(0);
            $(this).find('.popup').show();
		},  // function = onMouseOver callback (REQUIRED)    
		timeout: 0, // number = milliseconds delay before onMouseOut    
		out: function () {
			$(this).find('a:first').removeAttr('class');
        	//$(this).find('.popup').fadeOut(0);
            $(this).find('.popup').hide();
		}    
	};			   
	/*$('#mainMenu li').click(function() { 
      $(this).parent().find('.active').removeAttr('class');
      $(this).addClass('active');
    });*/
	
	$('#mainMenu li:not(:first, :last)').hoverIntent(config);
	
	$("#nav a").bigTarget({
		hoverClass: 'over', // CSS class applied to the click zone onHover
		clickZone : 'li:eq(0)' // jQuery parent selector
  	});
	$("#specials h5 a").bigTarget({
		hoverClass: 'over', // CSS class applied to the click zone onHover
		clickZone : 'li:eq(0)' // jQuery parent selector
  	});
	
	$('#nav').hover(
      function () {
        $('#nav').css('z-index','10');
        $('.buttons').css('z-index','1');
      }, 
      function () {
		  
      }
    );
	
	$('.buttons li').hover(
      function () {
        $('.buttons').css('z-index','10');
        $('#nav').css('z-index','1');
      }, 
      function () {
        $('#nav').css('z-index','10');		
        $('.buttons').css('z-index','1');  
      }
    );
	
	$(".buttons li").click(function () { 
      $(this).parent().find('.active').removeAttr('class'); 
      $(this).addClass('active');
	  $(".tabs > li").hide();
    });	
	
	$("#b1").click(function () {
		$("#t1").animate( { "height": "toggle", "opacity": "toggle"}, 400);
    });
	$("#b2").click(function () {
		$("#t2").animate( { "height": "toggle", "opacity": "toggle"}, 400);
    });
	$("#b3").click(function () {
		$("#t3").animate( { "height": "toggle", "opacity": "toggle"}, 400);
    });
	$("#b4").click(function () {
		$("#t4").animate( { "height": "toggle", "opacity": "toggle"}, 400);
    });
	$("#b5").click(function () {
		$("#t5").animate( { "height": "toggle", "opacity": "toggle"}, 400);
    });

});