function supports_input_placeholder() {
  var i = document.createElement('input');
  return 'placeholder' in i;
}

jQuery( function(){
	var $ = jQuery;
	if( ! supports_input_placeholder() ){
		$('input[placeholder]').each( function(){
			var input = $(this);
			this.defaultValue = this.value = input.attr('placeholder');
			input.focus( function(){
				if( this.value == this.defaultValue ){
					this.value = '';
				}
			} ).blur( function(){
				if( this.value == '' ){
					this.value = this.defaultValue;
				}
			} );
		} );
	}

	// Make external links open in new window.  Using target _blank for now... 
	$('a[rel="external"]').each( function(){
		this.target = '_blank';
	});

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

		// Try to fix yet another IE6 problem...
		try{document.execCommand("BackgroundImageCache", false, true);}catch(e){}

/*		$("#menu ul>li").hover(
			function(){
				$(this).addClass('hover');
			},  
			function(){
				$(this).removeClass('hover');
			}
		);*/
		
		$("#menu li:has(ul)").hover(
			function(){
				$(this).addClass('hover');
				$("ul:first", this).show();
			},  
			function(){
				$(this).removeClass('hover');
				$("ul:first", this).hide();
			}
		);

	}

} );



