var blank = new Image();
blank.src = 'http://www.studiobanks.biz/main/_public/img/slug.gif';

function fixPng(png) {
	var src = png.src;
	if (!png.style.width) { png.style.width = $(png).width(); }
	if (!png.style.height) { png.style.height = $(png).height(); }
	png.onload = function() { };
	png.src = blank.src;
	png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
}

$(document).ready(function() {
	// fix ie6
	var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
	if (badBrowser) {
		// png fix
		$('img[src$=.png]').each(function() {
			if (!this.complete) {
				this.onload = function() { fixPng(this) };
			} else {
				fixPng(this);
			}
		});
		// cache bg images
		try {
			document.execCommand("BackgroundImageCache", false, true);
		  } catch(err) {}
	}
	// bgea dropdown
	/*
	$('#bgea_sites').hover(
		function() {
			$(this).addClass('on');
		},
		function() {
			$(this).removeClass('on');
		}
	);*/
});
