// JavaScript Document

function links_widget(root) {
	this.root = root;
}

links_widget.prototype.containerHTML = function () {
	var html = "<div style='position: relative; top: -40px;'>"
		html += this.nav_content();
		html += "<div id='" + this.root + "' style='padding-left: 12px; color: #000; padding-bottom: 26px;'></div>";	
		html += "</div>";
	return html;	
}

links_widget.prototype.nav_content = function() {
	
	var nav_bar = "<div style='position: relative; width: 100%; background-color: #000;"
		+ " -moz-opacity:.65; height: 40px; padding: 3px'>";
		nav_bar += "<div style='position: absolute; left: 4%; top: 16px;'><a id='links_link' class='active' onClick='links_controller()'>Online Articles</a></div>";
		nav_bar += "</div>";
	return nav_bar;
}

links_widget.prototype.load_html = function() {
	$('content_frame').innerHTML = this.containerHTML();
	$(this.root).innerHTML = this.links_text();
}

links_widget.prototype.show_links = function() {
	$(this.root).innerHTML = this.links_text();
}

links_widget.prototype.links_text = function () {

		var text_content = "";
		text_content += "<div>"
		
			+ "<h3>Behind Bars</h3>"
			+ "\'\'As sun salutes and standing poses challenge them physically, the only sound is slow sychronized breathing, propelling each pose into the next.\'\'"
			+ "by <b>Jenny P. Andrews</b><br />"
			+ "Download the <a href=\"downloads/behind_bars.pdf\">Full Article</a><br /><br />"
				
			+ "<h3><b>New director of state prisons believes in rehabilitating, not recycling, inmates</b></h3>"
			+ "\'\'Twenty or so inmates, many covered in tattoos, gather to do sun salutations and other common yoga moves. The class is taught by James Fox... who believes yoga can play a part in lessening the rage and addiction that has dominated many inmates' lives.\'\'<br /> by <b>Mark Martin, Chronicle Sacremento Bureau</b><br />"
			+ "Read More at <a href=\"javascript:load_()\" onClick=\"window.open('http://www.sfgate.com/cgi-bin/article.cgi?file=/chronicle/archive/2004/06/21/MNG0179A821.DTL')\">SFGate.com</a><br /><br />"
			
			+ "<h3><b>Prison Practice</b></h3>"
			+ "<p style=\"font-size: 13px\">\'\'Fox says lessons imparted through asana and meditation have profound practical applications inside the cellblock.\'\'<br /> by <b>Alison Clare Steingold</b><br />"		
			+ "Read More at <a href=\"http://commongroundmag.com/2007/06/prisonyoga0706.html\">CommonGround.com</a><br /><br /></p>"
			
			+ "<h3>Big Men, Big Time</h3>"
			
			+ "<p style=\"font-size: 13px\">\'\'The Insight Prison Project's James Fox has taught in prisons and youth facilities for over three years in both San Francisco and, in the summers, Chicago.\'\'<br />"
			+ "by <b>Laura Shin</b><br />Read More at <a href=\"http://layogamagazine.com/issue13/feature/feature.htm\">layogamagazine.com</a><br /><br /></p>"

			+ "<h3>Bolinas man brings yoga behind bars</h3>"
			
			+ "<p style=\"font-size: 13px\">\'\'The mindfulness practices he teaches are meant to reconnect students with their bodies, and one of the common by-products of those practices is a new desire to take responsibility for past actions...\'\'<br />"
			
			+ "by <b>Sasha Portis, Point Reyes Light</b><br />"
			+ "Read More at <a href=\"javascript:load_()\" onClick=\"window.open('http://www.ptreyeslight.com/cgi/news_archive_2009.pl?record=415')\">PtReyesLight.com</a><br /><br />"
			
			
			+ "</div>";
		  
		return text_content;
}
