$(document).ready(function() {

	// Add the separator between the list element on the navigation link box
	$("#navigation ul li").each(function() {
		$(this).after("<li>|</li>");
	});
	$("#navigation ul li:last").remove();

	// Add the separator between the list element on the pages link box
	$("#masterhead #page-links ul li").each(function() {
		$(this).after("<li>|</li>");
	});
	$("#masterhead #page-links ul li:last").remove();	
});

// Frame killer
if (top.frames.length!=0) {
	top.location=self.document.location;
}

// Popup helper function
function popup(url, width, height) {
	window.open(url,'','directories=no,height='+height+',width='+width+',menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}

function bookmark(title, url){
	// Firefox
	if (window.sidebar) {
		window.sidebar.addPanel(title, url, "");		
	}
	
	// Opera
	else if (window.opera && window.print) {
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	}

	// IE
	else if (document.all) {
		window.external.AddFavorite(url, title);
	}
}
