var l = location;
if (l.port != '') location.replace(l.protocol + "//" + l.hostname + l.pathname + l.search + l.hash);

$(document).ready(function () {

	// navigation transparency
	var opacity = 0.85;
	var ua = $.browser;
	if (!(ua.msie && parseInt(ua.version) == 8.0)) //not ie8
		$('header nav').css({ opacity: opacity });
	if (ua.msie && parseInt(ua.version) < 9) {
		$('header nav li ul').css({ opacity: opacity });
	}

	// text limiting
	$('textarea[rel]').limitMaxlength({
		onEdit: function (remaining) {
			$(this).siblings('.chars-remaining').text("Characters remaining: " + remaining);
		}
	});

	// links in new window
	$('a[rel=blank]').click(function (el) {
		window.open(this.href, '_blank'); 
		return false;
	});
});

