﻿// JavaScript Document

$(document).ready(function() {
	$("#topMenu ul li:last-child").css("margin-right", "0").css("border-right", "0");
	$("#footerLegal ul li:last-child").css("margin-right", "0").css("border-right", "0");
	
	$("#topMenu ul li ul li").hover(
	  function () {
		  //alert("here");
		$(this).parent().parent().children("a").addClass("hover");
	  }, 
	  function () {
		$(this).parent().parent().children("a").removeClass("hover");
	  }
	);
	
	//#TabLinks .on
	//.TabContent
	
	$("#TabLinks li a").click(function() {
	  	
		//Clear the on states for all tabs
		$('#TabLinks li a').removeClass('on')
		
		//Set the visible state of the tab to be correct.
		$(this).addClass('on')
		
		//determine which number was clicked
		var tabIndex = $("#TabLinks li a").index(this);
		
		//Set all tab content to be hidden
		$(".tab").css("display","none");
		//alert("That was index" + tabIndex);

		//Set the correct Tab Content to be visible
		$(".TabContent div").eq(tabIndex).css("display","block");
	});
	
});
