function initPng()
{
	var images = document.getElementsByTagName("img");
	if (images){
		for (var i = 0; i < images.length; i++){
			if ((images[i].src.indexOf(".png")) != -1){
				var srcname = images[i].src.replace(new RegExp('(.*)\/(.*)?\.png'),"$1/$2");
				images[i].parentNode.style.display = "inline-block"
				images[i].style.visibility = "hidden";
				images[i].parentNode.style.filter = "progid:dximagetransform.microsoft.alphaimageloader(src='"+ srcname +".png',sizingmethod='crop');"
			}
		}
	}
}

if (window.attachEvent && !window.opera){
	window.attachEvent("onload",initPng);
}

$(document).ready(function(){	
	$("#slider").easySlider({
		auto: true,
		continuous: true,
		pause: 8500,
		speed: 1200
	});
	
	//AutoPopulate by Andy Stratton
	$(".populate").each( function(){
		if ( $(this).val() == "" ) {
			$(this).val( $(this).attr("title") );
		}
	});
	$(".populate").focus(function(){
		if ( $(this).val() == $(this).attr("title") ) {
			$(this).val("");
		}
	});
	$(".populate").blur(function(){
		if ( $(this).val() == "" ) {
			$(this).val( $(this).attr("title") );
		}
	});
	
	//New tab popup
	$("a.popup_external").attr("target", "_blank");

	
});
