/*
$('img[@src$=.png]').livequery(function(){
	$(this).ifixpng();
});
*/

$(function(){
    $("ul.sf-menu").supersubs({
        minWidth:    5,   // minimum width of sub-menus in em units 
        maxWidth:    30,   // maximum width of sub-menus in em units 
        extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
    }).superfish({
    	speed:		 200,
    	disableHI:	 true,
		hoverClass:  'sfHover',
		pathClass: 	 'sfPath'
    });
});
function focus() {
	for (a=0;a<document.links.length;)
		document.links[a].onfocus=document.links[a++].blur;
}

function openPictureWindow(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
    newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop+",scrollbars=no");
    newWindow.document.open();
    newWindow.document.write('<html><head><title>'+alt+'</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="background: #fff; margin: 0; padding: 0;">');
    newWindow.document.write('<img src='+imageName+' width="'+imageWidth+'" height="'+imageHeight+'" border="0" onClick="window.close();">');
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
}

function openPictureWindow_FeverX(imageName,imageWidth,imageHeight,alt,posLeft,posTop,picOpen,target) {
    newWindow = window.open("",target,"width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop+",scrollbars=no");
    newWindow.document.open();
    newWindow.document.write('<html><head><title>'+alt+'</title><meta http-equiv="imagetoolbar" content="no"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="background: #fff; margin: 0; padding: 0;">');
    newWindow.document.write('<img src="http://{$WWW}/'+imageName+'" width="'+imageWidth+'" height="'+imageHeight+'" border="0" onMouseOver="style.cursor=\'pointer\';" onClick="opener.open(\''+picOpen+'\',\'_top\'\,\'\'); window.close();">');
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
}
