$j=jQuery.noConflict();

// All magic numbers in page heights are to account for page borders.

jQuery(function(){


           if($j.browser.msie){
				$j(".ieMedia").media( { width: 850, height: 300, autoplay: true } );
				$j(".media").remove();
				$j(".aboutVideo").remove();
				$j(".aboutVideoIE").media({width: 790, height: 400, autoplay: true});
   }else{
				$j(".media").media( { width: 850, height: 300, autoplay: true } );
				$j(".ieMedia").remove();
				$j(".aboutVideo").media({width: 790, height: 400, autoplay: true});
				$j(".aboutVideoIE").remove();
   }


	//$j(".footer .inside").css("margin-left",($j(".footer").width() - $j(".footer .inside").width())/2);  
	$j("#menu-header-menu li").prepend("<div class = 'stripe'></div>")
	$j("#sidebar li:last").addClass("last");
	$j(".entry-content *:first").addClass("hideIfHeader");
	if ($j("h2.hideIfHeader").length != 0) {
		$j(".texttext > div > h2").remove();
	};
	$j(".footer .bottomArea:last").css("margin","0");
	$j(".footer .bottomArea:first").children("img").css("margin-left","10px");
	$j(".media").media({width: 848, height: 300, autoplay: true});

	$j(".rollover img:last").hide()
	$j(".rollover").hover(
		function(){
			$j(this).children("img:first").hide();
			$j(this).children("img:last").show();
		},
		function(){
			$j(this).children("img:first").show();
			$j(this).children("img:last").hide();
		}
	)

	$j(".bottomArea:last").addClass("last");

$j("#headerLinks li").hover(
				function(){
					$j(this).children(".stripe").animate({
						height: 25
					},75, 
					function(){
							$j(this).animate({
								top: 39
					},75, 
					function(){
							$j(this).animate({
								top: 39
					},175, 
					function(){
						$j(this).css("top","0px").css("height","10px");
					})
				})
			})
		}, function(){
			
		})
	});
