$(document).ready(function(){
    
    //$("#top1 a").fadeOut(200).fadeIn(100).fadeOut(200).fadeIn(100);//.fadeOut(200).fadeIn(100).fadeOut(150).fadeIn(200);
    //$("#top2 a").fadeOut(200).fadeIn(100).fadeOut(200).fadeIn(100);//.fadeOut(200).fadeIn(100).fadeOut(150).fadeIn(200);
    //$("#top3 a").fadeOut(200).fadeIn(100).fadeOut(200).fadeIn(100);//.fadeOut(200).fadeIn(100).fadeOut(150).fadeIn(200);
    
    $('#login_submit').hover(
        function(){ // Change the input image's source when we "roll on"
            $(this).attr({ src : '/media/images/login_over.gif'});
        },
        function(){ // Change the input image's source back to the default on "roll off"
            $(this).attr({ src : '/media/images/login_button.gif'});
        }
    );
    $('#topNav li a').hover(
    	function(){
    		$(this.parentNode).css("background", "url(/media/images/arrows_hover.png) right 3px no-repeat");//.fadeOut(200).fadeIn(100);
    		
        },
        function(){
            $(this.parentNode).css("background", "url(/media/images/arrows.png) right 3px no-repeat");
        }
    );
    $('a.boxLearnMore').hover(
        function(){
            $(this).css("background", "url(/media/images/arrows_hover.png) 98px 5px no-repeat");
        },
        function(){
            $(this).css("background", "url(/media/images/arrows.png) 98px 5px no-repeat");
        }
    );
    $('a.boxMedLearnMore').hover(
        function(){
            $(this).css("background", "url(/media/images/arrows_hover.png) 98px 5px no-repeat");
        },
        function(){
            $(this).css("background", "url(/media/images/arrows.png) 98px 5px no-repeat");
        }
    );
    $('a.boxSmallLearnMore').hover(
        function(){
            $(this).css("background", "url(/media/images/arrows_hover.png) 100px 5px no-repeat");
        },
        function(){
            $(this).css("background", "url(/media/images/arrows.png) 100px 5px no-repeat");
        }
    );
    $('#quoteButton').hover(
        function(){ 
            $(this).attr({ src : '/media/images/quote_button-on.png'});
        },
        function(){
            $(this).attr({ src : '/media/images/quote_button.png'});
        }
    );
    $('#login_user').focus(function(){
    	if($(this).val() == 'Email Address'){
    		$(this).attr("value", "");
		}
	});
	$('#login_user').blur(function(){
		if($(this).val() == ''){
    		$(this).attr("value", "Email Address");
		}
	});
	$('#login_pass').focus(function(){
    	if($(this).val() == 'Password'){
    		//$(this).attr("value", "");
			$(this).hide();
			$('#login_pass_value').show();
			$('#login_pass_value').focus();			
		}
	});
	$('#login_pass_value').blur(function(){
		if($(this).val() == ''){
    		$(this).hide();
    		$('#login_pass').show();
		}
	});
	$('#login_pass').blur(function(){
		if($(this).val() == ''){
    		$(this).attr("value", "Password");
		}
	});
    /** NAVIGATION **/
    $("#navigation ul li a.topLevelNav").hover(function() {
        //$(this).animate({"opacity": "0"}, "fast");
        //$(this).css({"background" : "url(/media/images/nav_border.gif) top right repeat-y", "background-color" : "#66b34d", "border-bottom" : "solid #357618;", "height" : '27px'});//.animate({"opacity": "1"}, "fast");
    } , function() { //On hover out...
        //$(this).css({"background" : "none", "background-color" : "none", "border-bottom" : "none", "height" : '27px'});
    });
});
