// JavaScript Document


Cufon.replace('#top_nav', { fontFamily: 'Myriad Pro Bold', color: '-linear-gradient(#FFF, #AAA)', hover: { color: '-linear-gradient(#F28B26, #923F08)' } });
Cufon.replace('#top_phones', { fontFamily: 'Myriad Pro Bold' });
Cufon.replace('#social', { fontFamily: 'Bebas Neue', color: '-linear-gradient(#F28B26, #923F08)' });
Cufon.replace('#nav', { fontFamily: 'Bebas Neue', color: '-linear-gradient(#FFF, #AAA)', hover: { color: '-linear-gradient(#F28B26, #923F08)' } });
Cufon.replace('.three_col h2', { fontFamily: 'Myriad Pro Bold', textShadow: '1px 1px #F5883F' });

// backend
Cufon.replace('.button_155x40, .button_300x40, .event_col h2', { fontFamily: 'Myriad Pro Bold', textShadow: '1px 1px #F5883F' });


$(document).ready(function()
{
	
	// fix padding of 1st tier last sub nav item
	$('#nav li ul li:last-child').addClass('last_sub_nav_item');
	
	// position 2nd tier sub nav relative to width of 1st sub nav
	var w = $('#nav li ul').css('width');
	$('#nav li ul li ul').css({ 'left':w });
	
	// add sub nav arrow to elements with 2nd tier sub nav
	$('#nav li ul li:has(ul) > a').append('<img src="images/sub-nav-arrow.png" />');
	
	// set drop downs
	$('#nav li').hover(
		function () {
            $('>ul', this).fadeIn(100);
 
        },
        function () {
            $('>ul', this).fadeOut(100);        
        }
	);
	
	
	$('.newWindowPop').click(function(event)
	{
		var url = $(this).attr("href");
		var windowName = "popUp";
		window.open(url, windowName, "width=600,height=350,scrollbars=no,toolbars=no,menubar=no,location=no");
		event.preventDefault();
    });
	
});

function addBookmark() {
	if (window.sidebar) { // firefox
		window.sidebar.addPanel(document.title, location.href,"");
	} else if( document.all ) { //MSIE
		window.external.AddFavorite( location.href, document.title);
	} else {
		alert("Please use the bookmark feature of your browser to save the location of this page. (Ctrl/Cmd + D)");
	}
}


