$( function(){
	/**
		IE6 must die.
	*/
	try{document.execCommand("BackgroundImageCache", false, true);}catch(e){}
	//jQuery(document).pngFix();

	/**
		Add rounded corners
	*/
	$('#sidebar').cornerz( { background:'#FFFFFF', radius:10 } );
	$('#contact-form-errors').cornerz( { background:'#FFFFFF', radius:6 } );
	
	
	/*
	$('#content-frame').cornerz( { corners:'tl tr', background:'#11313e', radius:10 } );
	$('#content-frame').cornerz( { corners:'bl br', background:'#6da1b7' } );
	*/

	/**
		Dynamically handle external links. This could be changed to open customized popup window/layer/frame.
		For now, just use target _blank.
	*/
	$('a[rel="external"]').each( function(){
		this.target = '_blank';
	});

	$("#menu ul ul li:has(ul)>a>span").addClass('arrow');
	
	/**
		Fix menu in IE6
	*/
	if( $.browser.msie && parseInt( jQuery.browser.version ) < 7 ){

		$("#menu li:has(ul)").hover( 
			function(){
				$("ul:first", this).show();
			},  
			function(){
				$("ul", this).hide();
			}
		);
	}

	
} );

