$(document).ready(function(){
	
	/* Grab the div height of the tallest column and then set that value to all the columns */
  	  var highNumber = 0;
	  
	  $('#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop').each(function(){
	        var theHeight = $(this).outerHeight();
	        if(theHeight > highNumber) { 
		      highNumber = theHeight;
		    }
	  });
	
	  var maxHeight = highNumber + 30;
	  $('#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop').css('min-height',maxHeight);
      
	  /* Stupid IE6 Doesn't understand min-height, but using height is same thing */
      if (($.browser.msie) && (parseInt(jQuery.browser.version)==6)) {
	    $('#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop').css('height',maxHeight);
      }
	
	/* On hover of the column add proper class to menu item and the column itself */
   	$("#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop").hover(
	  function() {
	     $(this).addClass('divHover');
	     var liDom = $("#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop").index(this);
	     $('#mainMenu li').eq(liDom).addClass('hover');
	
	  },
	  function() {
		 $('#mainMenu li').removeClass('hover');
	     $(this).removeClass('divHover');
	  });
	
	
	  /* On hover of the menu item, add the hover class to the same div column */
	  $("#homeTab #mainMenu li").hover(
	  function() {
	     $(this).addClass('hover');
	     var liDom2 = $("#mainMenu li").index(this);
	     $('#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop').eq(liDom2).addClass('divHover');
	  },
	  function() {
		 $('#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop').removeClass('divHover');
	     $(this).removeClass('hover');
	  });
	
	
	  $("#mainMenu li a").hover(
	  function() {
	     $(this).addClass('hover');
	  },
	  function() {
	     $(this).removeClass('hover');
	  });
	
	  
	
	
	  /* On click of the columns, grab the href value from the proper menu item and go there */
	  $("#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop").click(
	  function() {
		var clickDom = $("#homeAbout,#homePaintings,#homeNews,#homeBlog,#homeShop").index(this);
	    var theLink = $('#mainMenu li').eq(clickDom).children().attr('href');
        window.location = theLink;
	  });
	
	  
	  
      
 });
