var slideIndex = 0;

$(function(){
				Cufon.replace('.kabel,h1,h2,.topnav a,.secnav a,.flyoutnav .navtitle', {fontFamily:'Kabel Dm BT'});
				Cufon.replace('.goudyOld', {fontFamily:'Goudy Old Style'});
				$("#flyout-tab .flyout-trigger,#flyout-tab .flyout-content").hover(flyoutOver, flyoutOut);
				$(".weather").hover(weatherOver, weatherOut);
				$("#flyout-container").stop().animate({width:49}, {duration:"slow", easing:"swing"});
	});
			function flyoutOver()
			{
				$("#flyout-container").stop().animate({width:878}, "slow");
				$(".main").not(":has(.flyout-overlay)").append("<div class=\"flyout-overlay\"></div>");
				$(".flyout-overlay").css({opacity: 0, display: "block", height: $("body").height()}).stop().fadeTo("normal", 0.65);
			}
			function flyoutOut()
			{
				$("#flyout-container").stop().animate({width:49}, "slow");
				$(".flyout-overlay").stop().fadeTo("normal", 0, function(){$(".flyout-overlay").remove()});
			}
			function weatherOver()
			{
				if(!$.browser.msie)
					$(".weather-info").stop().show().css("opacity", 0).fadeTo("normal", 1);
				else
					$(".weather-info").show();
			}
			function weatherOut()
			{
				if(!$.browser.msie)
					$(".weather-info").stop().fadeTo("normal", 0, function(){$(this).hide()});
				else
					$(".weather-info").hide();
			} 

$(document).ready(function(){
	if (typeof openShadowbox != 'undefined') {
		$('a.shadowbox').click(function(){
			var $this = $(this);
			openShadowbox(
				$this.attr('title')
				,$this.attr('href')
				,636
				,400
			);
			return false;
		});
		Shadowbox.setup("a.listing-logo", { gallery:"Logos" });
	}

	// main nav hover
	$('.topnav li').hover(
		function(){ // in
			$(this).addClass('hover');
		}
		,function(){ // out
			$(this).removeClass('hover');
		}
	);
});


