/**
+	isIE()
+
+	@requires
+		none
+
+	@arguments
+		none
*/
function isIE() {
	if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1) { return true; }
	else { return false; }
}

/**
+	toggle()
+
+	@requires
+		isIE()
+
+	@arguments
+		id - the id of the DOM object you wish to toggle
*/
function toggle(id, state) {
	var e = document.getElementById(id);
	var d = "block";
	if (!isIE()) {
		if (e.insertRow) { d = "table"; }
		else if (e.insertCell) { d = "table-row"; }
	}
  if ( state == "on" ){ e.style.display = d; }
  if ( state == "off"){ e.style.display = "none";}
	return;
}


jQuery(document).ready(function() {
	$("a.youtube-link").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'		: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'false'
			}
		});

	return false;
});

});


