$(document).ready(function () {
    $('.chatWindow').bind("click", function(e){
		window.open(this.href,'popup','width=540,height=740');
		return false;
	    });
	$('.calendarLinks a').bind("click", function(e){
		window.open(this.href,'calendar','width=745,height=700,scrollbars=yes');
		return false;
	    });
	$('#trainingCalendarsSelect').change(function(e){
		window.open('/' + this.value,'calendar','width=745,height=700,scrollbars=yes');
		return false;
	    });
	if ($('#trainingCalendarSubmit:visible')) $('#trainingCalendarSubmit').css('display', 'none');
	if ($('#requestForm')) $("#requestForm").validate();
	if ($('div.flashBlock').length > 0) loadFlash();
});

function loadFlash() {
	var flashvars = {};
	var params = {};
	params.play = "true";
	params.menu = "true";
	params.scale = "noscale";
	params.salign = "tl";
	params.wmode = "transparent";
	params.allowfullscreen = "true";
	params.allowscriptaccess = "always";
	params.allownetworking = "all";
	var attributes = {};
	attributes.align = "left";
	swfobject.embedSWF("flash/slideshow.swf", "techSupport", "642", "224", "9.0.28", "expressInstall.swf", flashvars, params, attributes);
}