exports.generateHTML = function(user){
		var string = '<!DOCTYPE html>\
<html>\
<head>\
	<script src="http://code.jquery.com/jquery-2.0.3.min.js" type="text/javascript"></script>\
	<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">\
	<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>\
	<script>\
	\$(\'document\').ready(function(){\
' + generateItemPopovers(user.inventory) + '\
	})\
	</script>\
	<style>' + getStyle() + '</style>\
	<title>TweetQuest</title>\
</head>\
<body>\
<div id="wrapper"></div>\
	<div id="block0" class="panel panel-default block">\
	<h1>TweetQuest</h1>\
	</div>\
	<div id="block1" class="panel panel-default block">\
		<div id="charbox" class="box" style="background-image: url(' + user.image + '); background-size: 128px 128px"></div>\
		<div id="statbox" class="box">\
			<span id="charinfo">\
				<h3>' + user.name + '   <small><a href="http://twitter.com/' + user.atname + '">@' + user.atname + '</a></small></h3>\
				<h4>Level <strong>' + user.level + '</strong> ' + user.class + '</h4>\
			</span>\
			<div class="progress"><div class="progress-bar" role="progressbar" aria-valuenow="' + Math.floor(user.progressToLevel) + '" aria-valuemin="0" aria-valuemax="' + Math.floor(user.xpToLevel) + '" style="width: ' + Math.floor(user.progressPercent) + '%;">' + Math.round(user.progressPercent) + '% to level ' + (user.level +1) + '</div></div>\
			<div id="stats">\
				<div class="stat"><strong>Strength: </strong><span id="str">' + user.str + '</span></div>\
				<div class="stat"><strong>Perception: </strong><span id="per">' + user.per + '</span></div>\
				<div class="stat"><strong>Endurance: </strong><span id="end">' + user.end + '</span></div>\
				<div class="stat"><strong>Charisma: </strong><span id="chr">' + user.chr + '</span></div>\
				<div class="stat"><strong>Intelligence: </strong><span id="int">' + user.int + '</span></div>\
				<div class="stat"><strong>Agility: </strong><span id="agi">' + user.agi + '</span></div>\
				<div class="stat"><strong>Luck: </strong><span id="luk">' + user.luk + '</span></div>\
			</div>\
		</div>\
		<div id="inventbox" class="box">\
			<h4 style="text-align: center;">Your Inventory:</h4>\
			<table id="itemgrid">\
			<tr>\
				<td class="item" id="neck"><img src="http://www.global-rs.com/img/strength_ammy.gif"></img></td>\
				<td class="item" id="head"><img src="http://www.global-rs.com/img/white_med_helm.gif"></img></td>\
				<td class="item" id="cape"><img src="http://www.global-rs.com/img/cape_(black).gif"></img></td>\
			</tr>\
			<tr>\
				<td class="item" id="secondarywep"><img src="http://www.global-rs.com/img/white_sq_shield.gif"></img></td>\
				<td class="item" id="body"><img src="http://www.global-rs.com/img/white_platebody.gif"></img></td>\
				<td class="item" id="primarywep"><img src="http://www.global-rs.com/img/silverlight.gif"></img></td>\
			</tr>\
			<tr>\
				<td class="item" id="hands"><img src="http://www.global-rs.com/img/white_gloves.gif"></img></td>\
				<td class="item" id="legs"><img src="http://www.global-rs.com/img/white_platelegs.gif"></img></td>\
				<td class="item" id="ring"><img src="http://www.global-rs.com/img/perfect_ring.gif"></img></td>\
			</tr>\
			</table>\
		</div>\
		<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>\
		<div id="links"><a href="https://twitter.com/intent/tweet?text=I\'m a Level ' + user.level + ' ' + user.class + ', apparently.&url=http://tweetquest.herokuapp.com/?user=' + user.atname + '">Tweet this!</a> &middot; <a href="http://github.com/lbrentcarpenter/yrs2014">View on GitHub</a></div>\
	</div>\
</body>\
</html>'
	return string
}

function generateItemPopovers(inventory){
		return '$(\'#neck\').popover({\
			container: \'body\',\
			content: \'' + inventory.neck.enhancement + ' ' + inventory.neck.material + ' ' + inventory.neck.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#head\').popover({\
			container: \'body\',\
			content: \'' + inventory.head.enhancement + ' ' + inventory.head.material + ' ' + inventory.head.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#cape\').popover({\
			container: \'body\',\
			content: \'' + inventory.cape.enhancement + ' ' + inventory.cape.material + ' ' + inventory.cape.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#secondarywep\').popover({\
			container: \'body\',\
			content: \'' + inventory.secondarywep.enhancement + ' ' + inventory.secondarywep.material + ' ' + inventory.secondarywep.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#body\').popover({\
			container: \'body\',\
			content: \'' + inventory.body.enhancement + ' ' + inventory.body.material + ' ' + inventory.body.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#primarywep\').popover({\
			container: \'body\',\
			content: \'' + inventory.primarywep.enhancement + ' ' + inventory.primarywep.material + ' ' + inventory.primarywep.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#hands\').popover({\
			container: \'body\',\
			content: \'' + inventory.hands.enhancement + ' ' + inventory.hands.material + ' ' + inventory.hands.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#legs\').popover({\
			container: \'body\',\
			content: \'' + inventory.legs.enhancement + ' ' + inventory.legs.material + ' ' + inventory.legs.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});\
		$(\'#ring\').popover({\
			container: \'body\',\
			content: \'' + inventory.ring.enhancement + ' ' + inventory.ring.material + ' ' + inventory.ring.type + '\',\
			placement: \'top\',\
			trigger: \'hover\'\
		});'
}

function getStyle(){
	return '\
	.panel {\
		max-width: 800px;\
		min-width: 100px;\
		margin: auto;\
		padding: 10px;\
	}\
	#charbox {\
		width: 128px;\
		height: 128px;\
		border: 1px solid black;\
	}\
	#statbox {\
		margin: -10px 10px 0 10px;\
	}\
	.box {\
		display: inline-block;\
		vertical-align: top;\
	}\
	.block {\
		margin: 10px auto;\
	}\
	#block0 {\
		text-align: center;\
		padding-top: 0;\
	}\
	td, tr{\
		border: 1px solid black;\
		text-align: center;\
		padding: 2px;\
		height: 45px;\
	}\
	td {\
		width: 45px;\
	}\
	table {\
		border-collapse: collapse;\
		padding: 2px;\
		margin: 10px;\
	}\
	.item {\
		opacity: 0.5;\
	}\
	#links {text-align: center;}'
}