$(document).ready(function() {
	/*remove image link active state border bug*/
	$("a").click(function() { $(this).blur(); });
	
	 $("#btn-evaluation,#btn-evaluation2").hover(
    function (){
         $(this).css({'background-color':'#464646'}); //mouseover
    },
    function(){
         $(this).css({'background-color':'#636363'}); // mouseout
    }
);
	  
	/*contact.php : open and close home owners evaluation form
	$("#btn-evaluation").click(function() {
		$("#eval-container").show();
	});
	$("#eval-close, #eval-close-btn input[type='button']").click(function() {
		$("#eval-container").hide();
	});
	*/
	/*tips.php : tab click handlers*/
	$("#tips-main-nav li").click(function() {
		$("#tips-main-nav li").removeClass("active");
		$(this).addClass("active");
	});
     /*header.php : image rollovers */
	$("#social  img").fadeTo(1, 0.6);
	
	$("#social img").hover(function(){
	$(this).fadeTo(1, 1.0); // This sets the opacity to 100% on hover
	},function(){
	$(this).fadeTo(1, 0.6); // This sets the opacity back to 60% on mouseout
	});
	
	     /*insurance.php : image rollovers */
	$(".company img").hover(function(){
	$(this).fadeTo(1, .6); // This sets the opacity to 100% on hover
	},function(){
	$(this).fadeTo(1, 1); // This sets the opacity back to 60% on mouseout
	});
	
	     /*footer.php : image rollovers */
$("#footer-nav a").hover(function(){
	$(this).fadeTo(1, .4); // This sets the opacity to 100% on hover
	},function(){
	$(this).fadeTo(1, 1); // This sets the opacity back to 60% on mouseout
	});
	
	//display the cycler once the page is done loading.
$("#cycler").show();
//$(window).height() // returns height of browser viewport
//$(document).height(); // returns height of HTML document

	/*append appropriate page description heading to the title tag
	if($("#description h1").length > 0) {
	$("title").append(" - " + $("#description h1").html());
	}
	******/
		/* estimate form fixes for IE7 
	$("#estimate label[for=name], #estimate label[for=address], #estimate label[for=home-phone], #estimate label[for=root-type], #estimate label[for=insurance-provider]").addClass("estimate1");
	$("#estimate label[for=city], #estimate label[for=zip]").addClass("estimate2")
	$("#estimate label[for=work-phone], #estimate label[for=cell-phone]").addClass("estimate3");
	$("#estimate label[for=stories]").addClass("estimate4");
	$("#estimate label[for=contact-method]").addClass("estimate5");
	$("#estimate label[for=exposure-method]").addClass("estimate6");
	
	/*contact form fixes for IE7*/
	$("#contact label[for=name], #contact label[for=email], #contact label[for=subject],#contact label[for=phone], #contact label[for=message]").addClass("contact1");
	$("#contact label[for=message]").addClass("contact2");
});

