$(document).ready(function(){
	$(window).resize(windowresized);
	windowresized();
	_addGA();
});

function _addGA(){
	$("a").each(function(){
		$(this).click(function(){
			if ($(this).attr("href").indexOf("www.phgsecure.com") > -1){
				_gaq.push(['_link',$(this).attr("href")]);
				return false;
			}			   
		});			 
	})
}

function showOpt(_d1, _d2){
	document.getElementById(_d1).style.display='none';
	document.getElementById(_d2).style.display='block';	
}

function windowresized(){

	var x = $(window).width();
		if( x < 1072){
			x = 1072;
			$("#header_wrap").width(x);
			$("#body_wrap").width(x);
		}else{
			$("#header_wrap").width("100%");
			$("#body_wrap").width(x);
		}
	
}

function showVideo(_url, _title){
	var _srt = "<object width=\"400\" height=\"300\">"+
	"<param name=\"movie\" value=\""+_url+"\"></param>"+
	"<embed src=\""+_url+"\" type=\"application/x-shockwave-flash\" width=\"400\" height=\"300\"></embed>"+
	"</object>"+
	"<div id=\"media\" class=\"vid-head\">"+_title+"</div>"+
	"<div class=\"page_div\"> </div>";
	document.getElementById("show-video-id").innerHTML 		= _srt;
	document.getElementById("show-video-id").style.display 	= "block";
}
