$(document).ready(function() {

// Open links in new window
$("a[rel='external']").click(function(){window.open(this.href); return false;});

// Focus text for searchbox
$("#searchstring").focus(function(){
	if ($(this).val() == $(this)[0].title){
		$(this).removeClass("TextActive");
		$(this).val("");
	}
});
$("#searchstring").blur(function(){
	if ($(this).val() == ""){
		$(this).addClass("TextActive");
		$(this).val($(this)[0].title);
	}
});
$(".Text").blur();        

// Navigation
$('#nav li').hover(
	function () {
		$('ul', this).fadeIn(500);
	}, 
	function () {
		$('ul', this).fadeOut(0);			
	}
);

// Activate Selectbox
$(function() {
	$('select').selectbox();
});

});//End document ready

// Hover #nav li for IE6
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
