/*
 * Base JavaScript Files to handle common tasks
 */

/* prepend article tools to contentWell */
$(document).ready(function() {
	$('#contentWell .articleTools ul').append('<li class="clickabilityEmail"><a href="#" onclick="return(ET());" onMouseOver="return(ETMouseOver());" onMouseOut="return(ETMouseOut());">Email</a></li><li class="reprint"><a href="http://www.icopyright.com/' + icopy + '?icx_id=' + siteURL + '">Reprint</a></li><li class="clickabilitySave"><a href="#" onclick="return(ST());" onMouseOver="return(STMouseOver());" onMouseOut="return(STMouseOut());">Save</a></li><li class="clickabilityPrint"><a href="#" onclick="return(PT());" onMouseOver="return(PTMouseOver());" onMouseOut="return(PTMouseOut());">Print</a></li><li class="comment"><a href="#comments">Comment</a></li>'); 
});

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

/* delete this line to add popup ability */
// add _blank to any link with class="popup" 
$(document).ready(function() { 
	$('a.popup').click(function() {
		this.target = "_blank";
	});
});


/* delete this line to add IE6 dropdown nav solution */
// fix IE6's inability to have :hover on anything other than an anchor tag
$(document).ready(function() {  
	$("#topNav li").bind("mouseenter", function(){ 
  		$(this).addClass("over"); 
    }); 
	$("#topNav li").bind("mouseleave", function(){ 
	    $(this).removeClass("over"); 
	});
}); 

