var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;


function picturedialog(url, caption)
{
	var img = document.getElementById('zoomed_in');
	img.src = '';
	img.src = '/media/img/ajax-loader.gif';
	img.src = url;

	if(IE6)
	{
		window.open(url,'picture_window', 'left=20,top=20,width=550,height=550,toolbar=0,resizable=1,scrollbars=0');
		picture_window.focus();
	}
	else
	{
		var message_html = '<a onclick="$.unblockUI();" href="javascript:void(0);"><img id="zoomed_in" alt="'+ caption +'" title="'+ caption +'" src="'+ url +'" /></a>'
		$.blockUI({ message: message_html });
	}
}

function youtubedialog(url, caption)
{
	//var img = document.getElementById('zoomed_in');
	//img.src = '';
	//img.src = '/media/img/ajax-loader.gif';
	//img.src = url;
	
	if(IE6)
	{
		window.open(url,'video_window', 'left=20,top=20,width=550,height=550,toolbar=0,resizable=1,scrollbars=0');
		picture_window.focus();
	}
	else
	{
		//'<img id="zoomed_in" alt="'+ caption +'" title="'+ caption +'" src="'+ url +'" /></a>'
		var message_html = '<div style="text-align: right; padding: 3px; background: #000; width: 494px;"><a href="javascript: $.unblockUI();">Close</a></div>'
		message_html += '<a onclick="$.unblockUI();" href="javascript:void(0);"><object width="500" height="405"><param name="movie" value="'+ url +'&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+ url +'&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object></a>'
		$.blockUI({ message: message_html });
	}
}



$last_active = null;

$(document).ready(function(){
	$('#header-navigation li').mouseover(function(){
		$last_active = $('#header-navigation li.active');
		$last_active.removeClass('active');
		$(this).addClass('hover');
	});
	
	$('#header-navigation li').mouseout(function(){
		$(this).removeClass('hover');
		$last_active.addClass('active');
	});
	
	$('.bootcamp-images').cycle({
			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
	$('.bootcamp-images a').lightBox({fixedNavigation:true});
	
});
