﻿<!DOCTYPE html>
<html lang=en>
<head>
<meta name=keywords content="Mike Sebastian,Michael Sebastian,photographer,Louisville,Prospect,Kentucky,portrait,commercial,architecture,abstract,fine art,fine-art,industrial,fineart,editorial,Mike,Michael,Sebastian,commission,commissioned,medium format,large format,photography,photo,photograph, film, analog, digital,Z7rxQGixKJissIFiE7JnWGIiEKw, healthcare, physician, health care, creative, creativity, doctor, medicine, medical, anesthesiology, anesthesiologist, economalypse, econapocalypse,apocalypse,economic,economy,collapse, Las Vegas, 52 Miles, Fifty-Two Miles, Fifty Two Miles,commute, commuter,real estate,collapse,recession,foreclosure,mortgage,underwater,under water,">
<meta name=description content="Michael Sebastian is a Louisville, Kentucky-based fine-art, editorial, and portrait photographer.">
<meta http-equiv='X-UA-Compatible' content='chrome=1'>
<title>Michael Sebastian | Louisville, Kentucky Photographer</title>
<link rel='canonical' href='http://michaelsebastian.com'>
<style>
@font-face {
    font-family: 'iconsRegular';
    src: url('/inc/icn/icons.eot');
    src: url('/inc/icn/icons.eot?#iefix') format('embedded-opentype'),
         url('/inc/icn/icons.woff') format('woff'),
         url('/inc/icn/icons.ttf') format('truetype'),
         url('/inc/icn/icons.svg#iconsRegular') format('svg');
    font-weight: normal;
    font-style: normal;
    -webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
@font-face {
	font-family: 'Varela';
	font-style: normal;
	font-weight: normal;
	src: url('/fonts/Varela.woff') format('woff'),
		url('/fonts/Varela.ttf') format('truetype');
}

*
{
	margin: 0px;
	padding: 0px;
	border:none;
}

cite, em, var, address
{
	font-style: normal;
}

html
{
	width:100%;
	height:100%;
	overflow:hidden;
}

body
{
	background-color:#f1f1f1;
	margin-top:60px;
	margin-right:0px;
	margin-bottom:40px;
	margin-left:0px;
}

#site
{
	position: absolute;
	background-color:#f1f1f1;
	z-index:0;
	display: block;
	opacity: 0;
	top:0px;
	left:0px;
	width:100%;
	height:100%;
	text-rendering: optimizeLegibility;
}

.scrollHandle {
	pointer-events: auto;
}

.thumbs, #introLogo, #logo, #menuText a, nav, footer, .cursor
{
	cursor: default;
}

.thumbs, .mediaItem img, #introLogo, #logo, #menu, nav, footer, .cursor
{
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

#introLogo
{
	z-index:10;
	position: absolute;
	display: none;
	opacity: 0;
	font-family:'Georgia',sans-serif;
	font-size:20px;
	color: #CC0000;
	font-weight: normal;
}

#logo
{
	z-index:12;
	position: absolute;
	display: block;
	left:50px;
	top:10px;
	text-decoration: none;
	opacity: 0;
}

#logo h1
{
	font-family:'Varela',sans-serif;
	font-size:36px;
	color: #E1471E;
	white-space: nowrap;
	font-weight: normal;
}

#mediaView
{
	position: absolute;
	display: block;
	z-index: -10000;
	top:60px;
	left:260px;
	background-color:#f1f1f1;
	overflow:hidden;
	width:92%;
	height:92%;
	-webkit-backface-visibility: hidden;
}

.mediaItem
{
 	position: absolute;
	display: none;
	opacity: 0;
	background-color:#f1f1f1;
	overflow: hidden;
	-webkit-backface-visibility: hidden;
}
.mediaItem img
{
 	position: absolute;
 	image-rendering: optimizeQuality; /*-webkit-optimize-contrast;*/
 	-webkit-backface-visibility: hidden;
}

.mediaItem .loader
{
 	opacity:.25;
}

.mediaItem .thumb
{
}

.mediaItem .img
{
	image-rendering: optimizeQuality;
}

.mediaItem video
{
	position: absolute;
	z-index:2;
	opacity:1;
}

.mediaItem cite
{
	position: absolute;
	z-index:3;
	opacity:0;
	background-color:#000000;
	font-family:'Varela', sans-serif;
	font-size: 12px;
	color: #ffffff;
	padding: 8px;
}

.textPage
{
	position: absolute;
	display: block;
	font-family:'Verdana',serif;
	font-size:14px;
	color:#343434;
	width: 800px;
}

.textPage img
{
	position: relative;
}

.textPage h2
{
	font-family:'Georgia',serif;
	font-size:20px;
	color:#E1471E;
	white-space: nowrap;
	font-weight: normal;
}

.textPage p, .textPage a
{
	font-family:'Verdana',serif;
	font-size:14px;
	color:#343434;
}

.textMask
{
	display: block;
	cursor: default;
	overflow:hidden;
}

.pageText
{
	position: relative;
	display: block;
	font-family:'Verdana',serif;
	font-size:14px;
	color:#343434;
}
#menu {
	pointer-events: none;
	z-index: 12;
	position: absolute;
	display: block;
	top:60px;
	background-color: transparent; /*#f1f1f1*/
	width:260px;
	height:92%;
}

#menuBg {
	z-index:9;
	position: absolute;
	display: block;
	top:60px;
	background-color: #f1f1f1;
	width:260px;
	height:92%;
	opacity: 0.9;
}

#menuMask {
	position: absolute;
	display: block;
	top:-15px;
	left:0px;
	min-height: 10%;
	width:260px;
}

#menuText {
	pointer-events: auto;
	position: absolute;
	display: block;
	left:50px;
	min-width: 1px;
	min-height: 1px;
	text-align:left;
	list-style:none;
	font-family:'Varela',sans-serif;
	font-size:13px;
}

.menuItem {
	text-decoration:none;
	color: #3E4661;
	letter-spacing: 0px;
	padding: 28px 0 0 0;
	display: block;
	white-space: nowrap;
}

.menuItem b, .subMenuItem b {
	display: inline-block;
}

.menuSpacer {
	display: block;
	height:6.5px;
	margin: 0;
	padding: 28px 0 0 0;
}

.menuSubSpacer {
	display: block;
	height:6.5px;
	margin: 0;
	padding: 0 0 18px 0;
}

.subMenuItem {
	text-decoration:none;
	color: #3E4661;
	letter-spacing: 0px;
	display: block;
	white-space: nowrap;
	display:block;
	padding-left:30px;
	padding-bottom: 18px;
}

#menuText .subMenu {
	position: relative;
	font-size:13px;
	margin-top:23px;
	margin-bottom:28px;
	left: 0px;
}

.cursor
{
}

nav {
	z-index:35;
	position: absolute;
	display: none;
	opacity: 0;
	center: 0px;
	bottom: 5px;
}

nav a {
	display: inline-block;
	position: relative;
	color: #E1471E;
	padding-left: 10px;
	padding-right: 10px;
	list-style:none;
}

nav label {
	font: 400 13px/0px 'Verdana', sans-serif;
	padding: 0 0px;
}

nav icon {
	position: relative;
	font: 400 8px/0px 'iconsRegular';
	font-weight:normal;
	left:1px;
}

nav .navIconL {
	padding-right: 6px;
}

nav .navIconR {
	padding-left: 6px;
}

#navCount {
	display: inline-block;
	margin-left: -8px;
	padding-left: 10px;
	padding-right: 10px;
	text-align: center;
	white-space: nowrap;
}
.share h3, .thumbs h3
{
    font-family: 'Helvetica';
	color: #989898;
	font-size: 16px;
	font-weight: normal;
}

#emailForm input, #emailForm textarea
{
	float:left;
	height:23px;
	width:170px;
	margin: 0 0px 12px 12px;
	line-height:20px;
	border:none;

	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:12px;
	background-color:#e5e5e5;

	-webkit-border-radius:0px;
	border-radius:0px;
	-webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	-ms-transition: all .2s ease-in-out;	
	transition: all .2s ease-in-out;
}

#emailForm input:focus, #emailForm textarea:focus {
    outline: none;
}

#emailForm input[type=button]
{
	width:90px;
	float:right;
}

#emailForm textarea
{
	width:352px;
	height:55px;
	border:none;
	-webkit-border-radius:0px;
	border-radius:0px;
}

#shareResponse
{
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:12px;
	margin: 10px 0 0 15px;
}

#passPop
{
	-moz-box-shadow:0px 4px 12px rgba(0,0,0,0.25);
	-webkit-box-shadow:0px 4px 12px rgba(0,0,0,0.25);
	box-shadow:0px 4px 12px rgba(0,0,0,0.25);
}

#passPop input
{
	float:left;
	height:23px;
	width:170px;
	margin: 12px 0 0 12px;
	line-height:20px;
	border:none;
	outline: none;
		
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:12px;
	background-color:#e5e5e5;

	-webkit-border-radius:0px;
	border-radius:0px;
	-webkit-appearance: none;
	-webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	-ms-transition: all .2s ease-in-out;	
	transition: all .2s ease-in-out;
}

#passPop input[type=button]
{
	width:90px;
	float:left;
	margin: 12px 0 0 12px;
}

#shareResponse
{
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:12px;
	margin: 10px 0 0 15px;
}

.contactForm
{
	position:absolute;
	display: block;
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:16px;
}

.contactFormExtra
{
	position: relative;
	top: 44px;
	float:left;
	text-align:right;
	padding-right:16px;
}

.contactFormExtra a
{
	color:#3D3D3D;
	text-decoration:none;
}

.contactFormTitle
{
	position:absolute;
	top:-44px;
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:16px;
	font-weight: normal;
}

.contactFormFields
{
	position: relative;
	top: 44px;
	float: left;
	padding-left:16px;
	border-left:1px solid #3D3D3D;
}

.contactFormFields input, .contactFormFields textarea
{
	-webkit-border-radius:0px;
	border-radius:0px;
	-webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	-ms-transition: all .2s ease-in-out;	
	transition: all .2s ease-in-out;
}

.contactFormFields input[type=text]
{
	outline: none;
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:16px;
	background-color:#e5e5e5;
	width:200px;
	height:20px;
	margin-bottom:10px;
}

.contactFormFields textarea
{
	outline: none;
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:16px;
	background-color:#e5e5e5;
	width:200px;
	height:150px;
	margin-bottom:5px;
}

.contactFormFields input:focus, .contactFormFields textarea:focus {
    outline: none;
}

.contactFormFields [type=button]
{
	-webkit-border-radius: 0px;
	-webkit-appearance: none;
	border-radius:0px;
	color:#3D3D3D;
	font-family:'Varela',sans-serif;
	font-size:16px;
	background-color:#e5e5e5;
	padding:5px 8px;
}
footer
{
	z-index:14;
	position: absolute;
	display: block;
	right:20px;
	bottom:1px;
	font-family:'Varela',sans-serif;
	font-size:12px;
	color: #444444;
}

footer img
{
	position: relative;
	top:0px;
	padding:0 3px;
}

footer a
{
	text-decoration: none;
	color: #444444;
}
#like
{
	min-width:240px;
	height:40px;
	padding:15px 15px 2px 15px;
	position:absolute;
	display:none;
	z-index:11;
	top:50%;
	left:50%;
	margin:-30px 0 0 -140px;
	background:rgba(255,255,255,0.85);
	-moz-border-radius:3px;-webkit-border-radius:
	3px;border-radius:3px;
	-moz-box-shadow:1px 3px 3px rgba(0,0,0,0.35);
	-webkit-box-shadow:1px 3px 3px rgba(0,0,0,0.35);
	box-shadow:1px 3px 3px rgba(0,0,0,0.35);
}

#closeBtn
{
	cursor:pointer;
	position:absolute;
	right:8px;
	top:3px;
	font:14px "Arial",sans-serif;
	font-weight:bold;color:#555;
}

#plus1
{
	min-width:50px;
	height:30px;
	padding:15px 15px 2px 15px;
	position:absolute;display:none;
	z-index:11;
	top:50%;
	left:50%;
	margin:-20px 0 0 -60px;
	background:rgba(255,255,255,0.85);
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	-moz-box-shadow:1px 3px 3px rgba(0,0,0,0.35);
	-webkit-box-shadow:1px 3px 3px rgba(0,0,0,0.35);
	box-shadow:1px 3px 3px rgba(0,0,0,0.35);
}

#plus1CloseBtn
{
	cursor:pointer;
	position:absolute;
	right:8px;
	top:3px;
	font:14px "Arial",sans-serif;
	font-weight:bold;
	color:#555;
}

</style>

</head>
<body>
	<div id=site>
		<a id=logo href='/' onclick="Address.setPath('/'); return false;"><h1>MICHAEL SEBASTIAN</h1></a>
			<div id=menuBg></div>
		<div id=menu>
			<div id=menuMask>
			<div id=menuText>
				<a data-id='Projects' data-label='Projects' data-link=internal class=menuItem href="/Projects/Incidental-Findings/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Projects</a>

				<div data-id='Projects' class=subMenu>
				<a data-id='Projects' data-label='Incidental Findings' data-link=internal class=subMenuItem href="/Projects/Incidental-Findings/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Incidental Findings</a>

				<a data-id='Projects' data-label='52 Miles' data-link=internal class=subMenuItem href="/Projects/52-Miles/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >52 Miles</a>

				<a data-id='Projects' data-label='Economalypse' data-link=internal class=subMenuItem href="/Projects/Economalypse/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Economalypse</a>

				</div>
				<a data-id='Portraits' data-label='Portraits' data-link=internal class=menuItem href="/Portraits/One/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Portraits</a>

				<div data-id='Portraits' class=subMenu>
				<a data-id='Portraits' data-label='One' data-link=internal class=subMenuItem href="/Portraits/One/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >One</a>

				<a data-id='Portraits' data-label='Two' data-link=internal class=subMenuItem href="/Portraits/Two/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Two</a>

				</div>
				<a data-id='Tumblr Sketchbooks' data-label='Tumblr Sketchbooks' data-link=internal class=menuItem href="/Tumblr-Sketchbooks/Michael-Sebastian/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Tumblr Sketchbooks</a>

				<div data-id='Tumblr Sketchbooks' class=subMenu>
				<a data-id='Tumblr Sketchbooks' data-link=external class=subMenuItem href="http://blog.michaelsebastian.com/" target="_blank">Michael Sebastian</a>

				<a data-id='Tumblr Sketchbooks' data-link=external class=subMenuItem href="http://splendidsuburb.com" target="_blank">Splendid Suburb</a>

				</div>
<span class=menuSpacer>&nbsp;</span><span class=menuSpacer>&nbsp;</span>				<a data-id='Information' data-label='Information' data-link=internal class=menuItem href="/Information/About-Michael-Sebastian/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Information</a>

				<div data-id='Information' class=subMenu>
				<a data-id='Information' data-label='About Michael Sebastian' data-link=internal class=subMenuItem href="/Information/About-Michael-Sebastian/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >About Michael Sebastian</a>

				<a data-id='Information' data-label='Publications and Exhibitions' data-link=internal class=subMenuItem href="/Information/Publications-and-Exhibitions/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Publications and Exhibitions</a>

				<a data-id='Information' data-label='Buy or Commission' data-link=internal class=subMenuItem href="/Information/Buy-or-Commission/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Buy or Commission</a>

				<a data-id='Information' data-label='Copyright' data-link=internal class=subMenuItem href="/Information/Copyright/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Copyright</a>

				<a data-id='Information' data-label='Privacy' data-link=internal class=subMenuItem href="/Information/Privacy/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Privacy</a>

				</div>
				<a data-id='Connect' data-label='Connect' data-link=internal class=menuItem href="/Connect/Google-Plus/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Connect</a>

				<div data-id='Connect' class=subMenu>
				<a data-id='Connect' data-link=icon-ext class=subMenuItem href='https://plus.google.com/115739659213925109676/posts' target='_blank'><img src='/inc/icn/google-plus@2x.png' width=20 height=20 /></a>
				<a data-id='Connect' data-link=icon-ext class=subMenuItem href='http://twitter.com/mikeseb' target='_blank'><img src='/inc/icn/twitter@2x.png' width=20 height=20 /></a>
				<a data-id='Connect' data-link=icon-ext class=subMenuItem href='https://www.facebook.com/michael.sebastian' target='_blank'><img src='/inc/icn/facebook@2x.png' width=20 height=20 /></a>
				<a data-id='Connect' data-link=external class=subMenuItem href="http://www.michaelsebastian.com/blog/" target="_blank">Legacy Blog</a>

				<a data-id='Connect' data-link=external class=subMenuItem href="http://www.michaelsebastian.com/pdf/" target="_blank">Download PDF</a>

				</div>
				<a data-id='Contact' data-label='Contact' data-link=internal class=menuItem href="/Contact/"  data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}' >Contact</a>

<span class=menuSpacer>&nbsp;</span>				<a data-id='Client Access' data-link=external class=menuItem href="http://michaelsebastian.editdrop.com/" target="_blank">Client Access</a>

<span class=menuSpacer>&nbsp;</span>			</div>
			</div>
		</div>
		<div id=mediaView>
			<section id='rootSlideshow'>
				<article class=mediaItem id='/rootSlideshow/1/' data-mediaId='10338' data-label='121005-231515.jpg' data-type='image' data-content='121005-231515.jpg' data-thumb='121005-231515.jpg'>
				</article>
			</section>
			<section id='Projects.Incidental-Findings' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Projects/Incidental-Findings/1/' data-mediaId='10015' data-label=' Incidental Findings' data-type='html'>
					<div class=textPage>
						<h2> Incidental Findings</h2>
						<div class=textMask>
						<div class=pageText>
<p>In medicine, an <b>incidental finding</b> is something discovered while you're looking for something else, or expecting to find nothing at all. In either case, your eyes and mind are alive, through training and experience, to possibilities you didn't anticipate.</p><br><p>So it is with many of my photographs. These images have not yet found a home within a series or project, but seem to need a place of their own to be seen.</p>
						</div>
						</div>
					</div>
					<cite>Incidental Findings | Project Statement | Michael Sebastian</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/2/' data-mediaId='10338' data-label='121005-231515.jpg' data-type='image' data-content='121005-231515.jpg' data-thumb='121005-231515.jpg'>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/3/' data-mediaId='10332' data-label='120903-220135.jpg' data-type='image' data-content='120903-220135-DUP.jpg' data-thumb='120903-220135-DUP.jpg'>
					<cite>Ken Bowl, Southside Drive, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/4/' data-mediaId='10267' data-label='120610-224558.jpg' data-type='image' data-content='120610-224558.jpg' data-thumb='120610-224558.jpg'>
					<cite>Carl's Deer Processing, Loxley, Alabama</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/5/' data-mediaId='10269' data-label='120518-001749.jpg' data-type='image' data-content='120518-001749.jpg' data-thumb='120518-001749.jpg'>
					<cite>Dusk, Prospect, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/6/' data-mediaId='10278' data-label='120202-221742.jpg' data-type='image' data-content='120202-221742.jpg' data-thumb='120202-221742.jpg'>
					<cite>Dusk, Prospect, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/7/' data-mediaId='10283' data-label='111203-204449.jpg' data-type='image' data-content='111203-204449.jpg' data-thumb='111203-204449.jpg'>
					<cite>Apartment building northwest wall, Crestwood, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/8/' data-mediaId='10281' data-label='111228-211952.jpg' data-type='image' data-content='111228-211952.jpg' data-thumb='111228-211952.jpg'>
					<cite>Goshen, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/9/' data-mediaId='10275' data-label='120227-234239.jpg' data-type='image' data-content='120227-234239.jpg' data-thumb='120227-234239.jpg'>
					<cite>Dusk, Prospect, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/10/' data-mediaId='10276' data-label='120211-130055.jpg' data-type='image' data-content='120211-130055.jpg' data-thumb='120211-130055.jpg'>
					<cite>Sunrise, Buckner, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/11/' data-mediaId='10270' data-label='120515-001300.jpg' data-type='image' data-content='120515-001300.jpg' data-thumb='120515-001300.jpg'>
					<cite>Dusk, Prospect, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/12/' data-mediaId='10282' data-label='111203-215644.jpg' data-type='image' data-content='111203-215644.jpg' data-thumb='111203-215644.jpg'>
					<cite>Creche, La Grange, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/13/' data-mediaId='10245' data-label='2009062-01.jpg' data-type='image' data-content='2009062-01.jpg' data-thumb='2009062-01.jpg'>
					<cite>Flea Market, Simpsonville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/14/' data-mediaId='10330' data-label='2010162-03.jpg' data-type='image' data-content='2010162-03.jpg' data-thumb='2010162-03.jpg'>
					<cite>Jesus at The Concrete Lady, I-65, Jeffersonville, Indiana</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/15/' data-mediaId='10251' data-label='2009191-03-.jpg' data-type='image' data-content='2009191-03-.jpg' data-thumb='2009191-03-.jpg'>
					<cite>Strip Mall, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/16/' data-mediaId='10252' data-label='2008153-02.jpg' data-type='image' data-content='2008153-02.jpg' data-thumb='2008153-02.jpg'>
					<cite>Snowflakes on blacktop parking lot, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/17/' data-mediaId='10285' data-label='2010067-05.jpg' data-type='image' data-content='2010067-05.jpg' data-thumb='2010067-05.jpg'>
					<cite>Construction site, Buckner, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/18/' data-mediaId='10273' data-label='2012024-05.jpg' data-type='image' data-content='2012024-05.jpg' data-thumb='2012024-05.jpg'>
					<cite>Gulf Shores, Alabama</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/19/' data-mediaId='10322' data-label='2008134_06.jpg' data-type='image' data-content='2008134_06.jpg' data-thumb='2008134_06.jpg'>
					<cite>Ohio River from I-65 bridge, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/20/' data-mediaId='10297' data-label='2010004-10.jpg' data-type='image' data-content='2010004-10.jpg' data-thumb='2010004-10.jpg'>
					<cite>US 42 at KY 1793, Goshen, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/21/' data-mediaId='10296' data-label='2010018-09.jpg' data-type='image' data-content='2010018-09.jpg' data-thumb='2010018-09.jpg'>
					<cite>Quarry, River Road, Louisville, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/22/' data-mediaId='10279' data-label='111229-204218.jpg' data-type='image' data-content='111229-204218.jpg' data-thumb='111229-204218.jpg'>
					<cite>Shelbyville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/23/' data-mediaId='10287' data-label='2011045-09.jpg' data-type='image' data-content='2011045-09.jpg' data-thumb='2011045-09.jpg'>
					<cite>Vacant Chinese restaurant, Frankfort, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/24/' data-mediaId='10293' data-label='2010065-10.jpg' data-type='image' data-content='2010065-10.jpg' data-thumb='2010065-10.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/25/' data-mediaId='10294' data-label='2010065-04.jpg' data-type='image' data-content='2010065-04.jpg' data-thumb='2010065-04.jpg'>
					<cite>Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/26/' data-mediaId='10295' data-label='2011002-09.jpg' data-type='image' data-content='2011002-09.jpg' data-thumb='2011002-09.jpg'>
					<cite>Truck stop, I-65 at Memphis, Indiana</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/27/' data-mediaId='10304' data-label='2009194-07-.jpg' data-type='image' data-content='2009194-07-.jpg' data-thumb='2009194-07-.jpg'>
					<cite>KY 1793, Goshen, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/28/' data-mediaId='10306' data-label='2009177-08.jpg' data-type='image' data-content='2009177-08.jpg' data-thumb='2009177-08.jpg'>
					<cite>Off I-65, Montgomery, Alabama<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/29/' data-mediaId='10318' data-label='2008164_04.jpg' data-type='image' data-content='2008164_04.jpg' data-thumb='2008164_04.jpg'>
					<cite>Lexington Avenue, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/30/' data-mediaId='10319' data-label='2008163_01.jpg' data-type='image' data-content='2008163_01.jpg' data-thumb='2008163_01.jpg'>
					<cite>Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/31/' data-mediaId='10323' data-label='2008123_03.jpg' data-type='image' data-content='2008123_03.jpg' data-thumb='2008123_03.jpg'>
					<cite>River Road quarry, Louisville, Kentucky<br></cite>
				</article>
				<article class=mediaItem id='/Projects/Incidental-Findings/32/' data-mediaId='10331' data-label='2010134-08.jpg' data-type='image' data-content='2010134-08.jpg' data-thumb='2010134-08.jpg'>
					<cite>US 93, south of the Grand Canyon, Arizona</cite>
				</article>
			</section>
			<section id='Projects.52-Miles' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Projects/52-Miles/1/' data-mediaId='10003' data-label=' 52 Miles' data-type='html'>
					<div class=textPage>
						<h2> 52 Miles</h2>
						<div class=textMask>
						<div class=pageText>
<p>For the last several years I've driven a 52-mile commute to my medical practice in a small city in central Kentucky. I depart my suburban home, travel a busy stretch of interstate highway to my job, and reverse the trip at day's end. I traverse a lush, sparsely populated semi-rural landscape, marked by the presence of people I mostly don't see. I view their homes and playgrounds; their businesses and industrial sites; their rural hamlets and suburban shopping malls. Isolated within my car, apart from these unseen people, I already feel I'm The Other.</p><br><p>I drive, thinking of the day to come, or the day gone by, steering autonomically while my mind sifts what my eyes feed it. The siren calls of color, light, geometry, and form beckon me to stop to shoot at once, or to return later. I respond superficially to the many lovely scenes I encounter; who doesn't like a "pretty" picture? But I also sense the incongruities and oddities, and the manicured faux-perfection that betrays the human impulse to impose order around oneself. However I approach, I photograph as an interloper in places where I rarely feel fully at home. This tension, between visual attraction and emotional discomfort, is why I've returned time and again, camera on the seat beside me.</p><br><p>The vague anxiety this tension provokes prods me to shoot quickly, and return to the familiar confines of the car. But "quick" isn't so easy when wielding an eight-pound manual camera, or reloading rolls of film, each capable of only a handful of images. I've shot nearly all of this work on medium-format color-negative film for its ability to render complex, multi-dimensional information on a large plane of whatever emulsion best suits the day's light. But the cameras' physical heft and cumbersome operation are also soothing impediments to the task at hand. I must stop, compose, focus, and shoot; and though I don't linger, neither can I easily heed the voice that screams, "you don't belong here", and hasten back to the comfort of the commuter's hermetically-sealed isolation.</p>
						</div>
						</div>
					</div>
					<cite>52 Miles| Project Statement | Michael Sebastian</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/2/' data-mediaId='10246' data-label='2009150-02.jpg' data-type='image' data-content='2009150-02.jpg' data-thumb='2009150-02.jpg'>
					<cite>Big Wheel, Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/3/' data-mediaId='10301' data-label='2008166-04-imacn.jpg' data-type='image' data-content='2008166-04-imacn.jpg' data-thumb='2008166-04-imacn.jpg'>
					<cite>Sears yellow curbs, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/4/' data-mediaId='10309' data-label='2009172-07.jpg' data-type='image' data-content='2009172-07.jpg' data-thumb='2009172-07.jpg'>
					<cite>Red fence, Shelbyville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/5/' data-mediaId='10253' data-label='2009026-13.jpg' data-type='image' data-content='2009026-13.jpg' data-thumb='2009026-13.jpg'>
					<cite>New fence section, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/6/' data-mediaId='10308' data-label='2009172-09.jpg' data-type='image' data-content='2009172-09.jpg' data-thumb='2009172-09.jpg'>
					<cite>Culvert, Shelbyville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/7/' data-mediaId='10248' data-label='2008162_06.jpg' data-type='image' data-content='2008162_06.jpg' data-thumb='2008162_06.jpg'>
					<cite>Pharmacy, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/8/' data-mediaId='10250' data-label='2009054-07.jpg' data-type='image' data-content='2009054-07.jpg' data-thumb='2009054-07.jpg'>
					<cite>Drainage, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/9/' data-mediaId='10302' data-label='2009088-03-imacn.jpg' data-type='image' data-content='2009088-03-imacn.jpg' data-thumb='2009088-03-imacn.jpg'>
					<cite>Bird on hydrant, Simpsonville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/10/' data-mediaId='10298' data-label='2009172-03.jpg' data-type='image' data-content='2009172-03.jpg' data-thumb='2009172-03.jpg'>
					<cite>Motor home, Shelbyville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/11/' data-mediaId='10313' data-label='2009074-10.jpg' data-type='image' data-content='2009074-10.jpg' data-thumb='2009074-10.jpg'>
					<cite>Port-A-Johns</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/12/' data-mediaId='10303' data-label='2009117-05-imacn.jpg' data-type='image' data-content='2009117-05-imacn.jpg' data-thumb='2009117-05-imacn.jpg'>
					<cite>Trees behind fence, Frankfort, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/13/' data-mediaId='10299' data-label='2009071-08-imacn.jpg' data-type='image' data-content='2009071-08-imacn.jpg' data-thumb='2009071-08-imacn.jpg'>
					<cite>Lays Potato Chip truck, Frankfort, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/14/' data-mediaId='10321' data-label='2008145_01.jpg' data-type='image' data-content='2008145_01.jpg' data-thumb='2008145_01.jpg'>
					<cite>Target loading dock, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/15/' data-mediaId='10314' data-label='2009060-07.jpg' data-type='image' data-content='2009060-07.jpg' data-thumb='2009060-07.jpg'>
					<cite>Nine, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/16/' data-mediaId='10307' data-label='2009171-07.jpg' data-type='image' data-content='2009171-07.jpg' data-thumb='2009171-07.jpg'>
					<cite>Yellow hose, Shelbyville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/17/' data-mediaId='10311' data-label='2009125-09.jpg' data-type='image' data-content='2009125-09.jpg' data-thumb='2009125-09.jpg'>
					<cite>Red brick apartment, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/18/' data-mediaId='10315' data-label='2009054-02.jpg' data-type='image' data-content='2009054-02.jpg' data-thumb='2009054-02.jpg'>
					<cite>Plants on a levee</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/19/' data-mediaId='10247' data-label='2009127-03-imacn.jpg' data-type='image' data-content='2009127-03-imacn.jpg' data-thumb='2009127-03-imacn.jpg'>
					<cite>C, Frankfort, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/20/' data-mediaId='10249' data-label='2009131-07-imacn.jpg' data-type='image' data-content='2009131-07-imacn.jpg' data-thumb='2009131-07-imacn.jpg'>
					<cite>Dead grass, Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Projects/52-Miles/21/' data-mediaId='10300' data-label='2009061-09-imacn-2.jpg' data-type='image' data-content='2009061-09-imacn-2.jpg' data-thumb='2009061-09-imacn-2.jpg'>
					<cite>End of the road, Shelbyville, Kentucky</cite>
				</article>
			</section>
			<section id='Projects.Economalypse' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Projects/Economalypse/1/' data-mediaId='10014' data-label=' Economalypse' data-type='html'>
					<div class=textPage>
						<h2> Economalypse</h2>
						<div class=textMask>
						<div class=pageText>
<p><i>(pronounced echo-<b>NAHM</b>-uh-lips)</i></p><br><p><i>(work in progress)</i></p><br><p>I made my first-ever trip to Las Vegas in the autumn of 2010, as part of a family excursion through the American southwest. Like most first-time visitors to Vegas, I was taken aback by the crowds, the noise, the hubbub, and the glitz. But -- three years into the worldwide  <b>economalypse</b> that started with the collapse of the housing bubble in 2008 -- I sensed in the ostentatious craziness a wary, muted quality; tensions were palpable beneath the façade. Watching Vegas at play, it seemed like an aging frat boy, still partying desperately into middle age, trying to keep up appearances and convince himself he's having fun. I knew I would have to return to explore this undercurrent further.</p><br><p>During the early years of the 21st century, Las Vegas was the fastest-growing metro area in the US. There was a job for anyone who wanted to work; housing all those workers meant new homes went up as fast as builders could drive the nails, and mortgage lenders could close the deals. But things that can't last, don't; when the housing bubble inevitably burst in 2008, Vegas became Ground Zero, the sad exemplar of a cratered economy. By some estimates, home prices fell over 50% from 2006's peak values; and as many as 80% of Vegas-metro mortgages were (are) underwater, with Nevada leading the nation in foreclosures since 2007.</p><br><p>It would be obvious simply to photograph the shuttered buildings and acres of unsold tract homes that bespatter the metro area; those are the physical manifestations of the Vegas economalypse. But beneath these encrustations of recent man-made history, there also remains the starkly beautiful, human-imprinted southern-Nevada desert, with its astonishing light and rich palette of colors. I have long had an interest in the built landscape, and in few places is it as photogenic as in this part of the American southwest.</p><br><p>What about the visitors, the tourists? Talking with cab drivers, bellhops, and others who perform the city's "small jobs", I'm told that they keep coming to Vegas -- as affirmed by the crowds we negotiated during our 2010 visit -- but that they are fewer in number, and spending far less money than in better times past. Despite the melted trillions of national wealth, people still need -- perhaps more than ever -- a getaway. But, walking along the Strip, there is the faintest whiff of threadbare fatigue about the environment. You can sense the unease behind the faces of the passersby, a discordant note in a city devoted to fantasy and gratification. This unease is what I felt so strongly; it's what I've started, and hope to continue, to explore as this project develops.</p>
						</div>
						</div>
					</div>
					<cite>Economalypse | Project Statement | Michael Sebastian</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/2/' data-mediaId='10234' data-label='110421-140924.jpg' data-type='image' data-content='110421-140924.jpg' data-thumb='110421-140924.jpg'>
					<cite>Self-storage, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/3/' data-mediaId='10230' data-label='2011018-06.jpg' data-type='image' data-content='2011018-06.jpg' data-thumb='2011018-06.jpg'>
					<cite>Barker and pretty girl, Vegas Strip</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/4/' data-mediaId='10229' data-label='111005-173053.jpg' data-type='image' data-content='111005-173053.jpg' data-thumb='111005-173053.jpg'>
					<cite> Vegas welcome sign tourists</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/5/' data-mediaId='10242' data-label='110419-012302.jpg' data-type='image' data-content='110419-012302.jpg' data-thumb='110419-012302.jpg'>
					<cite>Covered car, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/6/' data-mediaId='10239' data-label='110420-134400.jpg' data-type='image' data-content='110420-134400.jpg' data-thumb='110420-134400.jpg'>
					<cite>Hotel, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/7/' data-mediaId='10241' data-label='110419-014908.jpg' data-type='image' data-content='110419-014908.jpg' data-thumb='110419-014908.jpg'>
					<cite>Abandoned movie theater, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/8/' data-mediaId='10232' data-label='110421-205051.jpg' data-type='image' data-content='110421-205051.jpg' data-thumb='110421-205051.jpg'>
					<cite>Tourists, Lake Mead</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/9/' data-mediaId='10236' data-label='110421-135309.jpg' data-type='image' data-content='110421-135309.jpg' data-thumb='110421-135309.jpg'>
					<cite>K-Mart, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/10/' data-mediaId='10240' data-label='110419-200926.jpg' data-type='image' data-content='110419-200926.jpg' data-thumb='110419-200926.jpg'>
					<cite>Motor home, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/11/' data-mediaId='10235' data-label='110421-135519.jpg' data-type='image' data-content='110421-135519.jpg' data-thumb='110421-135519.jpg'>
					<cite>Defunct restaurant, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/12/' data-mediaId='10233' data-label='110421-142635.jpg' data-type='image' data-content='110421-142635.jpg' data-thumb='110421-142635.jpg'>
					<cite>Abandoned boat, Henderson, Nevada</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/13/' data-mediaId='10237' data-label='110421-134149.jpg' data-type='image' data-content='110421-134149.jpg' data-thumb='110421-134149.jpg'>
					<cite>Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/14/' data-mediaId='10231' data-label='110422-021551.jpg' data-type='image' data-content='110422-021551.jpg' data-thumb='110422-021551.jpg'>
					<cite>Hotel roof, Vegas strip</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/15/' data-mediaId='10227' data-label='111007-223037.jpg' data-type='image' data-content='111007-223037.jpg' data-thumb='111007-223037.jpg'>
					<cite>Vegas Strip</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/16/' data-mediaId='10244' data-label='2011018-03.jpg' data-type='image' data-content='2011018-03.jpg' data-thumb='2011018-03.jpg'>
					<cite>Miracle Mile Shops, Vegas Strip</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/17/' data-mediaId='10228' data-label='111006-191014.jpg' data-type='image' data-content='111006-191014.jpg' data-thumb='111006-191014.jpg'>
					<cite>Queuing for freebies, Vegas strip</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/18/' data-mediaId='10243' data-label='110418-221003.jpg' data-type='image' data-content='110418-221003.jpg' data-thumb='110418-221003.jpg'>
					<cite>Screw Balls, Las Vegas</cite>
				</article>
				<article class=mediaItem id='/Projects/Economalypse/19/' data-mediaId='10238' data-label='110420-150521.jpg' data-type='image' data-content='110420-150521.jpg' data-thumb='110420-150521.jpg'>
					<cite>Las Vegas welcome sign tourist</cite>
				</article>
			</section>
			<section id='Portraits.One' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Portraits/One/1/' data-mediaId='10334' data-label='2012064-06.jpg' data-type='image' data-content='2012064-06.jpg' data-thumb='2012064-06.jpg'>
				</article>
				<article class=mediaItem id='/Portraits/One/2/' data-mediaId='10325' data-label='2008111_05.jpg' data-type='image' data-content='2008111_05.jpg' data-thumb='2008111_05.jpg'>
					<cite>Crestwood, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/3/' data-mediaId='10317' data-label='2009015-10.jpg' data-type='image' data-content='2009015-10.jpg' data-thumb='2009015-10.jpg'>
					<cite>Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/4/' data-mediaId='10324' data-label='2008120_11.jpg' data-type='image' data-content='2008120_11.jpg' data-thumb='2008120_11.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/5/' data-mediaId='10320' data-label='2008058_09.jpg' data-type='image' data-content='2008058_09.jpg' data-thumb='2008058_09.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/6/' data-mediaId='10329' data-label='061202_235854.jpg' data-type='image' data-content='061202_235854.jpg' data-thumb='061202_235854.jpg'>
					<cite>Dad, Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/7/' data-mediaId='10291' data-label='2010072-02.jpg' data-type='image' data-content='2010072-02.jpg' data-thumb='2010072-02.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/8/' data-mediaId='10290' data-label='2010087-03.jpg' data-type='image' data-content='2010087-03.jpg' data-thumb='2010087-03.jpg'>
					<cite>Somewhere in West Virginia</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/9/' data-mediaId='10327' data-label='2008024_05.jpg' data-type='image' data-content='2008024_05.jpg' data-thumb='2008024_05.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/10/' data-mediaId='10289' data-label='20110710-07.jpg' data-type='image' data-content='20110710-07.jpg' data-thumb='20110710-07.jpg'>
					<cite>Hot and tired, BMX Track, Tom Sawyer State Park, Louisville, Kentucky, July 2011</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/11/' data-mediaId='10316' data-label='2009016-05.jpg' data-type='image' data-content='2009016-05.jpg' data-thumb='2009016-05.jpg'>
					<cite>Louisville,Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/12/' data-mediaId='10271' data-label='2012023-05.jpg' data-type='image' data-content='2012023-05.jpg' data-thumb='2012023-05.jpg'>
					<cite>Pensacola, Florida</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/13/' data-mediaId='10326' data-label='2008030_02.jpg' data-type='image' data-content='2008030_02.jpg' data-thumb='2008030_02.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/14/' data-mediaId='10255' data-label='120824-000938-2.jpg' data-type='image' data-content='120824-000938-2.jpg' data-thumb='120824-000938-2.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/15/' data-mediaId='10258' data-label='2012036-12.jpg' data-type='image' data-content='2012036-12.jpg' data-thumb='2012036-12.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/16/' data-mediaId='10272' data-label='2012010-09.jpg' data-type='image' data-content='2012010-09.jpg' data-thumb='2012010-09.jpg'>
				</article>
				<article class=mediaItem id='/Portraits/One/17/' data-mediaId='10268' data-label='2012030-07.jpg' data-type='image' data-content='2012030-07.jpg' data-thumb='2012030-07.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/18/' data-mediaId='10286' data-label='2011046-05.jpg' data-type='image' data-content='2011046-05.jpg' data-thumb='2011046-05.jpg'>
					<cite>Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/19/' data-mediaId='10274' data-label='2012013-02.jpg' data-type='image' data-content='2012013-02.jpg' data-thumb='2012013-02.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/20/' data-mediaId='10284' data-label='2010141-01.jpg' data-type='image' data-content='2010141-01.jpg' data-thumb='2010141-01.jpg'>
					<cite>Williams, Arizona</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/21/' data-mediaId='10288' data-label='20110814-04.jpg' data-type='image' data-content='20110814-04.jpg' data-thumb='20110814-04.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/22/' data-mediaId='10292' data-label='2010072-08.jpg' data-type='image' data-content='2010072-08.jpg' data-thumb='2010072-08.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/23/' data-mediaId='10305' data-label='2009155-08.jpg' data-type='image' data-content='2009155-08.jpg' data-thumb='2009155-08.jpg'>
					<cite>Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/24/' data-mediaId='10328' data-label='2008023_10.jpg' data-type='image' data-content='2008023_10.jpg' data-thumb='2008023_10.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/25/' data-mediaId='10312' data-label='2009093-03.jpg' data-type='image' data-content='2009093-03.jpg' data-thumb='2009093-03.jpg'>
					<cite>Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/One/26/' data-mediaId='10310' data-label='2008027-05-hiRes.jpg' data-type='image' data-content='2008027-05-hiRes.jpg' data-thumb='2008027-05-hiRes.jpg'>
					<cite>Prospect, Kentucky</cite>
				</article>
			</section>
			<section id='Portraits.Two' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Portraits/Two/1/' data-mediaId='10264' data-label='2012042-05.jpg' data-type='image' data-content='2012042-05.jpg' data-thumb='2012042-05.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/Two/2/' data-mediaId='10257' data-label='2012051-08.jpg' data-type='image' data-content='2012051-08.jpg' data-thumb='2012051-08.jpg'>
				</article>
				<article class=mediaItem id='/Portraits/Two/3/' data-mediaId='10262' data-label='2012037-04.jpg' data-type='image' data-content='2012037-04.jpg' data-thumb='2012037-04.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/Two/4/' data-mediaId='10256' data-label='120812-213044.jpg' data-type='image' data-content='120812-213044.jpg' data-thumb='120812-213044.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/Two/5/' data-mediaId='10261' data-label='2012040-03.jpg' data-type='image' data-content='2012040-03.jpg' data-thumb='2012040-03.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/Two/6/' data-mediaId='10263' data-label='2012011-09-2.jpg' data-type='image' data-content='2012011-09-2.jpg' data-thumb='2012011-09-2.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/Two/7/' data-mediaId='10259' data-label='2012039-04.jpg' data-type='image' data-content='2012039-04.jpg' data-thumb='2012039-04.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
				<article class=mediaItem id='/Portraits/Two/8/' data-mediaId='10265' data-label='2012034-12.jpg' data-type='image' data-content='2012034-12.jpg' data-thumb='2012034-12.jpg'>
					<cite>Anna, Louisville, Kentucky</cite>
				</article>
			</section>
			<section id='Portraits.1' data-thumb=''>
				<article class=mediaItem id='/Portraits/1/'>
				</article>
			</section>
			<section id='Tumblr-Sketchbooks.Michael-Sebastian' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Tumblr-Sketchbooks.Splendid-Suburb' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Information.About-Michael-Sebastian' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Information/About-Michael-Sebastian/1/' data-mediaId='10019' data-label='About Michael Sebastian' data-type='html'>
					<div class=textPage>
						<h2>About Michael Sebastian</h2>
						<div class=textMask>
						<div class=pageText>
<p>I was born in New Orleans, and grew up in Baton Rouge, Louisiana and Dallas, Texas. I starting making and developing photographs around age eight (thanks, Mr. Treat) using that old first-camera cliché, a Kodak Brownie. Once its brittle bakelite finally yielded to my clumsy ministrations, I graduated to a well-used Zeiss Ikon Contina with a broken light meter -- which further disappointed me by failing to bounce resiliently from concrete.</p><br><p>Undismayed, I wound up graduating from medical school and two residencies, photographing all the while around life's other obligations. Along the way, I married a Kentuckian and moved to Louisville to raise two children. When not shooting, I practice anesthesiology in central Kentucky, in roughly that order of precedence. Fortunately for both cameras and patients, I now drop things far less frequently.</p><br><p>If you want to ask a question, buy a print, license an image, or (even better) commission me for a project, I'm all ears.</p><br><br><p><b>Contact information:</b></p><br><br>Click here to begin a new message in your email software:<br><br><u><a href="mailto:info@michaelsebastian.com?subject=commissioned photographic work by Michael Sebastian">here</a></u><br><br>OR via the Contact page:<br><br><u><a href="http://www.michaelsebastian.com/#/contact/">Contact</a></u>
						</div>
						</div>
					</div>
					<cite>Michael Sebastian biography</cite>
				</article>
			</section>
			<section id='Information.Publications-and-Exhibitions' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Information/Publications-and-Exhibitions/1/' data-mediaId='10008' data-label='Publications and Exhibitions' data-type='html'>
					<div class=textPage>
						<h2>Publications and Exhibitions</h2>
						<div class=textMask>
						<div class=pageText>
<b>September 2012</b> Participating photographer in Flak Photo's <i><a href="http://flakphoto.com/exhibition/looking-at-the-land#photo-62" target="_blank">Looking at the Land: 21st Century American Views</a></i><br><br><b>November 2011</b>  Represented <i>Fraction Magazine</i> at the Lishui Photo Festival 2011 in Lishui, China, with images from 52 Miles<br><br><b>August 2011</b>  Work-in-progress <i>Economalypse</i> featured on <i><a href="http://blog.susanburnstine.com/post/9549917298" target="_blank">underexposed</a></i>, blog by photographer / journalist Susan Burnstine<br><br><b>August 2011</b>  <i><a href="http://raykophoto.com/fraction-magazine-3-years-in-the-making/" target="_blank">Fraction Magazine</a></i> show at Rayko Photo Center, San Francisco<br><br><b>December 2010</b>   December featured photographer, <a href="http://oneonethousand.org/photographers/sebastian/" target="_blank"><i>One One Thousand</i></a>, online journal of southern photography<br><br><b>November 2010</b>  <i>The New York Times Magazine</i>, November 5, 2010: <a href="http://www.nytimes.com/2010/11/07/magazine/07FOB-WWLN-t.html?_r=1&scp=1&sq=michael%20sebastian&st=cse" target="_blank">"Fantasy Politics"</a>, photograph accompanying essay<br><br><b>August 2010</b>  <a href="http://photolucidapdx.blogspot.com/2010/08/and-finalists-are.html" target="_blank">Critical Mass 2010 Finalist</a><br><br><b>July 2010</b>  Featured on <a href="http://flakphoto.com/photo/michael-sebastian-new-fence-section" target="_blank">Flak Photo</a> as part of their Review Santa Fe series<br><br><b>June 2010</b>   <a href="http://www.visitcenter.org/index.php/reviews/photographer_gallery/review_santa_fe_2010/michael_sebastian" target="_blank">Review Santa Fe 2010</a>  with "52 Miles"<br><br><b>April-May 2010</b>  photographer in the <a href="http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCAQFjAA&url=http%3A%2F%2Fwww.griffinmuseum.org%2Fpdfs%2F2011%2FGriffin%2520AR2010.pdf&ei=-a5GUODRLIOy8ASNzoDQBA&usg=AFQjCNFc7NtDRtXUcy87rxF_uYUvRWgItw&sig2=qqEkIeZIIdQJ85ntFiSqqg" target="_blank">Griffin Museum Virtual Gallery</a> (download annual report for listing)<br><br><b>December 2009</b>  featured on <a href="http://academya.wordpress.com/2009/12/10/what-ever-happened/" target="_blank"><i> Academy A</i></a>, blog by Jeffrey Michael Smith<br><br><b>November 2009 </b>  featured on <a href="http://www.killeryellow.com/blog/2009/11/30/michael-sebastian/" target="_blank"><i> Shooting Wide Open</i></a>, blog by Jin Zhu<br><br><b>November 2009 </b>  featured on <a href="http://lenscratch.blogspot.com/2009/11/michael-sebastian.html" target="_blank"><i> Lenscratch</i></a>, blog by Aline Smithson<br><br><b>Fall 2009</b>  <a href="http://c4fap.org/exhibitors/2009Portraits/ExhibitorsAnnounce.asp" target="_blank">Group Portraiture exhibition,</a> Center For Fine Art Photography, Ft. Collins, Colorado, juried by Mary Ellen Mark<br><br><b>May 2009</b>  "Natural Geometries",  <a href="http://fractionmag.com/pastIssues/issue7.htm" target="_blank"><i> Fraction Magazine</i> issue 7</a><br><br><b>Jan 2009</b>  Group Portraiture Exhibition, "My World Is A Family", Perm, Russia; part of the Louisville/Perm Sister Cities program<br><br><b>Jan-Feb 2007</b>  Solo Exhibition, "Winter Works", Deven7 Studios, Louisville<br><br><b>Jan-Feb 2006</b>  Solo Exhibition, "Introductions", Kentucky Center for the Arts, Louisville<br><br><b>November 2005</b>  "LaGrange", photos accompanying feature article,  <i> Kentucky Monthly</i> magazine
						</div>
						</div>
					</div>
					<cite>Publications and Exhibitions | Michael Sebastian</cite>
				</article>
			</section>
			<section id='Information.Buy-or-Commission' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Information/Buy-or-Commission/1/' data-mediaId='10001' data-label='Buy or Commission' data-type='html'>
					<div class=textPage>
						<h2>Buy or Commission</h2>
						<div class=textMask>
						<div class=pageText>
<p><b>Commissions, Prints, or Licensing</b></p><br><p>I welcome inquiries about <b>commissioned</b> work, and I look forward to working with you to translate your project ideas into beautiful images. This is what really gets me excited, so let me hear from you.</p><br><p>You can also purchase <b>fine prints</b> of most of the images on this site. Prints are made in-house with pigment inks on archival papers; if properly displayed and protected, they will last a very long time. I can also make color dye-sublimation prints on substrates of masonite, medium-density fiberboard (MDF), or aluminum. These prints are ready to display without further matting or framing, for a very clean, minimalist presentation. I have several color photographs displayed this way in my home, and they are spectacular.</p><br><p>Most images on this site are also available for <b>licensing</b>. Licensing grants the use of an image for a defined purpose, time limit, geographic distribution, and circulation. These factors together determine the price. I retain the copyright for all licensed images.</p><br><br><b>Contact information:</b><br/ ><br/ ><br><br>Click here to begin a new message in your email software:<br><br><u><a href="mailto:info@michaelsebastian.com?subject=commissioned photographic work by Michael Sebastian">here</a></u><br><br>OR via the Contact page:<br><br><u><a href="http://www.michaelsebastian.com/#/contact/">Contact</a></u>
						</div>
						</div>
					</div>
					<cite>Buy or Commission work | Michael Sebastian</cite>
				</article>
			</section>
			<section id='Information.Copyright' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Information/Copyright/1/' data-mediaId='10002' data-label='Copyright' data-type='html'>
					<div class=textPage>
						<h2>Copyright</h2>
						<div class=textMask>
						<div class=pageText>
<b>Obligatory Copyright Warning!</b><br><br>All text and images on this site are ©Michael Sebastian. All rights are reserved. Images on this site are registered with the United States Copyright Office. They may not be used for any purpose without written permission.<br><br>To do so is a violation of copyright law, and may result in your being hurled from the  <a href="http://en.wikipedia.org/wiki/Tarpeian_Rock" target="_blank"><u>Tarpeian Rock</u></a>, among other undesirable outcomes.
						</div>
						</div>
					</div>
					<cite>Copyright Information | Michael Sebastian</cite>
				</article>
			</section>
			<section id='Information.Privacy' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
				<article class=mediaItem id='/Information/Privacy/1/' data-mediaId='10021' data-label='Privacy' data-type='html'>
					<div class=textPage>
						<h2>Privacy</h2>
						<div class=textMask>
						<div class=pageText>
<p><i>No, not that kind of privacy---though I definitely won't share your personal information with third parties without your opt-in consent.</i></p><br><p>I've been accosted so many times while photographing that I created this page, to have a place to which to refer those people who insist, with varying degrees of rudeness, that I can't photograph them or their property in public view.</p><br><p>I'm a photographer, not a lawyer, so what follows on this page is my informed-layman's understanding of privacy / publicity law. If you want a lawyer's take, I can recommend <a href="http://www.krages.com/phoright.htm" target="_blank"> Bert Krages</a>. He specializes in privacy and intellectual-property law, and has written widely on these subjects.</p><br><p>To put it simply, <b>if you are out in public, you have no expectation of privacy. You, your children (regardless of age), or your property can be photographed at any time, with or without your consent. The resulting photographs can be published in any form, without your permission, and without compensation.</b> Most people don't realize this, and it comes as something of a shock to read it. But it's true. (How do you think the government gets away with all those surveillance and traffic cameras; or paparazzi, with embarrassing celebrity photos?)</p><br><p>I can't trespass or impede your free movement in order to photograph you or your property. I also can't photograph you when you reasonably do have an expectation of privacy---such as standing inside your home undressing, while I'm perched outside your window like some vile peeping Tom.  And property owners have the right to restrict photography  <b>on their premises</b>.</p><br><p>There are some restrictions on my use of the images. I cannot use photographs of you to portray you in a false light. I can't photograph you, let's say, as you walk in front of a   <a href="http://www.thefreedictionary.com/brothel" target="_blank">brothel</a>, and publish the images in a way that falsely implies you're a patron rather than a pedestrian. Additionally, I can't use your image to imply your endorsement of a product or a cause---such as in an ad for condoms or cornflakes. For such commercial use, I'd need your written permission in the form of a release, which delineates the terms of that use, and your compensation for it.  <b>But most other uses are fair game</b>.</p><br><p>Furthermore, you certainly have no right to demand I desist. Nor may you demand, or attempt to seize, my memory cards or film, nor impede my activity. That's harrassment, which can get you arrested. And if you place a hand on me, you've committed battery, and <i>that</i> also can get you arrested.</p><br><p>I have no wish to bother anyone while I photograph. Neither, though, do I wish to be bothered while engaging in a harmless and perfectly legal pursuit. Therefore, I suggest -- if you see someone publicly making photographs, and you believe s/he is doing something illegal -- that you report it to the police. The subsequent conversation will be educational for everyone involved.</p>
						</div>
						</div>
					</div>
					<cite>Privacy information | Michael Sebastian</cite>
				</article>
			</section>
			<section id='Information.1' data-thumb=''>
				<article class=mediaItem id='/Information/1/'>
				</article>
			</section>
			<section id='Connect.Google-Plus' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Connect.Twitter' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Connect.Facebook' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Connect.Legacy-Blog' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Connect.Download-PDF' data-thumb='{"verticalMargin":0,"masonry":false,"type":"fill","titleFontFamily":null,"side":null,"titleFontColor":"0x0","dock":null,"defaultOn":false,"horizontalMargin":0,"titleFontSize":0}'>
			</section>
			<section id='Connect.1' data-thumb=''>
				<article class=mediaItem id='/Connect/1/'>
				</article>
			</section>
			<section id='Contact' data-thumb=''>
			<article class=mediaItem id='/Contact/1/' data-mediaId='10000' data-label='contact' data-type='contactForm'>
			<div class=textMask>
				<div class=contactForm>
					<div class=contactFormExtra>
<p>For commissions, print purchases, or image licensing, you've come to the right page.</p><br><p>Michael Sebastian</p><p>PO Box 1069</p><p>Prospect, KY 40059-1069</p><p>United States</p><br /><br /><p> 1.502.509.1421</p><br /><p><a href="mailto:mike@michaelsebastian.com?subject=website inquiry">mike@michaelsebastian.com</a></p>
					</div>
					<div class=contactFormFields>
					<div id=contactResponse></div>
					<h3 class=contactFormTitle>contact</h3>
						<form name=contact>
							<input class=input onfocus='Share.focus(this)' onblur='Share.blur(this)' id='Name' type='text' name='Name' size='39' value='Name' data-default='Name' /><br>
							<input class=input onfocus='Share.focus(this)' onblur='Share.blur(this)' id='Email' type='text' name='Email' size='39' value='Email' data-default='Email' /><br>
							<input class=input onfocus='Share.focus(this)' onblur='Share.blur(this)' id='Phone' type='text' name='Phone' size='39' value='Phone' data-default='Phone' /><br>
							<textarea class=textarea onfocus='Share.focus(this)' onblur='Share.blur(this)' rows='4' cols='39' id='Comments' type='text' name='Comments' data-default='Comments' >Comments</textarea><br>
							<input class=submit type='button' onfocus='Share.focus(this)' onblur='Share.blur(this)' onclick='Share.contactForm()' value='Submit' />
						</form>
					</div>
				</div>
			</div>
			</article>
			</section>
		</div>
		<nav>
			<a alt='caption' type='caption'><icon>%</icon></a>
			<a alt='email image' type='email'><icon>~</icon></a>
			<a alt='show thumbnails' type='thumbs'><icon>!</icon></a>
			<a alt='previous image' type='prev'><icon>#</icon></a>
			<a id='navCount' type='count'><icon>&#0160;</icon><label>1 of 4</label></a>
			<a alt='next image' type='next'><icon>$</icon></a>
			<a alt='fullscreen' type='fullscreen'><icon>*</icon></a>
		</nav>
		<footer>&#169; Michael Sebastian. All Rights Reserved. <a data-link='icon-ext' href=""></a></footer>
	</div>
<script>
(function(window) {
	function Util() {}

	Util.dom = function(obj) {
		var o = document.getElementsByTagName('*');
		var i = o.length;
		while(i--) o[i].id ? this[o[i].id] = o[i] : this[o[i].tagName] = o[i];
		return this;
	};

	Util.searchArray = function(str, arr) {
		var i = arr.length;
		var bool = false;
		while(i--) {
			if(str == arr[i]) {
				bool = true;
				break;
			}
		}
		return bool;
	};

	Util.findClass = function(o, clss) {
		return new RegExp('(^|\\s)' + clss + '(\\s|$)').test(o.className);
	};

	Util.hexToRGB = function(hex) {
		var rgb = new Array();
		hex = (hex.charAt(0) == "#") ? hex.substring(1, 7) : hex;
		rgb['r'] = parseInt(hex.substring(0, 2), 16);
		rgb['g'] = parseInt(hex.substring(2, 4), 16);
		rgb['b'] = parseInt(hex.substring(4, 6), 16);
		return rgb;
	};

	Util.percentToPixels = function(value, range) {
		if(value.search('%') > -1) {
			value = value.replace('%', '');
			value = (Number(value) * .01) * range;
			return Math.round(value);
		} else if(value.search('px') > -1) {
			value = value.replace('px', '');
			return Number(value);
		} else {
			return Number(value);
		}
	};

	Util.getStyle = function(obj, prop) {
		try {
			return parseInt(window.getComputedStyle(obj).getPropertyValue(prop));
		} catch(e) { /*console.log(obj,prop)*/
		};
	};

	Util.getDocHeight = function() {
		return Math.max(
		Math.max(document.body.scrollHeight, document.documentElement.scrollHeight), Math.max(document.body.offsetHeight, document.documentElement.offsetHeight), Math.max(document.body.clientHeight, document.documentElement.clientHeight));
	};

	Util.getExt = function(file) {
		return file.split('.').pop();
	};

	Util.getThumbQuery = function(w, h) {
		if(RETINA) {
			return '?w=' + w * 2 + '&h=' + h * 2 + '&f=';
		} else {
			return '?w=' + w + '&h=' + h + '&f=';
		}
	};

	window.Util = Util;

}(window));

function closeBlocker() {
	var blocker = document.getElementById('blocker');
	if(blocker) {
		new CSSTween(blocker, [0], ['opacity .25s ease-in-out'], function() {
			Site.blocker = false;
			document.body.removeChild(blocker);
		}, false);
	}
}

function showBlocker() {
	Site.blocker = true;
	var blocker = document.getElementById('blocker');
	if(!blocker) blocker = document.createElement('div');
	blocker.setAttribute('id', 'blocker');
	blocker.style.position = 'absolute';
	blocker.style.width = '100%';
	if(POD) {
		blocker.style.height = window.innerHeight + 'px';
		blocker.style.top = window.pageYOffset + 'px';
	} else {
		blocker.style.height = '100%';
		blocker.style.top = 0 + 'px';
	}
	blocker.style.zIndex = 3;
	blocker.style.left = 0 + 'px';
	blocker.style.backgroundColor = "rgba(0,0,0,0.65)";
	document.body.appendChild(blocker);
	blocker.style.opacity = 0;
	blocker.style.zIndex = 10;
	new CSSTween(blocker, [1], ['opacity .25s ease-in-out'], '', false);
}

function resizeBlocker() {
	var blocker = document.getElementById('blocker');
	if(blocker) {
		blocker.style.left = 0 + 'px';
		blocker.style.top = 0 + 'px';
		if(POD) {
			blocker.style.height = window.innerHeight + 'px';
			blocker.style.top = window.pageYOffset + 'px';
		}
	}
}
var USER_AGENT = 'html',
BROWSER_NAME = 'Another Browser',
BROWSER_VERSION = '0',
PAD = 'html' === 'pad' ? true : false,
POD = 'html' === 'pod' ? true : false,
Firefox = navigator.userAgent.match(/Firefox/i) != null,
Safari = navigator.userAgent.match(/Safari/i) != null,
mSafari = navigator.userAgent.match(/(Mobile).+(Safari)/i) != null,
IOS4 = navigator.userAgent.match(/(iPhone).+(OS 4)/i) != null,
DROID = navigator.userAgent.match(/Android/i) != null && navigator.userAgent.match(/Pad/i) != 'Pad',
Chrome = navigator.userAgent.match(/Chrome/i) != null,
RETINA = (window.retina || window.devicePixelRatio > 1),
d = Util.dom(),
STAGE_WIDTH = 0,
STAGE_HEIGHT = 0,
easeOut = 'cubic-bezier(0,0,0.25,1)',
INTRO = 'intro',
HOME = 'home',
SLIDESHOW = 'rootSlideshow',
IMAGE = 'image',
VIDEO = 'video',
HTML = 'html',
SWF = 'swf',
LINK = 'link',
PDF = 'pdf',
CONTACT = 'contactForm',
SLIDE_INTERVAL = 5*1000,
TOUCH_START = 'touchstart',
TOUCH_MOVE = 'touchmove',
TOUCH_END = 'touchend',
TOUCH_CANCEL = 'touchcancel',
MOUSE_OVER = 'mouseover',
MOUSE_DOWN = 'mousedown',
MOUSE_MOVE = 'mousemove',
MOUSE_UP = 'mouseup',
MOUSE_OUT = 'mouseout',
CLICK = 'click';
"ontouchstart" in window ? touchDevice = true : touchDevice = false;
var SELECT_EVENT = touchDevice ? 'touchend' : 'click';

(function(window) {
	Address.firstload = true;
	Address.listeners = [];
	Address.path = '';
	Address.pathNames = [];
	Address.base = '/';
	Address.docTitle = '';
	Address.ga = true;

	function Address() {
		Address.docTitle = document.title;
	}

	Address.addEventListener = function(type, listener, capture) {
		capture = capture ? capture : false;
		if(DROID) {
		} else if(BROWSER_NAME === 'MSIE' && BROWSER_VERSION < 10 && Address.trim(Address.getPath()) !== '') {
			Address.addHash();
		} else if(history.pushState && window.location.hash) {
			Address.removeHash(window.location.hash);
		}
		if(window.location.href.search("%20") > -1 || window.location.href.search(" ") > -1) {
			Address.addDashes();
		}
		Address.listeners.push({
			'type': type,
			'listener': listener
		});
		Address.setListeners();
		if(Address.getIEVersion() > 4 && Address.getIEVersion() < 8) {
			Address.savedHash = window.location.hash;
			setInterval(Address.checkInterval, 200);
		} else if(DROID && Address.getDroidVersion() < 3) {
			Address.savedHash = window.location.hash;
		}
	};

	Address.setListeners = function() {
		window.onpopstate = Address.onpushstate = window.onhashchange = function() {
			Address.fireListeners();
		};
	};

	Address.checkInterval = function() {
		if(Address.savedHash != window.location.hash) {
			Address.savedHash = window.location.hash;
			Address.fireListeners();
		}
	};

	Address.fireListeners = function() {
		if(!Address.firstload) {
			for(var i in Address.listeners) {
				Address.path = Address.getPath();
				Address.pathNames = Address.getPathNames();
				var fn = Address.listeners[i].listener;
				if(typeof fn == 'function') {
					fn(Address.getPath());
				} else {
					var ns = fn.split('.');
					window.document[ns[0]][ns[1]](Address.getPath());
				}
			}
		}
	};

	Address.setValue = Address.setPath = function(value) {
		Address.firstload = false;
		value = Address.trim(value) == '' ? '' : value = Address.trim(value) + '/';
		if(value.indexOf("http") == 0) {
			window.location = value;
		} else if(BROWSER_NAME === 'MSIE' && BROWSER_VERSION < 10) {
			window.location = Address.base + '#/' + value;
		} else if(history.pushState && !DROID) {
			history.pushState({
				page: Address.trim(value)
			}, '', Address.base + value);
			Address.onpushstate();
		} else if(DROID && Address.getDroidVersion() > 2.9) {
			history.pushState({
				page: Address.trim(value)
			}, '', Address.base + value);
			Address.onpushstate();
		} else {
			window.location = Address.base + '#/' + value;
		}
		if(Address.ga) _gaq.push(['_trackPageview']);
	};

	Address.back = function() {
		history.back();
	};

	Address.setLocation = function(value) {
		window.location = value;
	};

	Address.getBase = function() {
		return Address.base;
	};

	Address.getPath = function() {
		if(window.location.hash) {
			return decodeURIComponent(Address.trim(window.location.hash));
		} else {
			return decodeURIComponent(Address.trim(window.location.pathname));
		}
	};

	Address.getQuery = function() {
		return window.location.search;
	};

	Address.getPathNames = function() {
		return Address.getPath().split('/');
	};

	Address.setTitle = function(title) {
		document.title = Address.docTitle = title;
	};

	Address.getTitle = function() {
		return Address.docTitle ? Address.docTitle : document.title;
	};

	Address.removeHash = function(hash) {
		window.location = Address.base + Address.trim(hash);
	};

	Address.addHash = function() {
		window.location = Address.base + '#/' + Address.trim(Address.getPath());
	};

	Address.trim = function(str) {
		if(Address.base != '/') str = str.replace(Address.base, '');
		return str.replace(/^#/, '').replace(/^\s+|\s+$/g, '').replace(/^\/|\/$/g, '');
	};

	Address.getHost = function() {
		return window.location.host;
	};

	Address.addDashes = function() {
		var str = window.location.href.replace(/ /g, '-');
		window.location = str.replace(/%20/g, '-');
	};

	Address.getDroidVersion = function() {
		return new RegExp("Android ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null ? parseFloat(RegExp.$1) : -1;
	};

	Address.getIEVersion = function() {
		return new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null ? parseFloat(RegExp.$1) : -1;
	};

	window.Address = Address;

}(window));
(function(window) {

	CSSTween.vendors = ['WebkitTransition', 'MozTransition', 'OTransition', 'transition'];
	CSSTween.cubic = 'cubic-bezier(0.80, 0.0, 0.20, 1.000)';

	function CSSTween(obj, to, atr, callback, rmHA) {
		var dur = atr[0].split(' ')[1];
		obj.dur = dur[dur.length - 2] === 'ms' ? Number(dur.replace(dur[dur.length - 2], '')) : Number(dur.replace(dur[dur.length - 1], '')) * 1000;
		obj.atr = atr[0].split(' ')[0];
		obj.cb = callback || false;
		this.obj = obj;
		obj.rmHA = rmHA || false;

		if(obj.style) CSSTween.checkDisplay(obj);

		if(!rmHA && (Safari || mSafari)) obj.style.WebkitTransform = 'translateZ(0)';

		CSSTween.setAttributes(obj, atr);

		setTimeout(function() {
			CSSTween.initTween(obj, to, atr);
			CSSTween.setEndHandlers(obj);
		}, 1);
	}

	CSSTween.setAttributes = function(obj, atr) {
		var i = CSSTween.vendors.length;
		while(i--) obj.style[CSSTween.vendors[i]] = CSSTween.replaceEasingCurves(atr.toString());
	};

	CSSTween.initTween = function(obj, to, atr) {
		var i = to.length;
		while(i--) obj.style[atr[i].split(' ')[0]] = to[i];
	};

	CSSTween.setEndHandlers = function(obj) {
		setTimeout(function() {
			CSSTween.onComplete(obj);
		}, obj.dur);
	};

	CSSTween.onComplete = function(obj) {
		if(obj.cb) obj.cb(obj);
		if(obj.style && obj.atr === 'opacity' && obj.style.opacity === 0) {
			obj.style.display = 'none';
		}
		if(obj.rmHA && (Safari || mSafari)) obj.style.WebkitTransform = 'none';
	};

	CSSTween.checkDisplay = function(obj) {
		if(obj.atr === 'opacity' && obj.style.display === 'none') {
			obj.style.display = 'block';
			obj.style.opacity = 0;
		}
	};

	CSSTween.replaceEasingCurves = function(str) {
		return str.replace(/cubic/g, CSSTween.cubic);
	};

	window.CSSTween = CSSTween;

}(window));
(function(window) {
	Menu.closeDelay = 3000;
	Menu.subs = [];
	Menu.expandAll = false;
	Menu.state = 'open';
	Menu.bulletWidth = 0;
	Menu.bulletHeight = 0;
	Menu.bulletSubWidth = 0;
	Menu.bulletSubHeight = 0;

	function Menu() {
		Menu.load();
	}

	Menu.load = function() {
		d.menuText.style.opacity = 0;

		var menuBgAlpha = 0.9 < .99 ? .99 : 0.9;

		var topMenuPad = 0,
			bottomMenuPad = 0;
		if(!POD) {
			if('top' == 'top' && !POD) {
				topMenuPad = -15;
				bottomMenuPad = 0;
			} else if('top' == 'center' && !POD) {
				topMenuPad = -15 * 0.5;
				bottomMenuPad = -15 * 0.5;
			} else if('top' == 'bottom' && !POD) {
				topMenuPad = 0;
				bottomMenuPad = -15;
			}
		}

		if(POD) {
			var logoBgRgb = Util.hexToRGB('#f1f1f1');
			d.logo.style.backgroundColor = "rgba(" + logoBgRgb.r + "," + logoBgRgb.g + "," + logoBgRgb.b + "," + menuBgAlpha + ")";
			var menuRgb = Util.hexToRGB('#f1f1f1');
			d.menuText.style.backgroundColor = "rgba(" + menuRgb.r + "," + menuRgb.g + "," + menuRgb.b + "," + menuBgAlpha + ")";
			d.menuText.style.top = 0 + 'px';
		} else if(PAD) {
			var menuRgb = Util.hexToRGB('#f1f1f1');
			d.logo.style.backgroundColor = "rgba(" + menuRgb.r + "," + menuRgb.g + "," + menuRgb.b + "," + menuBgAlpha + ")";
			d.menu.style.backgroundColor = "rgba(" + menuRgb.r + "," + menuRgb.g + "," + menuRgb.b + "," + menuBgAlpha + ")";
		}

		Menu.getBulletWidth();


		if(PAD || POD) {
			Menu.buttonBuild();
		}

		if(POD) document.addEventListener("scroll", Menu.buttonPos, false);

		Menu.resize();
		Site.resize();
		new CSSTween(d.menuText, [1], ['opacity .3s linear']);

		if(!Menu.expandAll && !POD) {
			Menu.getSubMenus();
			Menu.collapseAll();
		}

		var scrollBarWidth = PAD ? 10 : 6;

		if(!POD) {
			if(!Menu.scroll) Menu.scroll = new Scroll(d.menuText, d.menuMask, {
				width: scrollBarWidth,
				align: 'left',
				vAlign: 'top',
				topPad: 0,
				bottomPad: 0,
				color: '#000000',
				hover: '#008dff',
				name: 'menu'
			});
		}

		Menu.mouseEvents();

	};

	Menu.resize = function() {
		if(!POD && !PAD) d.menu.style.top = 60 + 20 + 'px';

		var menuHeight;
		if(PAD) {
			var logoHeight = Util.getStyle(d.logo, 'height');
			menuHeight = STAGE_HEIGHT - logoHeight;
			d.menu.style.top = logoHeight + 'px';
			d.logo.style.top = -logoHeight + 'px';
		} else {
			menuHeight = (window.innerHeight - (60 + 40));
		}

		if(!POD) new CSSTween(d.menu, [menuHeight + 'px'], ['height 0s linear']);
		if(!POD && !PAD) {
			new CSSTween(d.menuBg, [menuHeight + 'px'], ['height 0s linear']);
			switch('left') {
			case 'left':
				d.menu.style.left = 0 + 'px';
				d.menuBg.style.left = 0 + 'px';
				break;
			case 'right':
				d.menu.style.right = 0 + 'px';
				d.menuBg.style.right = 0 + 'px';
				break;
			}
		}

		if(POD || PAD) Menu.buttonPos();

		if('left' == 'center' && !POD) {
			var menuTextWidth = Util.getStyle(d.menuText, 'width');
			d.menuText.style.left = (((260 - menuTextWidth) * 0.5)) + 'px';
		} else if('left' == 'left' && !POD) {
			var menuTextWidth = Util.getStyle(d.menuText, 'width');
			d.menuText.style.left = (50) + 'px';
		}

		var footerHeight = document.getElementsByTagName('footer')[0] ? Util.getStyle(document.getElementsByTagName('footer')[0], 'height') : 0;

		if('top' == 'top' && !POD && PAD) {
			if('top' == 'top' && 'left' == 'left') {
				var top = -15 - logoHeight;
				if(top > 0) {
					d.menuMask.style.top = top + 'px';
				} else {
					d.menuMask.style.top = 0 + 'px';
				}
			} else {
				d.menuMask.style.top = -15 + 'px';
			}
			d.menuText.style.top = 0 + 'px';
		} else if('top' == 'top' && !POD) {
			d.menuMask.style.top = '-15px';
			d.menuText.style.top = 0 + 'px';
		} else if('top' == 'center' && !POD && PAD) {
			var menuTextHeight = Util.getStyle(d.menuText, 'height');
			var center = (menuHeight - (menuTextHeight + logoHeight)) * 0.5;
			if(center > 0) {
				d.menuMask.style.top = center + 'px';
			} else {
				d.menuMask.style.top = 0 + 'px';
			}
			d.menuText.style.top = 0 + 'px';
		} else if('top' == 'center' && !POD) {
			var menuTextHeight = Util.getStyle(d.menuText, 'height');
			d.menuMask.style.top = ((menuHeight - menuTextHeight) * 0.5) + 'px';
			d.menuText.style.top = 0 + 'px';
		} else if('top' == 'bottom' && !POD && PAD) {
			d.menuMask.style.bottom = -15 + footerHeight + 10 + 'px';
			d.menuText.style.bottom = 0 + 'px';
		} else if('top' == 'bottom' && !POD) {
			d.menuMask.style.bottom = '-15px';
			d.menuText.style.bottom = 0 + 'px';
		}

		if(!POD) {
			var menuTextHeight = Util.getStyle(d.menuText, 'height');
			var menuTextPaddingVertical = PAD ? logoHeight + -15 + footerHeight + 10 : -15;

			if(('top' == 'top' || 'top' == 'bottom') && STAGE_HEIGHT - menuTextPaddingVertical < menuTextHeight) {
				d.menuMask.style.height = STAGE_HEIGHT - menuTextPaddingVertical + 'px';
			} else if('top' == 'center' && STAGE_HEIGHT < menuTextHeight) {
				d.menuMask.style.top = 0 + 'px';
				d.menuMask.style.height = STAGE_HEIGHT + 'px';
			} else {
				d.menuMask.style.height = menuTextHeight + 'px';
			}
			Scroll.resize();
		}

		if(POD && Menu.state == 'closed') {
			var closedX = -(Menu.getWidth());
			new CSSTween(d.menu, [closedX + 'px'], ['left 0s']);
			new CSSTween(d.logo, [0], ['opacity 0s']);
			Menu.buttonPos();
			Menu.buttonShow();
		} else if(PAD && Menu.state == 'closed') {
			Menu.buttonPos();
			Menu.buttonShow();
		}
	};

	Menu.getSubMenus = function() {
		var divs = d.menuText.getElementsByTagName('div');
		for(var i in divs) {
			if(Util.findClass(divs[i], 'subMenu')) {
				Menu.subs.push(divs[i]);
			}
		}
	};

	Menu.expand = function(id) {
		d.menuMask.style.overflow = 'visible';

		for(var i in Menu.subs) {
			var sub = Menu.subs[i];
			if(sub.getAttribute('data-id') == id) {
				sub.setAttribute('data-collapse', false);
				var height = Number(sub.getAttribute('data-height'));
				sub.style.display = 'block';
				new CSSTween(sub, [height + 'px', 1], ['height .25s', 'opacity .35s'], function() {
					this.style.overflow = 'visible';
					Menu.resize();
					Scroll.resize();
					setTimeout(Menu.resize, 500);
				});
			} else if(!Menu.expandAll && !POD) {
				sub.setAttribute('data-collapse', true);
				sub.style.overflow = 'hidden';
				new CSSTween(sub, [0 + 'px', 0], ['height .25s', 'opacity .25s'], function() {
					this.style.display = 'none';
					Menu.resize();
				});
			}
		}
	};

	Menu.collapseAll = function() {
		for(var i in Menu.subs) {
			var sub = Menu.subs[i];
			sub.setAttribute('data-height', Util.getStyle(sub, 'height'));
			sub.setAttribute('data-collapse', true);
			sub.style.height = 0 + 'px';
			sub.style.opacity = 0;
			sub.style.display = 'none';
			sub.style.overflow = 'hidden';
		}
	};

	Menu.getWidth = function() {
		if(POD) {
			return window.innerWidth;
		} else if(PAD) {
			return 260;
		} else {
			return 260;
		}
	};

	Menu.getLeft = function() {
		if(PAD || POD) {
			Menu.left = 0;
		} else {
			Menu.left = 'left' == 'left' ? Menu.getWidth() + 0 : 0;
		}
		return Menu.left;
	};

	Menu.buttonBuild = function() {
		Menu.menuBtn = document.createElement('img');
		Menu.menuBtn.style.opacity = 0;
		Menu.menuBtn.style.position = 'absolute';
		var src = RETINA ? 'menu@2x.png' : 'menu.png';
		Menu.menuBtn.setAttribute('src', Address.base + 'inc/icn/' + src);
		Menu.menuBtn.style.display = 'block';
		Menu.menuBtn.style.zIndex = 10;
		Menu.menuBtn.style.width = 20 + 'px';
		Menu.menuBtn.style.height = 20 + 'px';
		d.site.appendChild(Menu.menuBtn);
		Menu.buttonPos();
	};

	Menu.buttonShow = function() {
		new CSSTween(Menu.menuBtn, [.65], ['opacity .3s']);
		Menu.menuBtn.addEventListener('click', Menu.open, false);
	};

	Menu.buttonHide = function() {
		new CSSTween(Menu.menuBtn, [0], ['opacity .3s']);
		Menu.menuBtn.removeEventListener('click', Menu.open, false);
	};

	Menu.buttonPos = function() {
		new CSSTween(Menu.menuBtn, [5 + 'px', window.pageYOffset + 5 + 'px'], ['left .1s linear', 'top .1s linear']);
	};

	Menu.open = function() {
		Menu.state = 'open';
		if(Menu.closeTimer) clearTimeout(Menu.closeTimer);
		var openX = 0 + 'px';
		d.menu.style.display = 'block';
		new CSSTween(d.menu, [1], ['opacity .35s']);
		new CSSTween(d.menu, [openX], ['left .5s']);
		new CSSTween(d.logo, [1], ['opacity .2s']);
		setTimeout(function() {
			if(Menu.scroll) Menu.scroll.back.style.visibility = 'visible';
			Menu.buttonPos();
			Menu.buttonHide();
		}, 550);
		if(POD) clearInterval(Site.slideInterval);
	};

	Menu.close = function() {
		if(Menu.closeTimer) clearTimeout(Menu.closeTimer);
		Menu.closeTimer = setTimeout(function() {
			Menu.closeDelay = 0;
			var closedX = -(Menu.getWidth());
			new CSSTween(d.menu, [closedX + 'px'], ['left .8s']);
			if(POD) {
				Menu.buttonShow();
				Menu.buttonPos();
			} else if(PAD) {
				Menu.buttonShow();
				Menu.buttonPos();
			}
			setTimeout(function() {
				if(POD) {
					new CSSTween(d.logo, [0], ['opacity .5s']);
					d.menu.style.display = 'none';
				} else if(PAD) { /*new CSSTween(d.menu, [0], ['opacity .35s']);*/
					/*new CSSTween(d.logo, [0], ['opacity .35s']);*/
					if(Menu.scroll) Menu.scroll.back.style.visibility = 'hidden';
				}
			}, 600);
			setTimeout(function() {
				Menu.state = 'closed';
			}, 500);
		}, Menu.closeDelay);
	};

	Menu.mouseEvents = function() {
		var menuBtn = d.menu.getElementsByTagName('a');
		var i = menuBtn.length;
		while(i--) {
			menuBtn[i].style.opacity = 1;
			menuBtn[i].label = menuBtn[i].getElementsByTagName('li')[0];
			if(POD) {
				if(menuBtn[i].id != 'logo' && Util.findClass(menuBtn[i], 'menuItem')) {
					var menuBtnRgb = Util.hexToRGB('#3E4661');
					menuBtn[i].style.backgroundColor = "rgba(" + menuBtnRgb.r + "," + menuBtnRgb.g + "," + menuBtnRgb.b + "," + 0.15 + ")";
				}
			}
			if(menuBtn[i].getAttribute('data-link') == 'icon-ext') {
				menuBtn[i].addEventListener('mouseover', Menu.iconOver, false);
				menuBtn[i].addEventListener('mouseout', Menu.iconOut, false);
			} else if(menuBtn[i].id != 'logo') {
				if(Util.findClass(menuBtn[i], 'menuItem')) {
					Menu.buildBullet(menuBtn[i]);
					menuBtn[i].addEventListener('mouseover', Menu.mouseOver, false);
					menuBtn[i].addEventListener('mouseout', Menu.mouseOut, false);
					if(menuBtn[i].getAttribute('data-link') === 'internal') {
						menuBtn[i].addEventListener(TOUCH_END, Menu.click, false);
						menuBtn[i].addEventListener(CLICK, Menu.click, false);
					}
				} else if(Util.findClass(menuBtn[i], 'subMenuItem')) {
					Menu.buildSubBullet(menuBtn[i]);
					menuBtn[i].addEventListener('mouseover', Menu.mouseOver, false);
					menuBtn[i].addEventListener('mouseout', Menu.mouseOut, false);
					if(menuBtn[i].getAttribute('data-link') === 'internal') {
						menuBtn[i].addEventListener(TOUCH_END, Menu.click, false);
						menuBtn[i].addEventListener(CLICK, Menu.click, false);
					}
				}
			}
		}
	};

	Menu.click = function(event) {
		event.preventDefault();
		var thmDataObj = JSON.parse(this.getAttribute('data-thumb'));
		if(thmDataObj.defaultOn && thmDataObj.type === 'fill' && !POD) {
			if(Site.curMediaItem) new CSSTween(Site.curMediaItem, [0], ['opacity .15s cubic']);
			Address.setTitle(this.getAttribute('data-label'));
			var ths = this;
			setTimeout(function() {
				Address.setPath(ths.getAttribute('href') + "thumbs/");
			}, 0);
		} else {
			Address.setPath(this.getAttribute('href') + "1/");
		}
	};

	Menu.getBulletWidth = function() {
		if(Menu.bulletWidth == 0 && 'bullet' != 'none') {
			var bull = document.createElement('div');
			var type = ('bullet').replace(' ', '');
			bull.innerHTML = Menu.bullet[type];
			bull.style.position = 'absolute';
			bull.style.fontWeight = 'normal';
			bull.style.fontSize = '13px';
			bull.style.fontFamily = 'Varela';
			bull.style.display = 'block';
			bull.style.visibility = 'hidden';
			document.body.appendChild(bull);
			Menu.bulletWidth = Util.getStyle(bull, 'width');
			Menu.bulletHeight = Util.getStyle(bull, 'height');
			bull.style.fontSize = '13px';
			Menu.bulletSubWidth = Util.getStyle(bull, 'width');
			Menu.bulletSubHeight = Util.getStyle(bull, 'height');
			document.body.removeChild(bull);
		}
	};

	Menu.buildBullet = function(menuItem) {
		var _height = Util.getStyle(menuItem, 'height');
		var bulletType = ('bullet').replace(' ', '');
		menuItem.innerHTML = "<b>" + Menu.bullet[bulletType] + "</b>" + menuItem.innerHTML;
		menuItem.bullet = menuItem.getElementsByTagName('b')[0];
		menuItem.bullet.bullet = menuItem.bullet;
		menuItem.bullet.style.fontWeight = 'normal';
		menuItem.bullet.style.display = 'inline-block';
		menuItem.bullet.style.position = 'relative';
		menuItem.bullet.offsetX = -2 - 2;
		menuItem.bullet.offsetY = 0 + 0.5;
		menuItem.bullet.style.left = -9 + 'px';
		menuItem.bullet.style.top = ((_height - Menu.bulletHeight) * 0.5) + menuItem.bullet.offsetY + 'px';
		menuItem.bullet.style.opacity = 0.001;

		if('left' == 'left') {
			menuItem.style.position = 'relative';
			menuItem.style.left = -(Menu.bulletWidth + -2) + 'px';
		} else if('left' == 'center') {
			menuItem.style.position = 'relative';
			menuItem.style.left = -(Menu.bulletWidth * 0.5) + 'px';
		}
	};

	Menu.buildSubBullet = function(menuItem) {
		var _height = Util.getStyle(menuItem, 'height');
		var bulletType = ('bullet').replace(' ', '');
		menuItem.innerHTML = "<b>" + Menu.bullet[bulletType] + "</b>" + menuItem.innerHTML;
		menuItem.bullet = menuItem.getElementsByTagName('b')[0];
		menuItem.bullet.bullet = menuItem.bullet;
		menuItem.bullet.style.fontWeight = 'normal';
		menuItem.bullet.style.display = 'inline-block';
		menuItem.bullet.style.position = 'relative';
		menuItem.bullet.offsetX = -2 - 2;
		menuItem.bullet.offsetY = 0 + 0.5;
		menuItem.bullet.style.left = -9 + 'px';
		menuItem.bullet.style.top = ((_height - Menu.bulletSubHeight) * 0.5) + menuItem.bullet.offsetY + 'px';
		menuItem.bullet.style.opacity = 0.001;

		if('left' == 'left') {
			menuItem.style.position = 'relative';
			menuItem.style.left = -(Menu.bulletWidth - -2) + 'px';
		} else if('left' == 'center') {
			menuItem.style.position = 'relative';
			menuItem.style.left = -(Menu.bulletWidth * 0.5) + 'px';
		}
	};

	Menu.bullet = {
		none: '',
		arrow: '\u203A',
		arrow2: '\u00BB',
		bullet: '\u2022',
		bullet2: '\u00B7',
		dash: '-'
	};

	Menu.mouseOver = function(event) {
		if(event.target != Menu.curBtn) {
			var position = event.target.bullet.offsetX - 2;
			new CSSTween(event.target.bullet, [1, position + 'px', '#FC9F61'], ['opacity .2s', 'left .2s', 'color .2s']);
			new CSSTween(event.target, ['#FC9F61'], ['color .2s']);
		}
	};

	Menu.mouseOut = function(event) {
		if(event.target != Menu.curBtn) {
			new CSSTween(event.target.bullet, [0.001, -9 + 'px', '#3E4661'], ['opacity .2s', 'left .2s', 'color .2s']);
			new CSSTween(event.target, ['#3E4661'], ['color .2s']);
		}
	};

	Menu.iconOver = function(event) {
		new CSSTween(event.target, [.5], ['opacity .2s']);
	};

	Menu.iconOut = function(event) {
		new CSSTween(event.target, [1], ['opacity .2s']);
	};

	Menu.select = function() {
		var o = d.menuText.getElementsByTagName('a');
		for(var i = 0; i < o.length; i++) {
			switch(o[i].getAttribute('href') == Address.base + Site.curPath + '/') {
			case true:
				Menu.curBtn = o[i];
			default:
				if(o[i].getAttribute('data-link') != 'icon-ext') {
					new CSSTween(o[i], ['#3E4661'], ['color .2s']);
					if(o[i].bullet) new CSSTween(o[i].bullet, [0.001, -9 + 'px', '#3E4661'], ['opacity .2s', 'left .2s', 'color .2s']);
					if(POD && o[i].id != 'logo' && Util.findClass(o[i], 'menuItem')) {
						var menuBtnRgb = Util.hexToRGB('#3E4661');
						o[i].style.backgroundColor = "rgba(" + menuBtnRgb.r + "," + menuBtnRgb.g + "," + menuBtnRgb.b + "," + 0.15 + ")";
					} else {
						o[i].style.backgroundColor = "rgba(0,0,0,0)";
					}
				}
			}
		}
		if(Menu.curBtn && Menu.curBtn.getAttribute('data-link') != 'icon-ext' && Address.getPath() != '') {
			if(Menu.curBtn.getAttribute('class') == 'menuItem') Menu.closeDelay = 1500;
			if(Menu.curBtn.getAttribute('class') == 'subMenuItem') Menu.closeDelay = 1500;
			new CSSTween(Menu.curBtn, ['#FF6600'], ['color .3s']);
			var position = Menu.curBtn.bullet.offsetX - 2;
			new CSSTween(Menu.curBtn.bullet, [1, position + 'px', '#FF6600'], ['opacity .3s', 'left .3s', 'color .3s']);
			Menu.expand(Menu.curBtn.getAttribute('data-id'));
			if(POD) {
				var menuBtnRgb = Util.hexToRGB('#FC9F61');
				Menu.curBtn.style.backgroundColor = "rgba(" + menuBtnRgb.r + "," + menuBtnRgb.g + "," + menuBtnRgb.b + "," + 0.05 + ")";
			}
		} else if((POD || PAD) && Menu.state == 'open') {
			Menu.expand('');
		} else if(!POD && !PAD) {
			Menu.expand('');
		}

		if((PAD || POD) && Menu.state == 'open' && Address.getPath() != '') {
			Menu.close();
		}
	};

	window.Menu = Menu;

}(window));
(function(window) {
	var cursor;
	var PREV = 'prev';
	var THUMBS = 'thumbs';
	var NEXT = 'next';

	function Cursor() {
		Cursor.setCursorMouseEvents();
	}

	Cursor.setCursorMouseEvents = function() {
		cursor = document.createElement('div');
		cursor.style.opacity = 0;
		cursor.style.zIndex = 35;
		cursor.style.display = 'block';
		cursor.style.position = 'absolute';
		cursor.setAttribute('class', 'cursor');
		cursor.setAttribute('unselectable', 'on');
		cursor.style.font = "400 8px/0px 'iconsRegular'";
		cursor.style.color = '#E1471E';
		d.site.appendChild(cursor);
		cursor.show = false;
		document.addEventListener('mousemove', Cursor.move, true);
	};

	Cursor.show = function() {
		if(!cursor.show) {
			cursor.show = true;
			cursor.style.display = 'block';
			cursor.style.cursor = 'none';
			new CSSTween(cursor, [.65], ['opacity .35s linear']);
			try {
				Site.mediaView.style.cursor = 'none';
				Site.curMediaItem.style.cursor = 'none';
				var image = Site.getMediaAsset(Site.curMediaItem, 'image');
				image.style.cursor = 'none';
			} catch(error) {}
			document.addEventListener('click', Cursor.navClick, false);
		}
	};

	Cursor.hide = function() {
		if(cursor.show) {
			cursor.show = false;
			new CSSTween(cursor, [0], ['opacity .1s linear'], function() {
				document.body.style.cursor = 'default';
				cursor.style.display = 'none';
				cursor.style.left = 0 + 'px';
				cursor.style.top = 0 + 'px';
				try {
					Site.mediaView.style.cursor = 'default';
					Site.curMediaItem.style.cursor = 'default';
					var image = Site.getMediaAsset(Site.curMediaItem, 'image');
					image.style.cursor = 'default';
				} catch(error) {}
			});
			document.removeEventListener('click', Cursor.navClick, false);
		}
	};

	Cursor.navClick = function() {
		switch(cursor.state) {
		case PREV:
			Site.prev();
			break;
		case THUMBS:
			Thumbnails.toggle();
			break;
		case NEXT:
			Site.next();
			break;
		}
	};

	Cursor.move = function(event) {
		var zoneWidth = STAGE_WIDTH * .333;

		var overMediaView = Cursor.overMediaView(event.pageX, event.pageY);
		var overVidPlayBtn = Cursor.overVidPlayBtn(event.pageX, event.pageY);
		var overVidHud = Cursor.overVidHud(event.pageX, event.pageY);
		var overVimeoHud = Cursor.overVimeoHud(event.pageX, event.pageY);
		var overText = Cursor.overText(event.pageX, event.pageY);
		var overLogo = Cursor.overLogo(event.pageX, event.pageY);
		var overNavbar = Cursor.overNavbar(event.pageX, event.pageY);
		var overFooter = Cursor.overFooter(event.pageX, event.pageY);

		var cursorOffsetX = -15;
		var cursorOffsetY = -20;

		var leftMargin = 'left' == 'left' ? 0 + (260 - 10) : 0;
		var rightMargin = 'left' == 'right' ? 0 + (260 + 10) : 0;

		if(!Pass.showing && Address.getPath() != '' && !Thumbnails.open && !Share.open && !overText && overMediaView && event.pageX > leftMargin && event.pageX < (leftMargin + zoneWidth) && !overVidPlayBtn && !overVidHud && !overVimeoHud && !Site.blocker && !overLogo && !overFooter && !overNavbar) {
			cursor.state = PREV;
			cursor.innerHTML = Cursor.getPrevIcon();
			Cursor.show();
			cursor.style.left = event.pageX + cursorOffsetX + 'px';
			cursor.style.top = event.pageY + cursorOffsetY + 'px';
		} else if(!Pass.showing && Address.getPath() != '' && !Thumbnails.open && !Share.open && !overText && overMediaView && event.pageX > (leftMargin + zoneWidth) && event.pageX < (leftMargin + (zoneWidth * 2)) && !overVidPlayBtn && !overVidHud && !overVimeoHud && !Site.blocker && !overLogo && !overFooter && !overNavbar) {
			cursor.state = THUMBS;
			cursor.innerHTML = '\u2026';
			Cursor.show();
			cursor.style.left = event.pageX + cursorOffsetX + 'px';
			cursor.style.top = event.pageY + cursorOffsetY + 'px';
		} else if(!Pass.showing && Address.getPath() != '' && !Thumbnails.open && !Share.open && !overText && overMediaView && event.pageX > (leftMargin + (zoneWidth * 2)) && event.pageX < (window.innerWidth - rightMargin) && !overVidPlayBtn && !overVidHud && !overVimeoHud && !Site.blocker && !overLogo && !overFooter && !overNavbar) {
			cursor.state = NEXT;
			cursor.innerHTML = Cursor.getNextIcon();
			Cursor.show();
			cursor.style.left = event.pageX + cursorOffsetX + 'px';
			cursor.style.top = event.pageY + cursorOffsetY + 'px';
		} else {
			Cursor.hide();
		}

		try {
			var overVid = Cursor.overVid(event.pageX, event.pageY);
			if(Site.curMediaItem.vid.loaded && overVid) {
				Video.showHud();
			} else {
				Video.hideHud();
			}
		} catch(error) {}
	};

	Cursor.getPrevIcon = function() {
		switch('arrow2') {
		case 'arrow1':
			return '\u03bc';
			break;
		case 'arrow2':
			return '\u00ba';
			break;
		case 'plus1':
			return '\u00bf';
			break;
		case 'plus2':
			return '\u00ac';
			break;
		}
	};

	Cursor.getNextIcon = function() {
		switch('arrow2') {
		case 'arrow1':
			return '\u00aa';
			break;
		case 'arrow2':
			return '\u00f8';
			break;
		case 'plus1':
			return '\u00a1';
			break;
		case 'plus2':
			return '\u00a4';
			break;
		}
	};

	Cursor.overMediaView = function(mouseX, mouseY) {
		var leftMargin = 'left' == 'left' ? 0 + 260 : 0;
		var rightMargin = 'left' == 'right' ? 0 + 260 : 0;
		if(Site.curMediaItemsInSection > 1 && mouseX > leftMargin && mouseX < window.innerWidth - rightMargin && mouseY > 60 && mouseY < window.innerHeight - 40) {
			return true;
		} else {
			return false;
		}
	};

	Cursor.overVidPlayBtn = function(mouseX, mouseY) {
		try {
			var leftMargin = 'left' == 'left' ? 0 + 260 - 10 : 0;
			var rightMargin = 'left' == 'right' ? 0 + 260 - 10 : 0;

			var playBtn = Site.curMediaItem.playBtn;
			var left = parseInt(playBtn.style.left);
			var width = parseInt(playBtn.width);
			var top = parseInt(playBtn.style.top);
			var height = parseInt(playBtn.height);
			if(Site.state == VIDEO && mouseX > leftMargin + left && mouseX < leftMargin + left + width && mouseY > 60 + top && mouseY < 60 + top + height) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	Cursor.overVid = function(mouseX, mouseY) {
		try {
			var leftMargin = 'left' == 'left' ? 0 + 260 : 0;
			var rightMargin = 'left' == 'right' ? 0 + 260 : 0;
			var vid = Site.curMediaItem.vid;
			var left = parseInt(vid.style.left);
			var width = parseInt(vid.width);
			var top = parseInt(vid.style.top);
			var height = parseInt(vid.height);
			if(Site.state == VIDEO && mouseX > (leftMargin + left) && mouseX < (leftMargin + left + width) && mouseY > (60 + top) && mouseY < (60 + top + height)) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	Cursor.overVidHud = function(mouseX, mouseY) {
		try {
			var leftMargin = 'left' == 'left' ? 0 + 260 : 0;
			var rightMargin = 'left' == 'right' ? 0 + 260 : 0;
			var vid = Site.curMediaItem.vid;
			var hud = Site.curMediaItem.vid.hud;
			var left = parseInt(hud.style.left);
			var width = parseInt(hud.width);
			var top = parseInt(hud.style.top);
			var height = parseInt(hud.height);
			if(Site.state == VIDEO && mouseX > (leftMargin + left) && mouseX < (leftMargin + left + width) && mouseY > (60 + top) && mouseY < (60 + top + height)) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	Cursor.overVimeoHud = function(mouseX, mouseY) {
		try {
			var leftMargin = 'left' == 'left' ? 0 + 260 : 0;
			var rightMargin = 'left' == 'right' ? 0 + 260 : 0;
			var vid = Site.curMediaItem.vid;
			var left = parseInt(vid.style.left);
			var width = STAGE_WIDTH;
			var top = STAGE_HEIGHT - 60;
			var height = 60;
			if(Site.state == VIDEO && Site.curMediaItem.vid.type == 'vimeo' && mouseX > (leftMargin + left) && mouseX < (leftMargin + left + width) && mouseY > (60 + top) && mouseY < (60 + top + height)) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	Cursor.overLogo = function(mouseX, mouseY) {
		try {
			var logo = d.logo;
			var left = isNaN(Util.getStyle(logo, 'left')) ? window.innerWidth - Util.getStyle(logo, 'width') : Util.getStyle(logo, 'left');
			var width = Util.getStyle(logo, 'width');
			var top = isNaN(Util.getStyle(logo, 'top')) ? window.innerHeight - Util.getStyle(logo, 'height') : Util.getStyle(logo, 'top');
			var height = Util.getStyle(logo, 'height');

			if(mouseX > left && mouseX < left + width && mouseY > top && mouseY < top + height) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	Cursor.overFooter = function(mouseX, mouseY) {
		try {
			var footer = Site.site.getElementsByTagName('footer')[0];
			var left = isNaN(Util.getStyle(footer, 'left')) ? window.innerWidth - Util.getStyle(footer, 'width') : Util.getStyle(footer, 'left');
			var width = Util.getStyle(footer, 'width');
			var top = isNaN(Util.getStyle(footer, 'top')) ? window.innerHeight - Util.getStyle(footer, 'height') : Util.getStyle(footer, 'top');
			var height = Util.getStyle(footer, 'height');

			if(mouseX > left && mouseX < left + width && mouseY > top && mouseY < top + height) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	Cursor.overNavbar = function(mouseX, mouseY) {
		try {
			var nav = Site.site.getElementsByTagName('nav')[0];
			var left = isNaN(Util.getStyle(nav, 'left')) ? window.innerWidth - Util.getStyle(nav, 'width') : Util.getStyle(nav, 'left');
			var width = Util.getStyle(nav, 'width');
			var top = isNaN(Util.getStyle(nav, 'top')) ? window.innerHeight - Util.getStyle(nav, 'height') : Util.getStyle(nav, 'top');
			var height = Util.getStyle(nav, 'height');

			if(mouseX > left && mouseX < left + width && mouseY > top && mouseY < top + height) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};


	Cursor.overText = function(mouseX, mouseY) {
		try {
			var leftMargin = 'left' == 'left' ? 0 + 260 : 0;
			var rightMargin = 'left' == 'right' ? 0 + 260 : 0;

			var text = Site.getMediaAsset(Site.curMediaItem, 'textMask');

			if('left' == 'left') {
				var left = Util.getStyle(text, "left") - 30 - Scroll.active.width;
			} else {
				var left = Util.getStyle(text, "left");
			}
			var top = Util.getStyle(text, "top");

			var width = Util.getStyle(text, "width");
			var height = Util.getStyle(text, "height");

			if(Site.state == HTML && mouseX > (leftMargin + left) && mouseX < (leftMargin + left + width + 30 + Scroll.active.width) && mouseY > (60 + top) && mouseY < (60 + top + height)) {
				return true;
			}
		} catch(error) {
			return false;
		}
	};

	window.Cursor = Cursor;

}(window));
(function(window) {
	Loader.type = 'spinner';
	Loader.alpha = .75;
	Loader.color = '#FFFFFF';
	Loader.loaders = [];

	function Loader(obj, type, alpha, color) {
		if(type) Loader.type = type;
		if(alpha) Loader.alpha = alpha;
		if(color) Loader.color = color;

		var loader;

		if(obj.loader) {
			loader = obj.loader;
			Loader.active = loader;
		} else {
			loader = document.createElement('div');
			loader.style.display = 'block';
			loader.style.position = 'absolute';
			loader.style.width = '24px';
			loader.style.height = '24px';
			loader.style.overflow = 'hidden';
			switch(Loader.type) {
			case 'none':
				break;
			case 'horizontal line':
				break;
			case 'vertical line':
				break;
			case 'percent':
				break;
			case 'spinner':
				loader.spinner = Loader.spinner(Loader.color);
				loader.spinner.style.position = 'absolute';
				loader.appendChild(loader.spinner);
				break;
			}

			obj.loader = loader;
			obj.appendChild(loader);
			Loader.active = loader;
			Loader.loaders.push(loader);
		}

		Loader.align(obj);
		Loader.animate(loader);
		loader.style.opacity = 0;
		if(DROID && Address.getDroidVersion() < 2.4) {

		} else {
			new CSSTween(loader, [Loader.alpha], ['opacity .35s cubic']);
		}
	}

	Loader.animate = function(loader) {
		if(loader.spinner) {
			loader.interval = setInterval(function(){Loader.inc(loader)}, 80);
		}
	};

	Loader.inc = function(loader) {
		if(loader.spinner) {
			loader.spinner.style.top = loader.loc + 'px';
			loader.loc > -264 ? loader.loc -= 24 : loader.loc = 0;
		}
	};

	Loader.spinner = function(tint) {
		switch(tint) {
		case '#FFFFFF':
			return Loader.light ? Loader.light : Loader.img('loader1.png');
			break;
		case '#000000':
			return Loader.dark ? Loader.dark : Loader.img('loader2.png');
			break;
		}
	};

	Loader.img = function(src) {
		var img = document.createElement('img');
		img.setAttribute('src', Address.base + 'inc/icn/' + src);
		img.setAttribute('width', '24');
		img.setAttribute('height', '288');
		return img;
	};

	Loader.remove = function(obj) {
		if(obj.loader) {
			setTimeout(function() {
					clearInterval(obj.loader.interval);
					obj.loader.style.display = 'none';
			}, 360);
			new CSSTween(obj.loader, [0], ['opacity .35s cubic']);
		}
	};

	Loader.align = function(obj) {
		var left = Math.floor(parseInt(obj.style.width) * 0.5) - 12;
		var top = Math.floor(parseInt(obj.style.height) * 0.5) - 12;
		new CSSTween(obj.loader, [left + 'px', top + 'px'], ['left 0s linear', 'top 0s linear']);
	};

	window.Loader = Loader;

}(window));
(function(window)
{
	function Fullscreen()
	{
		Fullscreen.toggle();
		document.addEventListener('webkitfullscreenchange', Fullscreen.change, false);
	}

	Fullscreen.toggle = function()
	{
		if(document.isFullScreen | document.mozIsFullScreen | document.webkitIsFullScreen)
		{
			Fullscreen.exit();
		}
		else
		{
			Fullscreen.enter();
		}
	};

	Fullscreen.enter = function()
	{
		if (document.documentElement.requestFullScreen) {  
			document.documentElement.requestFullScreen();  
		} else if (document.documentElement.mozRequestFullScreen) {  
			document.documentElement.mozRequestFullScreen();
		} else if (document.documentElement.webkitRequestFullScreen) {
			document.documentElement.webkitRequestFullScreen();
			document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
			if(Chrome) Address.addHash();
		}
		Tooltip.hide();
	};

	Fullscreen.exit = function()
	{
		if (document.cancelFullScreen) {  
			document.cancelFullScreen();  
		} else if (document.mozCancelFullScreen) {  
			document.mozCancelFullScreen();  
		} else if (document.webkitCancelFullScreen) {  
			document.webkitCancelFullScreen();  
		} 
	};

	Fullscreen.i = function(event)
	{
		var vid = event.target.parent.vid;
		if(document.webkitIsFullScreen)
		{
			document.webkitCancelFullScreen();
		}
		else
		{	
			vid.webkitEnterFullscreen();
		}
		document.addEventListener('webkitfullscreenchange', Fullscreen.change, false);

		if(POD && Site.curMediaItem) 
		{
			TouchNav.addListeners(Site.curMediaItem);
		}
	};

	Fullscreen.PodInterval = null;

	Fullscreen.checkPOD = function()
	{
		var isFull = document.isFullScreen | document.mozIsFullScreen | document.webkitIsFullScreen;
		
		var vid = Site.getMediaAsset(Site.curMediaItem, VIDEO);
		if(!vid.webkitDisplayingFullscreen)
		{
			clearInterval(Fullscreen.PodInterval);

			var img = Site.getMediaAsset(vid.mediaItem, IMAGE);
			new CSSTween(img, [1], ['opacity .7s cubic']);

			Video.resize(vid);

			var bigPlayBtn = vid.mediaItem.playBtn;
			new CSSTween(bigPlayBtn, [.56], ['opacity .7s cubic']);
			/*bigPlayBtn.addEventListener(SELECT_EVENT, Video.bigPlay, false);*/
		}
	};

	Fullscreen.change = function()
	{
		var isFull = document.isFullScreen | document.mozIsFullScreen | document.webkitIsFullScreen;
		
		Site.resize();
	};

	Fullscreen.Available = function()
	{
		return true;
	};

	window.Fullscreen = Fullscreen;
	
}(window));
(function(window)
{
	function Navbar()
	{
		Navbar.mouseEvents();
	}

	Navbar.mouseEvents = function() {
		var nav = Site.site.getElementsByTagName('nav')[0].getElementsByTagName('a');
		var i = nav.length;
		while(i--) {
			if(nav[i].getElementsByTagName('icon')[0]) {
				nav[i].icon = nav[i].getElementsByTagName('icon')[0];
				nav[i].icon.label = nav[i].getElementsByTagName('label')[0];
			}
			if(nav[i].getElementsByTagName('label')[0]) {
				nav[i].label = nav[i].getElementsByTagName('label')[0];
				nav[i].label.icon = nav[i].getElementsByTagName('icon')[0];
			}
			nav[i].listener = false;
			Navbar.btnAction(nav[i]);
		}
	};

	Navbar.listeners = function(btn, active) {
		if(active) {
			new CSSTween(btn, [1], ['opacity .3s cubic']);
			if(!btn.listener) {
				if(touchDevice) {
					btn.addEventListener(TOUCH_START, Navbar.over, false);
					btn.addEventListener(TOUCH_END, Navbar.out, false);
				} else {
					btn.addEventListener(MOUSE_OVER, Navbar.over, false);
					btn.addEventListener(MOUSE_OUT, Navbar.out, false);
				}
				btn.listener = true;
			}
		} else {
			new CSSTween(btn, [0.25], ['opacity .3s cubic']);
			if(touchDevice) {
				btn.removeEventListener(TOUCH_START, Navbar.over, false);
				btn.removeEventListener(TOUCH_END, Navbar.out, false);
			} else {
				btn.removeEventListener(MOUSE_OVER, Navbar.over, false);
				btn.removeEventListener(MOUSE_OUT, Navbar.out, false);
			}
			btn.listener = false;
		}
	};

	Navbar.btnAction = function(btn) {
		switch(btn.type) {
			case 'fullscreen':
				if(Fullscreen.Available()) {
					btn.setAttribute('onclick', 'Fullscreen();');
					Navbar.listeners(btn, true);
				} else {
					btn.setAttribute('onclick', '');
					Navbar.listeners(btn, false);
				}
			break;
			case 'caption':
				if(Caption.getCur() && Address.getPath() != '') {
					btn.setAttribute('onclick', 'Caption.toggle();');
					Navbar.listeners(btn, true);
				} else {
					btn.setAttribute('onclick', '');
					Navbar.listeners(btn, false);
				}
			break;
			case 'thumbs':
				if(Site.numItemsInSection > 1 && Address.getPath() != '' && Site.curImgNum > 0) {
					btn.setAttribute('onclick', 'Thumbnails.toggle();');
					Navbar.listeners(btn, true);
				} else {
					btn.setAttribute('onclick', '');
					Navbar.listeners(btn, false);
				}
			break;
			case 'email':
				if(Address.getPath() != '' && (Site.state == IMAGE || Site.state == VIDEO)) {
					btn.setAttribute('onclick', 'Share.toggle();');
					Navbar.listeners(btn, true);
				} else {
					btn.setAttribute('onclick', '');
					Navbar.listeners(btn, false);
				}
			break;
			case 'prev':
				if(Site.numItemsInSection > 1 && Address.getPath() != '' && Site.curImgNum > 0) {
					btn.setAttribute('onclick', 'Site.prev();');
					Navbar.listeners(btn, true);
				} else {
					btn.setAttribute('onclick', '');
					Navbar.listeners(btn, false);
				}
			break;
			case 'count':
				if(Site.numItemsInSection > 1 && Site.curImgNum > 0) {
					btn.style.opacity = 0.65;
					btn.getElementsByTagName('label')[0].innerHTML = Site.curImgNum + " of " + Site.numItemsInSection;
				} else if(Site.numItemsInSection > 1 && Site.curImgNum === 0) {
					btn.style.opacity = 0.65;
					btn.getElementsByTagName('label')[0].innerHTML =  Site.curImgNum + " of " + Site.numItemsInSection;
				} else {
					btn.style.opacity = .65;
					btn.getElementsByTagName('label')[0].innerHTML = Site.curImgNum + " of " + Site.numItemsInSection;
				}
			break;
			case 'next':
				if(Site.numItemsInSection > 1 && Address.getPath() != '' && Site.curImgNum > 0) {
					btn.setAttribute('onclick', 'Site.next();');
					Navbar.listeners(btn, true);
				} else {
					btn.setAttribute('onclick', '');
					Navbar.listeners(btn, false);
				}
			break;
		}
	};

	Navbar.over = function(event) {
		var tip = event.target.getAttribute('alt') ? event.target.getAttribute('alt') : event.target.parentNode.getAttribute('alt');
		if(Site.tooltip) Tooltip.text(tip);
		new CSSTween(event.target, ['#FC9F61'], ['color .3s cubic']);
		if(event.target.icon) new CSSTween(event.target.icon, ['#FC9F61'], ['color .3s cubic']);
		if(event.target.label) new CSSTween(event.target.label, ['#FC9F61'], ['color .3s cubic']);
	};

	Navbar.out = function(event) {
		if(Site.tooltip) Tooltip.hide();
		new CSSTween(event.target, ['#E1471E'], ['color .3s cubic']);
		if(event.target.icon) new CSSTween(event.target.icon, ['#E1471E'], ['color .3s cubic']);
		if(event.target.label) new CSSTween(event.target.label, ['#E1471E'], ['color .3s cubic']);
	};

	Navbar.resize = function() {
		if('center' == 'center') {
			var width = Util.getStyle(Site.nav, 'width');
			Site.nav.style.left = ((window.innerWidth - width) * 0.5) + 0 + 'px';
		}
		if('bottom' == 'center') {
			var height = Util.getStyle(Site.nav, 'height');
			Site.nav.style.top = ((window.innerHeight - height) * 0.5) + 5 + 'px';
		}
	};

	Navbar.check = function() {
		Site.state == INTRO ? Navbar.hide() : Navbar.show();
	};

	Navbar.show = function() {
		Site.nav.style.display = 'block';
		Navbar.resize();
		new CSSTween(Site.nav, [1], ['opacity .5s linear']);
	};

	Navbar.hide = function() {
		new CSSTween(Site.nav, [0], ['opacity .5s linear'], function() {
			Site.nav.style.display = 'none';
		});
	};

	Navbar.setCount = function() {
		Navbar.mouseEvents();
	};

	window.Navbar = Navbar;

}(window));
(function(window)
{
	function Footer()
	{
		Footer.mouseEvents();
	}

	Footer.mouseEvents = function()
	{
		var footer = document.getElementsByTagName('footer')[0].getElementsByTagName('a');
		var i = footer.length;
		while(i--)
		{
			footer[i].addEventListener('mouseover', Footer.iconOver, false);
			footer[i].addEventListener('mouseout', Footer.iconOut, false);						
		}
	};

	Footer.iconOver = function(event)
	{
		new CSSTween(event.target, [.5], ['opacity .2s cubic']);
	};

	Footer.iconOut = function(event)
	{
		new CSSTween(event.target, [1], ['opacity .2s cubic']);				
	};

	Footer.resize = function()
	{
		var footer = document.getElementsByTagName('footer')[0];
		if('right' == 'center')
		{
			footer.style.left = ((window.innerWidth - Util.getStyle(footer, 'width')) * 0.5) + 20 + 'px';
		}
		if('bottom' == 'center')
		{
			footer.style.top = ((window.innerHeight - Util.getStyle(footer, 'height')) * 0.5) + 1 + 'px';
		}
	};

	window.Footer = Footer;

}(window));

(function(window) {

	Thumbnails.open = false;
	Thumbnails.masonry = false;
	Thumbnails.arr = [];
	Thumbnails.index = 0;

	Thumbnails.size = {
		small: {
			width: 100,
			height: 66
		},
		medium: {
			width: 200,
			height: 133
		},
		large: {
			width: 300,
			height: 200
		}
	};

	function Thumbnails() {
		buildThumbs();
	}

	function buildThumbs() {
		var thm = document.createElement('div');
		thm.style.position = 'absolute';
		thm.style.opacity = 0;
		thm.style.display = 'none';
		thm.style.zIndex = 30;
		thm.style.left = Util.getStyle(d.mediaView, 'left') + 'px';
		thm.style.top = Util.getStyle(d.mediaView, 'top') + 'px';
		thm.style.overflow = 'hidden';
		thm.setAttribute('class', 'thumbs');

		thm.bg = document.createElement('div');
		thm.bg.style.position = 'absolute';
		thm.bg.style.display = 'block';
		var thumbsRgb = Util.hexToRGB('#f1f1f1');
		thm.bg.style.backgroundColor = "rgba(" + thumbsRgb.r + "," + thumbsRgb.g + "," + thumbsRgb.b + "," + 0.9 + ")";
		thm.appendChild(thm.bg);

		thm.bg.addEventListener(CLICK, Thumbnails.toggle, false);

		thm.bg.gal = document.createElement('div');
		thm.bg.gal.style.position = 'absolute';
		thm.bg.gal.style.display = 'block';
		thm.bg.gal.style.width = (STAGE_WIDTH - (50 * 2)) + 'px';
		thm.bg.gal.style.height = 0 + 'px';
		thm.bg.gal.height = 0;
		thm.bg.gal.style.top = 50 + 'px';
		thm.appendChild(thm.bg.gal);

		thm.bg.gal.label = document.createElement('h3');
		thm.bg.gal.label.style.position = 'relative';
		thm.bg.gal.label.style.display = 'block';
		thm.bg.gal.label.style.color = '#989898';
		thm.bg.gal.label.style.fontSize = 16 + 'px';
		thm.bg.gal.label.style.fontFamily = 'Helvetica';
		thm.bg.gal.label.style.paddingBottom = 5 + 'px';
		thm.bg.gal.appendChild(thm.bg.gal.label);

		thm.bg.gal.line = document.createElement('hr');
		thm.bg.gal.line.style.position = 'relative';
		thm.bg.gal.line.style.width = (STAGE_WIDTH - (50 * 2)) + 'px';
		thm.bg.gal.line.style.height = 1 + 'px';
		thm.bg.gal.line.style.top = 4 + 'px';
		thm.bg.gal.line.style.border = 0;
		thm.bg.gal.line.style.color = '#989898';
		thm.bg.gal.line.style.backgroundColor = '#989898';
		thm.bg.gal.appendChild(thm.bg.gal.line);

		d.site.appendChild(thm);
		Thumbnails.thm = thm;
		Site.thumbs = thm;
	}

	function buildThumbHolders() {
		if(Site.thumbs.bg.gal.grid) Site.thumbs.bg.gal.removeChild(Site.thumbs.bg.gal.grid);
		Site.thumbs.bg.gal.grid = document.createElement('div');
		Site.thumbs.bg.gal.grid.style.position = 'relative';
		Site.thumbs.bg.gal.grid.style.display = 'block';
		Site.thumbs.bg.gal.appendChild(Site.thumbs.bg.gal.grid);

		Thumbnails.arr = [];

		Thumbnails.index = 0;

		buildHolder(Thumbnails.index);

		var scrollBarWidth = PAD ? 0 : 6;

		if('scrollbar' == 'scrollbar' || PAD) {
			if(!Thumbnails.scroll) Thumbnails.scroll = new Scroll(Site.thumbs.bg.gal, Site.thumbs, {
				width: scrollBarWidth,
				align: 'right',
				hOffset: -10,
				vOffset: 0,
				topPad: 50,
				bottomPad: 50,
				color: '#ffcc00',
				hover: '#00ffcc',
				name: 'thumbnails'
			});
		} else if('scrollbar' == 'mouse cursor') {
			Thumbnails.scrollCursor = new ScrollCursor(Site.thumbs.bg.gal, Site.thumbs);
		}
	}

	function buildHolder(i) {

		var mediaItems = Site.curMediaItems;

		var thumbWidth = Thumbnails.size['large']['width'];
		var thumbHeight = Thumbnails.size['large']['height'];
		var gap = 20;

		var holder = document.createElement('div');

		holder.style.display = 'block';
		holder.style.position = 'absolute';
		holder.style.width = Thumbnails.size['large']['width'] + 'px';
		holder.style.height = Thumbnails.size['large']['height'] + 'px';
		var bc = Util.hexToRGB('#f1f1f1');
		holder.style.border = '1px solid ' + "rgba(" + bc.r + "," + bc.g + "," + bc.b + "," + 0 + ")";
		Thumbnails.bgRgb = Util.hexToRGB('#f1f1f1');
		holder.style.backgroundColor = "rgba(" + Thumbnails.bgRgb.r + "," + Thumbnails.bgRgb.g + "," + Thumbnails.bgRgb.b + "," + .85 + ")";
		holder.style.overflow = 'hidden';
		holder.index = i;
		holder.type = mediaItems[i].getAttribute('data-type');
		var file = mediaItems[i].getAttribute('data-thumb');
		holder.file = file ? encodeURIComponent(file) : '';
		Site.thumbs.bg.gal.grid.appendChild(holder);
		holder.thumbHolder = holder;
		holder.loading = false;
		loadThumb(holder);
		Thumbnails.arr.push(holder);

		Site.thumbs.bg.gal.grid.thumbsArr = Thumbnails.arr;
		if(i >= Site.curImgNum - 1) {
			Thumbnails.highlightThumb();
		}

		holder.addEventListener(CLICK, click, false);
		holder.addEventListener(TOUCH_END, click, false);

		holder.addEventListener('mouseover', mouseOver, false);
		holder.addEventListener('mouseout', mouseOut, false);
	}

	function loadThumb(holder) {
		if(!holder.loading) {

			holder.loading = true;

			var thmWidth = Thumbnails.size['large']['width'];
			var thmHeight;

			if(Thumbnails.masonry && (holder.type === IMAGE || holder.type === VIDEO)) {
				thmHeight = 1000;
			} else {
				thmHeight = Thumbnails.size['large']['height'];
			}

			var thumbQuery;

			if(RETINA) {
				thumbQuery = '?w=' + thmWidth * 2 + '&h=' + thmHeight * 2 + '&f=';
			} else {
				thumbQuery = '?w=' + thmWidth + '&h=' + thmHeight + '&f=';
			}

			var src = '';

			switch(holder.type) {
			case IMAGE:
				src = 'media/thumb/' + thumbQuery + holder.file;
				break;
			case VIDEO:
				src = holder.file == '' ? 'inc/icn/video@2x.png' : 'media/thumb/' + thumbQuery + holder.file;
				break;
			case HTML:
				src = holder.file == '' ? 'inc/icn/text@2x.png' : 'media/thumb/' + thumbQuery + holder.file;
				break;
			case SWF:
				src = holder.file == '' ? 'inc/icn/swf@2x.png' : 'media/thumb/' + thumbQuery + holder.file;
				break;
			case LINK:
				src = holder.file == '' ? 'inc/icn/link@2x.png' : 'media/thumb/' + thumbQuery + holder.file;
				break;
			case PDF:
				src = holder.file == '' ? 'inc/icn/pdf@2x.png' : 'media/thumb/' + thumbQuery + holder.file;
				break;
			case CONTACT:
				src = holder.file == '' ? 'inc/icn/contact@2x.png' : 'media/thumb/' + thumbQuery + holder.file;
				break;
			}

			var img = document.createElement('img');
			img.thumbHolder = holder;
			img.style.opacity = 0;
			img.style.position = 'absolute';
			img.setAttribute('class', IMAGE);
			img.setAttribute('src', Address.base + src);

			var avg = (Thumbnails.bgRgb.r + Thumbnails.bgRgb.g + Thumbnails.bgRgb.b) * 0.33;
			var tint = avg < 128 ? '#FFFFFF' : '#000000';

			var loader = new Loader(holder, 'spinner', .4, tint);

			img.addEventListener('load', thumbLoaded, false);
			img.addEventListener('error', thumbError, false);
		}
	}

	function thumbLoaded(event) {
		var img = event.target;
		var holder = img.thumbHolder;
		img.index = holder.index;

		if(holder.type === IMAGE || holder.type === VIDEO) {
			if(RETINA) {
				img.setAttribute('width', img.width * 0.5);
				img.setAttribute('height', img.height * 0.5);
			} else {
				img.setAttribute('width', img.width);
				img.setAttribute('height', img.height);
			}
			if(Thumbnails.masonry) {
				holder.style.height = img.height + 'px'
			};
		} else {
			img.setAttribute('width', Thumbnails.size['large']['width']);
			img.setAttribute('height', Thumbnails.size['large']['height']);
		}

		img.style.opacity = 0;
		holder.appendChild(img);
		Loader.remove(holder);
		holder.loading = false;
		holder.loaded = true;

		if(Thumbnails.masonry) {
			img.style.left = 0 + 'px';
			img.style.top = 0 + 'px';
		} else {
			alignThumb(img);
		}

		new CSSTween(img, [1], ['opacity .5s cubic']);

		if(holder.type === VIDEO) buildPlayIcon(holder, img.width, img.height);

		if(Thumbnails.index + 1 < Site.curMediaItems.length) {
			Thumbnails.index += 1;
			buildHolder(Thumbnails.index);
		}

		Thumbnails.resize();
	}

	function thumbError(e) {
		if(Thumbnails.index + 1 < Site.curMediaItems.length) {
			Thumbnails.index += 1;
			buildHolder(Thumbnails.index);
		}
	}

	function alignThumb(img) {
		var thumbWidth = Thumbnails.size['large']['width'];
		var thumbHeight = Thumbnails.size['large']['height'];
		if(img.width > Thumbnails.size['large']['width']) {
			img.width = Thumbnails.size['large']['width'];
		}
		if(img.height > Thumbnails.size['large']['height']) {
			img.height = Thumbnails.size['large']['height'];
		}
		var left = Math.round((thumbWidth - img.width) * 0.5);
		var top = Math.round((thumbHeight - img.height) * 0.5);
		img.style.left = left + 'px';
		img.style.top = top + 'px';
	}

	function buildPlayIcon(holder, width, height) {

		var playBtn = document.createElement('img');
		playBtn.setAttribute('class', 'playBtn');
		playBtn.setAttribute('src', Address.base + 'inc/icn/play@2x.png');
		playBtn.setAttribute('width', '50');
		playBtn.setAttribute('height', '50');
		playBtn.style.opacity = 0;
		playBtn.style.position = 'absolute';
		playBtn.style.zIndex = 4;
		playBtn.thumbHolder = holder;
		playBtn.index = holder.index;
		var left = Math.floor((width - 50) * 0.5);
		var top = Math.floor((height - 50) * 0.5);
		new CSSTween(playBtn, [left + 'px', top + 'px', 1], ['left 0s linear', 'top 0s linear', 'opacity .2s cubic']);
		holder.appendChild(playBtn);
	}

	function click(event) {
		if(!Scroll.active.scrolling) {
			var mediaNum = Number(event.target.index) + 1;
			Address.setPath(Site.curPath + "/" + mediaNum);
		}
	}

	function mouseOver(event) {
		if(this.thumbHolder) {
			var bc = Util.hexToRGB('#ffffff');
			new CSSTween(this.thumbHolder, ['1px solid ' + 'rgba(' + bc.r + ',' + bc.g + ',' + bc.b + ',' + 1 + ')'], ['border .35s cubic']);
		}
	}

	function mouseOut(event) {
		if((Site.curImgNum - 1) != this.index && this.thumbHolder) {
			var bc = Util.hexToRGB('#f1f1f1');
			new CSSTween(this.thumbHolder, ['1px solid ' + 'rgba(' + bc.r + ',' + bc.g + ',' + bc.b + ',' + 0 + ')'], ['border .35s cubic']);
		} else if(this.thumbHolder) {
			var bc = Util.hexToRGB('#555555');
			new CSSTween(this.thumbHolder, ['1px solid ' + 'rgba(' + bc.r + ',' + bc.g + ',' + bc.b + ',' + 1 + ')'], ['border .35s cubic']);
		}
	}

	Thumbnails.highlightThumb = function() {
		if(Site.curImgNum > 0) {
			new CSSTween(Site.thumbs.bg.gal.grid.thumbsArr[Site.curImgNum - 1], ['1px solid #555555'], ['border .35s cubic']);
		} else { /* no highlight */
		}
	};

	Thumbnails.loadCurrentSection = function() {
		var section = Site.getCurSection();
		if(section.getAttribute('data-thumb')) {
			var thmDataObj = JSON.parse(section.getAttribute('data-thumb'));
			if(thmDataObj.masonry) {
				Thumbnails.masonry = true;
			} else {
				Thumbnails.masonry = false;
			}
		} else {
			Thumbnails.masonry = false;
		}

		if(Site.curSection[1]) {
			Site.thumbs.bg.gal.label.innerHTML = Site.curSection[1].replace(/-/g, ' ');
		} else {
			Site.thumbs.bg.gal.label.innerHTML = Site.curSection[0].replace(/-/g, ' ');
		}

		buildThumbHolders();
		if(Thumbnails.scroll) Thumbnails.scroll.percent = 0;
		if(Thumbnails.scrollCursor) {
			Thumbnails.scrollCursor.xform(Thumbnails.scrollCursor.obj, 'translateY', 0 + 'px');
			Thumbnails.scrollCursor.obj.style.top = 50 + 'px';
		}
	};

	Thumbnails.show = function() {
		Thumbnails.loadCurrentSection();
		Site.thumbs.style.display = 'block';
		new CSSTween(Site.thumbs, [1], ['opacity .25s cubic']);
		Thumbnails.open = true;
		Site.resize();
	};

	Thumbnails.hide = function() {
		if(Site.curImgNum > 0) {
			new CSSTween(Site.thumbs, [0], ['opacity .25s cubic'], function(ths) {
				ths.style.display = 'none';
			});
			Thumbnails.open = false;
		}
	};

	Thumbnails.toggle = function() {
		if(Thumbnails.open && Site.curImgNum > 0) {
			Address.setPath(Site.curPath + "/" + Site.curImgNum);
		} else if(Site.curImgNum > 0) {
			Address.setPath(Site.curPath + "/" + Site.curImgNum + "/thumbs");
		}
	};

	Thumbnails.resizing = false;

	Thumbnails.resize = function() {

		var thumbs = Thumbnails.arr;
		Site.thumbs.style.width = STAGE_WIDTH + 'px';
		Site.thumbs.style.height = STAGE_HEIGHT + 'px';
		new CSSTween(Site.thumbs, [Util.getStyle(d.mediaView, 'left') + 'px', Util.getStyle(d.mediaView, 'top') + 'px'], ['left .25s', 'top .25s']);
		Site.thumbs.bg.style.width = STAGE_WIDTH + 'px';
		Site.thumbs.bg.style.height = STAGE_HEIGHT + 'px';

		var gap = 20;
		var thumbX = 0;
		var thumbY = gap + 3;
		var thumbWidth = Thumbnails.size['large']['width'];
		var thumbHeight = Thumbnails.size['large']['height'];
		var gridAvailWidth = (STAGE_WIDTH - (50 * 2));
		var gridNumWidth = Math.floor(gridAvailWidth / (thumbWidth + gap));
		var gridNumHeight = 1;
		var gridWidth = gridNumWidth * thumbWidth + ((gridNumWidth - 1) * gap);

		Thumbnails.resizing = true;

		Site.thumbs.bg.gal.height = Util.getStyle(Site.thumbs.bg.gal.label, 'height') + 10;
		Site.thumbs.bg.gal.style.height = Util.getStyle(Site.thumbs.bg.gal.label, 'height') + 10 + 'px';

		var maxColumnHeight = 0;

		for(var i = 0; i < thumbs.length; i++) {

			thumbY = getThumbsAbove(i, gridNumWidth);

			if(thumbY > maxColumnHeight) {
				maxColumnHeight = thumbY;
			}

			thumbHeight = Util.getStyle(thumbs[i], 'height');

			if(!thumbs[i].loaded) {
				thumbs[i].style.left = thumbX + 'px';
				thumbs[i].style.top = thumbY + 'px';
			} else {
				new CSSTween(thumbs[i], [thumbX + 'px', thumbY + 'px'], ['left .5s', 'top .5s']);
			}

			thumbX += thumbWidth + gap;

			if(thumbX + thumbWidth > gridWidth && i < thumbs.length - 1) {
				thumbX = 0;
			}

			Site.thumbs.bg.gal.height = maxColumnHeight + thumbHeight + gap;
			Site.thumbs.bg.gal.style.height = Site.thumbs.bg.gal.height + 'px';

			if(i == thumbs.length - 1) {
				if(thumbs[i].loading) {
					Thumbnails.resizing = false;
				} else {
					setTimeout(function() {
						Thumbnails.resizing = false;
					}, 650);
				}
			}
		}

		if(!Thumbnails.resizing) {
			new CSSTween(Site.thumbs.bg.gal.grid, [gridWidth + 'px'], ['width 0s']);
			new CSSTween(Site.thumbs.bg.gal.line, [gridWidth + 'px'], ['width 0s']);
			new CSSTween(Site.thumbs.bg.gal, [((STAGE_WIDTH - gridWidth) * 0.5) + 'px', gridWidth + 'px'], ['left 0s', 'width 0s']);
		} else {
			new CSSTween(Site.thumbs.bg.gal.grid, [gridWidth + 'px'], ['width .5s']);
			new CSSTween(Site.thumbs.bg.gal.line, [gridWidth + 'px'], ['width .5s']);
			new CSSTween(Site.thumbs.bg.gal, [((STAGE_WIDTH - gridWidth) * 0.5) + 'px', gridWidth + 'px'], ['left .5s', 'width .5s']);
		}

		if(Thumbnails.scroll) {
			Scroll.resize();
		} else if('scrollbar' === 'mouse cursor' && Thumbnails.scrollCursor) {
			ScrollCursor.resize();
		}

	};

	function getThumbsAbove(i, gridNumWidth) {
		var gap = 20;
		var thumbs = Site.thumbs.bg.gal.grid.thumbsArr;
		var thumbsAbove = Math.floor(i / gridNumWidth);
		var thumbY = gap + 12;
		for(var j = 0; j < thumbsAbove; j++) {
			var curThumbAbove = gridNumWidth * (j + 1);
			thumbY += Util.getStyle(thumbs[i - curThumbAbove], 'height') + gap;
		}
		return thumbY;
	}

	window.Thumbnails = Thumbnails;

}(window));
(function(window) {
	Scroll.scrollBars = [];
	Scroll.vendors = ['WebkitT', 'MozT', 'OT', 'MST', 't'];

	function Scroll(obj, mask, vars) {
		this.obj = obj;
		this.obj.scrollbar = true;
		this.mask = mask;
		this.align = 'left';
		this.vAlign = 'top';
		this.color = '#545454';
		this.hover = '#A9A9A9';
		this.hOffset = 0;
		this.vOffset = 0;
		this.width = 6;
		this.topPad = 0;
		this.bottomPad = 0;

		for(key in vars) this[key] = vars[key];

		if(this.mask.parentNode.back) this.mask.parentNode.removeChild(this.mask.parentNode.back);

		this.rgb = Util.hexToRGB(this.color);

		this.mask.left = Util.getStyle(this.mask, 'left') ? Util.getStyle(this.mask, 'left') : 0;
		this.mask.width = Util.getStyle(this.mask, 'width');
		this.mask.height = Util.getStyle(this.mask, 'height');

		switch(this.vAlign) {
		case 'top':
			this.mask.top = Util.getStyle(this.mask, 'top') ? Util.getStyle(this.mask, 'top') : 0;
			this.obj.height = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			new CSSTween(this.obj, [this.topPad + 'px'], ['top 0s ease-out'], '', false);
			break;
		case 'center':
			this.mask.top = Util.getStyle(this.mask, 'top') ? Util.getStyle(this.mask, 'top') : 0;
			this.obj.height = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			new CSSTween(this.obj, [this.topPad + 'px'], ['top 0s ease-out'], '', false);
			break;
		case 'bottom':
			this.mask.bottom = Util.getStyle(this.mask, 'bottom') ? Util.getStyle(this.mask, 'bottom') : 0;
			this.obj.height = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			new CSSTween(this.obj, [this.bottomPad + 'px'], ['bottom 0s ease-out'], '', false);
			break;
		}

		Scroll.scrollBars.push(this);

		this.setEventTypes = function() {
			"ontouchstart" in window ? this.touchDevice = true : this.touchDevice = false;

			if(this.touchDevice) {
				Scroll.DOWN = 'touchstart';
				Scroll.MOVE = 'touchmove';
				Scroll.UP = 'touchend';
				Scroll.OUT = 'touchcancel';
			} else {
				Scroll.DOWN = 'mousedown';
				Scroll.MOVE = 'mousemove';
				Scroll.UP = 'mouseup';
				Scroll.OUT = 'mouseout';
			}
		};

		this.build = function() {
			var scrollDivHeight = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;

			this.back = document.createElement('div');
			this.back.setAttribute('class', 'scrollBg');
			this.back.style.position = 'absolute';
			this.back.style.zIndex = 150;
			if(this.vAlign === 'top' || this.vAlign === 'center') {
				this.back.style.top = this.mask.top + this.vOffset + 0 + 'px';
			} else {
				this.back.style.bottom = this.mask.bottom + this.vOffset + 0 + 'px';
			}
			this.back.style.width = this.width + 'px';
			this.back.style.height = this.mask.height + 'px';
			this.back.style.backgroundColor = "rgba(" + this.rgb.r + "," + this.rgb.g + "," + this.rgb.b + "," + .35 + ")";
			this.mask.parentNode.appendChild(this.back);

			this.handle = document.createElement('div');
			this.handle.setAttribute('class', 'scrollHandle');
			this.handle.style.position = 'absolute';
			this.handle.style.width = this.width + 'px';
			this.handle.style.height = (this.mask.height / this.obj.height) * this.mask.height + 'px';

			switch(this.vAlign) {
			case 'top':
				this.handle.style.top = 0 + 'px';
				break;
			case 'center':
				this.handle.style.top = 0 + 'px';
				break;
			case 'bottom':
				this.handle.style.bottom = 0 + 'px';
				break;
			}
			this.handle.style.backgroundColor = this.color;
			this.handle.style.opacity = 1;
			this.back.appendChild(this.handle);

			this.percent = 0;

			this.scrollbar = this.back;
			this.handle.instance = this;
			this.back.instance = this;
			this.obj.instance = this;
			this.obj.hasScrollbar = true;
			Scroll.active = this;
			Scroll.active.scrolling = false;

			this.checkScrollVisible();

			Scroll.resize();

			/*
			* mouseover to select active scroll instance
			*/
			this.obj.addEventListener(MOUSE_OVER, this.selectActive, false);

			/*
			* mouse events for scroll handle
			*/
			this.handle.addEventListener(MOUSE_OVER, this.mouseOver, false);
			this.handle.addEventListener(MOUSE_OUT, this.mouseOut, false);
			this.handle.addEventListener(MOUSE_DOWN, this.mouseDown, false);

			/*
			* touch events for scroll handle
			*/
			this.handle.addEventListener(TOUCH_START, this.mouseDown, false);
			this.handle.addEventListener(TOUCH_END, this.mouseOut, false);
			this.handle.addEventListener(TOUCH_CANCEL, this.mouseOut, false);

			/*
			* i dont like this
			*/
			if(this.obj.mediaItem) {
				this.obj.mediaItem.instance = this;
				this.obj.mediaItem.addEventListener(TOUCH_START, this.touchStart, false);
				this.obj.mediaItem.addEventListener(TOUCH_END, this.touchEnd, false);
				this.obj.mediaItem.addEventListener(TOUCH_CANCEL, this.touchEnd, false);
			} else if(this.name !== 'menu') {
				this.obj.instance = this;
				this.obj.addEventListener(TOUCH_START, this.touchStart, false);
				this.obj.addEventListener(TOUCH_END, this.touchEnd, false);
				this.obj.addEventListener(TOUCH_CANCEL, this.touchEnd, false);
			}

			window.addEventListener('MozMousePixelScroll', Scroll.mouseScroll, false);

			document.onmousewheel = Scroll.mouseScroll;
		};

		this.mouseOver = function(event) {
			Scroll.active = this.instance;
			new CSSTween(event.target, [this.instance.hover], ['background-color .35s cubic'], '', true);
			if(Firefox) event.target.style.backgroundColor = this.instance.hover;
		};

		this.mouseOut = function(event) {
			if(!this.instance.drag) new CSSTween(event.target, [this.instance.color], ['background-color .35s cubic'], '', true);
			if(!this.instance.drag && Firefox) event.target.style.backgroundColor = this.instance.color;
		};

		this.mouseDown = function(event) {
			event.preventDefault();
			new CSSTween(event.target, [this.instance.hover], ['background-color .35s cubic'], '', true);
			if(Firefox) event.target.style.backgroundColor = this.instance.hover;
			this.instance.drag = true;
			switch(this.instance.vAlign) {
			case 'top':
				this.instance.startPoint = this.instance.getYaxis(event) - Util.getStyle(Scroll.active.back, 'top') - Util.getStyle(event.target, 'top');
				break;
			case 'center':
				this.instance.startPoint = this.instance.getYaxis(event) - Util.getStyle(Scroll.active.back, 'top') - Util.getStyle(event.target, 'top');
				break;
			case 'bottom':
				this.instance.startPoint = this.instance.getYaxis(event) - Util.getStyle(Scroll.active.back, 'bottom') - Util.getStyle(event.target, 'bottom');
				break;
			}

			document.addEventListener(MOUSE_MOVE, this.instance.mouseMove, false);
			document.addEventListener(MOUSE_UP, this.instance.mouseUp, false);

			document.addEventListener(TOUCH_MOVE, this.instance.mouseMove, false);
			document.addEventListener(TOUCH_END, this.instance.mouseUp, false);
		};

		this.mouseUp = function(event) {
			new CSSTween(Scroll.active.handle, [Scroll.active.color], ['background-color .35s cubic'], '', true);
			Scroll.active.drag = false;

			document.removeEventListener(MOUSE_MOVE, Scroll.active.mouseMove, false);
			document.removeEventListener(MOUSE_UP, Scroll.active.mouseUp, false);

			document.removeEventListener(TOUCH_MOVE, Scroll.active.mouseMove, false);
			document.removeEventListener(TOUCH_END, Scroll.active.mouseUp, false);

			if(Firefox) Scroll.active.handle.style.backgroundColor = Scroll.active.color;
		};

		this.mouseMove = function(event) {
			switch(Scroll.active.vAlign) {
			case 'top':
				if(Scroll.active.drag) Scroll.active.update(Scroll.active.getYaxis(event) - Scroll.active.startPoint - Util.getStyle(Scroll.active.back, 'top'));
				break;
			case 'center':
				if(Scroll.active.drag) Scroll.active.update(Scroll.active.getYaxis(event) - Scroll.active.startPoint - Util.getStyle(Scroll.active.back, 'top'));
				break;
			case 'bottom':
				if(Scroll.active.drag) Scroll.active.update(Scroll.active.getYaxis(event) - Scroll.active.startPoint - Util.getStyle(Scroll.active.back, 'bottom'));
				break;
			}
		};

		this.update = function(handlePosition) {
			if(handlePosition < 0) {
				handlePosition = 0;
			} else if(handlePosition > Util.getStyle(this.back, 'height') - Util.getStyle(this.handle, 'height')) {
				handlePosition = Util.getStyle(this.back, 'height') - Util.getStyle(this.handle, 'height');
			}
			this.percent = Scroll.getPercent(handlePosition, Util.getStyle(this.back, 'height') - Util.getStyle(this.handle, 'height'));

			switch(this.vAlign) {
			case 'top':
				this.handle.style.top = handlePosition + 'px';
				break;
			case 'center':
				this.handle.style.top = handlePosition + 'px';
				break;
			case 'bottom':
				this.handle.style.bottom = handlePosition + 'px';
				break;
			}

			Scroll.active.setScrollPosition();
			Scroll.active.scrolling = true;
		};

		this.selectActive = function(event) {
			Scroll.active = this.instance;
		};

		this.touchStart = function(event) {
			event.preventDefault();
			Scroll.active = this.instance;
			this.instance.drag = true;
			this.instance.start = this.instance.getYaxis(event);

			switch(this.instance.vAlign) {
			case 'top':
				this.instance.startPoint = this.instance.getYaxis(event) - Util.getStyle(Scroll.active.mask, 'top') - Util.getStyle(this.instance.obj, 'top') + this.instance.topPad;
				break;
			case 'center':
				this.instance.startPoint = this.instance.getYaxis(event) - Util.getStyle(Scroll.active.mask, 'top') - Util.getStyle(this.instance.obj, 'top') + this.instance.topPad;
				break;
			case 'bottom':
				this.instance.startPoint = this.instance.getYaxis(event) - Util.getStyle(Scroll.active.mask, 'bottom') - Util.getStyle(this.instance.obj, 'bottom') + this.instance.bottomPad;
				break;
			}

			this.instance.obj.addEventListener(TOUCH_MOVE, this.instance.touchMove, false);
			this.instance.obj.addEventListener(TOUCH_END, this.instance.touchEnd, false);
		};

		this.touchMove = function(event) {
			switch(Scroll.active.vAlign) {
			case 'top':
				if(Scroll.active.drag) Scroll.active.touchUpdate(Scroll.active.getYaxis(event) - Scroll.active.startPoint - Util.getStyle(Scroll.active.mask, 'top'));
				break;
			case 'center':
				if(Scroll.active.drag) Scroll.active.touchUpdate(Scroll.active.getYaxis(event) - Scroll.active.startPoint - Util.getStyle(Scroll.active.mask, 'top'));
				break;
			case 'bottom':
				if(Scroll.active.drag) Scroll.active.touchUpdate(Scroll.active.getYaxis(event) - Scroll.active.startPoint - Util.getStyle(Scroll.active.mask, 'bottom'));
				break;
			}

			/*if(!Site.curMediaItem.touchNavlisteners) {
				Scroll.active.start - Scroll.active.getYaxis(event) > 0 ? TouchNav.swipeDirection = 'up' : TouchNav.swipeDirection = 'down';
			}*/
		};

		this.getYaxis = function(event) {
			switch(this.vAlign) {
			case 'top':
				return this.touchDevice ? event.touches[0].pageY : event.clientY;
				break;
			case 'center':
				return this.touchDevice ? event.touches[0].pageY : event.clientY;
				break;
			case 'bottom':
				return -(this.touchDevice ? event.touches[0].pageY : event.clientY);
				break;
			}
		};

		this.touchUpdate = function(position) {
			position = -position;
			var totalScrollableHeight = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			this.percent = Scroll.getPercent(position, totalScrollableHeight - Util.getStyle(this.mask, 'height'));
			Scroll.active.setHandlePosition();
			Scroll.active.setScrollPosition();
			Scroll.active.scrolling = true;
			if(POD) Menu.buttonPos();
		};

		this.touchEnd = function(event) {
			Scroll.active.drag = false;
			Scroll.active.setScrollRebound();
			document.removeEventListener(Scroll.MOVE, Scroll.active.mouseMove, false);
			document.removeEventListener(Scroll.UP, Scroll.active.mouseUp, false);
			setTimeout(function() {
				if(TouchNav.swipeDirection != 'left' && TouchNav.swipeDirection != 'right') {
					TouchNav.swipeDirection = undefined;
				}
				if(POD) Menu.buttonPos();
				Scroll.active.scrolling = false;
			}, 250);
		};

		this.setScrollPosition = function() {

			var totalScrollableHeight = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			var top = -Scroll.getPosition(this.percent, totalScrollableHeight - Util.getStyle(this.back, 'height'));

			switch(this.vAlign) {
			case 'top':
				if(POD || PAD || BROWSER_NAME === 'MSIE') {
					this.obj.style.top = top + this.topPad + 'px';
				} else {
					this.xform(this.obj, 'translateY', top + 'px');
				}
				break;
			case 'center':
				if(POD || PAD || BROWSER_NAME === 'MSIE') {
					this.obj.style.top = top + 'px';
				} else {
					this.xform(this.obj, 'translateY', top + 'px');
				}
				break;
			case 'bottom':
				if(POD) {
					this.obj.style.top = top + 'px';
				} else if(PAD || BROWSER_NAME === 'MSIE') {
					this.obj.style.bottom = top + this.bottomPad + 'px';
				} else {
					this.xform(this.obj, 'translateY', -top + 'px');
				}
				break;
			}
		};

		this.xform = function(obj, prop, val) {
			for(i in Transition.vendors) obj.style[Transition.vendors[i] + 'ransform'] = prop + '(' + val + ')';
		};

		this.checkPercentBound = function() {
			if(this.percent < 0) {
				this.percent = 0;
			} else if(this.percent > 1) {
				this.percent = 1;
			}
		};

		this.setScrollRebound = function() {
			Scroll.active.checkPercentBound();
			var totalScrollableHeight = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			var top = -Scroll.getPosition(this.percent, totalScrollableHeight - Util.getStyle(this.back, 'height'));
			new CSSTween(this.obj, [this.topPad + top + 'px'], ['top 0s ease-out'], '', false);
		};

		this.setHandlePosition = function() {
			var percent, top;
			if(this.percent < 0) {
				percent = 0;
			} else if(this.percent > 1) {
				percent = 1;
			} else {
				percent = this.percent;
			}

			top = Scroll.getPosition(percent, Util.getStyle(this.back, 'height') - Util.getStyle(this.handle, 'height'));

			switch(this.vAlign) {
			case 'top':
				new CSSTween(this.handle, [top + 'px'], ['top 0s ease-out'], '', false);
				break;
			case 'center':
				new CSSTween(this.handle, [top + 'px'], ['top 0s ease-out'], '', false);
				break;
			case 'bottom':
				new CSSTween(this.handle, [top + 'px'], ['bottom 0s ease-out'], '', false);
				break;
			}
		};

		this.checkScrollVisible = function() {
			var totalScrollableHeight = this.topPad + Util.getStyle(this.obj, 'height') + this.bottomPad;
			if(totalScrollableHeight > Util.getStyle(this.mask, 'height') && Util.getStyle(this.mask, 'opacity') > 0) {
				this.back.style.display = 'block';
				this.back.style.opacity = 1;
				this.scrollable = true;
				this.mask.style.overflow = 'hidden';
			} else {
				this.back.style.opacity = 0;
				this.back.style.display = 'none';
				this.percent = 0;
				this.scrollable = false;
				this.mask.style.overflow = 'visible';
			}
		};

		this.setEventTypes();
		this.build();

	}

	Scroll.mouseScroll = function(event) {
		if(Scroll.active.scrollable) {
			var scrollY = 0;

			if(event.detail && event.axis == 2) {
				scrollY = event.detail;
			} else if(event.wheelDeltaY) {
				scrollY = -event.wheelDeltaY;
			} else if(event.wheelDelta) {
				scrollY = -event.wheelDelta * 2;
			}

			if(Scroll.active.vAlign == 'bottom') {
				scrollY = scrollY * -1;
			}

			var newPosition = Scroll.active.percent + (scrollY * .0001);

			if(newPosition < 0) {
				Scroll.active.percent = 0;
			} else if(newPosition > 0 && newPosition < 1) {
				Scroll.active.percent = newPosition;
			} else if(newPosition > 1) {
				Scroll.active.percent = 1;
			}
			Scroll.active.setHandlePosition();
			Scroll.active.setScrollPosition();
		}
	};

	Scroll.getPercent = function(position, totalScrollableHeight) {
		return position / totalScrollableHeight;
	};

	Scroll.getPosition = function(percent, totalScrollableHeight) {
		return percent * totalScrollableHeight;
	};

	Scroll.resize = function() {
		var i = Scroll.scrollBars.length;
		while(i--) {
			var ths = Scroll.scrollBars[i];
			var totalScrollableHeight = ths.topPad + Util.getStyle(ths.obj, 'height') + ths.bottomPad;
			ths.checkScrollVisible();
			if(ths.align == 'right') {
				ths.back.style.left = (ths.mask.left + Util.getStyle(ths.mask, 'width') - ths.width + ths.hOffset) + 'px';
			} else {
				ths.back.style.left = (ths.mask.left - ths.hOffset) + 'px';
			}

			if(ths.vAlign == 'center') {
				ths.back.style.top = Util.getStyle(ths.mask, 'top') + ths.vOffset + 0 + 'px';
			}

			ths.back.style.height = Util.getStyle(ths.mask, 'height') + 'px';
			ths.handle.style.height = ((Util.getStyle(ths.mask, 'height') / totalScrollableHeight) * Util.getStyle(ths.mask, 'height')) + 'px';
			ths.setHandlePosition();
			ths.setScrollPosition();
		}
	};

	window.Scroll = Scroll;

}(window));
(function(window)
{
	ScrollCursor.instances = [];
	
	function ScrollCursor(obj, mask, vars)
	{
		this.obj = obj,
		this.obj.scroll = true,
		this.mask = mask;

		for(key in vars) this[key] = vars[key];

		this.obj.parent = this;
		this.mask.parent = this;

		this.obj.style.position = 'absolute';

		this.xtion = function(obj, val)
		{
			for(i in Transition.vendors) obj.style[Transition.vendors[i] + 'Transition'] = val;
		};

		this.xform = function(obj, prop, val)
		{
			for(i in Transition.vendors) obj.style[Transition.vendors[i] + 'Transform'] = prop+'('+val+')';
		};

		this.xtion(this.obj, 'all 1.8s ease-out');

		ScrollCursor.instances.push(this);
		ScrollCursor.active = this;

		ScrollCursor.resize();

		document.onmousemove = function(event)
		{
			var ths = ScrollCursor.active;
			if(	ths.obj.height + (50 * 2) > ths.mask.height &&
				event.pageX > ths.mask.left &&
				event.pageX < ths.mask.left + ths.mask.width &&
				event.pageY > ths.mask.top &&
				event.pageY < ths.mask.top + ths.mask.height)
			{
				var mouseY = event.pageY - ths.mask.top;
				var mousePercent = (mouseY / ths.mask.height);
				var yGoal = ((ths.mask.height) - (ths.obj.height + (50 * 2))) * mousePercent;		
			}
			else if(ths.obj.height < ths.mask.height)
			{
				var yGoal = 0;
				ths.xtion(ths.obj, '');
			}

			if(Chrome || Firefox)
			{
				ths.xform(ths.obj, 'translateY', yGoal + 'px');					
			}
			else
			{
				ths.xform(ths.obj, 'translateZ', 0);
				ths.obj.style.top = yGoal + 50 + 'px';					
			}
		};

	}

	ScrollCursor.resize = function()
	{
		var ths = ScrollCursor.active;
		ths.mask.left = Util.getStyle(ths.mask,'left') ? Util.getStyle(ths.mask,'left') : 0;
		ths.mask.top = Util.getStyle(ths.mask,'top') ? Util.getStyle(ths.mask,'top') : 0;
		ths.mask.width = Util.getStyle(ths.mask,'width');
		ths.mask.height = Util.getStyle(ths.mask,'height');
	};
	
	window.ScrollCursor = ScrollCursor;
	
}(window));
(function(window) {
	Caption.defaultOn = true;
	Caption.state = undefined;

	function Caption(){}

	Caption.resize = function() {
		if(Site.curMediaItem && Site.curMediaItem.getElementsByTagName('cite')[0]) {
			var cap = Site.curMediaItem.getElementsByTagName('cite')[0];
			cap.style.display = 'block';
			cap.style.position = 'absolute';
			var capWidth = parseInt(window.getComputedStyle(cap).getPropertyValue("width"));
			var left = ((STAGE_WIDTH - capWidth) * 0.5) - 8;
			var bottom = 40 > 0 ? 10 : 33;
			if(PAD||POD) {
				new CSSTween(cap, [left + 'px', bottom + 'px'], ['left 0s cubic','bottom 0s cubic']);
			} else {
				new CSSTween(cap, [left + 'px', bottom + 'px'], ['left 0s cubic','bottom 0s cubic']);
			}
		}
	};

	Caption.getCur = function() {
		try {
			return Site.curMediaItem.getElementsByTagName('cite')[0];
		} catch(error) {
			
		}
	};

	Caption.on = function() {
		if(Site.curMediaItem && Site.curMediaItem.getElementsByTagName('cite')[0]) {
			Caption.state = true;
			Caption.resize();
			setTimeout(Caption.resize,10);
			setTimeout(function(){
				var cap = Site.curMediaItem.getElementsByTagName('cite')[0];
				cap.style.opacity = 1;
			},20);
		}
	};

	Caption.off = function() {
		if(Site.curMediaItem && Site.curMediaItem.getElementsByTagName('cite')[0]) {
			var cap = Site.curMediaItem.getElementsByTagName('cite')[0];
			new CSSTween(cap, [0], ['opacity 0s cubic']);
			Caption.state = false;
		}
	};

	Caption.toggle = function() {
		if(Caption.state) {
			Caption.state = false;
			Address.setPath(Site.curPath + "/" + Site.curImgNum);
		} else {
			Caption.state = true;
			Address.setPath(Site.curPath + "/" + Site.curImgNum + "/caption");
		}
	};

	Caption.check = function() {
		if(Address.getPath() !== '' && Caption.defaultOn && Caption.state == undefined && Site.curMediaItem && Site.curMediaItem.getElementsByTagName('cite')[0]) {
			Caption.on();
		} else if(Address.getPath() !== '' && Caption.state && Site.curMediaItem && Site.curMediaItem.getElementsByTagName('cite')[0]) {
			Caption.on();
		}
	};

	window.Caption = Caption;

}(window));
(function(window)
{
	function Page(){}

	Page.resize = function(mediaItem)
	{
		if(POD)
		{
			var pageTopMargin = 26,
			pageBottomMargin = 0,
			pageLeftMargin = 16,
			pageRightMargin = 0;
		}
		else
		{
			var pageTopMargin = Util.percentToPixels('10%',STAGE_HEIGHT),
			pageBottomMargin = Util.percentToPixels('20%',STAGE_HEIGHT),
			pageLeftMargin = Util.percentToPixels('10%',STAGE_WIDTH),
			pageRightMargin = Util.percentToPixels('10%',STAGE_WIDTH);
		}

		var scrollBarWidth = 6;

		var featuredImage;

		if(mediaItem.getAttribute('data-featuredImage'))
		{
			featuredImage = Site.getMediaAsset(mediaItem, 'featuredImage');
		}

		var mask = Site.getMediaAsset(mediaItem, 'textMask');
		mask.style.position = 'absolute';

		var headingHeight = 0;
		if(true && Site.state != CONTACT)
		{
			var heading = Site.getMediaAsset(mediaItem, 'textPage').getElementsByTagName('h2')[0];
			heading.style.position = 'absolute';
			heading.style.top = pageTopMargin + 'px';
			headingHeight = 20 + 30;
			mask.style.top = pageTopMargin + headingHeight + 'px';

			if('left' == 'right' && featuredImage && !POD)
			{
				heading.style.left = pageLeftMargin + featuredImage.width + 24 + 'px';
			}
			else if('left' == 'right' && !featuredImage)
			{
				heading.style.left = pageLeftMargin + 'px';
			}
			else if('left' == 'left' && featuredImage && !POD)
			{
				heading.style.left = pageLeftMargin + scrollBarWidth + 30 + featuredImage.width + 24 + 'px';
			}
			else
			{
				heading.style.left = pageLeftMargin + 'px';
			}
		}
		else
		{
			mask.style.top = pageTopMargin + 'px';
		}

		if(featuredImage && !POD)
		{
			featuredImage.style.top = pageTopMargin + headingHeight + 'px';
		}
		
		if('left' == 'left' && featuredImage && !POD)
		{
			mask.style.left = pageLeftMargin + 30 + featuredImage.width + 30 + 'px';
			if(!POD) featuredImage.style.left = pageLeftMargin + 'px';
		}
		else if('left' == 'left' && !featuredImage)
		{
			mask.style.left = pageLeftMargin + 30 + 'px';
		}
		else if('left' == 'right' && featuredImage && !POD)
		{
			mask.style.left = pageLeftMargin + featuredImage.width + 30 + 'px';
			if(!POD) featuredImage.style.left = pageLeftMargin + 'px';
		}
		else
		{
			mask.style.left = pageLeftMargin + 'px';
		}
		var text;
		if(Site.state == CONTACT)
		{
			text = Site.getMediaAsset(mediaItem, 'contactForm');
		}
		else
		{
			text = Site.getMediaAsset(mediaItem, 'pageText');
		}

		var maskWidth;

		if(featuredImage && !POD)
		{
			maskWidth = (STAGE_WIDTH - (pageLeftMargin + pageRightMargin + 30 + featuredImage.width + 30));
		}
		else
		{
			maskWidth = (STAGE_WIDTH - (pageLeftMargin + pageRightMargin + 30));
		}

		var maskHeight = (STAGE_HEIGHT - (pageTopMargin + pageBottomMargin + headingHeight));
		mask.style.width = maskWidth + 'px';				
		mask.style.height = maskHeight + 'px';
		if(!mediaItem.scrollbar && (Util.getStyle(text,'height') > maskHeight)) 
		{
			switch('left') {
				case 'left':
					var horOffset = 30;
				break;
				case 'right':
					var horOffset = 30 + 4;
				break;
			}
			text.mediaItem = mediaItem;
			if(!mediaItem.scroll) mediaItem.scroll = new Scroll(text, mask, {align:'left',hOffset:horOffset,vOffset:0});
		}
		Scroll.resize();
		
		text.mediaItem = mediaItem;
		mask.mediaItem = mediaItem;
	};

	Page.linkTouchEvents = function(mediaItem)
	{
		var a = mediaItem.getElementsByTagName('a');			
		for(i in a)
		{
			if(a[i].href != undefined && a[i].href != '')
			{
				a[i].addEventListener(TOUCH_END, Page.touchLink, false);
			}
		}
	};

	Page.touchLink = function(e)
	{
		var tg = '';
		if(!e.target.getAttribute('onclick')) tg = '_blank';
		if(e.target.getAttribute('target')) tg = e.target.getAttribute('target');
		if(e.target.href.search('mailto:') > -1) {
			if(e.target.href) {
				window.location.href = e.target.href;
			} else if(e.target.parentNode.href) {
				window.location.href = e.target.parentNode.href;
			}
		} else if(tg === '_blank' || tg === '_self') {
			if(e.target.href) {
				window.open(e.target.href, tg);
			} else if(e.target.parentNode.href) {
				window.open(e.target.parentNode.href, tg);
			}
		} else {
			if(e.target.href) {
				Address.setPath(e.target.href.split(window.location.hostname)[1]);
			} else if(e.target.parentNode.href) {
				Address.setPath(e.target.parentNode.href.split(window.location.hostname)[1]);
			}
		}
	};

	window.Page = Page;
	
}(window));
(function(window) {
	Transition.active = false;
	Transition.zIndex = 0;
	Transition.dir = 'left';
	Transition.vendors = ['WebkitT', 'MozT', 'OT', 't'];

	function Transition(_new, vars) {
		this._new = _new;
		this.speed = Transition.speed();
		this.type = 'slide';

		for(key in vars) this[key] = vars[key];

		this.transition = function() {
			switch(this.type) {
			case 'slide':
				this.slide();
				break;
			case 'fade':
				this.fade();
				break;
			}
		};

		this.fade = function() {
			if(this.old != this._new) {
				Transition.active = true;
				this._new.style.zIndex = Transition.zIndex++;
				this._new.style.left = 0 + 'px';
				this.xtion(this._new, '');
				this.xform(this._new, 'translateX', 0 + 'px');
				new CSSTween(this._new, [1], ['opacity ' + this.speed + 's cubic'],function(){
					Transition.active = false;
				});
				if(this.old) {
					var ths = this;
					setTimeout(function() {
						var swiping = Site.touchNav ? TouchNav.swiping : false;
						if(ths.onComplete) ths.onComplete();
					}, this.speed * 1000);

				}
			} else {
				this._new.style.left = 0 + 'px';
				this._new.style.opacity = 1;
				this.xtion(this._new, '');
				this.xform(this._new, 'translateX', 0 + 'px');
			}
		};

		this.xtion = function(obj, val) {
			for(i in Transition.vendors) obj.style[Transition.vendors[i] + 'ransition'] = val;
		};

		this.xform = function(obj, prop, val) {
			for(i in Transition.vendors) obj.style[Transition.vendors[i] + 'ransform'] = prop + '(' + val + ')';
		};

		this.slide = function() {
			if(Address.getPath() != '' && this.old && this.old != this._new) {

				Transition.active = true;

				this._new.style.zIndex = Transition.zIndex++;
				var newTo, oldTo;

				switch(Transition.dir) {
				case 'left':
					if(this.old) {
						this.xtion(this.old, '');
						this.xform(this.old, 'translateX', 0 + 'px');
					}
					this.xtion(this._new, '');
					this.xform(this._new, 'translateX', STAGE_WIDTH + 'px');
					newTo = 0;
					oldTo = -STAGE_WIDTH;
					break;
				case 'right':
					if(this.old) {
						this.xtion(this.old, '');
						this.xform(this.old, 'translateX', 0 + 'px');
					}
					this.xtion(this._new, '');
					this.xform(this._new, 'translateX', (-STAGE_WIDTH) + 'px');
					newTo = 0;
					oldTo = STAGE_WIDTH;
					break;
				}

				var ths = this;

				setTimeout(function() {
					if(ths.onComplete) ths.onComplete();
					Transition.active = false;
				}, ths.speed * 1000);

				setTimeout(function() {

					ths._new.style.display = 'block';
					ths._new.style.opacity = 1;
					ths._new.parent = ths;

					ths.xtion(ths._new, 'all ' + ths.speed + 's');
					ths.xform(ths._new, 'translateX', newTo + 'px');

					if(ths.old) {
						ths.xtion(ths.old, 'all ' + ths.speed + 's');
						ths.xform(ths.old, 'translateX', oldTo + 'px');
						setTimeout(function() {
							ths.old.style.opacity = 0;
							ths.old.style.display = 'none';
						}, ths.speed * 800);
					}

				}, 50);
			} else {
				this.fade();
			}
		};

		this.transition();
	}

	Transition.setDir = function(dir) {
		switch(dir) {
		case 'left':
			Transition.dir = 'left';
			break;
		case 'right':
			Transition.dir = 'right';
			setTimeout(function(){Transition.setDir('left')}, 250);
			break;
		}

	};

	Transition.speed = function() {
		if(Address.getPath() == '') {
			return 1;
		} else {
			return 1;
		}
	};

	window.Transition = Transition;

}(window));
(function(window) {
	function JSONP(path, file, params, callback) {
		var jp = document.createElement("script");
		jp.setAttribute("src", path + file + "?" + params + '&callback=' + callback);
		jp.setAttribute("id", "jp");
		!document.getElementById("jp") ? document.getElementsByTagName("head")[0].appendChild(jp) : document.getElementsByTagName("head")[0].replaceChild(jp, document.getElementById("jp"));
	}

	window.JSONP = JSONP;

}(window));
(function(window) {
	Pass.width = 296;
	Pass.height = 47;

	function Pass(){}

	Pass.show = function(section) {
		Pass.section = section;
		var id = section.getAttribute('data-lock');

		if(!Pass.div) {
			var p = document.createElement('div');
			p.style.opacity = 0;
			p.style.zIndex = 100;
			p.setAttribute('id', 'passPop');
			p.style.position = 'absolute';
			p.style.display = 'none';
			p.style.width = Pass.width + 'px';
			p.style.height = Pass.height + 'px';
			p.style.backgroundColor = '#f1f1f1';
			d.site.appendChild(p);
			Pass.div = p;
		}

		Pass.div.innerHTML = "<form name=sectionAuth>";
		Pass.div.innerHTML += "<input id=passInput name=passInput onfocus='Share.focus(this)' onblur='Share.blur(this)' value='PASSWORD' data-default='PASSWORD' onkeydown='Pass.submitCheck(event,"+id+")' />";
		Pass.div.innerHTML += "<input type=button value='SUBMIT' onfocus='Share.focus(this)' onblur='Share.blur(this)' onclick='Pass.submit("+id+")'>";
		Pass.div.innerHTML += "</form>";

		if(!Pass.showing) document.getElementById('passInput').value = 'PASSWORD';

		Pass.showing = true;
		Pass.align();
		new CSSTween(Pass.div, [.95], ['opacity .35s cubic']);
	};

	Pass.align = function() {
		if(Pass.div && !POD && !PAD) {
			var STAGE_WIDTH = window.innerWidth - (0 + 0);
			var STAGE_HEIGHT = window.innerHeight - (60 + 40);
			Pass.div.style.left = ((STAGE_WIDTH - Pass.width + Util.getStyle(d.mediaView, 'left')) * 0.5) + 'px';
			Pass.div.style.top =  ((STAGE_HEIGHT - Pass.height) * 0.5) + 60 + window.pageYOffset + 'px';
		} else if(Pass.div && (POD||PAD)) {
			Pass.div.style.left = ((window.innerWidth - Pass.width) * 0.5) + 'px';
			Pass.div.style.top =  ((window.innerHeight - Pass.height) * 0.5) + window.pageYOffset + 'px';
		}
	};

	Pass.checkLock = function(section) {
		if(section && section.getAttribute('data-lock') && section.locked === false) {
			section.locked = false;
		} else if(section && section.getAttribute('data-lock') && section.locked === undefined) {
			section.locked = true;
		} else if(section && !section.getAttribute('data-lock')) {
			section.locked = false;
		}
	};

	Pass.hide = function() {
		if(Pass.div) {
			Pass.showing = false;
			new CSSTween(Pass.div, [0], ['opacity .35s cubic']);
		}
	};

	Pass.submitCheck = function(e, id) {
  		var keyPressed = e.which || e.keyCode;
		if(keyPressed === 13) {
			Pass.submit(id);
			document.getElementById('passInput').blur();
		}
	};

	Pass.submit = function(id) {
		var pass = document.getElementById('passInput').value;
		new JSONP(Address.base + 'inc/com/', 'SectionAuth.php', 'id='+id+'&pass='+pass, 'Pass.response');
	};

	Pass.response = function(response) {
		if(response) {
			Pass.section.locked = false;
			Site.address();
			Pass.hide();
		} else {
			document.getElementById('passInput').value = 'INCORRECT PASSWORD';
		}
	};

	window.Pass = Pass;
	
}(window));
(function(window)
{
	Share.open = false;
	Share.fontCol = Util.hexToRGB('#3D3D3D');
	Share.fieldCol = Util.hexToRGB('#e5e5e5');

	function Share()
	{
		Share.build();
	}

	Share.setContactTouchEvents = function()
	{
		var str = '';
		var form = document.contact.elements;			
		for(key in form)
		{
			if(form[key].id != undefined)
			{
				form[key].addEventListener(TOUCH_END, Share.touchFocus, false);
				form[key].addEventListener(TOUCH_CANCEL, Share.touchBlur, false);
			}
		}
	};

	Share.build = function()
	{
		var shr = document.createElement('div');
		shr.style.opacity = 0;
		shr.style.zIndex = 28;
		shr.style.position = 'absolute';
		shr.style.display = 'none';
		var shrLeft = 'left' == 'left' ? 0 + (260 - 10) : 0;
		shr.style.left = shrLeft + 'px';
		shr.style.top = 60 + 'px';
		shr.style.overflow = 'hidden';
		shr.setAttribute('class', 'share');

		shr.bg = document.createElement('div');
		shr.bg.style.position = 'absolute';
		shr.bg.style.display = 'block';
		shr.bg.style.overflow = 'hidden';
		var rgb = Util.hexToRGB('#f1f1f1');
		shr.bg.style.backgroundColor = "rgba("+rgb.r+","+rgb.g+","+rgb.b+","+0.9+")";
		shr.appendChild(shr.bg);

		shr.bg.addEventListener('click', Share.toggle, false);

		shr.bg.gal = document.createElement('div');
		shr.bg.gal.style.position = 'absolute';
		shr.bg.gal.style.display = 'block';
		shr.bg.gal.style.width = (STAGE_WIDTH - (50 * 2)) + 'px';
		shr.bg.gal.style.height = 0 + 'px';
		shr.bg.gal.height = 0;
		shr.bg.gal.style.top = 50 + 'px';
		shr.appendChild(shr.bg.gal);

		shr.bg.gal.label = document.createElement('h3');
		shr.bg.gal.label.style.position = 'relative';
		shr.bg.gal.label.style.display = 'block';
		shr.bg.gal.label.style.paddingBottom = 5 + 'px';
		shr.bg.gal.label.innerHTML = "Email this image";
		shr.bg.gal.appendChild(shr.bg.gal.label);
		
		shr.bg.gal.line = document.createElement('hr');
		shr.bg.gal.line.style.position = 'relative';
		shr.bg.gal.line.style.width = (STAGE_WIDTH - (50 * 2)) + 'px';
		shr.bg.gal.line.style.height = 1 + 'px';
		shr.bg.gal.line.style.top = 0 + 'px';
		shr.bg.gal.line.style.border = 0;
		shr.bg.gal.line.style.opacity = .35;
		shr.bg.gal.line.style.color = '#989898';
		shr.bg.gal.line.style.backgroundColor = '#989898';
		shr.bg.gal.appendChild(shr.bg.gal.line);

		shr.bg.gal.form = document.createElement('div');
		shr.bg.gal.form.style.position = 'absolute';
		shr.bg.gal.form.setAttribute('id', 'emailForm');
		shr.bg.gal.form.style.top = 45 + 'px';
		shr.bg.gal.form.style.left = 208 + 'px';
		var form = "<div id=shareResponse style='display:none;opacity:0;'></div>";
		form += "<form name=emailShare>";
		form += "<input id=fromName type=text onfocus='Share.focus(this)' onblur='Share.blur(this)' value='YOUR NAME' data-default='YOUR NAME'>";
		form += "<input id=toName type=text onfocus='Share.focus(this)' onblur='Share.blur(this)' value='FRIEND&apos;S NAME' data-default='FRIEND&apos;S NAME'>";
		form += "<input id=fromEmail type=text onfocus='Share.focus(this)' onblur='Share.blur(this)' value='YOUR EMAIL' data-default='YOUR EMAIL'>";
		form += "<input id=toEmail type=text onfocus='Share.focus(this)' onblur='Share.blur(this)' value='FRIEND&apos;S EMAIL' data-default='FRIEND&apos;S EMAIL'>";
		form += "<textarea id=message onfocus='Share.focus(this)' onblur='Share.blur(this)' data-default='MESSAGE'>MESSAGE</textarea>";
		form += "<input id=shareItem type=hidden value='"+encodeURIComponent(Address.base + 'media/thumb/' + '?w=1600&h=1200&f=' + Site.curMediaItem.getAttribute('data-thumb'))+"'>";
		form += "<input type=button value='SEND' onfocus='Share.focus(this)' onblur='Share.blur(this)' onclick='Share.shareForm()'>";
		form += "</form>";
		shr.bg.gal.form.innerHTML = form;
		shr.bg.gal.appendChild(shr.bg.gal.form);

		d.site.appendChild(shr);
		Share.share = shr;
		Site.share = shr;
		Share.resize();
	};

	Share.imgLoad = function(event)
	{
		var img = event.target;
		img.style.opacity = 0;
		if(RETINA)
		{
			img.setAttribute('width', img.width * 0.5);
			img.setAttribute('height', img.height * 0.5);			
		}
		else
		{
			img.setAttribute('width', img.width);
			img.setAttribute('height', img.height);			
		}
		img.parent.appendChild(img);
		new CSSTween(img, [1], ['opacity .25s cubic']);
		img.removeEventListener('load', Share.imgLoad, false);
	};

	Share.update = function()
	{
		var thumbQuery = RETINA ? Util.getThumbQuery(400,266) : Util.getThumbQuery(200,133);
		var img = Site.share.bg.gal.img = document.createElement('img');
		img.setAttribute('src', Address.base + 'media/thumb/' + Util.getThumbQuery(200,133) + Site.curMediaItem.getAttribute('data-thumb'));
		img.style.position = 'absolute';
		img.style.top = 45 + 'px';
		img.parent = Site.share.bg.gal;
		img.addEventListener('load', Share.imgLoad, false);
	};

	Share.show = function()
	{
		Share.update();
		Site.resize();
		new CSSTween(Site.share, [1], ['opacity .25s cubic']);
		Share.open = true;
	};

	Share.hide = function()
	{
		new CSSTween(Site.share, [0], ['opacity .25s cubic'],function(){
			Site.share.bg.gal.removeChild(Site.share.bg.gal.img);
		});
		Share.open = false;
	};

	Share.toggle = function()
	{
		if(Share.open)
		{
			Address.setPath(Site.curPath + "/" + Site.curImgNum);
		}
		else
		{
			Address.setPath(Site.curPath + "/" + Site.curImgNum + "/email");
		}
	};

	Share.resize = function()
	{
		var emailWidth = 573,
		emailHeight = 225;

		Site.share.style.width = STAGE_WIDTH + 'px';
		Site.share.style.height = STAGE_HEIGHT + 'px';
		Site.share.bg.style.width = STAGE_WIDTH + 'px';
		Site.share.bg.style.height = STAGE_HEIGHT + 'px';

		Site.share.bg.gal.style.width = emailWidth + 'px';
		Site.share.bg.gal.line.style.width = emailWidth + 'px';
		Site.share.bg.gal.style.left = ((STAGE_WIDTH - emailWidth) * 0.5) + 'px';
		Site.share.bg.gal.style.top = ((STAGE_HEIGHT - emailHeight) * 0.5) + 'px';

		Scroll.resize();
	};

	Share.shareForm = function()
	{
		var str = '';
		var form = document.emailShare.elements;			
		for(key in form)
		{
			if(form[key].id != undefined)
			{
				form[key]._default = form[key].getAttribute('data-default');
				str += '&'+form[key].id+'='+form[key].value;
			}
		}
		str = str.replace(/\n/g,"<br>");
		str = str.replace(/\r/g,"<br>");

		if(Share.checkShare() == '')
		{
			new JSONP(Address.base + 'inc/com/', 'Share.php', 'method=shareForm'+str, 'Share.shareResponse');
		}
		else
		{
			alert(Share.checkShare());
		}
	};

	Share.checkShare = function()
	{
		var msg = '';
		var form = document.emailShare.elements;			
		for(key in form)
		{
			var id = form[key]._default;
			var val = form[key].value;
			if((id == val || val == ' ') && id != undefined)
			{
				msg += 'Please enter: ' + id + '\n\r';
			}
		}
		return msg;
	};

	Share.contactForm = function()
	{
		var str = '';
		var form = document.contact.elements;			
		for(key in form)
		{
			if(form[key].id != undefined)
			{
				str += '&'+form[key].id+'='+form[key].value;
			}
		}
		str = str.replace(/\n/g,"<br>");
		str = str.replace(/\r/g,"<br>");

		if(Share.checkForm() == '')
		{
			new JSONP(Address.base + 'inc/com/', 'Share.php', 'method=contactForm'+str, 'Share.contactResponse');
		}
		else
		{
			alert(Share.checkForm());
		}
	};

	Share.checkForm = function()
	{
		var msg = '';
		var form = document.contact.elements;			
		for(key in form)
		{
			var id = String(form[key].id);
			var val = String(form[key].value);
			if(id == val && id.toLowerCase() != 'email' && id != 'undefined')
			{
				msg += 'Please enter valid: ' + id + '\n\r';
			}
			else if(id.toLowerCase() == 'email')
			{
				if(val.search('@') < 0 || val.search('.') < 0 || id == val)
				{
					msg += 'Please enter valid: ' + id + '\n\r';
				}
			}
		}
		return msg;
	};

	Share.touchFocus = function(event)
	{
		if(!TouchNav.swipeDirection)
		{
			var rgb1 = Share.fieldCol;
			event.target.style.backgroundColor = "rgba("+rgb1.r+","+rgb1.g+","+rgb1.b+","+0.5+")";
			var rgb2 = Share.fontCol;
			event.target.style.color = "rgba("+rgb2.r+","+rgb2.g+","+rgb2.b+","+1+")";
			if(event.target.getAttribute('data-default') === event.target.value) 
			{
				event.target.value = '';
				event.target.focus();
			}
			if(event.target.value === 'Submit')
			{
				Share.contactForm();
			}
		}
		if(POD) Menu.buttonPos();
	};

	Share.touchBlur = function(event)
	{
		if(!TouchNav.swipeDirection)
		{
			var rgb1 = Share.fieldCol;
			event.target.style.backgroundColor = "rgba("+rgb1.r+","+rgb1.g+","+rgb1.b+","+1+")";
			var rgb2 = Share.fontCol;
			event.target.style.color = "rgba("+rgb2.r+","+rgb2.g+","+rgb2.b+","+1+")";
			if(event.target.value === '') 
			{
				event.target.value = event.target.getAttribute('data-default');
				event.target.blur();
			}
		}
		if(POD) Menu.buttonPos();
	};

	Share.focus = function(input)
	{
		var rgb1 = Share.fieldCol;
		input.style.backgroundColor = "rgba("+rgb1.r+","+rgb1.g+","+rgb1.b+","+0.5+")";
		var rgb2 = Share.fontCol;
		input.style.color = "rgba("+rgb2.r+","+rgb2.g+","+rgb2.b+","+1+")";
		if(input.getAttribute('data-default') === input.value || input.value === 'INCORRECT PASSWORD') 
		{
			input.value = '';
		}
	};

	Share.blur = function(input)
	{
		var rgb1 = Share.fieldCol;
		input.style.backgroundColor = "rgba("+rgb1.r+","+rgb1.g+","+rgb1.b+","+1+")";
		var rgb2 = Share.fontCol;
		input.style.color = "rgba("+rgb2.r+","+rgb2.g+","+rgb2.b+","+1+")";
		if(input.value === '' || input.value === 'INCORRECT PASSWORD') 
		{
			input.value = input.getAttribute('data-default');
		}
	};

	Share.shareResponse = function(response)
	{
		var rspDiv = document.getElementById('shareResponse');
		rspDiv.style.opacity = 0;
		rspDiv.style.position = 'absolute';
		rspDiv.style.zIndex = 2;
		rspDiv.style.width = '250px';
		rspDiv.innerHTML = response;
		rspDiv.innerHTML += "<br><input style='float: none; margin: 10px 0;' type=button value='OK' onfocus='Share.focus(this)' onblur='Share.blur(this)' onclick='Share.toggle()'>";
		new CSSTween(document.emailShare, [0], ['opacity .35s cubic']);
		new CSSTween(rspDiv, [1], ['opacity 1s cubic']);
	};	

	Share.contactResponse = function(response)
	{
		var rspDiv = document.getElementById('contactResponse');
		rspDiv.style.opacity = 0;
		rspDiv.style.position = 'absolute';
		rspDiv.style.zIndex = 2;
		rspDiv.style.width = '350px';
		rspDiv.innerHTML = response;
		new CSSTween(document.contact, [0.001], ['opacity .35s cubic']);
		new CSSTween(rspDiv, [1], ['opacity 1s cubic']);
	};

	window.Share = Share;

}(window));
(function(window) {
	function ImgLoader(){}

	ImgLoader.load = function(mediaItem) {
		if(POD) {
			ImgLoader.imageVideoMarginTop = 0,
			ImgLoader.imageVideoMarginRight = 0,
			ImgLoader.imageVideoMarginBottom = 0,
			ImgLoader.imageVideoMarginLeft = 0;		
		} else {
			ImgLoader.imageVideoMarginTop = ImgLoader.percentToPixels('2%',STAGE_HEIGHT),
			ImgLoader.imageVideoMarginRight = ImgLoader.percentToPixels('2%',STAGE_WIDTH),
			ImgLoader.imageVideoMarginBottom = ImgLoader.percentToPixels('5%',STAGE_HEIGHT),
			ImgLoader.imageVideoMarginLeft = ImgLoader.percentToPixels('2%',STAGE_WIDTH);		
		}

		if(!mediaItem.loading) {						
			var type = mediaItem.getAttribute('data-type');
			var thumb = mediaItem.getAttribute('data-thumb') ? mediaItem.getAttribute('data-thumb') : '';
			var src = '';
			var mediaPath = '';
			
			if(IOS4) {
				mediaPath = 'media/thumb/?w=600&h=400&f=';
			} else if(POD) {
				mediaPath = 'media/thumb/?w=1024&h=768&f=';
			} else {
				mediaPath = 'media/original/';
			}

			switch(type) {
				case IMAGE:
					src = mediaPath + mediaItem.getAttribute('data-content');
				break;
				case VIDEO:
					src = thumb === '' ? 'inc/icn/videoLarge.png' : mediaPath + thumb;
				break;
				case SWF:
					src = thumb === '' ? 'inc/icn/swfLarge.png' : mediaPath + thumb;
				break;
				case PDF:
					src = thumb === '' ? 'inc/icn/pdfLarge.png' : mediaPath + thumb;
				break;
			}

			var mask = document.createElement('div');
			mask.setAttribute('class', 'imageVideoMask');
			mask.style.display = 'block';
			mask.style.position = 'absolute';
			mask.style.overflow = 'hidden';
			mask.style.left = ImgLoader.imageVideoMarginLeft + 'px';
			mask.style.top = ImgLoader.imageVideoMarginTop + 'px';
			mask.style.width = (STAGE_WIDTH - (ImgLoader.imageVideoMarginLeft + ImgLoader.imageVideoMarginRight)) + 'px';
			mask.style.height = (STAGE_HEIGHT - (ImgLoader.imageVideoMarginTop + ImgLoader.imageVideoMarginBottom)) + 'px';
			mediaItem.appendChild(mask);

			var img = document.createElement('img');
			img.mediaItem = mediaItem;
			img.setAttribute('class', IMAGE);
			var path = (Address.base+src).replace(thumb, encodeURIComponent(thumb));
			img.src = path;
			
			mediaItem.loading = true;
			img.style.opacity = 0;

			var alt = mediaItem.getAttribute('data-label');

			if(alt) img.alt = alt;

			mediaItem.mask = mask;
			img.mask = mask;

			ImgLoader.loader(mediaItem);

			img.addEventListener('load', ImgLoader.loaded, false);
		}
	};

	ImgLoader.loader = function(mediaItem) {
		mediaItem.style.width = STAGE_WIDTH + 'px';
		mediaItem.style.height = STAGE_HEIGHT + 'px';

		var avg,tint,loader,bg;
		if('10338' != '' && Address.getPath() == '' && Loader.type == 'spinner') {
			bg = Util.hexToRGB('#f1f1f1');
			avg = (bg.r + bg.g + bg.b) * 0.33;
			tint = avg < 128 ? '#FFFFFF' : '#000000'; 
			new Loader(mediaItem, 'spinner', '', tint);
		} else if(Loader.type == 'spinner') {
			bg = Util.hexToRGB('#f1f1f1');
			avg = (bg.r + bg.g + bg.b) * 0.33;
			tint = avg < 128 ? '#FFFFFF' : '#000000'; 
			new Loader(mediaItem, 'spinner', '', tint);
		} else {	
			new Loader(mediaItem);
		}
	};

	ImgLoader.loaded = function(event) {
		var img = event.target;
		mediaItem = img.mediaItem;
		mask = img.mask;
		img.setAttribute('width', img.width);
		img.setAttribute('height', img.height);
		mask.appendChild(img);
		Loader.remove(mediaItem);
		mediaItem.loading = false;
		mediaItem.loaded = true;
		ImgLoader.resize(mediaItem);

		if(Address.getPath() == '') {
			new CSSTween(img, [1], ['opacity 1s cubic'],'',true);
		} else {
			new CSSTween(img, [1], ['opacity 1s cubic'],'',true);
		}
		
		Site.loadMediaItem(mediaItem.index);

		if(mediaItem.getAttribute('data-type') == VIDEO) {
			Video.buildBigPlay(mediaItem);
			Video.autoLoad(Site.curMediaItem);
			Video.loadPadVimeo(mediaItem);
		}
	};

	ImgLoader.resize = function(mediaItem) {

		var stageWidth, stageHeight;
		
		if(Address.getPath() == '' && 'fit' == 'fillSite') {
			stageWidth = window.innerWidth;
			stageHeight = window.innerHeight;
		} else {
			stageWidth = STAGE_WIDTH - (ImgLoader.imageVideoMarginRight + ImgLoader.imageVideoMarginLeft),
			stageHeight = STAGE_HEIGHT - (ImgLoader.imageVideoMarginTop + ImgLoader.imageVideoMarginBottom);
		}

		if(mediaItem.loaded) {
			var image = Site.getMediaAsset(mediaItem, IMAGE),
			scale = ImgLoader.scale(image);
			image._width = scale.width;
			image._height = scale.height;

			var align = ImgLoader.align(image);
				image.left = align.left;
				image.top = align.top;
		
			if(Address.getPath() == '' && 'fit' == 'fillSite') {
				new CSSTween(mediaItem.mask, [stageWidth + 'px', stageHeight + 'px', 0 + 'px', 0 + 'px'], ['width 0s linear','height 0s linear','left 0s linear','top 0s linear'],'',true);
			} else {
				new CSSTween(mediaItem.mask, [stageWidth + 'px', stageHeight + 'px', ImgLoader.imageVideoMarginLeft + 'px', ImgLoader.imageVideoMarginTop + 'px'], ['width 0s linear','height 0s linear','left 0s linear','top 0s linear'],'',true);
			}
			
			new CSSTween(image, [image._width + 'px', image._height + 'px', image.left + 'px', image.top + 'px'], ['width 0s linear','height 0s linear','left 0s linear','top 0s linear'],'',true);
		}
		if(Site.getMediaAsset(mediaItem,'loader')) Loader.align(mediaItem);
		if(Site.getMediaAsset(mediaItem,'playBtn')) Video.alignPlayBtn(mediaItem);
	};

	ImgLoader.percentToPixels = function(value,range) {
		if(value.search('%') > -1) {
			value = value.replace('%','');
			value = (Number(value) * .01) * range;
			return Math.round(value);
		} else if(value.search('px') > -1) {
			value = value.replace('px','');
			return Number(value);
		} else {
			return Number(value);
		}
	};

	ImgLoader.scale = function(img) {

		var scale = ['width','height'];

		var stageWidth, stageHeight;

		if(Address.getPath() == '' && 'fit' == 'fillSite') {
			stageWidth = window.innerWidth;
			stageHeight = window.innerHeight;
		} else {
			stageWidth = STAGE_WIDTH - (ImgLoader.imageVideoMarginRight + ImgLoader.imageVideoMarginLeft),
			stageHeight = STAGE_HEIGHT - (ImgLoader.imageVideoMarginTop + ImgLoader.imageVideoMarginBottom);
		}
		
		var imageRatio = img.getAttribute('width') / img.getAttribute('height');
		var stageRatio = stageWidth / stageHeight;

		if(ImgLoader.fit(stageRatio, imageRatio)) {
			scale.width = stageWidth,
			scale.height = Math.round(scale.width / imageRatio);
		} else {
			scale.width = Math.round(stageHeight * imageRatio),
			scale.height = stageHeight;			
		}

		return scale;
	};

	ImgLoader.fit = function(stageRatio, imageRatio) {
		if(POD) {
			return stageRatio < imageRatio;
		} else if(Address.getPath() == '') {
			switch('fit') {
				case 'fit':
					return stageRatio < imageRatio;
				break;
				case 'fill':
					return stageRatio > imageRatio;
				break;
				case 'fillSite':
					return stageRatio > imageRatio;
				break;
			}
		} else {
			if(POD) {
				return stageRatio < imageRatio;
			} else if(Site.curMediaItem && Site.curMediaItem.getAttribute('data-type') == VIDEO) {
				return stageRatio < imageRatio;				
			} else {
				switch('fit') {
					case 'fit':
						return stageRatio < imageRatio;
					break;
					case 'fill':
						return stageRatio > imageRatio;
					break;
				}				
			}
		}
	};

	ImgLoader.align = function(img) {
		
		var stageWidth, stageHeight;

		if(Address.getPath() == '' && 'fit' == 'fillSite') {
			stageWidth = window.innerWidth;
			stageHeight = window.innerHeight;
		} else {
			stageWidth = STAGE_WIDTH - (ImgLoader.imageVideoMarginRight + ImgLoader.imageVideoMarginLeft);
			stageHeight = STAGE_HEIGHT - (ImgLoader.imageVideoMarginTop + ImgLoader.imageVideoMarginBottom);
		}

		var align = ['left','top'];
		switch('center') {
			case 'center':
				align.left = Math.round((stageWidth - img._width) * 0.5);
				align.top = Math.round((stageHeight - img._height) * 0.5);
			break;
			case 'left':
				align.left = 0;
				align.top = Math.round((stageHeight - img._height) * 0.5);
			break;
			case 'right':
				align.left = stageWidth - img._width;
				align.top = Math.round((stageHeight - img._height) * 0.5);
			break;
		}
		if(!POD && Address.getPath() != '' && 'fit' == 'fill' && Site.curMediaItem && Site.curMediaItem.getAttribute('data-type') !== VIDEO) {
			align.top = 0;
		} else if(!POD && Address.getPath() == '' && ('fit' == 'fill' || 'fit' == 'fillSite')) {
			align.left = Math.round((stageWidth - img._width) * 0.5);
			align.top = 0;
		}
		return align;
	};

	window.ImgLoader = ImgLoader;
	
}(window));
var Froogaloop=function(){function e(c){return new e.fn.init(c)}function g(c,b,a){if(!a.contentWindow.postMessage)return!1;var d=a.getAttribute("src").split("?")[0],c=JSON.stringify({method:c,value:b});a.contentWindow.postMessage(c,d)}function i(c){var b,a;try{b=JSON.parse(c.data),a=b.event||b.method}catch(l){}"ready"==a&&!h&&(h=!0);if(c.origin!=j)return!1;var c=b.value,e=b.data,f=""===f?null:b.player_id;b=f?d[f][a]:d[a];a=[];if(!b)return!1;void 0!==c&&a.push(c);e&&a.push(e);f&&a.push(f);return 0<
a.length?b.apply(null,a):b.call()}function k(c,b,a){a?(d[a]||(d[a]={}),d[a][c]=b):d[c]=b}var d={},h=!1,j="";e.fn=e.prototype={element:null,init:function(c){"string"===typeof c&&(c=document.getElementById(c));this.element=c;for(var c=this.element.getAttribute("src").split("/"),b="",a=0,d=c.length;a<d;a++){if(3>a)b+=c[a];else break;2>a&&(b+="/")}j=b;return this},api:function(c,b){if(!this.element||!c)return!1;var a=this.element,d=""!==a.id?a.id:null,e=!b||!b.constructor||!b.call||!b.apply?b:null,f=
b&&b.constructor&&b.call&&b.apply?b:null;f&&k(c,f,d);g(c,e,a);return this},addEvent:function(c,b){if(!this.element)return!1;var a=this.element,d=""!==a.id?a.id:null;k(c,b,d);"ready"!=c?g("addEventListener",c,a):"ready"==c&&h&&b.call(null,d);return this},removeEvent:function(c){if(!this.element)return!1;var b=this.element,a;a:{if((a=""!==b.id?b.id:null)&&d[a]){if(!d[a][c]){a=!1;break a}d[a][c]=null}else{if(!d[c]){a=!1;break a}d[c]=null}a=!0}"ready"!=c&&a&&g("removeEventListener",c,b)}};e.fn.init.prototype=
e.fn;window.addEventListener?window.addEventListener("message",i,!1):window.attachEvent("onmessage",i,!1);return window.Froogaloop=window.$f=e}();
(function(window) {	
	function Video() {

	}

	Video.autoLoad = function(mediaItem) {
		if(mediaItem && mediaItem.getAttribute('data-type') == VIDEO && (false || Address.getPath() == '')) {
			if(!POD && !PAD) Video.load(mediaItem);
		}
	};

	Video.btnLoad = function(event) {
		var playBtn = event.target;
		playBtn.removeEventListener(SELECT_EVENT, Video.btnLoad, false);
		if(!DROID) new CSSTween(playBtn, [0], ['opacity .7s cubic']);

		var mediaItem = playBtn.mediaItem;

		Video.load(mediaItem);
	};

	Video.load = function(mediaItem) {

		if(POD) {
			Video.imageVideoMarginTop = 0,
			Video.imageVideoMarginRight = 0,
			Video.imageVideoMarginBottom = 0,
			Video.imageVideoMarginLeft = 0;
		} else {
			Video.imageVideoMarginTop = Video.percentToPixels('2%',STAGE_HEIGHT),
			Video.imageVideoMarginRight = Video.percentToPixels('2%',STAGE_WIDTH),
			Video.imageVideoMarginBottom = Video.percentToPixels('5%',STAGE_HEIGHT),
			Video.imageVideoMarginLeft = Video.percentToPixels('2%',STAGE_WIDTH);
		}

		if(!mediaItem.vid) {
			var img = Site.getMediaAsset(mediaItem, IMAGE);
			if(!DROID) new CSSTween(img, [0], ['opacity .7s cubic']);
			
			var src = mediaItem.getAttribute('data-content');
			var poster = mediaItem.getAttribute('data-thumb');
			if(src.search("vimeo:") == 0) {
				var img = Site.getMediaAsset(mediaItem, IMAGE);
				img.style.zIndex = -3;

				var vid = mediaItem.getElementsByTagName('iframe')[0];
				vid.style.position = 'absolute';
				var id = vid.getAttribute('id');
				vid.setAttribute('class', VIDEO);
				src = src.slice(6, src.length).replace(/^\s+|\s+$/g,'');
				vid.setAttribute('src', 'http://player.vimeo.com/video/' + src + '?api=1&player_id=' + id );

				vid.mediaItem = mediaItem;
				vid.type = 'vimeo';
				mediaItem.appendChild(vid);
				mediaItem.vid = vid;
				vid.style.opacity = 0;

				ImgLoader.loader(mediaItem);

				vid.vimeo = $f(vid); /*froogaloop*/
				vid.vimeo.mediaItem = mediaItem;
				vid.vimeo.addEvent('ready', Video.VimeoLoaded);
			} else {
				if(DROID) {
					window.location = Address.base + 'media/original/' + src;
				} else {
					var vid = document.createElement('video');
					vid.setAttribute('class', VIDEO);
					if(IOS4) {
						vid.setAttribute('src', Address.base + 'media/original/' + src.replace(Util.getExt(src),'mobile.mp4'));
					} else if(Firefox) {
						vid.setAttribute('src', Address.base + 'media/original/' + src.replace(Util.getExt(src),'webm'));
					} else {
						vid.setAttribute('src', Address.base + 'media/original/' + src);
					}
					vid.load();
					vid.mediaItem = mediaItem;
					mediaItem.appendChild(vid);
					mediaItem.vid = vid;
					vid.style.opacity = 0;

					ImgLoader.loader(mediaItem);

					vid.addEventListener('loadedmetadata', Video.loaded, false);			
				}
			}
		} else if(mediaItem.vid && (false || Address.getPath() == '')) {
			try{Video.play(mediaItem.vid);}catch(err){trace(err)};
		}
	};

	Video.loadPadVimeo = function(mediaItem) {
		if(mediaItem.getAttribute('data-content').search("vimeo:") == 0 && PAD) {
			mediaItem.playBtn.style.zIndex = -2;
			mediaItem.playBtn.removeEventListener(SELECT_EVENT, Video.btnLoad, false);
			var img = Site.getMediaAsset(mediaItem, IMAGE);
			img.style.zIndex = -3;
			var vid = mediaItem.getElementsByTagName('iframe')[0];

			var src = mediaItem.getAttribute('data-content');
			src = src.slice(6, src.length).replace(/^\s+|\s+$/g,'');
			var id = vid.getAttribute('id');
			vid.setAttribute('src', 'http://player.vimeo.com/video/' + src + '?api=1&player_id=' + id );

			vid.style.opacity = 0;
			vid.style.zIndex = 5;
			vid.width = 70;
			vid.height = 70;
			vid.style.position = 'absolute';
			vid.style.left = (STAGE_WIDTH - 70) * 0.5 + 'px';
			vid.style.top = (STAGE_HEIGHT - 70) * 0.5 + 'px';

			vid.setAttribute('class', VIDEO);
			vid.mediaItem = mediaItem;
			vid.type = 'vimeo';

			mediaItem.vid = vid;

			Video.resize(vid);

			vid.vimeo = $f(vid);
			vid.vimeo.mediaItem = mediaItem;
			
			vid.vimeo.addEvent('ready', Video.VimeoLoadedPad);
		}
	};

	Video.loaded = function(event) {
		var vid = event.target;
		var mediaItem = vid.mediaItem;
		mediaItem.vid = vid;
		vid.loaded = true;
		mediaItem.vidLoaded = true;
		Video.resize(vid);
		Loader.remove(mediaItem);
		new CSSTween(vid, [1], ['opacity .7s cubic']);
		vid.addEventListener('ended', Video.ended, false);
		if(Address.getPath() != '' && !POD) Video.drawHud(mediaItem);
		Video.play(vid);
		if(Site.touchNav) TouchNav.addListener(vid);
		if(Address.getPath() == '') {
			clearInterval(Site.slideInterval);
			Site.slideInterval = null;
		}
	};

	Video.VimeoLoadedPad = function(id) {
		var vid = document.getElementById(id);
		var vimeo = vid.vimeo = $f(vid);
		vid.loaded = true;

		vid.videoWidth = vid.getAttribute('width');
		vid.videoHeight = vid.getAttribute('height');

		vid.vimeo.addEvent('play', function(data) {

			Site.resize();

			vid.vimeo.api('getVideoWidth', function (value, id) {
				vid.setAttribute('width', value);
				vid.videoWidth = value;
			});

			vid.vimeo.api('getVideoHeight', function (value, id) {
				vid.setAttribute('height', value);
				vid.videoHeight = value;
			});

			setTimeout(function(vid){
				vid.style.display = 'block';
				Video.resize(vid);
				vid.style.left = (STAGE_WIDTH - vid.width) * 0.5 + 'px';
				vid.style.top = (STAGE_HEIGHT - vid.height) * 0.5 + 'px';
				var img = Site.getMediaAsset(vid.mediaItem, IMAGE);
				new CSSTween(img, [0], ['opacity .7s cubic']);
				vid.style.opacity = 1;
				new CSSTween(vid, [1], ['opacity .7s cubic']);
				vid.style.zIndex = 0;
				img.style.zIndex = 1;
			},100,vid);

			var bigPlayBtn = vid.mediaItem.playBtn;
			new CSSTween(bigPlayBtn, [0], ['opacity .7s cubic']);
			bigPlayBtn.style.zIndex = 3;
			bigPlayBtn.removeEventListener(SELECT_EVENT, Video.bigPlay, false);
		});

		vid.vimeo.addEvent('pause', function(data) {
			var img = Site.getMediaAsset(vid.mediaItem, IMAGE);
			new CSSTween(img, [1], ['opacity .7s cubic']);
			new CSSTween(vid, [0], ['opacity .7s cubic']);
			var bigPlayBtn = vid.mediaItem.playBtn;
			new CSSTween(bigPlayBtn, [1], ['opacity .7s cubic']);
			bigPlayBtn.style.zIndex = 3;
			bigPlayBtn.removeEventListener(SELECT_EVENT, Video.bigPlay, false);
		});
	};

	Video.VimeoLoaded = function(id) {
		var vid = document.getElementById(id);
		var vimeo = vid.vimeo;
		vid.loaded = true;

		/*defualt vid width*/
		vid.videoWidth = vid.getAttribute('width');
		vid.videoHeight = vid.getAttribute('height');

		vid.vimeo.api('getVideoWidth', function (value, id) {
			vid.setAttribute('width', value);
			vid.videoWidth = value;
			Video.resize(vid);
		});

		vid.vimeo.api('getVideoHeight', function (value, id) {
			vid.setAttribute('height', value);
			vid.videoHeight = value;
		});

		vid.vimeo.addEvent('play', function(data) {
			Site.resize();
			Video.resize(vid);
			var img = Site.getMediaAsset(vid.mediaItem, IMAGE);
			new CSSTween(img, [0], ['opacity .7s cubic']);
			new CSSTween(vid, [1], ['opacity .7s cubic']);

			var bigPlayBtn = vid.mediaItem.playBtn;
			new CSSTween(bigPlayBtn, [0], ['opacity .7s cubic']);
			bigPlayBtn.removeEventListener(SELECT_EVENT, Video.bigPlay, false);
		});

		var mediaItem = vimeo.mediaItem;
		vid.loaded = true;
		mediaItem.vidLoaded = true;

		Loader.remove(mediaItem);
		setTimeout(function(vid){
			Site.resize();
			Video.resize(vid);
			new CSSTween(vid, [1], ['opacity .7s cubic']);
		},1000,vid);
		vimeo.addEvent('finish', Video.ended, false);
		Video.play(vid);
		if(Site.touchNav && Site.curMediaItems.length > 1) TouchNav.addListener(vid);
		if(Address.getPath() == '') {
			clearInterval(Site.slideInterval);
			Site.slideInterval = null;
		}
	};

	Video.resize = function(vid) {

		var stageWidth, stageHeight;
		
		if(Address.getPath() == '' && 'fit' == 'fillSite') {
			stageWidth = window.innerWidth;
			stageHeight = window.innerHeight;
		} else {
			stageWidth = STAGE_WIDTH - (Video.imageVideoMarginRight + Video.imageVideoMarginLeft),
			stageHeight = STAGE_HEIGHT - (Video.imageVideoMarginTop + Video.imageVideoMarginBottom);
		}

		if(vid.loaded && !POD) {
			var scale = Video.scale(vid);
			vid.width = scale.width;
			vid.height = scale.height;

			var align = Video.align(vid);
			vid.left = align.left;
			vid.top = align.top;

			new CSSTween(vid, [vid.width + 'px', vid.height + 'px', vid.left + 'px', vid.top + 'px'], ['width 0s linear','height 0s linear','left 0s linear','top 0s linear']);			
			
			if(vid.hud) Video.hudResize(vid);
		} else if(vid.loaded && POD) {
			vid.style.opacity = 0.01;
			vid.style.width = '0px';
			vid.style.height = '0px';
			vid.style.top = (window.innerHeight * 0.5) + 'px';
			vid.style.left = (window.innerWidth * 0.5) + 'px';
		}
	};

	Video.percentToPixels = function(value,range) {
		if(value.search('%') > -1) {
			value = value.replace('%','');
			value = (Number(value) * .01) * range;
			return Math.round(value);
		}
		else if(value.search('px') > -1) {
			value = value.replace('px','');
			return Number(value);
		} else {
			return Number(value);
		}
	};

	Video.scale = function(vid) {

		var scale = ['width','height'];
		var stageWidth = STAGE_WIDTH - (Video.imageVideoMarginRight + Video.imageVideoMarginLeft);
		var stageHeight = STAGE_HEIGHT - (Video.imageVideoMarginTop + Video.imageVideoMarginBottom);

		if('fit' == 'fillSite' && Address.getPath() == '') {
			var imageRatio = vid.videoWidth / vid.videoHeight;
			var stageRatio = STAGE_WIDTH / STAGE_HEIGHT;
			if (stageRatio > imageRatio) {
				scale.width = STAGE_WIDTH;
				scale.height = Math.round(STAGE_WIDTH / imageRatio);
			} else {
				scale.width = Math.round(STAGE_HEIGHT * imageRatio);
				scale.height = STAGE_HEIGHT;
			}
		} else if('no stretch' == 'stretch' || vid.videoWidth > stageWidth || vid.videoHeight > stageHeight) {
			var imageRatio = vid.videoWidth / vid.videoHeight;
			var stageRatio = stageWidth / stageHeight;
			if (stageRatio < imageRatio) {
				scale.width = stageWidth;
				scale.height = Math.round(stageWidth / imageRatio);
			} else {
				scale.width = Math.round(stageHeight * imageRatio);
				scale.height = stageHeight;
			}
		} else {
			scale.width = vid.videoWidth;
			scale.height = vid.videoHeight;
		}
		return scale;
	};

	Video.align = function(vid) {
		
		var stageWidth, stageHeight;

		if(Address.getPath() == '' && 'fit' == 'fillSite') {
			stageWidth = window.innerWidth;
			stageHeight = window.innerHeight;
		} else {
			stageWidth = STAGE_WIDTH - (Video.imageVideoMarginRight + Video.imageVideoMarginLeft);
			stageHeight = STAGE_HEIGHT - (Video.imageVideoMarginTop + Video.imageVideoMarginBottom);
		}

		var align = ['left','top'];
		switch('center') {
			case 'center':
				align.left = Math.round((STAGE_WIDTH - vid.width) * 0.5);
				align.top = Math.round((STAGE_HEIGHT - vid.height) * 0.5);
			break;
			case 'left':
				align.left = Video.imageVideoMarginLeft;
				align.top = Math.round((STAGE_HEIGHT - vid.height) * 0.5);
			break;
			case 'right':
				align.left = STAGE_WIDTH - vid.width - Video.imageVideoMarginRight;
				align.top = Math.round((STAGE_HEIGHT - vid.height) * 0.5);
			break;
		}
		if(Address.getPath() === '' && ('fit' == 'fillSite')) {
			align.left = Math.round((STAGE_WIDTH - vid.width) * 0.5);
			align.top = 0;
		}
		return align;
	};

	Video.hudResize = function(vid) {
		vid.hud.width = vid.width;
		
		new CSSTween(vid.hud, [vid.width + 'px',vid.left + 'px',vid.top + (vid.height - vid.hud.height) + 'px'], ['width 0s linear','left 0s linear','top 0s linear']);
		new CSSTween(vid.hud.muteBtn, [(vid.width - (vid.hud.btnWidth * 2)) + 'px'], ['left 0s linear']);
		new CSSTween(vid.hud.fullBtn, [(vid.width - vid.hud.btnWidth) + 'px'], ['left 0s linear']);

		if(vid.hud) Video.updateProgress(vid);
	};

	Video.ended = function(event) {
		if(Address.getPath() != '') {
			var vid = event.target;
			var mediaItem = event.target.mediaItem;
			var playBtn = mediaItem.playBtn;
			playBtn.addEventListener(SELECT_EVENT, Video.bigPlay, false);
			new CSSTween(playBtn, [1], ['opacity .7s cubic']);			
		} else if(Address.getPath() == '') {
			if(Site.curMediaItemsInSection > 1) {
				Site.next();				
			} else if(Site.curMediaItem.getAttribute('data-type') == VIDEO && !POD && !PAD) {
				var vid = event.target;
				Video.play(vid);
			}
		}
	};

	Video.buildBigPlay = function(mediaItem) {
		var playBtn = document.createElement('img');
		playBtn.setAttribute('class', 'playBtn');
		playBtn.setAttribute('src', Address.base + 'inc/icn/play@2x.png');
		mediaItem.playBtn = playBtn;
		playBtn.setAttribute('width', '70');
		playBtn.setAttribute('height', '70');
		playBtn.style.opacity = 0;
		mediaItem.appendChild(playBtn);
		if(!false && Address.getPath() != '') {
			new CSSTween(playBtn, [1], ['opacity .2s cubic']);
		} else if(PAD||POD) {
			new CSSTween(playBtn, [1], ['opacity .2s cubic']);
		}
		playBtn.style.zIndex = 4;
		Video.alignPlayBtn(mediaItem);
		playBtn.mediaItem = mediaItem;
		mediaItem.vidLoaded = false;
		playBtn.addEventListener(SELECT_EVENT, Video.btnLoad, false);
	};

	Video.alignPlayBtn = function(mediaItem) {
		var playBtn = Site.getMediaAsset(mediaItem,'playBtn');
		var left = Math.floor((STAGE_WIDTH - playBtn.width) * 0.5);
		var top = Math.floor((STAGE_HEIGHT - playBtn.width) * 0.5);
		new CSSTween(playBtn, [left + 'px',top + 'px'], ['left 0s linear','top 0s linear']);
	};

	Video.bigPlay = function(event) {
		var playBtn = event.target;
		var mediaItem = event.target.mediaItem;
		var vid = mediaItem.vid;
		playBtn.removeEventListener(SELECT_EVENT, Video.bigPlay, false);
		new CSSTween(playBtn, [0], ['opacity .7s cubic']);
		Video.play(vid);
	};

	Video.drawHud = function(mediaItem) {
		var vid = mediaItem.vid;
		var hud = document.createElement('div');

		Video.resize(vid);

		hud.height = 50;
		hud.width = 0;
		hud.btnWidth = hud.height;
		hud.scrubWidth = 0;
		hud.show = true;

		hud.style.opacity = 1;
		hud.style.zIndex = 5;
		hud.style.position = 'absolute';
		hud.style.left = vid.style.left+'px';
		hud.style.bottom = 0+'px';
		mediaItem.appendChild(hud);

		mediaItem.hud = hud;
		vid.hud = hud;

		hud.playBtn = document.createElement('div');
		hud.playBtn.mediaItem = mediaItem;
		hud.playBtn.style.display = 'block';
		hud.playBtn.style.position = 'absolute';
		hud.playBtn.style.width = hud.btnWidth + 'px';
		hud.playBtn.style.height = hud.height + 'px';
		hud.appendChild(hud.playBtn);

		hud.playBtn.bg = document.createElement('div');
		hud.playBtn.bg.style.display = 'block';
		hud.playBtn.bg.style.position = 'absolute';
		hud.playBtn.bg.style.backgroundColor = '#000';
		hud.playBtn.bg.style.opacity = .65;
		hud.playBtn.bg.style.width = hud.btnWidth + 'px';
		hud.playBtn.bg.style.height = hud.height + 'px';
		hud.playBtn.appendChild(hud.playBtn.bg);

		hud.playBtn.icon = document.createElement('div');
		hud.playBtn.icon.style.position = 'absolute';
		hud.playBtn.icon.style.font = "400 8px/0px 'iconsRegular'";
		hud.playBtn.icon.style.color = '#FFF';
		hud.playBtn.icon.innerHTML = "'";
		hud.playBtn.icon.style.opacity = .5;
		hud.playBtn.appendChild(hud.playBtn.icon);
		var iconWidth = 8;
		hud.playBtn.icon.style.left = (hud.btnWidth - iconWidth) * 0.5 + 'px';
		hud.playBtn.icon.style.top = -3 + 'px';

		hud.playBtn.hit = document.createElement('div');
		hud.playBtn.hit.style.position = 'absolute';
		hud.playBtn.hit.style.display = 'block';
		hud.playBtn.hit.style.width = hud.btnWidth + 'px';
		hud.playBtn.hit.style.height = hud.height + 'px';
		hud.playBtn.appendChild(hud.playBtn.hit);
		hud.playBtn.vid = vid;
		hud.playBtn.mediaItem = mediaItem;
		hud.playBtn.hit.parent = hud.playBtn;


		hud.muteBtn = document.createElement('div');
		hud.muteBtn.mediaItem = mediaItem;
		hud.muteBtn.style.display = 'block';
		hud.muteBtn.style.position = 'absolute';
		hud.muteBtn.style.width = hud.btnWidth + 'px';
		hud.muteBtn.style.height = hud.height + 'px';
		hud.appendChild(hud.muteBtn);

		hud.muteBtn.bg = document.createElement('div');
		hud.muteBtn.bg.style.display = 'block';
		hud.muteBtn.bg.style.position = 'absolute';
		hud.muteBtn.bg.style.backgroundColor = '#000';
		hud.muteBtn.bg.style.opacity = .65;
		hud.muteBtn.bg.style.width = hud.btnWidth + 'px';
		hud.muteBtn.bg.style.height = hud.height + 'px';
		hud.muteBtn.appendChild(hud.muteBtn.bg);

		hud.muteBtn.icon = document.createElement('div');
		hud.muteBtn.icon.style.position = 'absolute';
		hud.muteBtn.icon.style.font = "400 8px/0px 'iconsRegular'";
		hud.muteBtn.icon.style.color = '#FFF';
		hud.muteBtn.icon.innerHTML = "(";
		hud.muteBtn.icon.style.opacity = .5;
		hud.muteBtn.appendChild(hud.muteBtn.icon);
		var iconWidth = 10;
		hud.muteBtn.icon.style.left = (hud.btnWidth - iconWidth) * 0.5 + 'px';
		hud.muteBtn.icon.style.top = -3 + 'px';

		hud.muteBtn.hit = document.createElement('div');
		hud.muteBtn.hit.style.position = 'absolute';
		hud.muteBtn.hit.style.display = 'block';
		hud.muteBtn.hit.style.width = hud.btnWidth + 'px';
		hud.muteBtn.hit.style.height = hud.height + 'px';
		hud.muteBtn.appendChild(hud.muteBtn.hit);
		hud.muteBtn.vid = vid;
		hud.muteBtn.mediaItem = mediaItem;
		hud.muteBtn.hit.parent = hud.muteBtn;


		hud.fullBtn = document.createElement('div');
		hud.fullBtn.mediaItem = mediaItem;
		hud.fullBtn.style.display = 'block';
		hud.fullBtn.style.position = 'absolute';
		hud.fullBtn.style.width = hud.btnWidth + 'px';
		hud.fullBtn.style.height = hud.height + 'px';
		hud.appendChild(hud.fullBtn);

		hud.fullBtn.bg = document.createElement('div');
		hud.fullBtn.bg.style.display = 'block';
		hud.fullBtn.bg.style.position = 'absolute';
		hud.fullBtn.bg.style.backgroundColor = '#000';
		hud.fullBtn.bg.style.opacity = .65;
		hud.fullBtn.bg.style.width = hud.btnWidth + 'px';
		hud.fullBtn.bg.style.height = hud.height + 'px';
		hud.fullBtn.appendChild(hud.fullBtn.bg);

		hud.fullBtn.icon = document.createElement('div');
		hud.fullBtn.icon.style.position = 'absolute';
		hud.fullBtn.icon.style.font = "400 8px/0px 'iconsRegular'";
		hud.fullBtn.icon.style.color = '#FFF';
		hud.fullBtn.icon.innerHTML = "?";
		hud.fullBtn.icon.style.opacity = .5;
		hud.fullBtn.appendChild(hud.fullBtn.icon);
		var iconWidth = 10;
		hud.fullBtn.icon.style.left = (hud.btnWidth - iconWidth) * 0.5 + 'px';
		hud.fullBtn.icon.style.top = -2 + 'px';

		hud.fullBtn.hit = document.createElement('div');
		hud.fullBtn.hit.style.position = 'absolute';
		hud.fullBtn.hit.style.display = 'block';
		hud.fullBtn.hit.style.width = hud.btnWidth + 'px';
		hud.fullBtn.hit.style.height = hud.height + 'px';
		hud.fullBtn.appendChild(hud.fullBtn.hit);
		hud.fullBtn.vid = vid;
		hud.fullBtn.mediaItem = mediaItem;
		hud.fullBtn.hit.parent = hud.fullBtn;


		hud.scrub = document.createElement('div');
		hud.scrub.mediaItem = mediaItem;
		hud.scrub.style.display = 'block';
		hud.scrub.style.position = 'absolute';
		hud.scrub.style.zIndex = -1;
		hud.scrub.style.left = hud.btnWidth + 'px';
		hud.scrub.style.width = hud.btnWidth + 'px';
		hud.scrub.style.height = hud.height + 'px';
		hud.appendChild(hud.scrub);

		hud.scrub.bg = document.createElement('div');
		hud.scrub.bg.style.display = 'block';
		hud.scrub.bg.style.position = 'absolute';
		hud.scrub.bg.style.backgroundColor = '#000';
		hud.scrub.bg.style.opacity = .65;
		hud.scrub.bg.style.width = '100%';
		hud.scrub.bg.style.height = hud.height + 'px';
		hud.scrub.appendChild(hud.scrub.bg);

		hud.scrub.buffer = document.createElement('div');
		hud.scrub.buffer.style.display = 'block';
		hud.scrub.buffer.style.position = 'absolute';
		hud.scrub.buffer.style.backgroundColor = '#FFF';
		hud.scrub.buffer.style.opacity = .12;
		hud.scrub.buffer.style.width = 1 + 'px';
		hud.scrub.buffer.style.height = hud.height + 'px';
		hud.scrub.appendChild(hud.scrub.buffer);

		hud.scrub.progress = document.createElement('div');
		hud.scrub.progress.style.display = 'block';
		hud.scrub.progress.style.position = 'absolute';
		hud.scrub.progress.style.backgroundColor = '#FFF';
		hud.scrub.progress.style.opacity = .25;
		hud.scrub.progress.style.width = 1 + 'px';
		hud.scrub.progress.style.height = hud.height + 'px';
		hud.scrub.appendChild(hud.scrub.progress);

		hud.scrub.time = document.createElement('div');
		hud.scrub.time.style.position = 'absolute';
		hud.scrub.time.style.font = "400 8px/0px 'iconsRegular'";
		hud.scrub.time.style.color = '#FFF';
		hud.scrub.time.innerHTML = "00:00 / 00:00";
		hud.scrub.time.style.opacity = .5;
		hud.scrub.appendChild(hud.scrub.time);
		hud.scrub.time.style.left = 10 + 'px';
		hud.scrub.time.style.top = -3 + 'px';

		hud.scrub.head = document.createElement('div');
		hud.scrub.head.style.display = 'block';
		hud.scrub.head.style.position = 'absolute';
		hud.scrub.head.style.backgroundColor = '#FFF';
		hud.scrub.head.style.opacity = 0;
		hud.scrub.head.style.left = 30 + 'px';
		hud.scrub.head.style.width = 1 + 'px';
		hud.scrub.head.style.height = hud.height + 'px';
		hud.scrub.appendChild(hud.scrub.head);

		hud.scrub.headTime = document.createElement('div');
		hud.scrub.headTime.style.display = 'block';
		hud.scrub.headTime.style.position = 'absolute';
		hud.scrub.headTime.style.font = "400 8px/0px 'iconsRegular'";
		hud.scrub.headTime.style.color = '#FFF';
		hud.scrub.headTime.style.opacity = 0;
		hud.scrub.headTime.innerHTML = "00:00";
		hud.scrub.headTime.style.left = 30 + 'px';
		hud.scrub.headTime.style.top = -35 + 'px';
		hud.scrub.appendChild(hud.scrub.headTime);

		hud.scrub.hit = document.createElement('div');
		hud.scrub.hit.style.position = 'absolute';
		hud.scrub.hit.style.display = 'block';
		hud.scrub.hit.style.width = '100%';
		hud.scrub.hit.style.height = hud.height + 'px';
		hud.scrub.appendChild(hud.scrub.hit);
		hud.scrub.vid = vid;
		hud.scrub.mediaItem = mediaItem;
		hud.scrub.hit.parent = hud.scrub;

		hud.playBtn.hit.addEventListener('mouseover', Video.hudBtnOver, false);
		hud.playBtn.hit.addEventListener('mouseout', Video.hudBtnOut, false);

		hud.scrub.hit.addEventListener('mouseover', Video.hudScrubOver, false);
		hud.scrub.hit.addEventListener('mouseout', Video.hudScrubOut, false);

		hud.muteBtn.hit.addEventListener('mouseover', Video.hudBtnOver, false);
		hud.muteBtn.hit.addEventListener('mouseout', Video.hudBtnOut, false);

		hud.fullBtn.hit.addEventListener('mouseover', Video.hudBtnOver, false);
		hud.fullBtn.hit.addEventListener('mouseout', Video.hudBtnOut, false);

		hud.playBtn.hit.addEventListener(SELECT_EVENT, Video.hudPlayPause, false);
		hud.muteBtn.hit.addEventListener(SELECT_EVENT, Video.hudMute, false);

		if(PAD || POD) {
			hud.fullBtn.hit.addEventListener(SELECT_EVENT, Fullscreen.i, false);
		} else {
			hud.fullBtn.hit.addEventListener(SELECT_EVENT, Fullscreen, false);
		}

		if(touchDevice) {
			hud.scrub.hit.addEventListener('touchstart', Video.scrubSeek, false);			
		} else {
			hud.scrub.hit.addEventListener('mousemove', Video.scrubMove, false);
			hud.scrub.hit.addEventListener('click', Video.scrubSeek, false);			
		}

		Video.resize(vid);
	};

	Video.scrubMove = function(event) {
		var scrub = event.target.parent;

		var pointX = 0;
		if(touchDevice) {
			pointX = event.touches[0].offsetX - scrub.vid.hud.height - scrub.vid.left;
		} else {
			pointX = event.offsetX;
		}

		scrub.head.style.left = pointX + 'px';
		scrub.headTime.style.left = pointX + 'px';
		var scrubWidth = scrub.vid.width - (scrub.vid.hud.btnWidth * 3);
		var dropInPoint = Video.secondsToTime((pointX / scrubWidth) * scrub.vid.duration);
		scrub.headTime.innerHTML = dropInPoint;
	};

	Video.scrubSeek = function(event)
	{
		var scrub = event.target.parent;

		var pointX = 0;
		if(touchDevice) {
			pointX = event.touches[0].pageX - scrub.vid.hud.height - scrub.vid.left;
		} else {
			pointX = event.offsetX;
		}

		scrub.head.style.left = pointX + 'px';
		scrub.headTime.style.left = pointX + 'px';
		var scrubWidth = scrub.vid.width - (scrub.vid.hud.btnWidth * 3);
		var dropInPoint = (pointX / scrubWidth) * scrub.vid.duration;
		scrub.vid.currentTime = dropInPoint;
		scrub.headTime.innerHTML = Video.secondsToTime(dropInPoint);
		if(scrub.vid.hud) Video.updateProgress(scrub.vid);
	};

	Video.showHud = function() {
		var hud = Site.curMediaItem.vid.hud;
		if(!hud.show) {
			hud.show = true;
			hud.style.display = 'block';
			new CSSTween(hud, [1], ['opacity .5s cubic'],'',true);
		}
	};

	Video.hideHud = function() {
		var hud = Site.curMediaItem.vid.hud;
		if(hud.show) {
			hud.show = false;
			new CSSTween(hud, [0], ['opacity .5s cubic'],function(){
				hud.style.display = 'none';
			},true);
		}
	};

	Video.hudScrubOver = function(event) {
		var scrub = event.target.parent;
		new CSSTween(scrub.bg, [.7], ['opacity .5s cubic']);
		new CSSTween(scrub.buffer, [.2], ['opacity .5s cubic']);
		new CSSTween(scrub.progress, [.4], ['opacity .5s cubic']);
		new CSSTween(scrub.time, [1], ['opacity .5s cubic']);
		new CSSTween(scrub.head, [1], ['opacity .5s cubic']);
		new CSSTween(scrub.headTime, [.65], ['opacity .5s cubic']);
	};

	Video.hudScrubOut = function(event) {
		var scrub = event.target.parent;
		new CSSTween(scrub.bg, [.65], ['opacity .5s cubic']);
		new CSSTween(scrub.buffer, [.12], ['opacity .5s cubic']);
		new CSSTween(scrub.progress, [.25], ['opacity .5s cubic']);
		new CSSTween(scrub.time, [.5], ['opacity .5s cubic']);
		new CSSTween(scrub.head, [0], ['opacity .5s cubic']);
		new CSSTween(scrub.headTime, [0], ['opacity .5s cubic']);
	};

	Video.hudBtnOver = function(event) {
		var playBtn = event.target.parent;
		new CSSTween(playBtn.bg, [.85], ['opacity .5s cubic']);
		new CSSTween(playBtn.icon, [1], ['opacity .5s cubic']);
	};

	Video.hudBtnOut = function(event) {
		var playBtn = event.target.parent;
		new CSSTween(playBtn.bg, [.65], ['opacity .5s cubic']);
		new CSSTween(playBtn.icon, [.5], ['opacity .5s cubic']);
	};

	Video.showHudPlayBtn = function(playBtn) {
		playBtn.icon.style.top = -2 + 'px';
		playBtn.icon.innerHTML = "&";
	};

	Video.showHudPauseBtn = function(playBtn) {
		playBtn.icon.style.top = -3 + 'px';
		playBtn.icon.innerHTML = "'";
	};

	Video.hudPlayPause = function(event) {
		var playBtn = event.target.parent;
		var vid = playBtn.vid;
		if(vid.paused) {
			Video.play(vid);
		} else {
			Video.pause(vid);
		}
	};

	Video.play = function(vid) {
		vid.type == 'vimeo' ? vid.vimeo.api('play') : vid.play();
		vid.paused = false;
		if(vid.hud) Video.showHudPauseBtn(vid.hud.playBtn);
		var bigPlayBtn = vid.mediaItem.playBtn;
		new CSSTween(bigPlayBtn, [0], ['opacity .7s cubic']);
		bigPlayBtn.removeEventListener(SELECT_EVENT, Video.bigPlay, false);
		if(vid.hud) vid.progInterval = setInterval(function(){Video.updateProgress(vid)}, 30);
		if(POD) {
			var img = Site.getMediaAsset(vid.mediaItem, IMAGE);
			new CSSTween(img, [0], ['opacity .7s cubic']);
			Video.resize(vid);
			Fullscreen.PodInterval = setInterval(Fullscreen.checkPOD,800);
			vid.webkitEnterFullscreen();
		}
		if(POD||PAD) Menu.close();
	};

	Video.pause = function(vid) {
		vid.type == 'vimeo' ? vid.vimeo.api('pause') : vid.pause();
		if(vid.hud) Video.showHudPlayBtn(vid.hud.playBtn);
		vid.paused = true;
		if(!POD && Site.state != SLIDESHOW) {
			var bigPlayBtn = vid.mediaItem.playBtn;
			bigPlayBtn.style.display = 'block';
			new CSSTween(bigPlayBtn, [1], ['opacity .7s cubic']);
			bigPlayBtn.addEventListener(SELECT_EVENT, Video.bigPlay, false);
		}
	};

	Video.playPause = function() {
		var mediaItem = Site.curMediaItem;	
		if(mediaItem.getAttribute('data-type') === VIDEO) {
			if(mediaItem.vidLoaded) {
				var vid;
				if(mediaItem.getAttribute('data-content').search("vimeo:") == 0) {
					vid = mediaItem.getElementsByTagName('iframe')[0];
				} else {
					vid = Site.getMediaAsset(Site.curMediaItem, VIDEO);
				}
				vid.paused ? Video.play(vid) : Video.pause(vid);
			} else {
				Video.load(Site.curMediaItem);
			}
		}
	};

	Video.pauseCur = function() {
		if(Site.curMediaItem) {
			if(Site.curMediaItem.vid) {
				Video.pause(Site.curMediaItem.vid);
				clearInterval(Site.curMediaItem.vid.progInterval);
			}
		}
	};

	Video.hudMute = function(event) {
		var muteBtn = event.target.parent;
		var vid = muteBtn.vid;
		if(vid.volume == 1) {
			Video.mute(vid);
		} else {
			Video.unmute(vid);
		}
	};

	Video.mute = function(vid) {
		vid.volume = 0;
		vid.hud.muteBtn.icon.style.top = -2 + 'px';
		vid.hud.muteBtn.icon.innerHTML = ")";
	};

	Video.unmute = function(vid) {
		vid.volume = 1;
		vid.hud.muteBtn.icon.style.top = -2 + 'px';
		vid.hud.muteBtn.icon.innerHTML = "(";
	};

	Video.updateProgress = function(vid) {
		scrubWidth = vid.width - (vid.hud.btnWidth * 3);
		new CSSTween(vid.hud.scrub, [scrubWidth + 'px'], ['width 0s linear']);
		
		if(vid.buffered.length > 0) {
			bufferedPercent = vid.buffered.end(0) / vid.duration;
			new CSSTween(vid.hud.scrub.buffer, [(bufferedPercent * scrubWidth) + 'px'], ['width 0s linear']);

			playedPercent = vid.currentTime / vid.duration;
			new CSSTween(vid.hud.scrub.progress, [(playedPercent * scrubWidth) + 'px'], ['width 0s linear']);

			var totalTime = Video.secondsToTime(vid.duration);

			vid.hud.scrub.time.innerHTML = Video.secondsToTime(vid.currentTime) + " / " + totalTime;
		}
	};

	Video.secondsToTime = function(seconds) {
		minutes = Math.floor(seconds / 60);
		seconds = Math.floor(seconds - (minutes * 60));
		minutes = minutes < 10 ? "0" + minutes : minutes;
		seconds = seconds < 10 ? "0" + seconds : seconds;
		return minutes + ":" + seconds;
	};

	window.Video = Video;
	
}(window));
(function(window) {
	Popup.obj;
	Popup.site;

	function Popup(name, show) {
		if(Popup.obj !== undefined) hidePopup(Popup.obj);
		if(Popup.site === undefined) Popup.site = document.getElementById("site");
		Popup.obj = document.getElementById(name);
		if(show) {
			showPopup(Popup.obj);
		} else {
			hidePopup(Popup.obj);
			closeBlocker();
		}
	}

	function showPopup(obj) {document.getElementById('site').style.width = '0%';

		if(obj) obj.style.display = 'block';
	}

	function hidePopup(obj) {document.getElementById('site').style.width = '100%';

		if(obj) obj.style.display = 'none';
	}

	window.Popup = Popup;

}(window));

(function(window) {

	function Plus1(domain) {
		if(!document.getElementById('plus1')) {
			var div = document.createElement('div');
			div.setAttribute('id', "plus1");
			div.innerHTML = "<a id='closeBtn' onclick='closePlus1();'>&times;</a><g:plusone href='" + domain + "' size='medium'></g:plusone>";
			document.body.appendChild(div);

			var fileref = document.createElement('script');
			fileref.setAttribute("type", "text/javascript");
			fileref.setAttribute("src", 'https://apis.google.com/js/plusone.js');
			document.getElementsByTagName("head")[0].appendChild(fileref);
		}
	}

	window.Plus1 = Plus1;

}(window));

(function(window) {

	function Like(domain) {

		if(!document.getElementById('like')) {
			var div = document.createElement('div');
			div.setAttribute('id', "like");
			div.innerHTML = "<a id='closeBtn' onclick='closeLike();'>&times;</a><div id='fb-root'></div><fb:like href='" + domain + "' send='false' width='200' show_faces='false' font=''></fb:like>";
			document.body.appendChild(div);

			var fileref = document.createElement('script');
			fileref.setAttribute("type", "text/javascript");
			fileref.setAttribute("src", 'http://connect.facebook.net/en_US/all.js#xfbml=1');
			document.getElementsByTagName("head")[0].appendChild(fileref);
		}
	}

	window.Like = Like;

}(window));

function closeLike() {
	Popup('like', false);
}

function closePlus1() {
	Popup('plus1', false);
}

function makeLike(domain) {
	new Like(domain);
}

function makePlus1(domain) {
	new Plus1(domain);
}
(function(window)
{
	Tooltip.zIndex = 100;
	Tooltip.borderRadius = '8px';
 	Tooltip.backgroundColor = 'rgba(0,0,0,.7)';
 	Tooltip.textColor = '#CCCCCC';
 	Tooltip.fontFamily = 'Lucida Grande, Lucida, Century Gothic, Arial, sans-serif';
 	Tooltip.fontSize = '10px';
 	Tooltip.padding = '2px 5px';
 	Tooltip.shadow = '1px 3px 3px rgba(0,0,0,0.35)';
 	Tooltip.parent = document.getElementsByTagName('nav')[0];
 	Tooltip.tag = 'a';
 	Tooltip.property = 'alt';
 	Tooltip.showing = false;

	function Tooltip(vars)
	{
		for(key in vars) Tooltip[key] = vars[key];
		Tooltip.build();
	}

	Tooltip.build = function()
	{
		Tooltip.instance = document.createElement('div');
		Tooltip.instance.style.opacity = 0;
		Tooltip.instance.style.position = 'absolute';
		Tooltip.instance.style.display = 'none';
		Tooltip.instance.style.zIndex = Tooltip.zIndex;
		Tooltip.instance.style.borderRadius = Tooltip.borderRadius;
		Tooltip.instance.style.WebkitBorderRadius = Tooltip.borderRadius;
		Tooltip.instance.style.boxShadow = Tooltip.shadow;
		Tooltip.instance.style.WebkitBoxShadow = Tooltip.shadow;
		Tooltip.instance.style.backgroundColor = Tooltip.backgroundColor;
		Tooltip.instance.style.color = Tooltip.textColor;
		Tooltip.instance.style.fontFamily = Tooltip.fontFamily;
		Tooltip.instance.style.fontSize = Tooltip.fontSize;
		Tooltip.instance.style.padding = Tooltip.padding;
		Tooltip.instance.innerHTML = '';

		d.site.appendChild(Tooltip.instance);
	};

	Tooltip.buildArrow = function()
	{
		var dnArw = document.createElement('div');
		dnArw.style.position = 'absolute';
		dnArw.style.display = 'block';
		dnArw.style.opacity = 1;
		dnArw.style.width = 0 + 'px'; 
		dnArw.style.height = 0 + 'px'; 
		dnArw.style.left = 15 + 'px'; 
		dnArw.style.bottom = -6 + 'px';
		dnArw.style.borderLeft = '6px solid transparent';
		dnArw.style.borderRight = '6px solid transparent';
		dnArw.style.borderTop = '6px solid ' + 'rgba(0,0,0,.5)';
		Tooltip.instance.appendChild(dnArw);
	};

	Tooltip.move = function(event)
	{
		if(Tooltip.showing)
		{
			var width = Util.getStyle(Tooltip.instance, 'width');
			var height = Util.getStyle(Tooltip.instance, 'height');
			Tooltip.instance.style.left = event.pageX - 22 + 'px';
			Tooltip.instance.style.top = event.pageY - height - 15 + 'px';			
		}
	};

	Tooltip.text = function(str)
	{
		if(str && !Tooltip.showing)
		{
			Tooltip.instance.innerHTML = str;
			Tooltip.buildArrow();
			Tooltip.show();		
		}
		else
		{
			Tooltip.hide();
		}
	};

	Tooltip.show = function(event)
	{
		Tooltip.instance.style.display = 'block';
		Tooltip.instance.style.opacity = 1;
		Tooltip.showing = true;
		document.addEventListener('mousemove', Tooltip.move, false);
	};

	Tooltip.hide = function(event)
	{
		Tooltip.instance.style.display = 'none';
		Tooltip.instance.style.opacity = 0;
		Tooltip.showing = false;
		document.removeEventListener('mousemove', Tooltip.move, false);
	};

	window.Tooltip = Tooltip;
	
}(window));
(function(window) {
	Site.curImgNum = 1;
	Site.curSection = '';
	Site.curPath = '';
	Site.blocker = false;
	Site.rotateInit = true;

	function Site() {
		if(POD || PAD) {
			window.addEventListener('orientationchange', Site.rotate, false);
			window.addEventListener('scroll', Site.scroll, false);
		} else {
			window.addEventListener('resize', Site.resize, false);
			window.addEventListener('keydown', Site.keydown, false);
			window.ondragstart = function() {
				return false;
			}
		}

		Site.getSiteObjects();
		Site.load();
	}

	Site.load = function() {
		if('' != '' && Address.getPath() == '' && Address.getQuery() === '') {
			Site.state = INTRO;
			d.introLogo.style.opacity = 0;
			d.introLogo.src = d.introLogo.getAttribute('data-src');
			d.introLogo.addEventListener('load', Site.fadeInIntro, false);
		} else {
			if(d.introLogo) d.introLogo.style.display = 'none';
			Site.loadMainSite();
		}
	};

	Site.fadeInIntro = function() {
		d.introLogo.style.display = 'block';
		d.introLogo.style.left = ((window.innerWidth - d.introLogo.width) * 0.5) + 'px';
		d.introLogo.style.top = ((window.innerHeight - d.introLogo.height) * 0.5) + 'px';
		new CSSTween(d.introLogo, [1], ['opacity .85s cubic'], Site.fadeOutIntro, false);
	};

	Site.fadeOutIntro = function() {
		setTimeout(function() {
			new CSSTween(d.introLogo, [0], ['opacity .7s cubic'], function() {
				d.introLogo.style.display = 'none';
				Site.loadMainSite();
			}, false);
		}, 2000);
	};

	Site.loadMainSite = function() {
		Site.state = HOME;

		Site.menu = new Menu();

		Address.addEventListener('addressEvent', Site.goto, false);

		new CSSTween(d.site, [1], ['opacity .8s cubic']);

		if(POD) d.site.style.backgroundColor = '#f1f1f1';

		setTimeout(Site.goto, 10);

		if(POD) {
			Site.touchNav = new TouchNav();
			Site.hideAb();
		} else if(PAD) {
			Site.touchNav = new TouchNav();
			Site.nav = Site.site.getElementsByTagName('nav')[0];
			Site.navbar = new Navbar();
			Site.hideAb();
		} else {
			Site.cursor = new Cursor();
			Site.nav = Site.site.getElementsByTagName('nav')[0];
			Site.navbar = new Navbar();
			Site.footer = new Footer();
			Site.tooltip = new Tooltip();
		}

		setTimeout(Site.resize, 2);
	};

	Site.startSlideshow = function() {
		if(Site.oldMediaItem) {
			Site.curMediaItem.style.backgroundColor = '#f1f1f1';
			d.mediaView.style.backgroundColor = '#f1f1f1';
			if(Site.state != SLIDESHOW) {
				Site.oldMediaItem.style.opacity = 0;
				Site.oldMediaItem.style.display = 'none';
			}
		}
		Site.state = SLIDESHOW;
		Site.slideInterval = setInterval(Site.next, SLIDE_INTERVAL);
		if(Site.thumbs) Thumbnails.hide();
		Site.goto();
		if(POD || PAD) Menu.close();
	};

	Site.hideAb = function() {
		if(Site.rotateInit) {
			window.scrollTo(0, 1);
		}
		setTimeout(function() {
			Site.resizeMediaView(STAGE_WIDTH, STAGE_HEIGHT, Site.getMediaViewLeft(), 60);
		}, 50);
		Site.rotateInit = false;
	};

	Site.rotate = function() {
		Site.rotateInit = true;
		Site.hideAb();
		setTimeout(Site.resize, 50);
		setTimeout(Site.resize, 500);
		setTimeout(Site.resize, 1000);
	};

	Site.scroll = function() {
		resizeBlocker();
	};

	Site.resize = function() {

		if(('10338' != '' && Address.getPath() == '') && 'fit' == 'fillSite') {
			STAGE_WIDTH = window.innerWidth, STAGE_HEIGHT = window.innerHeight;
		} else {
			STAGE_WIDTH = Site.getWidth();
			STAGE_HEIGHT = Site.getHeight();
		}

		if(Site.state == INTRO) {
			new CSSTween(d.introLogo, [((window.innerWidth - d.introLogo.width) * 0.5) + 'px', ((window.innerHeight - d.introLogo.height) * 0.5) + 'px'], ['left 0s linear', 'top 0s linear']);
		} else {
			Site.resizeMediaView(STAGE_WIDTH, STAGE_HEIGHT, Site.getMediaViewLeft(), 60);
			Menu.resize();
		}

		if('left' == 'center' && !POD && !PAD) {
			var logoWidth = Util.getStyle(d.logo, 'width');
			d.logo.style.left = ((window.innerWidth - logoWidth) * 0.5) + 'px';
		}

		if(d.logo && Menu.state !== 'closed') new CSSTween(d.logo, [1], ['opacity .7s cubic']);

		if('top' == 'center' && !POD && !PAD) {
			var logoHeight = Util.getStyle(d.logo, 'height');
			d.logo.style.top = ((window.innerHeight - logoHeight) * 0.5) + 'px';
		}

		if(Site.curMediaItem) {
			Site.resizeMediaItem(Site.curMediaItem);
			Caption.resize();
		}

		if(Site.thumbs) Thumbnails.resize();
		if(Site.share) Share.resize();

		if(Site.navbar) {
			Navbar.resize();
			setTimeout(Navbar.resize, 1000);
		}

		if(Site.touchNav && Address.getPath() != '') TouchNav.checkVisible();

		Scroll.resize();
		Pass.align();
		if(Site.footer) Footer.resize();
	};

	Site.getMediaViewLeft = function() {
		if(PAD || POD) {
			return 0;
		} else {
			switch('left') {
			case 'left':
				return 0 + 260 - 10;
				break;
			case 'right':
				return 0;
				break;
			}
		}
	};

	Site.resizeMediaView = function(stageWidth, stageHeight, left, top) {
		var width = stageWidth,
			height = stageHeight;
		if(PAD || ('10338' != '' && Address.getPath() == '' && 'fit' == 'fillSite')) {
			top = 0, left = 0;
		} else if(POD) {
			top = window.pageYOffset, left = 0;
		}
		new CSSTween(d.mediaView, [left + 'px', top + 'px', width + 'px', height + 'px'], ['left 0s linear', 'top 0s linear', 'width 0s linear', 'height 0s linear']);
	};

	Site.resizeMediaItem = function(mediaItem) {
		new CSSTween(mediaItem, [STAGE_WIDTH + 'px', STAGE_HEIGHT + 'px'], ['width 0s linear', 'height 0s linear']);
		switch(mediaItem.getAttribute('data-type')) {
		case IMAGE:
			ImgLoader.resize(mediaItem);
			break;
		case VIDEO:
			ImgLoader.resize(mediaItem);
			if(mediaItem.vidLoaded) Video.resize(Site.getMediaAsset(mediaItem, VIDEO));
			break;
		case HTML:
			Page.resize(mediaItem);
			break;
		case CONTACT:
			if(POD) {
				Share.setContactTouchEvents();
				Page.resize(mediaItem);
			} else {
				setTimeout(function() {
					var contact = Site.getMediaAsset(mediaItem, 'contactForm');
					var title = Site.getMediaAsset(mediaItem, 'contactFormTitle');
					var titleOffset;
					if(title) {
						titleOffset = title.innerHTML === '' ? -44 : -22;
					} else {
						titleOffset = -44;
					}
					contact.style.left = (STAGE_WIDTH - Util.getStyle(contact, 'width')) * 0.5 - (Util.getStyle(contact, 'width') * 0.1) + 'px';
					contact.style.top = (STAGE_HEIGHT - Util.getStyle(contact, 'height')) * 0.5 + titleOffset + 'px';

					var rgb = Util.hexToRGB('#3D3D3D');
					Site.getMediaAsset(mediaItem, 'contactFormFields').style.borderLeft = "1px solid rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + .5 + ")";

				}, 10);
			}
			break;
		}
	};

	Site.getMediaAsset = function(mediaItem, clss) {
		var asset = mediaItem.getElementsByTagName('*');
		var i = asset.length;
		while(i--) if(Util.findClass(asset[i], clss)) return asset[i];
	};

	Site.next = function() {
		Transition.setDir('left');
		Site.curImgNum = Site.curImgNum < Site.curMediaItemsInSection ? Site.curImgNum + 1 : 1;
		if(Address.getPath() == '') {
			Site.goto();
		} else {
			Address.setPath(Site.curPath + "/" + Site.curImgNum);
		}
	};

	Site.prev = function() {
		Transition.setDir('right');
		Site.curImgNum = Site.curImgNum - 1 > 0 ? Site.curImgNum - 1 : Site.curMediaItemsInSection;
		Address.setPath(Site.curPath + "/" + Site.curImgNum);
	};

	Site.keydown = function(e) {
		switch(e.which) {
		case 37:
			Site.prev();
			break;
		case 39:
			Site.next();
			break;
		case 32:
			Video.playPause();
			break;
		case 38:
			if(!POD && !PAD) {
				Address.setPath(Site.curPath + "/" + Site.curImgNum + "/thumbs/");
			}
			break;
		case 13:
			if(Site.curMode === 'thumbs') {
				Address.setPath(Site.curPath + "/" + Site.curImgNum);
			}
			break;
		case 27:
			Address.setPath(Site.curPath + "/" + Site.curImgNum);
			Caption.off();
			Pass.hide();
			closePlus1();
			closeLike();
			break;
		case 70:
			if(!POD && !PAD && Site.curMode !== 'email' && Site.state != CONTACT && !Pass.showing) {
				Fullscreen.toggle();
			}
			break;
		}
	};

	Site.getWidth = function() {
		if(PAD || POD) {
			return window.innerWidth;
		} else {
			if('left' == 'left') {
				return(window.innerWidth - (0 + 0 + Menu.getWidth() - 10));
			} else {
				return(window.innerWidth - (0 + 0 + Menu.getWidth() + 10));
			}
		}
	};

	Site.getHeight = function() {
		if(PAD || POD) {
			return window.innerHeight;
		} else {
			return(window.innerHeight - (60 + 40));
		}
	};

	Site.getCurSection = function() {
		Site.getCurSectionPath();
		var section = SLIDESHOW;
		if(Site.curSection[1]) {
			section = Site.curSection[0] + '.' + Site.curSection[1];
		} else if(Site.curSection[0]) {
			section = Site.curSection[0];
		}

		return document.getElementById(section);
	};

	Site.getMediaItemsInSection = function() {
		var oldPath = Site.curPath;
		var section = Site.getCurSection();
		Pass.checkLock(section);
		var newPath = Site.curPath;
		Site.newSection = false;
		if(oldPath != newPath && Site.curPath != '') {
			Site.newSection = true;
			Site.numItemsInSection = 0;
			var divs = section.getElementsByTagName('article');
			var mediaItems = new Array();
			for(var i = 0; i < divs.length; i++) {
				if(Util.findClass(divs[i], 'mediaItem')) {
					divs[i].index = i;
					Site.numItemsInSection++;
					if(!divs[i].loading) divs[i].loading = false;
					if(!divs[i].loaded) divs[i].loaded = false;
					if(divs[i].getAttribute('data-type') == HTML || divs[i].getAttribute('data-type') == '' || divs[i].getAttribute('data-type') == 'contactForm') divs[i].loaded = true;
					if(divs[i].getElementsByTagName('cite')[0]) {
						var captRgb = Util.hexToRGB('#000000');
						var cap = divs[i].getElementsByTagName('cite')[0];
						cap.style.opacity = 0;
						cap.style.backgroundColor = "rgba(" + captRgb.r + "," + captRgb.g + "," + captRgb.b + "," + 0.6 + ")";
					}
					mediaItems.push(divs[i]);
				}
			}
			Site.curMediaItemsInSection = mediaItems.length;
			Site.curMediaItems = mediaItems;
		}
		return Site.curMediaItems;
	};

	Site.getCurSectionPath = function() {

		Site.curSection = [];
		Site.curPath = '';

		var path = Address.getPathNames();

		var sectionLimit;

		if(path.length === 1 && path[0] === '') { /* root uri */
			Site.curSection[0] = SLIDESHOW;
			Site.curSection[1] = null;
			Site.curPath = SLIDESHOW;
			Site.curMode = '';
		} else if(path[path.length - 1] > 0) { /* this is an asset - maybe */
			Site.curImgNum = Number(path[path.length - 1]);
			Site.curMode = '';
			sectionLimit = path.length - 1;
		} else if(path[path.length - 2] > 0 && (path[path.length - 1] === 'thumbs' || path[path.length - 1] === 'caption' || path[path.length - 1] === 'email')) { /* asset with thumbs overlay */
			Site.curImgNum = Number(path[path.length - 2]);
			Site.curMode = path[path.length - 1];
			sectionLimit = path.length - 2;
		} else if(path[path.length - 1] === 'thumbs') { /* thumbs first behavior, with no asset */
			Site.curImgNum = 0;
			Site.curMode = 'thumbs';
			sectionLimit = path.length - 1;
		} else { /* no asset or thumbs state - 404 most likely */
			Site.curImgNum = 0;
			Site.curMode = '';
			sectionLimit = path.length;
		}

		for(var i = 0; i < sectionLimit; i += 1) {
			Site.curSection.push(path[i]);
			Site.curPath += path[i];
			if(i < sectionLimit - 1) {
				Site.curPath += "/";
			}
		}
	};

	Site.getSiteObjects = function() {
		var o = document.getElementsByTagName('*');
		var i = o.length;
		while(i--) o[i].id ? Site[o[i].id] = o[i] : Site[o[i].tagName] = o[i];
	};

	Site.checkSlideshowStatus = function() {
		if('10338' != '' && Address.getPath() == '') {
			if(Site.curMediaItem && Site.curMediaItem.getAttribute('data-type') == VIDEO && !POD && !PAD) {
				clearInterval(Site.slideInterval);
				Site.slideInterval = null;
			} else if(!Site.slideInterval) {
				Menu.curBtn = undefined;
				setTimeout(Site.startSlideshow, 10);
			}
		} else if('10338' === '' && Address.getPath() == '') {
			Address.setPath(d.menuText.getElementsByTagName('a')[0].getAttribute('href'));
		} else if(Address.getPath() != '') {
			clearInterval(Site.slideInterval);
			Site.slideInterval = null;
		}
	};

	Site.checkSectionLoaded = function() {
		var section = Site.getCurSection();
		var divs = section.getElementsByTagName('article');
		var loaded = new Array();
		var mediaItems = new Array();
		for(var i = 0; i < divs.length; i++) {
			if(Util.findClass(divs[i], 'mediaItem')) {
				mediaItems.push(divs[i]);
				if(divs[i].loaded || divs[i].loading) {
					loaded.push(divs[i]);
				}
			}
		}
		if(loaded.length >= mediaItems.length) {
			return true;
		} else {
			return false;
		}
	};

	Site.loadMediaItem = function(i) {
		var mediaItems = Site.curMediaItems;
		var curMediaItem = mediaItems[i];
		if(i < mediaItems.length) {
			if(!Site.checkSectionLoaded() && !curMediaItem.loading && !curMediaItem.loaded && (curMediaItem.getAttribute('data-type') == IMAGE || curMediaItem.getAttribute('data-type') == VIDEO)) {
				ImgLoader.load(curMediaItem);
			} else if(!Site.checkSectionLoaded()) {
				i < mediaItems.length - 1 ? i++ : i = 0;
				setTimeout(function() {
					Site.loadMediaItem(i)
				}, 600);
			}
		}
	};

	Site.goto = function() {
		//try {
		Site.getMediaItemsInSection();
		var section = Site.getCurSection();
		if(!section.locked) {
			Site.address();
			Pass.hide();
		} else {
			Pass.show(section);
			Site.checkSlideshowStatus();
		}
		Menu.select();
		//} catch(err) {
		//console.log('there was an error locating this section - ' + err);
		//}
	};

	Site.address = function() {
		if(Site.curMediaItem) {
			Site.oldMediaItem = Site.curMediaItem;
		}

		Video.pauseCur();

		Site.curMediaItem = Site.getNewMediaItem();

		Site.checkSlideshowStatus();

		if(Site.curMediaItem) {
			var mediaItem = Site.curMediaItem;
			mediaItem.style.display = 'block';

			if(Address.getPath() == '' && 'fit' != 'fit') {
				mediaItem.style.backgroundColor = '#f1f1f1';
				d.mediaView.style.backgroundColor = '#f1f1f1';
			} else {
				Site.state = mediaItem.getAttribute('data-type');
				mediaItem.style.backgroundColor = '#f1f1f1';
				d.mediaView.style.backgroundColor = '#f1f1f1';
			}

			Site.setBrowserTitle(mediaItem);
			Site.resize();
			Site.loadMediaItem(mediaItem.index);
			if(mediaItem.loaded) Video.autoLoad(mediaItem);
			mediaItem.style.zIndex = 1;

			if(PAD || POD) {
				if(Site.state != SLIDESHOW) TouchNav.checkVisible();
				TouchNav.addListeners(mediaItem);
				if(Site.state == HTML) Page.linkTouchEvents(mediaItem);
				if(Site.newSection || Address.getPath() == '') {
					new Transition(mediaItem, {
						old: Site.oldMediaItem,
						type: 'fade'
					});
				} else if(Site.oldMediaItem) {
					new Transition(mediaItem, {
						old: Site.oldMediaItem,
						type: 'fade'
					});
				} else {
					new Transition(mediaItem, {
						type: 'fade'
					});
				}
			} else {
				new Transition(mediaItem, {
					old: Site.oldMediaItem,
					onComplete: Site.transitionComplete
				});
			}

		}
		if(!POD) {
			Navbar.setCount();
			Navbar.check();
		}
		Site.checkMode();
	};

	Site.transitionComplete = function() {

	};

	Site.getNewMediaItem = function() {
		var o = document.getElementById('mediaView').getElementsByTagName('article');
		var mediaItem = undefined;
		for(var i in o) {
			if(Util.findClass(o[i], 'mediaItem')) {
				switch(o[i].id == '/' + Site.curPath + '/' + Site.curImgNum + '/') {
				case true:
					mediaItem = o[i];
					break;
				default:
					if((POD || PAD) && Site.state != SLIDESHOW) {
						o[i].style.display = 'none';
					}
					break;
				}
			}
		}

		return mediaItem;
	};

	Site.setBrowserTitle = function(mediaItem) {
		if(mediaItem && mediaItem.getAttribute('data-label') && Site.curSection[0] != SLIDESHOW && Site.curSection[0] != undefined && 'true' == 'false') {
			document.title = mediaItem.getAttribute('data-label');
		} else {
			document.title = decodeURIComponent("Michael Sebastian | Louisville, Kentucky Photographer");
		}
	};

	Site.checkMode = function() {
		switch(Site.curMode) {
		case 'thumbs':
			if(!Site.thumbs && !POD) new Thumbnails();
			if(Site.thumbs && !POD) Thumbnails.show();
			break;
		case 'email':
			if(!Site.share) new Share();
			if(!Share.open) Share.show();
			break;
		case 'caption':
			Caption.on();
			break;
		default:
			if(Site.thumbs && Thumbnails.open) Thumbnails.hide();
			if(Share.open) Share.hide();
			if(Caption.state === false) Caption.off();
			break;
		}
		Caption.check();
	};

	window.Site = Site;

}(window));

/*window.addEventListener('load', new Site, false);*/

document.onreadystatechange = function() {
	if(document.readyState === 'complete') {
		new Site();
	}
};
</script>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3826269-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
