// JavaScript Document

// Normal jQuery items
$(document).ready(function() {
	//test
	//$("#contentWrap h1").css({color:"red", backgroundImage:"url(img/bg-tab.gif)"});
	
	//See if path matches desired article
	myURL = window.location;
	//alert(myTest);
	if (myURL == 'http://barrybevis.directhomes.com/?CI=1'){
		//alert("Home");
		$("ul#nav li a.home").css({color:"#979700", backgroundPosition:"0 0"});
	} else if (myURL == 'http://barrybevis.directhomes.com/'){
		//alert("Home");
		$("ul#nav li a.home").css({color:"#979700", backgroundPosition:"0 0"});
	} else if (myURL == 'http://barrybevis.directhomes.com/content/listings.html?ag_id=2171658'){
		//alert("My Listings");
		$("ul#nav li a.listings").css({color:"#979700", backgroundPosition:"0 0"});
		$("#contentWrap").prepend("<h1>View My Listings</h1>");
	} else if (myURL == 'http://barrybevis.directhomes.com/content/homefinder.html'){
		//alert("MLS Search");
		$("ul#nav li a.search").css({color:"#979700", backgroundPosition:"0 0"});
		$("#contentWrap").prepend("<h1>MLS Search</h1>");
	} else if (myURL == 'http://barrybevis.directhomes.com/content/contact.html'){
		//alert("Contact");
		$("ul#nav li a.contact").css({color:"#979700", backgroundPosition:"0 0"});
		$("#contentWrap table table:first").css({display:"none"});
		$("#contentWrap").prepend("<h1>Contact</h1>");
	} else {
		//alert("Resources/Other");
		$("ul#nav li a.resources").css({color:"#979700", backgroundPosition:"0 0"});
		$("#contentWrap").prepend("<h1>Resources</h1>");
	}
	
	//fix My Home Tracker
	$("#myhtWrap table:first td").css({height: "29px"});
	$("#myhtWrap table:first td img").css({verticalAlign: "middle", padding: "3px"});
	$("#myhtWrap table:first td input").css({verticalAlign: "middle"});

	//turn off "print" and "email" buttons on articles
	$("a[@target='print_this']").css({display: "none"});
	$("a[@target='email_this']").css({display: "none"});
	
	//fix font tags in content well
	$("font").attr({ face: "", color: "", size: "", style: "" });
	
	//hide agent mug in content well
	$("table[@align='right']").css({display: "none"});
	$("b i").css({display: "none"});
	$("div[@align='justify']").css({textAlign: "left"});
	$("#mainBlockWrapTable center img").css({display: "none"});
	
	//fix float on footer logo
	$("#copyrightWrap a[target='_portal'] img").css({float: "left", marginRight: "6px"});
	$("#desBoxText br").css({display: "none"});
	
	//fix float on footer logo
	$("#myhtWrap td").css({verticalAlign: "middle"});
	
	//set slideshow innerfade
	//$("ul#portfolio").innerfade({ speed: 1000, timeout: 5000, type: 'sequence', containerheight: '325px' });
	
});