addLoadEvent(blurLinks);
addLoadEvent(embedVideo);



function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}


/* remove all focus lines from links when clicked */
function blurLinks() {
	var links = document.getElementsByTagName('a');
	for (i=0;i<links.length;i++) {
		links[i].onfocus = function() {
			this.blur();
		}
	}
}



// image rollover function
function swapImg(strImg, strID) {
	$(strID).src = 'images/btn/' + strImg;
}


function embedVideo() {
	new flashembed("videoIntro", { 
		src: "assets/video/FlowPlayerLight.swf", width: 372, height: 278 }, {
			config: {
			autoPlay: false, 
			showStopButton: false, 
			showScrubber: true, 
			showVolumeSlider: false,
			showMuteVolumeButton: false, 
			showFullScreenButton: false, 
			showMenu: false, 
			controlsOverVideo: 'locked',
			controlBarBackgroundColor: -1,
			controlBarGloss: 'none',
			initialScale: 'scale',
			videoFile: 'Outlast_Bedding.flv',
			loop:false,
			splashImageFile: 'assets/images/misc/video_placeholder.jpg'
			} 
		}
	);
}

function mailMe(sDom, sUser){
  return("mail"+"to:"+sUser+"@"+sDom.replace(/%23/g,"."));
}