// Tab Navigation
$(function () {
    var tabContainers = $('div.tabs > div');
	var randomTab = Math.floor(Math.random()*5);
	
	$('div.tabs ul.tabNav a').click(function () {

		$thisDiv = this.hash;
        tabContainers.hide().filter($thisDiv).show();
        
        $('div.tabs ul.tabNav a').removeClass('active');
        $(this).addClass('active');

		$thisDiv = $thisDiv + ' .callout span';		

		// Check for IE6 and IE7 to add in CSS fix for hidden content
		if ( (!window.XMLHttpRequest) || (document.all && !window.opera && window.XMLHttpRequest) ) {

			if ( $($thisDiv).css('zoom') == (null || 0) ) {
				$($thisDiv).css('zoom','1');
			}
			else {
				$($thisDiv).css('zoom','0');
			}
		}
		
		if ($(this).parent().hasClass("last")){
			$('div.tabs ul.tabNav li.white').addClass('active');
		}
		else{
			$('div.tabs ul.tabNav li.white').removeClass('active');	
		}
		
        return false;
    }).filter(':eq('+randomTab+')').click();
	
});