$(document).ready(function(){
	// XHTML 1.0 Strict work around for external links
	$('a[rel*="external"]').attr("target","_blank");
	
	// Fix stupid IE :active bug
	if($.browser.msie){
		$('a').mouseup(function(){this.blur();});
	}


	// Image roll-over setup
	$('img.rollOver, input[type="image"].rollOver').mouseover(function(){
		if (this.src.indexOf("_i.") != -1) this.src = this.src.replace("_i.", "_o.");
	}).mouseout(function(){
		if (this.src.indexOf("_o.") != -1) this.src = this.src.replace("_o.", "_i.");
		if (this.src.indexOf("_a.") != -1) this.src = this.src.replace("_a.","_i.");
	}).not('img.rollOver').mousedown(function(){
		if (this.src.indexOf("_o.") != -1) this.src = this.src.replace("_o.","_a.");
		if (this.src.indexOf("_i.") != -1) this.src = this.src.replace("_i.","_a.");
	}).mouseup(function(){
		this.src = this.src.replace("_a.","_i.");
	}).focus(function(){
		this.blur();
	});
	
	$('input.clearField').focus(function(){
		if(this.value == this.defaultValue) this.value = "";
	}).blur(function(){
		if(this.value == "") this.value = this.defaultValue;
	});
	
	if(window.location.toString().indexOf("#thanks") != -1) {
		$('#thanks_subscribe').slideDown("fast");
	}
	
	if($('a.commentsLink')){
		$('a.commentsLink').attr({rel:'nofollow'});
	}
});