<!--
/* <documentation about="ABOUT js/content.js" type="GENERAL">
	<summary>This file is specific javascript file for kittyappeal site.</summary>
	<namespace>KittyAppeal</namespace>
</documentation> */
KittyAppeal = {};



/* <documentation about="KittyAppeal.init" type="init function">
	<summary>This function containes all calls made to functions used within kittyappeal.
		It is initialized on page load (Lib.addEvent(window, "load", KittyAppeal.init);).
	</summary>
	<namespace>KittyAppeal</namespace>
</documentation> */
KittyAppeal.init = function() {
	try {
		Lib.debug = true;

		KittyAppeal.addTarget2ExternalLinks();
	}
	catch (ex){ Lib.errHandler(ex); }

}

/* <documentation about="KittyAppeal.addTarget2ExternalLinks" type="specific function">
	<summary>This function adds target=blank to all links with rel external</summary>
	<namespace>KittyAppeal</namespace>
</documentation> */
KittyAppeal.addTarget2ExternalLinks = function(){

	var pageContent = document.getElementById("page");
	var allContentLinks = pageContent.getElementsByTagName("a");
		for(var n=0; n<allContentLinks.length; n++){
			// get rel attribute
			var linkRels = allContentLinks[n].getAttribute("rel");
					if (linkRels == "external") {
						// set target to _blank
						allContentLinks[n].target = "_blank";
					}

		}
}

/* <documentation about="Lib.addStyleSheet('../static/css/js-enabled-styles.css')" type="FUNCTION CALL">
	<summary>Add javascript style sheet to hide folds outs</summary>
</documentation> */
//Lib.addStyleSheet("../static/css/js-enabled-styles.css");

/* <documentation about="KittyAppeal.init" type="FUNCTION CALL">
	<summary>Calling Lib.addEvent: Add KittyAppeal.init as eventhandler on window onload event</summary>
</documentation> */
Lib.addEvent(window, "load", KittyAppeal.init);
Lib.eventCache.add(window, "load", KittyAppeal.init, false);

-->
