/****************************************
GLOBAL.JS
- This file is used to store functions that are called on everypage
****************************************/


/****************************************
$().ready()
- this function is triggered when all page elements have been loaded
and are ready to be manipulated. just like onload="init()"
****************************************/
$().ready(function(){
				   
	$("#txtEmail").focus(function() {
	   if (this.value == "enter your email here"){
		 this.value = "";		 
	   }
	 });
	$("#txtEmail").blur(function() {
	   if (this.value == ""){
		 this.value = "enter your email here";
	   }
	 }); 
	
	$("#txtConfirmEmail").focus(function() {
	   if (this.value == "confirm your email here"){
		 this.value = "";		 
	   }
	 });
	$("#txtConfirmEmail").blur(function() {
	   if (this.value == ""){
		 this.value = "confirm your email here";
	   }
	 }); 
	
	
	//Rollovers
	$('img.rollover').hover(function() { 
		//over 
		var newImage = $(this).attr('src').replace('-off', '-on');
		$(this).attr('src', newImage); 
	},function() { 
		//out 
		var newImage = $(this).attr('src').replace('-on', '-off'); 
		$(this).attr('src', newImage); 
	});
	
	//Launch Demo
	$("#lnkDemo").click(function(){
		launch(this.href);	
		$(this).attr({target: "newWindow"});		
		return false;
	});
	
});


function launch(page) {
	//IE Fix:
	NewWindow=window.open(page,'newWin','width=714,height=542,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');
	NewWindow.focus();
	void(0);
	//Openwin = this.open(page,"Tag Demo","toolbar=no,menubar=no,scrollbars=no,locationbar=no,width=714,height=542,top=250,left=250");
}

function shutDown(){
	alert("close");
	window.close();
	self.close();
}

function shutDown(win){
	alert("close"+win);
	window.close();
	this.close();
	self.close();
}
