function goTo(page){
	window.location = page;
}
	//round corners for buttons and anything else.
	DD_roundies.addRule('.button a, .submit', 5, true);

$(document).ready(function(){
        //convert richtext popup images to fancybox images
        $(".leftContent a").each(function(){
            var href = $(this).attr("href");
           if(href != undefined){
                var index = href.indexOf("viewImage");
                if(index > -1){
                   href = href.replace("javascript:viewImage('", "");
                   href = href.replace("')","");
                   $(this).attr("href", href);
                   $(this).addClass("single_image"); 
                }
            }
        });
        $("a.single_image").fancybox();
        //end convert richtext popup images to fancybox images
        //first level hover
	    $('.aNavName').hover(
	        function()
	        {
		        $(this).children(".menus").stop().css({'display':'block', 'top':'65px'}).animate(
		        {
			        opacity: 1,
			        left: 0
			        //children hover
		        }, "fast").children().hover(
		            
		            function()
		            {
		                $(this).parent().css({'filter':'none'});
		                $(this).addClass('navItemHover');
		                $(this).children('.menuExtra').stop().css({'display':'block', 'top':'0px'}).animate({
			                opacity: 1,
			                left: 0
		                }, "fast");
		            },
		            //children hover out
                    function(){
                        $(this).removeClass('navItemHover');
                        $(this).children('.menuExtra').stop().animate({
	                        opacity: 1,
	                        left: 0
                        }, "fast").animate({
	                        top: -1000
                        }, 2);
                    }
                    //end children hover out
                );
                //end children hover
	        },
	        //first level hover out
	        function(){
		        $(this).children(".menus").stop().animate({
			        opacity: 0,
			        left: 0
		        }, "fast").animate({
			        top: -1000
		        }, 2);
	        }
	        //end first level hover out
	    );
	    //end first level hover	
	
		//NAVAGATION ADD 2 CORNERS	
		$('#navHolder .aNavName').hover(function(){
			$(this).find('.aNavName').css('color','#ccc09b')
		}, function(){
			$(this).find('.aNavName').css('color','#fff')
		});
	//Remove Img if it's empty
	$('.intContent .intMiddle .imgMiddle img').each(function(){
		var imgSrc = $(this).attr("src");
		if(imgSrc == "")
			$(this).parent().remove();
	});
		
	
	$('.intNavItem').hover(function(){
		$(this).addClass('subnav_hover')
	}, function(){
		$(this).removeClass('subnav_hover')
	});
	
	$("#current_weather").fancybox({
		'width'				: 575,
		'height'			: 600,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'scrolling'			: 'no'
	});	
	
	$('#features').jshowoff({ 
		controls: true,
		links: false,
		hoverPause: false,
		changeSpeed: 1200,
		speed: 5000
	}); 
	
	$('#leftNav ul li.Selectedtrue a').before('<img src="/images/longArrow.png" />');
	
	$('#features').after('<div class="sliderNavLine"></div>');
	
	//MAIN NAVAGATION DROP DOWN
	$('.navItemArrow').each(function(){
		var itemWidth = $(this).width();
		var holderLeft = (itemWidth / 2) - 26;
		$('.mainDDholder', this).stop().css({'top': '0', 'display':'block', 'opacity': 0, 'left':holderLeft + "px"});
	});
	
	//Remove Img if it's empty
	$('.imgBorder img').each(function(){
		var imgSrc = $(this).attr("src");
		if(imgSrc == "")
			$(this).remove();
	});	
	
		//NewsScroller
    
    //sitemap popup
    $("#siteMapPop").fancybox({
		'width'				: 950,
		'height'			: 400,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

    $("#PrivacyPolicy").fancybox({
		'width'				: 575,
		'height'			: 600,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	$('#newsy').innerfade({
				animationtype: 'fade',
				speed: 1250,
				timeout: 7000,
				type: 'random',
				containerheight: '1em'
	});

});
