// JavaScript Document
if (typeof wthvideo == 'undefined') {
	wthvideo = new Object();
}

wthvideo.params = {
	width:210,
	height:350,
	volume:1,
	left:"auto",
	right:"0px",
	top:"auto",
	bottom:"0px",
	centeroffset:"auto",
	flv:"/flash/TheBraceShop_Tk14"};
	
wthvideo.hideDiv = function(){
	document.getElementById('wthvideo').style.visibility = 'hidden';	
}

wthvideo.showDiv = function(){
	document.getElementById('wthvideo').style.visibility = 'visible';	
}

function onlyOnce() {
	if (document.cookie.indexOf("hasSeen=true") == -1) {
		var later = new Date();
		later.setFullYear(later.getFullYear()+10);
		document.cookie = 'hasSeen=true;path=/;';
		wthvideo.drawVideo();
	}
}

function playTheVideo() {
	wthvideo.drawVideo();
}

function hideDiv() {
	wthvideo.hideDiv();
}

function showDiv() {
	wthvideo.showDiv();
}

wthvideo.drawVideo= function(){
	$('#wthvideo').css('display', 'block');
	var markUp = '';
	markUp += '<style type="text/css">';
	markUp += '#wthvideo {position:fixed;width:'+wthvideo.params.width+'px;height:'+wthvideo.params.height+'px;margin-left:'+wthvideo.params.centeroffset+';left:'+wthvideo.params.left+';right:'+wthvideo.params.right+';top:'+wthvideo.params.top+';bottom:'+wthvideo.params.bottom+';z-index:999;}';
	markUp += '</style>';
	markUp += '<!--[if lte IE 6]>';
	markUp += '<style type="text/css">';
	markUp += 'html, body{height: 100%;overflow: auto;}#wthvideo {position: absolute;}';
	markUp += '</style>';
	markUp += '<![endif]-->';
	//markUp += '<div id="wthvideo">';
	markUp += '  <object id="objvideo" style="outline:none;" type="application/x-shockwave-flash" width="'+wthvideo.params.width+'" height="'+wthvideo.params.height+'" data="/javascript/wthplayer.swf">';
	markUp += '    <param name="movie" value="/javascript/wthplayer.swf" />';
	markUp += '    <param name="quality" value="high" />';
	markUp += '    <param name="flashvars" value="vurl='+wthvideo.params.flv+'.flv&amp;vwidth='+wthvideo.params.width+'&amp;vheight='+wthvideo.params.height+'&amp;vvolume='+wthvideo.params.volume+'" />';
	markUp += '    <param name="wmode" value="transparent" />';
	markUp += '    <param name="allowscriptaccess" value="always" />';
	markUp += '    <param name="swfversion" value="9.0.45.0" />';
	markUp += '  </object>';
	//markUp += '</div>';
	//document.write(markUp);
	document.getElementById('wthvideo').style.visibility = 'visible';
	document.getElementById('wthvideo').innerHTML = markUp;
}
//wthvideo.drawVideo();

//onlyOnce();
//playTheVideo();