<!--


// Display Header Logo script
function writeLogo(){
	var strReturn = new String();
	strReturn += ('<a href="/index.html"><img id="siteLogo" src="/images/header/g12Logo" alt="GRIND&#8226;12  logo" /></a><br /><img id="siteTagline" src="/images/header/g12Tagline.jpg" alt="GRIND&#8226;12 tagline" />');
	
document.writeln(strReturn);
}
// END Display Header Logo script


// Display Header Print Logo script
function writePrintLogo(){
	var strReturn = new String();
	strReturn += ('<img id="siteLogoPrint" src="/images/header/g12LogoPrint" />');
	
document.writeln(strReturn);
}
// END Display Header Print Logo script


// Display Header Tagline Print script
function writeHeaderTagLine(){
	var strReturn = new String();
	strReturn += ('<p id="headerTagLinePrint">a subversive tome of skate culture</p>');
	
document.writeln(strReturn);
}
// END Display Header Tagline script


// Display Header Contact script
function writeHeaderContact(){
	var strReturn = new String();
	strReturn += ('<span id="headerContact">GRIND&#8226;12 Skate Zine | www.grind12.com | atari2600vcs@yahoo.com</span>');
	
document.writeln(strReturn);
}
// END Display Header Contact script







// MAIN Nav script
function writeMainNav(){
	var strReturn = new String();
	strReturn += ('<ul id="rightNav"><li id="select"><a href="/index.html">home</a></li><li><a href="/zines/index.html">zine archive</a></li><li><a href="/about/index.html">about</a></li><li><a href="/contact/index.html">contact</a></li><li><a href="http://www.skate-the-planet.com/index.html" target="_blank">sk8 the planet</a></li></ul>');
	
document.writeln(strReturn);
}
// END MAIN Nav script

// ZINE ARCHIVE Nav script
function writeZineNav(){
	var strReturn = new String();
	strReturn += ('<ul id="rightNav"><li><a href="/index.html">home</a></li><li id="select"><a href="/zines/index.html">zine archive</a></li><li><a href="/about/index.html">about</a></li><li><a href="/contact/index.html">contact</a></li><li><a href="http://www.skate-the-planet.com/index.html" target="_blank">sk8 the planet</a></li></ul>');
	
document.writeln(strReturn);
}
// END ZINE ARCHIVE Nav script

// ABOUT Nav script
function writeAboutNav(){
	var strReturn = new String();
	strReturn += ('<ul id="rightNav"><li><a href="/index.html">home</a></li><li><a href="/zines/index.html">zine archive</a></li><li id="select"><a href="/about/index.html">about</a></li><li><a href="/contact/index.html">contact</a></li><li><a href="http://www.skate-the-planet.com/index.html" target="_blank">sk8 the planet</a></li></ul>');
	
document.writeln(strReturn);
}
// END ABOUT Nav script

// CONTACT Nav script
function writeContactNav(){
	var strReturn = new String();
	strReturn += ('<ul id="rightNav"><li><a href="/index.html">home</a></li><li><a href="/zines/index.html">zine archive</a></li><li><a href="/about/index.html">about</a></li><li id="select"><a href="/contact/index.html">contact</a></li><li><a href="http://www.skate-the-planet.com/index.html" target="_blank">sk8 the planet</a></li></ul>');
	
document.writeln(strReturn);
}
// END CONTACT Nav script





// Show/hide script
// showMe
function showMe(what) {
  what = document.getElementById(what);
  what.style.display='inline';
}

// hideMe
function hideMe(what) {
  what = document.getElementById(what);
  what.style.display='none';
}

// used to show/hide layers/spans
function showHide(show,hide){
  var showArray = show.split(",")
  var s = showArray.length
  for(i = 0; i < s; i++) {
  	var imShowing = showArray[i];
	showMe(imShowing);
  }
  var hideArray = hide.split(",")
  var h = hideArray.length
  for(i = 0; i < h; i++) {
  	var imHiding = hideArray[i];
	hideMe(imHiding);
  }
}
// END Show/hide script








// Printer Friendly script
function writePrinterFriendly(){
	var strReturn = new String();
	strReturn += ('<!-- BEGIN pf--><div id="pf" style="display: inline;"><p id="printerFriendly"><a href=javascript:showHide("pfDetail","pf");>Printer Friendly</a></p></div><!-- BEGIN pfDetail--><div id="pfDetail" style="display: none;"><p id="printerFriendly"><a href=javascript:showHide("pf","pfDetail");><strong>Printer Friendly:</strong> This page will print from your browser as black text on a white background. Extraneous backgrounds, images and navigational stuff will not be printed, resulting in a properly formatted printout looking much better than the crappy print formats generated by most web sites. &#8220;Print and Destroy!&#8221;</a></p></div><!-- END pf-->');
	
document.writeln(strReturn);
}
// END  Printer Friendly script








// copyright script
function writeCopyright(){
	var strReturn = new String();
	strReturn += ('<p>Copyright &nbsp;&#169; 2005 - 2012 - GRIND&#8226;12 Skateboard Zine &#38; Skate the Planet. All rights reserved. Sk8 or die!</p><img src="/images/madeWithMac.jpg" width="155" height="150" alt="Made with Macintosh" />');
	
document.writeln(strReturn);
}
// END copyright script








// Display Footer Tagline script
function writeTagLine(){
	var strReturn = new String();
	strReturn += ('Never Summer | Never Winter | Ride Forever');
	
document.writeln(strReturn);
}
// END Display Footer Tagline script

// Display Footer Tagline REVIEWS script
function writeTagLineReviews(){
	var strReturn = new String();
	strReturn += ('Never Summer | Never Winter | Ride Her Forever');
	
document.writeln(strReturn);
}
// END Display Footer Tagline REVIEWS script




/* RE-TWEET ----------------------- */
/*
 * Easy Retweet Button
 * http://ejohn.org/blog/retweet/
 *   by John Resig (ejohn.org)
 *
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */

(function(){

window.RetweetJS = {
	// Your Bit.ly Username
	//bitly_user: "retweetjs",
	bitly_user: "skatetheplanet",

	// Your Bit.ly API Key
	// Found here: http://bit.ly/account
	//bitly_key: "R_6287c92ecaf9efc6f39e4f33bdbf80b1",
	bitly_key: "R_6963f783d5996ddf8146e2262df8f7a0",

	// The text to replace the links with
	link_text: (/windows/i.test( navigator.userAgent) ? "&#9658;" : "&#9851;") +
		"&#160;Retweet",

	// What # to show (Use "clicks" for # of clicks or "none" for nothing)
	count_type: "none",

	// Tweet Prefix text
	// "RT @jeresig " would result in: "RT @jeresig Link Title http://bit.ly/asdf"
	prefix: "via @skatetheplanet ",

	// Style information
	styling: "a.retweet { font: bold 12px Helvetica,Arial; color: #ccc; text-decoration: none; border: 0px; }" +
		"a.retweet span { color: #e6e6e6; background: #333; margin-left: 2px; border: 1px solid #000; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 3px; }" +
		"a.vert { display: block; text-align: center; font-size: 16px; float: left; margin: 4px; }" +
		"a.retweet strong.vert { display: block; margin-bottom: 4px; background: #F5F5F5; border: 1px solid #EEE; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 3px; }" +
		"a.retweet span.vert { display: block; font-size: 11px; margin-left: 0px; }"
};

//////////////// No Need to Configure Below Here ////////////////

var loadCount = 1;

// Asynchronously load the Bit.ly JavaScript API
// If it hasn't been loaded already
if ( typeof BitlyClient === "undefined" ) {
	var head = document.getElementsByTagName("head")[0] ||
		document.documentElement;
	var script = document.createElement("script");
	script.src = "http://bit.ly/javascript-api.js?version=latest&login=" +
		RetweetJS.bitly_user + "&apiKey=" + RetweetJS.bitly_key;
	script.charSet = "utf-8";
	head.appendChild( script );

	var check = setInterval(function(){
		if ( typeof BitlyCB !== "undefined" ) {
			clearInterval( check );
			head.removeChild( script );
			loaded();
		}
	}, 10);

	loadCount = 0;
}

if ( document.addEventListener ) {
	document.addEventListener("DOMContentLoaded", loaded, false);

} else if ( window.attachEvent ) {
	window.attachEvent("onload", loaded);
}

function loaded(){
	// Need to wait for doc ready and js ready
	if ( ++loadCount < 2 ) {
		return;
	}

	var elems = [], urlElem = {}, hashURL = {};

	BitlyCB.shortenResponse = function(data) {
		for ( var url in data.results ) {
			var hash = data.results[url].userHash;
			hashURL[hash] = url;

			var elems = urlElem[ url ];

			for ( var i = 0; i < elems.length; i++ ) {
				elems[i].href += hash;
			}

			if ( RetweetJS.count_type === "clicks" ) {
				BitlyClient.stats(hash, 'BitlyCB.statsResponse');
			}
		}
	};

	BitlyCB.statsResponse = function(data) {
		var clicks = data.results.clicks, hash = data.results.userHash;
		var url = hashURL[ hash ], elems = urlElem[ url ];

		if ( clicks > 0 ) {
			for ( var i = 0; i < elems.length; i++ ) {
				var strong = document.createElement("strong");
				strong.appendChild( document.createTextNode( clicks + " " ) );
				elems[i].insertBefore(strong, elems[i].firstChild);

				if ( /(^|\s)vert(\s|$)/.test( elems[i].className ) ) {
					elems[i].firstChild.className = elems[i].lastChild.className = "vert";
				}
			}
		}

		hashURL[ hash ] = urlElem[ url ] = null;
	};

	if ( document.getElementsByClassName ) {
		elems = document.getElementsByClassName("retweet");
	} else {
		var tmp = document.getElementsByTagName("a");
		for ( var i = 0; i < tmp.length; i++ ) {
			if ( /(^|\s)retweet(\s|$)/.test( tmp[i].className ) ) {
				elems.push( tmp[i] );
			}
		}
	}

	if ( elems.length && RetweetJS.styling ) {
		var style = document.createElement("style");
		style.type = "text/css";

		try {
			style.appendChild( document.createTextNode( RetweetJS.styling ) );
		} catch (e) {
			if ( style.styleSheet ) {
				style.styleSheet.cssText = RetweetJS.styling;
			}
		}

		document.body.appendChild( style );
	}

	for ( var i = 0; i < elems.length; i++ ) {
		var elem = elems[i];

		if ( /(^|\s)self(\s|$)/.test( elem.className ) ) {
			elem.href = window.location;
			elem.title = document.title;
		}

		var origText = elem.title || elem.textContent || elem.innerText,
			href = elem.href;

		elem.innerHTML = "<span>" + RetweetJS.link_text + "</span>";
		elem.title = "";
		elem.href = "http://twitter.com/home?status=" +
			encodeURIComponent(RetweetJS.prefix + origText + " http://bit.ly/");

		if ( urlElem[ href ] ) {
			urlElem[ href ].push( elem );
		} else {
			urlElem[ href ] = [ elem ];
			BitlyClient.shorten(href, 'BitlyCB.shortenResponse');
		}
	}

}

})();




// 
