$(document).ready(function() {
	/* $('img.bandmember').onHover
	if($('img.bandmember')){				   
	$('img.bandmember').Tooltip({
			track: true,
			top: 16,
			left: 10,
			delay: 200,
			/*bodyHandler: function() {
				var message = 'Web-enabled features are those downloadable special features brought to you by your HD DVD player\'s network connection&mdash;from ringtones to exclusive content to fully interactive experiences and more depending upon the title.';
				return message; 
			},
			showURL: false,
			fixPNG: true
		});
	}*/
	
});

function memberInfo(whom){
	theInfo = $("#"+whom).attr('title');
	theInfoSplit = theInfo.split(" - ");
	//
	//
	$("#memberInfo").html("<strong>"+theInfoSplit[0] + " </strong> - " + theInfoSplit[1]);
	$("#"+whom).blur();
}

/* open new centered window with scrolling ability */
/* USAGE: javascript:openPop('filename.html','windowname', width, height); */


function openWin(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;
        if (version.toLowerCase().indexOf("mac")!=-1) {
                    popW = eval("popW-18");
        }
	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=yes,toolbar=yes,status=yes,resizable=yes,top=' + topPos + ',left=' + leftPos);void(0);
}

/* open new centered window without scrolling ability */
/* USAGE: javascript:openPop('filename.html','windowname', width, height); */


function openPop(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=no,toolbar=no,status=yes,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
}

function setIdProperty(id,property,value) {
	var styleObject = document.getElementById( id );
	if (styleObject != null) {
		styleObject = styleObject.style;
		styleObject[ property ] = value;
	}
}


/* SPAM FIGHTER! */
function spamFighter(user,domain) {
	locationstring = "mailto:" + user + "@" + domain + "?subject=Hello Codaphonic";
	window.location = locationstring;
}


function checkEmail(addy) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(addy)){
		return (true)
	} else {
		return (false)
	}
}

function submitForm(){
	userAddress = document.getElementById('userEmail').value.toLowerCase();
	sMsg = null;
	//
	if (userAddress == "you@yours.com"){
		sMsg = "Please enter your email";
	} 
	if (!checkEmail(userAddress)){
		sMsg = "Please enter a valid email";
	}
	if (!sMsg){
		openPop('mlist.php?email='+userAddress,'mlist',500,320);
	} else {
		alert(sMsg);
	}
}

