/* basic page setups stuff
   requires jquery and jquery-corner be loaded first
*/

$j = jQuery.noConflict();

$j(document).ready(function () {
    //make the header navigation look like tabs
    $j("#headernav a").css({padding: "4px 4px 4px 4px", backgroundColor: "#232323", color: "#fff8cd", height: "1%", 
	        fontWeight: "normal"}).each(function() {
	    $j(this).corner("bottom");
		//remove margin from parent
		$j(this).parent().css("margin", 0);
		//set a rollover effect (swap background and foreground colors)
		$j(this).hover(function () {
		    $j(this).css({backgroundColor: "#fff8cd", color: "#232323"});
		}, function () {
		    $j(this).css({color: "#fff8cd", backgroundColor: "#232323"});
		});
	});
	
	//round the content area
	$j("#content").corner("10px");
	$j("#menu").corner("10px");
	
	//set target _blank for all links with rel=external
	$j("a[rel=external]").attr("target", "_blank");

       //all links on the distractions page should open in new windows, regardless of rel setting
       $j("body#distractions #content li a").attr("target", "_blank");
});
