function winOpen(url, name, op) {
	window.open(url, name, op);
	return false;
}

$(function () {

//IE background png
$(".bgPng").fixPng();

//IE png animation
if(navigator.userAgent.indexOf("MSIE") != -1) {
	$('img').each(function() {
		if($(this).attr('src').indexOf('.png') != -1) {
			$(this).css({
				'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' +
				$(this).attr('src') +
				'", sizingMethod="scale");'
			});
		}
	});
}

//
$('img.rollover').each(function() {
	var $this = $(this);
	$this.hover(function() {
		$this.attr("src",$this.attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
	}, function() {
		$this.attr("src",$this.attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	});
	$(window).unload(function() {
		$this.attr("src",$this.attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	});
});

//alpha animation
var onAlpha = 0.6;
var onDuration = 200;
var outDuration = 400;

$("a.jsover").each(function() {
	$(this).mouseover(function() {
		$(this).find('img').stop(true, false).animate({opacity: onAlpha}, onDuration);
	}).mouseout(function() {
		$(this).find('img').stop(true, false).animate({opacity: 1}, outDuration);
	}).mouseup(function() { $(this).mouseout(); });
});

});

