$(function () {
	if(!($.browser.msie && $.browser.version == 6)) {
		$("#nav li").each(function(){
			$(this).css('width',$(this).width());						   
		});
	}
    $("#nav li").hover(
	function(){
		$(this).addClass("hover");
		if($('ul:first',this).length) {
			$('ul:first',this).css('display', 'block');
		}
    }, 
	function(){
		$(this).removeClass("hover");
		if($('ul:first',this).length) {
			$('ul:first',this).css('display', 'none');
		}
    });


});

function PNG(element){
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){
	var src;
	if (element.tagName=='IMG'){
			if (/\.png$/.test(element.src)){
				src = element.src;
				element.src = "img/t.gif";
			}
		}
		else {
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i)
			if(src){
				src = src[1];
				element.runtimeStyle.backgroundImage="none";
			}
		}
	if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
	}
}
