$(document).ready(function() {
	//bind mouseover/mouseout events to buttons
	$('IMG.register-now').mouseover(function() { this.src= "images/register_now_hover.png"; }).mouseout(function() { this.src= "images/register_now.png"; });

	$('IMG.register-nowh').mouseover(function() { this.src= "images/register_nowh_hover.png"; }).mouseout(function() { this.src= "images/register_nowh.png"; });
	
});

function popvideo(page) { 
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=380,height=320"); 
} 


function pop1(page) { 
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=320,height=280"); 
} 

function pop2(page) { 
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=400,height=20"); 
} 

var init_flash = function(movieName, container) {
	var swf = new SWFObject(movieName, "flash", 320, 280, "8", "#FFFFFF", "high");
	swf.setAttribute("wmode", "transparent");
	swf.addParam("allowScriptAccess", "sameDomain");
	swf.write(container);
}
// popup window functions
function openWindow(sURL, sName, lHeight, lWidth, bScrollBars, bResizable, sFeatures) {
	var sFeatures;
  	var availheight=screen.availHeight;
    var availwidth=screen.availWidth;
	features = sFeatures;
	features = 'height=' + lHeight + ',width=' + lWidth;
	features +=',toolbar=no,location=no,directories=no,menubar=no';
	features += ',top=' + Math.round((availheight - lHeight)/2);
	features += ',left=' + Math.round((availwidth - lWidth)/2);
	
	if(bScrollBars) {
		features += ',scrollbars=yes';
	}
	
	if(bResizable) {
		features += ',resizable=yes';
	}
	
    popup=window.open(sURL,sName,features);  
	popup.opener = self;
	onblur = popup.focus();   	
}

// Ajax Loading Icon Function
var show_ajax_loading = function() {
	if(Ajax.activeRequestCount > 0){
		if($('ajax_loader')) {
			$('ajax_loader').show();	
		}
	}
}

var hide_ajax_loading = function() {
	if(Ajax.activeRequestCount == 0){
		if($('ajax_loader')) {
			$('ajax_loader').hide();	
		}
	}
}

