
$(document).ready(function(){
						   
	var $mainNav2 = $("#example-two");
   
   	$mainNav2.append("<li id='magic-line-two'></li>");
    
    var $magicLineTwo = $("#magic-line-two");
	var $currentItem = $(".current_page_item");
	
	if ($currentItem.hasClass('homelink')){
		
		$magicLineTwo.css('background-color', '#3c3c3c');
		
		$magicLineTwo
        .width($(".current_page_item").width())
        .height($mainNav2.height())
        .css("left", $(".current_page_item").position().left)
        .data("origLeft", $(".current_page_item").position().left)
        .data("origWidth", $magicLineTwo.width())
		.data("origColor", "#3c3c3c");
	
	}
	else {
		
		$magicLineTwo.css('background-color', '#9e1b34');
		
		$magicLineTwo
        .width($(".current_page_item").width())
        .height($mainNav2.height())
        .css("left", $(".current_page_item").position().left)
        .data("origLeft", $(".current_page_item").position().left)
        .data("origWidth", $magicLineTwo.width())
		.data("origColor", "#9e1b34");
	
	}
	

	$("#example-two li").find("a").hover(function() {
        $el = $(this);
        leftPos = $el.parent().position().left;
        newWidth = $el.parent().width();
        $magicLineTwo.stop().animate({
            left: leftPos,
            width: newWidth,
			backgroundColor: "#3d3d3d"
			//backgroundColor: $magicLineTwo.data("origColor")
            //backgroundColor: $el.attr("rel")
        })
    }, function() {
        $magicLineTwo.stop().animate({
            left: $magicLineTwo.data("origLeft"),
            width: $magicLineTwo.data("origWidth"),
			backgroundColor: $magicLineTwo.data("origColor")
			
        });    
    });
	

	// logo hover fades 
	jQuery("#logo span, .awards span, .photos span").css("opacity","0");
		jQuery("#logo span, .awards span, .photos span").hover(
			function () {
			jQuery(this).stop().animate({
			opacity: 1
			}, "slow");
		}, 
		function () {
			jQuery(this).stop().animate({
			opacity: 0
			}, "slow");
		}
	);

});


