// JavaScript Document

// Original code from comments in http://www.codeproject.com/KB/scripting/ForceLinkTarget.aspx, slightly modified by Shane
// Purpose is to force links in iframes to open in _parent 
function ForceLinks()
{
// idea for conditional application (by page path) from http://developers.squarespace.com/design-coding/post/918232
checkpage=(window.location.pathname.toString());
if (checkpage=='/third-column-content-for-front') {
var linkcount= document.getElementsByTagName('a').length; // It will tell u how many no of tags your code have
var links=document.getElementsByTagName('a');// Putting tag in links variable to use it for array purpose
// alert(linkcount); commented out to avoid pointless alert boxes on page load
for(var i = 0; i < linkcount; ++i){
links[i].setAttribute('target','_parent');
}
}
if (checkpage=='/leaderboard-code') {
	var linkcount= document.getElementsByTagName('a').length; // It will tell u how many no of tags your code have
	var links=document.getElementsByTagName('a');// Putting tag in links variable to use it for array purpose
	// alert(linkcount); commented out to avoid pointless alert boxes on page load
	for(var i = 0; i < linkcount; ++i){
	links[i].setAttribute('target','leaderboard');
	}
	}
}
