// Arrows Management
var arrows = {
/* Config */
	topName : "#frame_up",
	rightName : "#frame_right",
	bottomName : "#frame_down",
	leftName : "#frame_left",

	label : '.label',
	arrow : '.arrow',

	animateDelay: 300,
	showSpeed: 600,
	hideSpeed: 300,
	showLabelSpeed: 300,
	hideLabelSpeed: 300,
	resetSpeed: 0,

	topPos : 80,
	rightPos : -260,
	bottomPos : -10,
	leftPos : -260,

	topPosFinal : 130,
	rightPosFinal : -10,
	bottomPosFinal : 40,
	leftPosFinal : -10,

	init: function(){
		$('.arrow-container').hover(function(){
			$( arrows.label, this ).show( arrows.showLabelSpeed );
		},function(){
			$( arrows.label, this ).hide( arrows.hideLabelSpeed, function(){ $(this).stop( true, true ); });
		});
	},

/* CORE START, don't touch if you don't know... please! */
/* Open */
	openTop: function( label, link ){
		// Show it
		$( this.topName ).delay( this.animateDelay ).animate( { 'top' : this.topPosFinal }, this.showSpeed ).addClass( 'active' ).attr( 'href', link );
		$( this.label, this.topName ).html( label ).hide( this.resetSpeed );
	},
	openRight: function( label, link ){
		$( this.rightName ).delay( this.animateDelay ).animate( { 'right' : this.rightPosFinal }, this.showSpeed ).addClass( 'active' ).attr( 'href', link );
		$( this.label, this.rightName ).html( label ).hide( this.resetSpeed );
	},
	openBottom: function( label, link ){
		$( this.bottomName ).delay( this.animateDelay ).animate( { 'bottom' : this.bottomPosFinal }, this.showSpeed ).addClass( 'active' ).attr( 'href', link );
		$( this.label, this.bottomName ).html( label ).hide( this.resetSpeed );
	},
	openLeft: function( label, link ){
		$( this.leftName ).delay( this.animateDelay ).animate( { 'left' : this.leftPosFinal }, this.showSpeed ).addClass( 'active' ).attr( 'href', link );
		$( this.label, this.leftName ).html( label ).hide( this.resetSpeed );
	},


/* Reset */
	resetTop: function(){
		$( this.topName ).stop( true, true ).css( { 'top' : this.topPos } ).removeClass( 'active' );
		$( this.label, this.topName ).text( '' ).hide( this.resetSpeed );
	},
	resetRight: function(){
		$( this.rightName ).stop( true, true ).css( { 'right' : this.rightPos } ).removeClass( 'active' );
		$( this.label, this.rightName ).text( '' ).hide( this.resetSpeed );
	},
	resetBottom: function(){
		$( this.bottomName ).stop( true, true ).css( { 'bottom' : this.bottomPos } ).removeClass( 'active' );
		$( this.label, this.bottomName ).text( '' ).hide( this.resetSpeed );
	},
	resetLeft: function(){
		$( this.leftName ).stop( true, true ).css( { 'left' : this.leftPos } ).removeClass( 'active');
		$( this.label, this.leftName ).text( '' ).hide( this.resetSpeed );
	},

	reset: function(){ this.resetTop();this.resetRight();this.resetBottom();this.resetLeft(); },


/* Close */
	closeTop: function(){
		$( this.topName ).animate( { 'top' : this.topPos }, this.hideSpeed ).removeClass( 'active' ).attr( 'href', '#' );
		$( this.label, this.topName ).text( '' ).hide( this.hideSpeed );
	},
	closeRight: function(){
		$( this.rightName ).animate( { 'right' : this.rightPos }, this.hideSpeed ).removeClass( 'active' ).attr( 'href', '#' );
		$( this.label, this.rightName ).text( '' ).hide( this.hideSpeed );
	},
	closeBottom: function(){
		$( this.bottomName ).animate( { 'bottom' : this.bottomPos }, this.hideSpeed ).removeClass( 'active' ).attr( 'href', '#' );
		$( this.label, this.bottomName ).text( '' ).hide( this.hideSpeed );
	},
	closeLeft: function(){
		$( this.leftName ).animate( { 'left' : this.leftPos }, this.hideSpeed ).removeClass( 'active').attr( 'href', '#' );
		$( this.label, this.leftName ).text( '' ).hide( this.hideSpeed );
	},

	closer: function(){ this.closeTop();this.closeRight();this.closeBottom();this.closeLeft(); }
};

$(function(){arrows.init();});

var baseScene = {
    id: "",
    size: [600, 600],
    center: [0, 0],
    triggers: [],
    elements: [],
    nextScene: function (a) {
        return typeof scenes[a + 1] == "undefined" ? -1 : a + 1
    },
    prevScene: function (a) {
        return a - 1
    },
    onCreate: function () {},
    onActivate: function () {},
    onDeactivate: function () {},
    onHash: function () {},
    state: 0
},
    scenes = [{
        id: "Home",
        size: [960, 600],
        backgroundColor: "#ffffff",
        elements: [{
            pos: [0, -20]
            ,layer: 6
            ,html: '<div class="container"><div id="home_slider">'+
				   '<img src="images/home/img_home_1.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_2.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_3.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_4.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_5.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_6.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_7.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_8.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '<img src="images/home/img_home_9.png" alt="What drives you? The fuel you need to keep moving forward." height="328" width="959" />'+
				   '</div></div>'
        },{
            pos: [-124, 94]
            ,layer: 6
            ,html: '<div class="get-inspired"><h2 class="pl12">Get Inspired</h2><h3 class="pl12">AIGA San Diego Y Design Conference</h3><p class="pl12">March 30 & 31, 2012<br />Joan B. Kroc Institute for Peace & Justice<br />University of San Diego</p><p><a href="register-now.html" id="home-register">Register Now</a></p></div>'
        },{
            pos: [-2650, -128]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 3000px">&nbsp;</div>'
        },{
            pos: [-905, -30]
            ,layer: 2
            ,html: '<div class="road-light-odd-1">&nbsp;</div>'
        },{
            pos: [-85, 64]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 1130px">&nbsp;</div>'
        },{
            pos: [90, 90]
            ,layer: 6
            ,html: '<div id="tell-us"><h2>Tell Us What Drives You</h2><div id="twitter-home"> </div></div>'
        },{
            pos: [90, 80]
            ,layer: 2
            ,html: '<img src="images/global/hatch1.png" />'
        },{
            pos: [92, 115]
            ,layer: 6
            ,html: '<ul id="twit-convo"><li><a href="#Join-the-Conversation">Tweet Your Answer</a>•</li><li><a href="https://twitter.com/#!/AIGAYConference" target="_blank">Follow</a></li><li>Use #Y17</li></ul>'
        },{
            pos: [152, 34.5	]
            ,layer: 6
            ,html: '<a href="#About-Y17" id="home-details">Event Details</a>'
        }, {
            pos: [0.5, -55.8] // Set the x and y position of the element. Position 0,0 is the absolute center of the frame. You'll have to play around with positioning to understand this correctly.
            ,html: '<div class="rd-horiz" style="width:1400px;">&nbsp;</div>' // horizontal road tile, width is inline style because the background is a 1px wide repeated graphic
            ,layer: 5 // all main road tiles should be on layer 5. The smaller white road tiles should be on layer 4 (I havent placed any of these tiles yet.)
        }, {
            pos: [395, 15]
            ,html: '<div class="rd-corner-6">&nbsp;</div>' // There are several corner tiles. look at the css file to get which is which.
            ,layer: 5
        }, {
            pos: [-443.4, 19.07]
            ,html: '<div class="rd-corner-5">&nbsp;</div>' // There are several corner tiles. look at the css file to get which is which.
            ,layer: 5
        }],
        prevScene: function () {
            return !1
        },
        onCreate: function () {
			//$("#home_ctas").parent().attr("id", "home_ctas_parent");
			$('#home_slider').cycle({ 
    			fx:     'fade', 
			    speed:   500, 
			    timeout: 8000, 
			    next:   '#home_slider', 
			    pause:   1 
			});
			jQuery('#twitter-home').jTweetsAnywhere({
    searchParams: ['q=@AIGAYConference OR %23Y17'],
    count: 1,
	showTweetFeed: {
		showTwitterBird: false,
		showTimestamp: true,
		showProfileImages: true,
		expandHovercards: true,
		autorefresh: true,
		interval: 60,             // Time in seconds to be waited until the next request for new tweets. Minimum
                                  // value is 30, the default value is 60.
        duration: 3600
	}
});
        },
        onActivate: function (a,b) {
        	$('#slideshow').cycle('resume');
	    	arrows.reset();
		arrows.openRight( 'About Y17', '#About-Y17' );
        },
        onDeactivate: function () {
		$('#slideshow').cycle('pause');
		arrows.closer();
        }
    }, {
        id: "About-Y17",
        size: [960, 600],
        center: [960, 0],
        elements: [{
            pos: [-178.2, 89]
            ,html: '<div class="rd-horiz" style="width:1366px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [-225, 155]
            ,layer: 2
            ,html: '<div class="road-light-odd-1">&nbsp;</div>'
        },{
            pos: [206.5, 263]
            ,layer: 2
            ,html: '<div class="road-light-tr">&nbsp;</div>'
        },{
            pos: [81, 249]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 103px;">&nbsp;</div>'
        },{
            pos: [-190, -30]
            ,layer: 3
            ,html: '<img src="images/global/hatch2.png" />'
        },{
            pos: [20, 240]
            ,layer: 3
            ,html: '<img src="images/global/hatch6.png" />'
        },{
            pos: [180.5, 96.2]
            ,html: '<div class="rd-corner-3">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [193.5, 188.2]
            ,html: '<div class="rd-vert" style="height:212px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [-135, -72]
            ,html: '<img src="images/about/h1_about-y17.png" />'
            ,layer: 6
        },{
            pos: [54, -65]
            ,html: '<div class="navigation"><a href="" class="active">The Conference</a><a href="">Venue</a><a href="">Accommodations & Travel</a><a href="">About San Diego</a></div>'
            ,layer: 6
        },{
            pos: [0, 30]
            ,layer: 6
            ,html: "<div id='about' class='container'>"+
			"<div><img src='images/about/img_about_conference.png' style='float:left;' /><h2>The antidote to inertia.</h2><p>Sometimes you just need a little nudge to keep things moving ahead. That’s where the AIGA San Diego Y Conference comes in. Come get inspired by forward-thinking folk like:</p><p><strong><a href='http://www.karimrashid.com/' target='_blank'>Karim Rashid</a></strong>, Prolific designer<br /><strong><a href='http://www.72andsunny.com/' target='_blank'>John Boiler & Matt Jarvis</a></strong>, 72andSunny<br /><strong><a href='http://goforitdesign.com/' target='_blank'>Nancy Harris Rouemy</a></strong>, Go For It Design<br /><strong><a href='http://www.austinkleon.com/' target='_blank'>Austin Kleon</a></strong>, A writer who draws.</p><p><a href='#The-Drivers'><strong>Check out the rest of the Drivers.</strong></a></p></div>"+
			
"<div><img src='images/about/img_about_venue.png' style='float:left;' /><h2>The Venue</h2><p>Y17 will be held at The Joan B. Kroc Institute for Peace and Justice on the beautiful campus of the University of San Diego. There you are, up on a hill overlooking Mission Valley and the waters of Mission Bay. Wow. You can't help but be inspired.</p><p>Joan B. Kroc Institute for Peace and Justice<br />5998 Alcala Park, San Diego, CA 92110<br />(619) 260.7808<br /><a href='http://peace.sandiego.edu'>peace.sandiego.edu</a></p></div>"+

			"<div class='longtext'><img src='images/about/img_about_travel.png' style='float:left;' /><h2>Accommodations & Travel</h2>"+
				"<div class='drivescroll'>"+
					"<div class='scrollbar'><div class='track'><div class='thumb'><div class='end'></div></div></div></div>"+
					"<div class='viewport'><div class='overview'><p>The Y Conference will be held at the University of San Diego, which is located right in the center of San Diego. The airport and Downtown San Diego are just minutes away.</p><h3>Go Downtown.</h3><p>Gaslamp Quarter. East Village. Little Italy.  You’re close to the Airport and close to the University of San Diego.</p><ul><li><a href='http://www.starwoodhotels.com/whotels/property/overview/index.html?propertyID=1433' target='_blank'>The W Hotel</a></li><li><a href='http://www.hotelsolamar.com/' target='_blank'>Hotel Solamar</a></li><li><a href='http://www.marriott.com/hotels/travel/sandt-san-diego-marriott-marquis-and-marina/' target='_blank'>San Diego Marriot Hotel and Marina</a></li><li><a href='http://www.hortongrand.com/' target='_blank'>Horton Grand Hotel</a></li><li><a href='http://www1.hilton.com/en_US/hi/hotel/SANGQHF-Hilton-San-Diego-Gaslamp-Quarter-California/index.do' target='_blank'>Hilton San Diego Gaslamp Quarter</a></li></ul><h3>Nearby in Mission Valley.</h3><p>If you want to sleep in until the last possible moment, stay right in Mission Valley, just minutes away. (Don't miss the mariachis and margaritas in Old Town.)</p><ul><li><a href='http://heritageinnsandiego.com/' target='_blank'>Heritage Inn San Diego Hotel</a></li><li><a href='http://www.hioldtownhotel.com/' target='_blank'>Holiday Inn Express San Diego Old Town</a></li><li><a href='http://www.thebristolsandiego.com/' target='_blank'>Bristol San Diego</a></li><li><a href='http://www.haciendahotel-oldtown.com/' target='_blank'>Best Western Hacienda Hotel</a></li></ul><h3>San Diego on a dime.</h3><p>For those who would rather spend their money on design books. (We understand.)</p><ul><li><a href='http://www.travelodgehotelsandiego.com/' target='_blank'>San Diego Mission Valley Travelodge</a></li><li><a href='http://www.californiahostel.com/' target='_blank'>Ocean Beach International Hostel</a></li><li><a href='http://www.bw7seas.com/' target='_blank'>Best Western 7 Seas</a></li></ul></div></div></div>"+
					"<p>What if I need travel assistance? We have a local travel agent that will assist in all your travel needs. Hotel, air, car rental. Please <a href='mailto:kathy@abitoftravel.com' target='_blank'>email Kathy</a> at A Bit of Travel.</p></div>"+
					
"<div class='longtext'><img src='images/about/img_about_sandiego.png' style='float:left;' /><h2>Destination: San Diego.</h2><p>We understand if you just book a one-way ticket. San Diego is just that sort of place. (Some of us came here on vacation and never left.)</p><p>Over the past few years, San Diego has grown to become the nation's eighth largest city. Nowhere is this more evident than in Downtown, where recent development has provided a vibrant place for people to live, work and play. Leading economic sectors in the county include defense, biotechnology/biosciences, computer sciences, electronics manufacturing, software development, telecommunications, wireless research, and tourism.</p><p>Many people know San Diego for the <a href='http://www.sandiegozoo.org/' target='_blank'>San Diego Zoo</a> (pandas and koalas) and <a href='http://seaworldparks.com/seaworld-sandiego' target='_blank'>Sea World</a> (Shamu). But San Diego may be best known for its beaches. Visiting Ocean Beach is like a trip back in time to 1969 with its collection of funky shops, health food restaurants and live music. Head up the coast to Windansea Beach in La Jolla where you can sit under a hut and watch some of the city's best surfers hit the waves. Then enjoy a scenic drive along Torrey Pines Road, take in the beauty of the Salk Institute by Louis I. Kahn and be sure to check out the Torrey Pines Gliderport where paragliders and hang gliders launch off the sheer cliffs and soar hundreds of feet above the Pacific in free flight.</p><p>There's so much to do. The wild flowers will be blooming in the desert. Tijuana beckons south of the border. And Coronado is just a short ferry ride (or breathtaking drive across the bridge) from Downtown. Trust us, you'll want to stay a day or two after the Y. (Heck, make it a whole week.)</p></div></div>"
        }],
        onCreate: function () { 
	$(".drivescroll").tinyscrollbar();
			$('#about').cycle({ 
    			fx:     'fade', 
			    speed:  'fast', 
			    timeout: 0, 
			    //pager:  '#about .navigation', 
     
			    // callback fn that creates a thumbnail to use as pager anchor 
			    pagerAnchorBuilder: function(idx, slide) { 
			        return '.navigation a:eq(' + idx + ')';
			    } 
			});
			$('.navigation a').click(function(event){event.preventDefault();
				$('.navigation a').removeClass('active');
				$(this).addClass('active');
				});
        },
        onActivate: function () {
		$('#about').cycle('resume');
	    	arrows.reset();
		arrows.openLeft( 'Home', '#Home' );
		arrows.openBottom( 'The Drivers', '#The-Drivers' );
        },
        onDeactivate: function () {
		$('#about').cycle('pause');
		arrows.closer();
	}
    }, {
        id: "The-Drivers",
        size: [960, 600],
        center: [1000, 455],
        elements: [{
            pos: [0, 30]
            ,layer: 6
            ,html: '<div id="thedrivers"><div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div><div class="viewport"><div class="overview">'+

					'<div class="col"><a href="the-drivers/video_karim-rashid.html" class="fancy-video"><img src="images/the-drivers/driver_karim-rashid.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Karim Rashid</h3>'+
						'<p><a href="the-drivers/bio_karim-rashid.html" class="fancy-bio" >View Bio</a><br />'+
						'<a href="http://www.karimrashid.com/" target="_blank">www.karimrashid.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/bio_eben-bayer.html" class="fancy-bio2"><img src="images/the-drivers/driver_eben-bayer.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Eben Bayer</h3>'+
						'<p><a href="the-drivers/bio_eben-bayer.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.ecovativedesign.com/" target="_blank">www.ecovativedesign.com</a><a href="https://twitter.com/#!/ecovative" target="_blank" class="twtr_bird2">twitter</a></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/video_guy-iannuzzi.html" class="fancy-video"><img src="images/the-drivers/driver_guy_iannuzzi.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Guy Iannuzzi</h3>'+
						'<p><a href="the-drivers/bio_guy-iannuzzi.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.mentus.com/" target="_blank">www.mentus.com</a><a href="http://twitter.com/mentusinc" target="_blank" class="twtr_bird2">twitter</a></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/video_joseph-foo.html" class="fancy-video"><img src="images/the-drivers/driver_joseph-foo.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Joseph Foo</h3>'+
						'<p><a href="the-drivers/bio_joseph-foo.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.3nitydesign.com/" target="_blank">www.3nitydesign.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/video_jorge-alderete.html" class="fancy-video"><img src="images/the-drivers/driver_jorge-alderete.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Jorge Alderete</h3>'+
						'<p><a href="the-drivers/bio_jorge-alderete.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.jorgealderete.com/" target="_blank">www.jorgealderete.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/video_andrew-byrom.html" class="fancy-video"><img src="images/the-drivers/driver_andrew-byrom.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Andrew Byrom</h3>'+
						'<p><a href="the-drivers/bio_andrew-byrom.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.andrewbyrom.com/" target="_blank">www.andrewbyrom.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+
						
					'<div class="col"><a href="the-drivers/video_andrea-dezso.html" class="fancy-video"><img src="images/the-drivers/driver_andrea-dezso.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Andrea Dezsö</h3>'+
						'<p><a href="the-drivers/bio_andrea-dezso.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.andreadezso.com/" target="_blank">www.andreadezso.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/bio_nancy-harris-rouemy.html" class="fancy-bio2"><img src="images/the-drivers/driver_nancy-harris-rouemy.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Nancy Harris Rouemy</h3>'+
						'<p><a href="the-drivers/bio_nancy-harris-rouemy.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://goforitdesign.com/" target="_blank">goforitdesign.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/video_john-and-matt.html" class="fancy-video"><img src="images/the-drivers/driver_john-and-matt.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>John Boiler & Matt Jarvis</h3>'+
						'<p><a href="the-drivers/bio_john-and-matt.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://72andsunny.com/" target="_blank">72andsunny.com</a><!--<a href="#" class="twtr_bird2">twitter</a>--></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/video_austin-kleon.html" class="fancy-video"><img src="images/the-drivers/driver_austin-kleon.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Austin Kleon</h3>'+
						'<p><a href="the-drivers/bio_austin-kleon.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.austinkleon.com/" target="_blank">www.austinkleon.com</a><a href="https://twitter.com/austinkleon" class="twtr_bird2" target="_blank">twitter</a></p>'+
						'</div></div>'+

					'<div class="col"><a href="the-drivers/bio_dave-bruno.html" class="fancy-bio2"><img src="images/the-drivers/driver_dave-bruno.jpg" class="driver" /></a>'+
						'<div class="desc">'+
						'<h3>Dave Bruno</h3>'+
						'<p><a href="the-drivers/bio_dave-bruno.html" class="fancy-bio">View Bio</a><br />'+
						'<a href="http://www.guynameddave.com/" target="_blank">www.guynameddave.com</a><a href="http://twitter.com/guynameddave" target="_blank" class="twtr_bird2">twitter</a></p>'+
						'</div></div>'+

					'</div></div></div>'
        },{
            pos: [-132, -72]
            ,html: '<img src="images/the-drivers/h1_the-drivers.png" />'
            ,layer: 6
        },{
			pos: [53, -70]
            ,layer: 6
            ,html: '<p class="tagline">Meet our speakers and find out what drives each of them.</p>'
		},{
            pos: [202, 65]
            ,layer: 2
            ,html: '<div class="road-light-vert" style="height:370px">&nbsp;</div>'
        },{
            pos: [-170, 290]
            ,layer: 2
            ,html: '<div class="road-light-odd-1">&nbsp;</div>'
        },{
            pos: [162, 330]
            ,layer: 2
            ,html: '<div class="road-light-br">&nbsp;</div>'
        },{
            pos: [-500, 218]
            ,layer: 2
            ,html: '<div class="road-light-tl">&nbsp;</div>'
        },{
            pos: [-190, 80]
            ,layer: 3
            ,html: '<img src="images/global/hatch10.png" />'
        },{
            pos: [153.5, -93.2]
            ,html: '<div class="rd-vert" style="height:552px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [22.2, 90.5]
            ,layer: 5
            ,html: '<div class="rd-horiz" style="width:326px;">&nbsp;</div>'
        },{
			pos: [-177.6, 165]
            ,html: '<div class="rd-corner-5">&nbsp;</div>'
            ,layer: 5
		},{
			pos: [142.8, 78.6]
            ,html: '<div class="rd-corner-1">&nbsp;</div>'
            ,layer: 5
		}],
        onCreate: function () { 
			$('#thedrivers .fancy-video').append('<img src="images/global/btn_play.png" class="play" />');
			$('#thedrivers').tinyscrollbar();
        },
        onHash: function (a) {
            
        },
        onActivate: function (a) {
		    	arrows.reset();
			arrows.openTop( 'About Y17', '#About-Y17' );
			arrows.openBottom( 'Thinkshops', '#Thinkshops' );

			$('#thedrivers .fancy-video').fancybox({
					'padding' : 0,
					'margin' : 0,
					'autoDimensions' : false,
					'width' : 680,
					'height' : 460,
					'content' : '<div id="fancyvideo" style="width:100%;height:460px"></div>',
					'cyclic' : false,
					'showCloseButton' : false,
					'overlayOpacity' : .1, 
					'onComplete' : function(){$.ajax({
			  url: $(this).attr("href"),
  			  success: function(data) { $("#fancyvideo").html(data); }
			});}
		});
			$('#thedrivers .fancy-bio,#thedrivers .fancy-bio2').fancybox({
					'padding' : 0,
					'margin' : 0,
					'autoDimensions' : false,
					'width' : 680,
					'height' : 460,
					'content' : '<div id="fancybio" style="width:100%;height:460px"></div>',
					'cyclic' : false,
					'showCloseButton' : false,
					'overlayOpacity' : .1, 
					'onComplete' : function(){
						$("#fancybox-wrap").unbind('mousewheel.fb');
						$.ajax({
			  url: $(this).attr("href"),
  			  success: function(data) { $("#fancybio").html(data); }
			});}
				});
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }, {
        id: "Thinkshops",
        size: [960, 600],
        center: [500, 1250],
        elements: [{
            pos: [-135, -72]
            ,html: '<img src="images/thinkshops/h1_thinkshops.png" />'
            ,layer: 6
        },{
            pos: [0, -40]
            ,html: '<div class="intro"><h2>Mix it up a little.</h2><p>Yeah, we all love listening to great speakers too. But what really makes the Y-Conference different are the Thinkshops. They’re your opportunity to learn something new, interact with fellow attendees, and maybe even get your hands a little messy. Thinkshops are small intimate workshops with usually less than 25 people. Thinkshops will only be offered on Saturday.</p></div>'
            ,layer: 6
        },{
			pos: [0,55]
			,html: '<div id="thinkshops">'+
			'<div id="think1" class="col50"><div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div><div class="viewport"><div class="overview">'+
					'<ul class="col">'+
						"<li><a href='the-drivers/video_bennett-peji.html' class='fancy-video'><img src='images/thinkshops/ts_bennett-peji2.jpg' width='80' height='80' align='left' style='padding-right:10px;' /></a><h3>How to Market Yourself as a Speaker</h3><h4>Bennett Peji, <a href='http://pejidesign.com' target='_blank'>pejidesign.com</a></h4><p>Bennett Peji is a specialist in civic branding and design. And he speaks around the globe on the subject. Find out how you can market yourself as a speaker in your particular area of expertise.</p></li>"+
						
						"<li><img src='images/thinkshops/ts_tyler-blik.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>Finding (Design) Inspiration in all the Right Places</h3><h4>Tyler Blik, <a href='http://www.tylerblik.com/' target='_blank'>tylerblik.com</a></h4><p>Join Tyler, as he escorts you to view one of area’s best-kept secrets – the Athenaeum Music & Arts Library in La Jolla. Here you will receive a private presentation of their collection of artists’ books, while discussing the power of concept + craft.</p></li>"+
						
						"<li><img src='images/thinkshops/ts_luke-pilon.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>Designing Mobile and Location-Based Awesomesauce</h3><h4>Luke Pilon, <a href='http://www.mobiah.com/' target='_blank'>mobiah.com</a></h4><p>Mobiah is a boutique software development firm that builds web applications, distributes WordPress plugins, and other awesome things. Learn how the integration of mobile and geo technology can benefit your designs.</p></li>"+
						
						"<li><img src='images/thinkshops/ts_cindy-westen.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>Smart Studio Management 101: Creative Side, Meet Business Side</h3><h4>Cindy Westen, <a href='http://www.clientsandprofits.com/' target='_blank'>clientsandprofits.com</a></h4><p>Running a design studio whether large or small, is challenging to do, even in the best of times. Today, no studio can survive without knowing the business side of being creative—with proper project management, job tracking and bookkeeping skills and tools.</p><p>Clients & Profits' Cindy Westen will lead a back-to-basics discussion on managing your studio the smart way. Studio Management 101 will show you the top 10 secrets you need to know to run a smart studio: managing the jobs, tracking the costs, and getting paid for the value you bring to your clients. You'll see how to take a holistic approach to the juggling the business side of being creative, and learn the Holy Trinity of Studio Success—estimates, change orders and purchase orders.</p><p>You'll also learn how to look out for the pitfalls that sink even the best creative houses and see the tools to make your studio rock.</p></li>"+
						
						"<li class='li_last'><img src='images/thinkshops/ts_jeff-motch.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>Crafting Design, Beer and Pizza</h3><h4>Jeff Motch, <a href='http://www.livelyandmotch.com/' target='_blank'>livelyandmotch.com</a> &amp; <a href='http://www.blindladyalehouse.com/' target='_blank'>blindladyalehouse.com</a></h4><p>Driven to jump without a parachute, Jeff has quit some pretty good jobs over his career and never once had the next one lined up. Consequently, his heady brew of a Thinkshop will connect the dots between craft and trade to reveal how cross discipline is nourishing.</p></li>"+
					"</ul></div></div></div>"+
					'<div id="think2" class="col50"><div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div><div class="viewport"><div class="overview">'+
					'<ul class="col">'+
						"<li><a href='the-drivers/video_amy-levine.html' class='fancy-video'><img src='images/thinkshops/ts_amy-levine2.jpg' width='80' height='80' align='left' style='padding-right:10px;' /></a><h3>Screen Printing</h3><h4>Amy Levine, <a href='http://www.visualasylum.com/' target='_blank'>visualasylum.com</a></h4><p>Back by popular demand. Amy presents her ever-popular hands-on Screenprinting Thinkshop. Here you’ll have the opportunity to print a design of your own making.</p></li>"+
						
						"<li><img src='images/thinkshops/ts_don-and-dylan.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>FreeBird</h3><h4>Don Hollis / Dylan Jones,<br /><a href='http://www.subtextgallery.com/' target='_blank'>subtextgallery.com</a></h4><p>You are your own most valuable asset. What you do elevates business, supports financial goals, helps companies grow and amplifies messages for clients and their causes. Now, it’s your time to fly. Spread your wings and soar to your own lofty ambitions. You have the power; we’ll deliver some flight plans.</p></li>"+
						
						"<li><img src='images/thinkshops/ts_maximo-escobedo.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>Bentwire Sculptures</h3><h4>Máximo Escobedo, <a href='http://maximoinc.com/' target='_blank'>maximoinc.com</a></h4><p>Máximo — responsible for the branding of Y9 MoxY — leads this hands-on Thinkshop that instigates participants to create precious sculpture from salvaged bent wire. Bring a fluid mind and some needle-nose pliers; we’ll bring the rest.</p></li>"+
						
						"<li><img src='images/thinkshops/ts_andrea-singer.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>BookArts</h3><h4>Andrea Singer, <a href='http://www.andreasinger.net/' target='_blank'>andreasinger.net</a></h4><p>Get off the computer and reconnect with your hand skills. Invigorate your creative drive, learn about hard cover / soft spines, pamphlet stitch signatures and book cloth for flexible spines. Create your own beautiful handmade book!</p>"+
						"<p>$20 additional materials fee. Must bring exacto knife, cutting mat and — if you’ve got one — a “folding bone”.</p></li>"+
						
						"<li class='li_last'><img src='images/thinkshops/ts_mark-murphy.jpg' width='80' height='80' align='left' style='padding-right:10px;' /><h3>From Still Images to Moving Pictures</h3><h4>Mark Murphy, <a href='http://murphydesign.com/' target='_blank'>murphydesign.com</a></h4><p>Artistic inspiration and Fine Art resourcing collides with this informative Thinkshop that prepares you to understand how to create rich, informative video media for your next project</p></li>"+
					"</ul>"+
					'</div></div></div></div>'
			,layer: 6
		},{
            pos: [-35, -436]
            ,layer: 2
            ,html: '<div class="road-light-vert" style="height:135px">&nbsp;</div>'
        },{
            pos: [55, -150]
            ,layer: 2
            ,html: '<div class="road-light-odd-2">&nbsp;</div>'
        },{
            pos: [-146, 17]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 140px;">&nbsp;</div>'
        },{
            pos: [-294, 42]
            ,layer: 2
            ,html: '<div class="road-light-tl">&nbsp;</div>'
        },{
            pos: [-330, 182]
            ,layer: 2
            ,html: '<div class="road-light-vert" style="height: 130px;">&nbsp;</div>'
        },{
            pos: [133.8, -241]
            ,html: '<div class="rd-vert" style="height:1112px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [-320.2, 220.5]
            ,html: '<div class="rd-vert" style="height:400px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [-90, 70]
            ,layer: 5
            ,html: '<div class="rd-horiz" style="width:732px;">&nbsp;</div>'
        },{
            pos: [0, -250]
            ,layer: 5
            ,html: '<img src="images/global/hatch1.png" />'
        },{
			pos: [-305.5, 81.7]
            ,html: '<div class="rd-corner-2">&nbsp;</div>'
            ,layer: 5
		},{
			pos: [149, -542]
            ,html: '<div class="rd-corner-2">&nbsp;</div>'
            ,layer: 5
		},{
            pos: [290, 280]
            ,layer: 3
            ,html: '<img src="images/global/hatch1.png" />'
        },{
			pos: [123, 58]
            ,html: '<div class="rd-corner-1">&nbsp;</div>'
            ,layer: 5
		}],
        onCreate: function () {
            $('#thinkshops .col50').tinyscrollbar();
        },
        onHash: function (a) {
        },
        onActivate: function (a) {
		arrows.reset();
		arrows.openTop( 'The Drivers', '#The-Drivers' );
		arrows.openLeft( 'Agenda', '#Agenda' );
		
		$('#thinkshops .fancy-video').fancybox({
					'padding' : 0,
					'margin' : 0,
					'autoDimensions' : false,
					'width' : 680,
					'height' : 460,
					'content' : '<div id="fancyvideo" style="width:100%;height:460px"></div>',
					'cyclic' : false,
					'showCloseButton' : false,
					'overlayOpacity' : .1, 
					'onComplete' : function(){$.ajax({
			  url: $(this).attr("href"),
  			  success: function(data) { $("#fancyvideo").html(data); }
			});}
		});
		
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }, {
        id: "Agenda",
        size: [960, 600],
        center: [0, 2045],
        elements: [{
            pos: [-144, -72]
            ,html: '<img src="images/agenda/h1_agenda.png" />'
            ,layer: 6
        },{
            pos: [2, -48]
            ,html: '<div class="intro"><h2>Fueling new ideas.</h2><p>Amazing speakers. Inspiring Thinkshops.  Great interaction with fellow design nerds. You’ve got two of “whoa” ahead of you.</p></div>'
            ,layer: 6
        },{
			pos: [0,50]
			,html: '<div id="agenda">'+
			'<div class="col50"><h2>Friday, March 30</h2>'+
					'<ul class="col">'+
						"<li><h3>Morning Session</h3><table><tr><td>7-9:00am</td><td>Registration / Resource Center Open</td></tr><tr><td>9:00am</td><td>Opening Film and Welcome</td></tr><tr><td>9:10am</td><td>Speaker</td></tr><tr><td>9:55am</td><td>Speaker</td></tr><tr><td>10:30pm</td><td>Break / Resource Center Open</td></tr><tr><td>11:05pm</td><td>Speaker</td></tr><tr><td>11:45pm</td><td>Lunch / Resource Center Open</td></tr></table></li>"+
						"<li><h3>Afternoon Session</h3><table><tr><td>1:40pm</td><td>Speaker</td></tr><tr><td>2:20pm</td><td>Speaker</td></tr><tr><td>3:00pm</td><td>Break / Resource Center Open</td></tr><tr><td>3:20pm</td><td>Speaker</td></tr><tr><td>4:00pm</td><td>Speaker</td></tr><tr><td>5:30pm</td><td>Reception (held in the Garden of the Sea at USD)</td></tr></table></li>"+
					"</ul></div>"+
					'<div class="col50"><h2>Saturday, March 31</h2>'+
					'<ul class="col">'+
						"<li><h3>Morning Session</h3><table><tr><td>7-9:00am</td><td>Registration</td></tr><tr><td>9:00am</td><td>Opening Film + Welcome</td></tr><tr><td>9:10am</td><td>Speaker</td></tr><tr><td>10:00am</td><td>Thinkshops</td></tr><tr><td>12:00pm</td><td>Lunch</td></tr></table></li>"+
						"<li><h3>Afternoon Session</h3><table><tr><td>2:10pm</td><td>Speaker</td></tr><tr><td>2:50pm</td><td>Speaker</td></tr><tr><td>3:30pm</td><td>Break</td></tr><tr><td>3:50pm</td><td>Speaker</td></tr><tr><td>4:30pm</td><td>Link Scholarship Presentation</td></tr><tr><td>5:00pm</td><td>Closing Comments</td></tr><tr><td>6-9:30pm</td><td>Closing Party</td></tr></table></li>"+
					"</ul>"+
					'</div></div>'
			,layer: 6
		},{
            pos: [130, -465]
            ,layer: 2
            ,html: '<div class="road-light-br">&nbsp;</div>'
        },{
            pos: [-150, -412]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 400px;">&nbsp;</div>'
        },{
            pos: [-428, -385]
            ,layer: 2
            ,html: '<div class="road-light-tl">&nbsp;</div>'
        },{
            pos: [-465, -125]
            ,layer: 2
            ,html: '<div class="road-light-vert" style="height: 375px;">&nbsp;</div>'
        },{
            pos: [-428, 135]
            ,layer: 2
            ,html: '<div class="road-light-bl">&nbsp;</div>'
        },{
            pos: [-263, 180]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 175px;">&nbsp;</div>'
        },{
            pos: [-96, 128]
            ,layer: 2
            ,html: '<div class="road-light-br">&nbsp;</div>'
        },{
            pos: [-55, -20]
            ,layer: 2
            ,html: '<div class="road-light-vert" style="height: 129px;">&nbsp;</div>'
        },{
            pos: [-20, -159]
            ,layer: 2
            ,html: '<div class="road-light-tl">&nbsp;</div>'
        },{
            pos: [262, -184]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 408px;">&nbsp;</div>'
        },{
            pos: [570, 22.2]
            ,layer: 5
            ,html: '<div class="rd-horiz" style="width:1741px;">&nbsp;</div>'
        },{
			pos: [112.5, -7]
            ,html: '<div class="rd-corner-4">&nbsp;</div>'
            ,layer: 5
		},{
			pos: [-19.0, -268.3]
            ,html: '<div class="rd-corner-9">&nbsp;</div>'
            ,layer: 5
		},{
			pos: [168.5, -438.3]
            ,html: '<div class="rd-corner-1">&nbsp;</div>'
            ,layer: 5
		},{
            pos: [-40, 80]
            ,layer: 3
            ,html: '<img src="images/global/hatch9.png" />'
        }],
        onCreate: function () { 
        },
        onHash: function (a) {
        },
        onActivate: function (a) {
		arrows.reset();
		arrows.openTop( 'Thinkshops', '#Thinkshops' );
		arrows.openRight( 'Register Now', '#Register-Now' );
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }, {
        id: "Register-Now",
        size: [960, 600],
        center: [1300, 1850],
        elements: [{
            pos: [-135, -72]
            ,html: '<img src="images/register/h1_register.png" />'
            ,layer: 6
        },{
            pos: [0, 5]
            ,layer: 6
            ,html: "<div id='register-now' class='container'>"+
'<div class="row top"><div class="col1"><h2>Registration Type</h2></div><div class="col2"><h2>AIGA Member</h2></div><div class="col3"><h2>Non Member</h2></div></div>'+

'<div class="row"><div class="col1">Early Bird <em>(ends January 22)</em></div><div class="col2"><input type="radio" value="http://www.eventbrite.com/event/2579762138" name="price" class="price"> $300.00</div><div class="col3"><input type="radio" value="http://www.eventbrite.com/event/2579840372" name="price" class="price"> $400.00</div></div>'+

'<div class="row"><div class="col1">Student</div><div class="col2"><input type="radio" value="http://www.eventbrite.com/event/2579876480" name="price" class="price"> $175.00</div><div class="col3"><input type="radio" value="http://www.eventbrite.com/event/2579876480" name="price" class="price"> $225.00</div></div>'+

'<div class="row"><div class="col1">Professional</div><div class="col2"><input type="radio" value="http://www.eventbrite.com/event/2579762138" name="price" class="price"> $400.00</div><div class="col3"><input type="radio" value="http://www.eventbrite.com/event/2579840372" name="price" class="price"> $475.00</div></div>'+

'<div class="row bottom"><div class="col1">5 or More<br><small>*Group registration must contact <a href="mailto:info@aigasandiego.org">info@aigasandiego.org</a><br />to register.</small></div><div style="padding-left:26px;" class="col2">$300.00</div><div class="col3">$400.00</div><div class="col4"><a target="_blank" href="#" id="buy-now">Buy Now</a></div></div>'+
'</div>'
        },{
            pos: [0, 85]
            ,layer: 6
            ,html: "<div class='register-notice'><p>Cancellation Policy: Cancellations made 7-29 days prior to the conference will be refunded 50% of the registration fee less a $55 handling fee. Cancellations made less then 7 days prior to the conference will not be refunded.</p><p>Any questions or problems with registering? Email us at <a href='mailto:info@aigasandiego.org' target='_blank'>info@aigasandiego.org</a>.</p></div>"
		},{
            pos: [13, 295.7]
            ,html: '<div class="rd-vert" style="height:1036px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [-755, -45]
            ,layer: 2
            ,html: '<div class="road-light-br">&nbsp;</div>'
        },{
            pos: [-680, -203]
            ,layer: 2
            ,html: '<div class="road-light-tl">&nbsp;</div>'
        },{
            pos: [-405, -229]
            ,layer: 2
            ,html: '<div class="road-light-hort" style="width: 395px;">&nbsp;</div>'
        },{
            pos: [-133, -215]
            ,layer: 2
            ,html: '<div class="road-light-tr">&nbsp;</div>'
        },{
            pos: [-100, 460]
            ,layer: 2
            ,html: '<div class="road-light-vert" style="height: 1200px;">&nbsp;</div>'
        },{
            pos: [-40, 110]
            ,layer: 3
            ,html: '<img src="images/global/hatch8.png" />'
        },{
            pos: [-288, 205.5]
            ,layer: 5
            ,html: '<div class="rd-corner-1">&nbsp;</div>'
        },{
            pos: [.3, 16.4]
            ,layer: 5
            ,html: '<div class="rd-corner-3">&nbsp;</div>'
        },{
            pos: [-277.2, 113.7]
            ,html: '<div class="rd-vert" style="height:200px;">&nbsp;</div>'
            ,layer: 5
        },{
            pos: [-130.5, 9.1]
            ,layer: 5
            ,html: '<div class="rd-horiz" style="width:363px;">&nbsp;</div>'
        },{
			pos: [-262.5, 20.5]
            ,html: '<div class="rd-corner-2">&nbsp;</div>'
            ,layer: 5
		}],
        onCreate: function () { 
            $('.price').click(function(){$('#buy-now').attr('href',jQuery('.price:checked').val());});
        },
        onHash: function (a) {
        },
        onActivate: function (a) {
		arrows.reset();
		arrows.openLeft( 'Agenda', '#Agenda' );
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }, {
        id: "Sponsors",
        size: [960, 600],
        center: [-750, -600],
        elements: [{
            pos: [-138, -72]
            ,html: '<img src="images/sponsors/h1_sponsors.png" />'
            ,layer: 6
        },{
            pos: [-396, 444.25]
            ,layer: 2
            ,html: '<div class="rd-wl-vert" style="height: 219px;">&nbsp;</div>'
        },{
            pos: [-430, 638.5]
            ,layer: 2
            ,html: '<div class="rd-wl-br">&nbsp;</div>'
        },{
            pos: [-1508, 683]
            ,layer: 2
            ,html: '<div class="rd-wl-hort" style="width: 2000px">&nbsp;</div>'
        },{
            pos: [-375.2, 232.8]
            ,layer: 2
            ,html: '<div class="rd-wl-tl">&nbsp;</div>'
        },{
            pos: [-97.2, 198.7]
            ,layer: 2
            ,html: '<div class="rd-wl-hort" style="width: 400px">&nbsp;</div>'
        },{
            pos: [345.74, 58.0]
            ,layer: 2
            ,html: '<div class="rd-wl-odd">&nbsp;</div>'
        },{
            pos: [-462.8, 282.83]
            ,layer: 4
            ,html: '<div class="rd-w-br">&nbsp;</div>'
        },{
            pos: [-1657, 327.5]
            ,layer: 4
            ,html: '<div class="rd-w-hort" style="width: 4000px">&nbsp;</div>'
        },{
            pos: [-423.25, 174.60]
            ,layer: 4
            ,html: '<div class="rd-w-vert" style="height: 70px;">&nbsp;</div>'
        },{
            pos: [-383, 54]
            ,layer: 4
            ,html: '<div class="rd-w-tl">&nbsp;</div>'
        },{
            pos: [-172.74, .35]
            ,layer: 4
            ,html: '<div class="rd-w-hort" style="width: 435px;">&nbsp;</div>'
        },{
            pos: [155.05, 96]
            ,layer: 4
            ,html: '<div class="rd-w-odd">&nbsp;</div>'
        },{
            pos: [2, -40]
            ,html: '<div class="intro"><h2>All together now: “Thank you.”</h2><p>These companies and organizations help make the Y possible. Please join us in supporting them. During the conference, feel free to stop by the Resource Center featuring our sponsors and say hi (And thank you too!). To find out how you can join our list of current sponsors, just download the "Become a Sponsor" PDF <a href="pdf/AIGA_SponsorPack_2011-12.pdf" target="_blank">here</a> or simply <a href="mailto:info@aigasandiego.org">e-mail us</a> and we will get in touch with you.</p></div>'
            ,layer: 6
        },{
            pos: [0, 0]
            ,layer: 3
            ,html: '<img src="images/global/hatch1.png" />'
        },{
            pos: [0, 50]
            ,layer: 6
            ,html: '<div id="sponsors">'+
				'<div class="col50" style="min-height:295.8px;"><h2>Chapter Sponsor</h2><div class="chapter-sponsor"><a href="http://www.clientsandprofits.com/" target="_blank" rel="nofollow"><img src="images/sponsors/clients-and-profits3.jpg" style="border-bottom: 1px solid orange; margin-left: -13px; padding: 10px 10px 27px;" /></a></div><h2>Title Sponsors</h2><div class="chapter-sponsor"><a href="http://muse.adobe.com/" target="_blank" rel="nofollow" style="margin-right:25px;"><img src="images/sponsors/logo_adobemuse.jpeg" style="padding: 0;" /></a><a href="http://myclearstorypro.com/" target="_blank" rel="nofollow" style="margin-left:25px;"><img src="images/sponsors/logo_clearstory.jpg" style="padding: 0;" /></a></div></div>'+
				'<div class="col50" style="min-height:295.8px;"><h2>Supporting Sponsors</h2><div class="y17-sponsors"><a href="http://www.commarts.com" target="_blank" rel="nofollow"><img src="images/sponsors/logo_commarts.jpg" /></a><a href="http://blendsd.com/" target="_blank" rel="nofollow"><img src="images/sponsors/logo_blend.jpg" /></a><a href="http://www.groovylikeamovie.com" target="_blank" rel="nofollow"><img src="images/sponsors/logo_groovy.jpg" /></a><a href="http://www.jacobtyler.com" target="_blank"><img src="images/sponsors/logo_jacobtyler.jpg" /></a><a href="http://www.mohawkpaperstore.com" target="_blank" rel="nofollow"><img src="images/sponsors/logo_mohawk.jpg" /></a><a href="http://www.neenahpaper.com/" target="_blank" rel="nofollow"><img src="images/sponsors/logo_neenah.jpg" /></a><a href="http://www.neyenesch.com/" target="_blank" rel="nofollow"><img src="images/sponsors/logo_neyenesch.jpg" /></a><a href="http://www.sandiegofoil.com/" target="_blank" rel="nofollow"><img src="images/sponsors/logo_sdfoilemboss.jpeg" /></a></div></div>'+
				'</div>'
        }],
        onCreate: function () { 
            //$('#sponsors').tinyscrollbar();
        },
        onHash: function (a) {
        },
        onActivate: function (a) {
		arrows.reset();
		arrows.openRight( 'Resources', '#Resources' );
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }, {
        id: "Resources",
        size: [960, 600],
        center: [-10, -600],
        elements: [{
            pos: [-135, -72]
            ,html: '<img src="images/resources/h1_resources.png" />'
            ,layer: 6
        },{
            pos: [173.3, -66.6]
            ,layer: 2
            ,html: '<div class="rd-wl-hort" style="width: 649px">&nbsp;</div>'
        },{
            pos: [-190, 180]
            ,layer: 3
            ,html: '<img src="images/global/hatch2.png" />'
        },{
            pos: [-294.62, 140.85]
            ,layer: 4
            ,html: '<div class="rd-w-br">&nbsp;</div>'
        },{
            pos: [-254.79, 17.8]
            ,layer: 4
            ,html: '<div class="rd-w-vert" style="height: 123px;">&nbsp;</div>'
        },{
            pos: [-214.58, -117.46]
            ,layer: 4
            ,html: '<div class="rd-w-tl">&nbsp;</div>'
        },{
            pos: [112.0, -171]
            ,layer: 4
            ,html: '<div class="rd-w-hort" style="width: 854px;" >&nbsp;</div>'
        },{
            pos: [0, 40]
            ,layer: 6
            ,html: '<div id="resources">'+
				'<div class="col50"><h2>Questions?</h2><p>Email Greg Laubach, Y17 Committee chair at: <a href="mailto:info@aigasandiego.org" target="_blank">info@aigasandiego.org</a></p></div>'+
				'<div class="col50"><h2>Sponsorship Opportunities</h2><p>Download our Sponsor Kit to discover the benefits of sponsoring this amazing event. <a href="pdf/AIGA_SponsorPack_2011-12.pdf" target="_blank">Click here</a></p></div>'+
				'<div class="col50"><h2>Y-Conference Archives</h2><p><a target="_blank" href="http://y-conference.com/y8/">Y8</a> / <a target="_blank" href="http://y-conference.com/y9/">Y9</a> / <a target="_blank" href="http://y-conference.com/y10/">Y10</a> / <a target="_blank" href="http://y-conference.com/y11/">Y11</a> / <a target="_blank" href="http://y-conference.com/y12/">Y12</a> / <a target="_blank" href="http://y-conference.com/y13/">Y13</a> / <a target="_blank" href="http://y-conference.com/y14/">Y14</a> / <a target="_blank" href="http://y-conference.com/y15/">Y15</a> / <a target="_blank" href="http://y-conference.com/y16/">Y16</a></p></div>'+
				'</div>'
        },{
            pos: [2, -40]
            ,html: '<div class="intro"><h2>Some extras for you.</h2><p>Are you a media expert or PR person? Do you want to know what the past conferences have been like? Or, if you just have some straight forward questions. Well, here you go.</p></div>'
            ,layer: 6
        }],
        onCreate: function () { 
            
        },
        onHash: function (a) {
        },
        onActivate: function (a) {
		arrows.reset();
		arrows.openLeft( 'Sponsors', '#Sponsors' );
		arrows.openRight( 'Join The <br />Conversation', '#Join-the-Conversation' );
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }, {
        id: "Join-the-Conversation",
        size: [960, 600],
        center: [650, -750],
        elements: [{
            pos: [-100, -72]
            ,html: '<img src="images/join-the-conversation/h1_join-the-convo.png" />'
            ,layer: 6
        },{
            pos: [80.8, -57.0]
            ,layer: 2
            ,html: '<div class="rd-wl-odd">&nbsp;</div>'
        },{
            pos: [373, -184]
            ,layer: 2
            ,html: '<div class="rd-wl-hort" style="width: 97px;">&nbsp;</div>'
        },{
            pos: [500.75, -227]
            ,layer: 2
            ,html: '<div class="rd-wl-br">&nbsp;</div>'
        },{
            pos: [537, -811.5]
            ,layer: 2
            ,html: '<div class="rd-wl-vert" style="height: 1000px;">&nbsp;</div>'
        },{
            pos: [-103.85, 74.4]
            ,layer: 4
            ,html: '<div class="rd-w-odd">&nbsp;</div>'
        },{
            pos: [186.45, 119.6]
            ,layer: 4
            ,html: '<div class="rd-w-br">&nbsp;</div>'
        },{
            pos: [226.2, -525]
            ,layer: 4
            ,html: '<div class="rd-w-vert" style="height: 2000px;">&nbsp;</div>'
        },{
            pos: [-380, -70]
            ,layer: 3
            ,html: '<img src="images/global/hatch3.png" />'
        },{
            pos: [192, 56]
            ,layer: 6
            ,html: '<div id="conversation">'+
				'<div class="col-facebook"><iframe src="facebook-widget.html"></iframe></div></div>'+
				'</div>'
        },{
            pos: [2, -45]
            ,html: '<div class="intro"><p>Tweet us or Facebook us and let us know what drives you as a designer? Is it the opportunity to create something new? Work as a team. Change the world? We want to know! Also, don’t miss our contest on Facebook to win a free conference pass!</p></div>'
            ,layer: 6
        },{
            pos: [-97, 85]
            ,html: '<div id="what-drives">'+
'<div class="col-tweetback"><iframe src="tweetback.html"></iframe></div></div>'
            ,layer: 6
        },{
            pos: [2, -40]
            ,html: "<div class='intro'></div>"
            ,layer: 6
        }],
        onCreate: function () { 
        },
        onHash: function (a) {
        },
        onActivate: function (a) {
		arrows.reset();
		arrows.openLeft( 'Resources', '#Resources' );
        },
        onDeactivate: function () {
		arrows.closer();
	}
    }];


if (typeof console == "undefined")(function (a) {
    function b() {}
    for (var c = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","), d; d = c.pop();) a[d] = a[d] || b
})(window.console = window.console || {});
if (!Number.toFixed) Number.prototype.toFixed = function (a) {
    return Math.round(this * Math.pow(10, a)) / Math.pow(10, a)
};

function hexToRGB(a) {
    a[0] == "#" && (a = a.substr(1));
    if (a.length != 6) return [0, 0, 0];
    var b = [0, 0, 0];
    b[0] = parseInt(a.substr(0, 2), 16);
    b[1] = parseInt(a.substr(2, 2), 16);
    b[2] = parseInt(a.substr(4, 2), 16);
    return b[0] <= 255 && b[1] <= 255 && b[2] <= 255 ? b : [0, 0, 0]
}
function RGBToHex(a) {
    for (var b = [], c = 0; c < 3; c++) b[c] = a[c].toString(16), b[c].length < 2 && (b[c] = "0" + b[c]);
    return "#" + b.join("")
}
var userInput = {
    _enabled: !0,
    deltaVel: [0, 0],
    touchPos: [],
    keyVel: 100,
    active: [],
    pgup: 33,
    pgdown: 34,
    left: 37,
    up: 38,
    right: 39,
    down: 40,
    setEnabled: function (a) {
        userInput._enabled = a;
        if (a == !1) userInput.active = []
    },
    inputVel: function () {
        var a = userInput.keyVel,
            b = userInput.deltaVel,
            c;
        for (c in userInput.active) if (userInput.active[c] != !1) switch (parseInt(c)) {
        case userInput.left:
            b[0] -= a;
            break;
        case userInput.up:
            b[1] -= a;
            break;
        case userInput.right:
            b[0] += a;
            break;
        case userInput.down:
            b[1] += a;
            break;
        case 36:
            director.moveToScene(stage.currentScene)
        }
        userInput.deltaVel = [0, 0];
        return b
    },
    clearInputs: function () {
        userInput.active = []
    },
    onDown: function (a) {
        if (!(a.which < 33 || a.which > 40)) if (a.preventDefault(), userInput._enabled != !1) switch (a.which) {
        case userInput.pgup:
            director.moveRelativeScene(-1);
            break;
        case userInput.pgdown:
            director.moveRelativeScene(1);
            break;
        default:
            userInput.active[a.which] = !0
        }
    },
    onUp: function (a) {
        a.preventDefault();
        userInput.active[a.which] = !1
    },
    onTouchStart: function (a) {
        if (userInput._enabled != !1) {
            a.preventDefault();
            var b = a.originalEvent.touches[0];
            userInput.touchPos = [b.pageX, b.pageY];
            $("#loading").text("touch: 0x0 " + a.originalEvent.touches.length)
        }
    },
    onTouchMove: function (a) {
        if (userInput._enabled != !1) {
            a.preventDefault();
            var a = a.originalEvent.touches[0],
                b = [userInput.touchPos[0] - a.pageX, userInput.touchPos[1] - a.pageY];
            userInput.touchPos = [a.pageX, a.pageY];
            userInput.deltaVel[0] += b[0];
            userInput.deltaVel[1] += b[1];
            $("#loading").text("touch: " + b.join("x"))
        }
    },
    onTouchEnd: function (a) {
        a.preventDefault();
        userInput.touchPos = [null, null];
        $("#loading").text("touchend")
    }/*,
    onScroll: function (a, b) { BL COMMENT
        userInput._enabled != !1 && (b > 0 ? userInput.deltaVel[0] -= Math.log(b * 100) * 500 : userInput.deltaVel[0] += Math.log(-b * 100) * 500)
    }*/
};
$.fn.extend({
    compatFadeIn: function (a, b) {
        if (director.fx.opacity) return $(this).fadeIn(a, b);
        else {
            var c = $(this).css("display", "block");
            typeof b == "function" && b.call();
            return c
        }
    },
    compatFadeOut: function (a, b) {
        if (director.fx.opacity) return $(this).fadeOut(a, b);
        else {
            var c = $(this).css("display", "none");
            typeof b == "function" && b.call();
            return c
        }
    },
    compatFaded: function (a) {
        return director.fx.opacity ? $(this).css("opacity", a ? "0.5" : "1") : $(this).css("display", a ? "none" : "block")
    }
});

$.easing.jswing = $.easing.swing;
$.extend($.easing, {
    def: "easeOutQuad",
    swing: function (a, b, c, d, e) {
        return $.easing[$.easing.def](a, b, c, d, e)
    },
    easeInQuad: function (a, b, c, d, e) {
        return d * (b /= e) * b + c
    },
    easeOutQuad: function (a, b, c, d, e) {
        return -d * (b /= e) * (b - 2) + c
    },
    easeInOutQuad: function (a, b, c, d, e) {
        return (b /= e / 2) < 1 ? d / 2 * b * b + c : -d / 2 * (--b * (b - 2) - 1) + c
    },
    easeInCubic: function (a, b, c, d, e) {
        return d * (b /= e) * b * b + c
    },
    easeOutCubic: function (a, b, c, d, e) {
        return d * ((b = b / e - 1) * b * b + 1) + c
    },
    easeInOutCubic: function (a, b, c, d, e) {
        return (b /= e / 2) < 1 ? d / 2 * b * b * b + c : d / 2 * ((b -= 2) * b * b + 2) + c
    },
    easeInQuart: function (a, b, c, d, e) {
        return d * (b /= e) * b * b * b + c
    },
    easeOutQuart: function (a, b, c, d, e) {
        return -d * ((b = b / e - 1) * b * b * b - 1) + c
    },
    easeInOutQuart: function (a, b, c, d, e) {
        return (b /= e / 2) < 1 ? d / 2 * b * b * b * b + c : -d / 2 * ((b -= 2) * b * b * b - 2) + c
    },
    easeInQuint: function (a, b, c, d, e) {
        return d * (b /= e) * b * b * b * b + c
    },
    easeOutQuint: function (a, b, c, d, e) {
        return d * ((b = b / e - 1) * b * b * b * b + 1) + c
    },
    easeInOutQuint: function (a, b, c, d, e) {
        return (b /= e / 2) < 1 ? d / 2 * b * b * b * b * b + c : d / 2 * ((b -= 2) * b * b * b * b + 2) + c
    },
    easeInSine: function (a, b, c, d, e) {
        return -d * Math.cos(b / e * (Math.PI / 2)) + d + c
    },
    easeOutSine: function (a, b, c, d, e) {
        return d * Math.sin(b / e * (Math.PI / 2)) + c
    },
    easeInOutSine: function (a, b, c, d, e) {
        return -d / 2 * (Math.cos(Math.PI * b / e) - 1) + c
    },
    easeInExpo: function (a, b, c, d, e) {
        return b == 0 ? c : d * Math.pow(2, 10 * (b / e - 1)) + c
    },
    easeOutExpo: function (a, b, c, d, e) {
        return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c
    },
    easeInOutExpo: function (a, b, c, d, e) {
        return b == 0 ? c : b == e ? c + d : (b /= e / 2) < 1 ? d / 2 * Math.pow(2, 10 * (b - 1)) + c : d / 2 * (-Math.pow(2, -10 * --b) + 2) + c
    },
    easeInCirc: function (a, b, c, d, e) {
        return -d * (Math.sqrt(1 - (b /= e) * b) - 1) + c
    },
    easeOutCirc: function (a, b, c, d, e) {
        return d * Math.sqrt(1 - (b = b / e - 1) * b) + c
    },
    easeInOutCirc: function (a, b, c, d, e) {
        return (b /= e / 2) < 1 ? -d / 2 * (Math.sqrt(1 - b * b) - 1) + c : d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c
    },
    easeInElastic: function (a, b, c, d, e) {
        var a = 1.70158,
            f = 0,
            j = d;
        if (b == 0) return c;
        if ((b /= e) == 1) return c + d;
        f || (f = e * 0.3);
        j < Math.abs(d) ? (j = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / j);
        return -(j * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - a) * 2 * Math.PI / f)) + c
    },
    easeOutElastic: function (a, b, c, d, e) {
        var a = 1.70158,
            f = 0,
            j = d;
        if (b == 0) return c;
        if ((b /= e) == 1) return c + d;
        f || (f = e * 0.3);
        j < Math.abs(d) ? (j = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / j);
        return j * Math.pow(2, -10 * b) * Math.sin((b * e - a) * 2 * Math.PI / f) + d + c
    },
    easeInOutElastic: function (a, b, c, d, e) {
        var a = 1.70158,
            f = 0,
            j = d;
        if (b == 0) return c;
        if ((b /= e / 2) == 2) return c + d;
        f || (f = e * 0.3 * 1.5);
        j < Math.abs(d) ? (j = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / j);
        return b < 1 ? -0.5 * j * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - a) * 2 * Math.PI / f) + c : j * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - a) * 2 * Math.PI / f) * 0.5 + d + c
    },
    easeInBack: function (a, b, c, d, e, f) {
        f == void 0 && (f = 1.70158);
        return d * (b /= e) * b * ((f + 1) * b - f) + c
    },
    easeOutBack: function (a, b, c, d, e, f) {
        f == void 0 && (f = 1.70158);
        return d * ((b = b / e - 1) * b * ((f + 1) * b + f) + 1) + c
    },
    easeInOutBack: function (a, b, c, d, e, f) {
        f == void 0 && (f = 1.70158);
        return (b /= e / 2) < 1 ? d / 2 * b * b * (((f *= 1.525) + 1) * b - f) + c : d / 2 * ((b -= 2) * b * (((f *= 1.525) + 1) * b + f) + 2) + c
    },
    easeInBounce: function (a, b, c, d, e) {
        return d - $.easing.easeOutBounce(a, e - b, 0, d, e) + c
    },
    easeOutBounce: function (a, b, c, d, e) {
        return (b /= e) < 1 / 2.75 ? d * 7.5625 * b * b + c : b < 2 / 2.75 ? d * (7.5625 * (b -= 1.5 / 2.75) * b + 0.75) + c : b < 2.5 / 2.75 ? d * (7.5625 * (b -= 2.25 / 2.75) * b + 0.9375) + c : d * (7.5625 * (b -= 2.625 / 2.75) * b + 0.984375) + c
    },
    easeInOutBounce: function (a, b, c, d, e) {
        return b < e / 2 ? $.easing.easeInBounce(a, b * 2, 0, d, e) * 0.5 + c : $.easing.easeOutBounce(a, b * 2 - e, 0, d, e) * 0.5 + d * 0.5 + c
    }
});
(function (a) {
    a.browserTest = function (b, c) {
        var d = function (a, b) {
                for (var c = 0; c < b.length; c += 1) a = a.replace(b[c][0], b[c][1]);
                return a
            },
            e = function (b, c, e, E) {
                c = {
                    name: d((c.exec(b) || ["unknown", "unknown"])[1], e)
                };
                c[c.name] = !0;
                c.version = (E.exec(b) || ["X", "X", "X", "X"])[3];
                if (c.name.match(/safari/) && c.version > 400) c.version = "2.0";
                if (c.name === "presto") c.version = a.browser.version > 9.27 ? "futhark" : "linear_b";
                c.versionNumber = parseFloat(c.version, 10) || 0;
                c.versionX = c.version !== "X" ? (c.version + "").substr(0, 1) : "X";
                c.className = c.name + c.versionX;
                return c
            },
            b = (b.match(/Opera|Navigator|Minefield|KHTML|Chrome/) ? d(b, [
                [/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ""],
                ["Chrome Safari", "Chrome"],
                ["KHTML", "Konqueror"],
                ["Minefield", "Firefox"],
                ["Navigator", "Netscape"]
            ]) : b).toLowerCase();
        a.browser = a.extend(!c ? a.browser : {}, e(b, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/));
        a.layout = e(b, /(gecko|konqueror|msie|opera|webkit)/, [
            ["konqueror", "khtml"],
            ["msie", "trident"],
            ["opera", "presto"]
        ], /(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);
        a.os = {
            name: (/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase()) || ["unknown"])[0].replace("sunos", "solaris")
        };
        c || a("html").addClass([a.os.name, a.browser.name, a.browser.className, a.layout.name, a.layout.className].join(" "))
    };
    a.browserTest(navigator.userAgent)
})(jQuery);
var director = {
        fx: {
            opacity: !0,
            anims: !0
        },
        status: function (a) {
            $("#status").text(a)
        },
        init: function () {
            if (!($.browser.name == "msie" && $.browser.versionNumber <= 6)) {
                $(".jsshow").css("display", "block");
                var a = $("#container");
                /*$(document).keydown(userInput.onDown).keyup(userInput.onUp);
                $(a).bind({
                    touchmove: userInput.onTouchMove,
                    touchstart: userInput.onTouchStart,
                    touchend: userInput.onTouchEnd,
                    touchcancel: userInput.onTouchEnd
                });*/
                $(window).blur(userInput.clearInputs);
                /*$(document).bind("gesturestart gesturechange", function (a) {
                    a.preventDefault()
                });*/
                $(document).bind("mousedown mouseup", function (a) {
                    a.target.tagName == "IMG" && a.preventDefault()
                });
                //$(a).mousewheel(userInput.onScroll); BL
                $(window).resize(director.onResize);
                $(window).hashchange(director.onHashChange);
                if ($.browser.name == "msie" && $.browser.version <= 8) director.fx.opacity = !1;
                //miniMap.init();
                stage.init();
            }
        },
        loadingCount: 0,
        loading: function (a) {
            director.loadingCount += a;
            director.loadingCount <= 0 ? $("#loading").compatFadeOut("fast") : director.loadingCount >= 1 && $("#loading").compatFadeIn("fast").css("margin-bottom", director.loadingCount - 1 + "px")
        },
        onResize: function () {
            stage.onResize();
            stage.positionElements();
        },
        onHashChange: function () {

			if( parseInt($('#frame_right').css('right')) > -60 ){  $("#frame_right").stop().animate({right: '-=60'},300, function(){$(this).css('right', -60 ); }); } // default right: -60px;

			if( parseInt($('#frame_left').css('left')) > -60 ){ $("#frame_left").stop().animate({left: '-=60'},300, function(){$(this).css('left', -60); }); }  // default left: -60px;
			
			if( parseInt($('#frame_up').css('top')) > 80 ){ $("#frame_up").stop().animate({top: '-=50'},300, function(){$(this).css('top', 80); }); }     // default top: 80px;
			
			if( parseInt($('#frame_down').css('bottom')) > -10 ){ $("#frame_down").stop().animate({bottom: '-=50'},300, function(){$(this).css('bottom', -10); } ); } // default bottom: -10px;
	
            var a = window.location.hash.substr(1).split("/").shift(),
                b = 0;
            if (a.length) for (var c = 0; c < scenes.length; c++) if (scenes[c].id == a) {
                b = c;
                break
            }
            if (stage.currentScene != b) director.moveToScene(b);
            else scenes[stage.currentScene].onHash(window.location.hash)
        },
        autoMoveTo: null,
        autoMoveFrom: null,
        autoMoveTimes: null,
        moveToScene: function (a) {
            if (userInput._enabled != !1) {
                userInput.setEnabled(!1);
                director.autoMoveFrom = [stage.stageX, stage.stageY];
                director.autoMoveTo = [scenes[a].center[0], scenes[a].center[1]];
                var b = (new Date).getTime();
                director.autoMoveTimes = [b, b + 1500];
                stage.createScene(a)
            }
        },
        moveRelativeScene: function (a) {
            userInput._enabled != !1 && (a = a < 0 ? scenes[stage.currentScene].prevScene(stage.currentScene) : scenes[stage.currentScene].nextScene(stage.currentScene), parseInt(a) >= 0 && director.moveToScene(a))
        },
        autoMovement: function () {
            if (director.autoMoveTo == null) return [0, 0];
            if (Math.abs(stage.stageX - director.autoMoveTo[0]) < 4 && Math.abs(stage.stageY - director.autoMoveTo[1]) < 4) return userInput.setEnabled(!0), director.autoMoveTo = null, [0, 0];
            var a = (new Date).getTime() - director.autoMoveTimes[0],
                b = director.autoMoveTimes[1] - director.autoMoveTimes[0],
                a = a > b ? b : a,
                c = director.autoMoveTo[0] - director.autoMoveFrom[0],
                d = director.autoMoveTo[1] - director.autoMoveFrom[1];
            (a /= b / 2) < 1 ? (b = c / 2 * Math.pow(a, 4) + director.autoMoveFrom[0], a = d / 2 * Math.pow(a, 4) + director.autoMoveFrom[1]) : (a -= 2, b = -c / 2 * (Math.pow(a, 4) - 2) + director.autoMoveFrom[0], a = -d / 2 * (Math.pow(a, 4) - 2) + director.autoMoveFrom[1]);
            return [stage.stageX - b, stage.stageY - a]
        },
        sceneHandlers: function (a) {
            $("[placeholder]", a).each(function () {
                var a = $(this);
                if (a.val() == "" || a.val() == a.attr("placeholder")) a.addClass("placeholder"), a.val(a.attr("placeholder"))
            }).focus(function () {
                var a = $(this);
                a.val() == a.attr("placeholder") && (a.val(""), a.removeClass("placeholder"))
            }).blur(function () {
                var a = $(this);
                if (a.val() == "" || a.val() == a.attr("placeholder")) a.addClass("placeholder"), a.val(a.attr("placeholder"))
            }).parents("form").submit(function () {
                $(this).find("[placeholder]").each(function () {
                    var a = $(this);
                    a.val() == a.attr("placeholder") && a.val("")
                })
            })
        }
    },
    stage = {
        frameTimer: 0,
        stageX: 0,
        stageY: 0,
        stageOffset: [0, 0],
        wishVel: [0, 0],
        width: $(window).width(),
        height: $(window).height(),
        onFrameCallbacks: [],
        lastFrameTime: 0,
        friction: 45,
        llaxability: 4,
        fpsHistory: {
            timerDelays: [16, 25, 33, 40],
            curDelay: 0,
            slowFrames: 0,
            history: [],
            lastI: -1,
            add: function (a) {
                this.lastI = ++this.lastI % 30;
                this.history[this.lastI] = a;
                a > this.timerDelays[this.curDelay] * 0.001 + 0.03 ? this.slowFrames++ : this.slowFrames = 0;
                if (this.slowFrames > 21 && this.curDelay + 1 < this.timerDelays.length) this.slowFrames = 0, this.curDelay++, clearInterval(stage.frameTimer), stage.frameTimer = setInterval(stage.onFrame, this.timerDelays[this.curDelay])
            },
            average: function () {
                var a = 0,
                    b;
                for (b in this.history) a += this.history[b];
                return a / this.history.length
            }
        },
        currentScene: null,
        init: function () {
            var a, b = window.location.hash.substr(1).split("/").shift() || "home",
                c;
            for (c in scenes) scenes[c] = $.extend({}, baseScene, scenes[c]), scenes[c].id == b && (a = c);
            a = a || 0;
            stage.createScene(a);
            stage.stageX = scenes[a].center[0];
            stage.stageY = scenes[a].center[1];
            stage.wishVel[1] = -10;
            stage.activateScene(a, !0);
            stage.positionElements(a);
            stage.checkSceneBounds(scenes[a]);
            scenes[a].onHash(window.location.hash);
            stage.frameTimer = setInterval(stage.onFrame, 16);
            stage.lastFrameTime = (new Date).getTime()
        },
        onResize: function () {
            stage.width = $(window).width();
            stage.height = $(window).height();
            stage.checkSceneBounds(scenes[stage.currentScene])
        },
        onFrame: function () {
            var a = (new Date).getTime(),
                b = (a - stage.lastFrameTime) / 1E3;
            stage.lastFrameTime = a;
            stage.fpsHistory.add(b);
            if (stage.currentScene != null) {
                var a = scenes[stage.currentScene],
                    c, d = userInput.inputVel();
                if (d[1] != 0 || d[0] != 0) for (c = 0; c <= 1; c++) stage.wishVel[c] += d[c] * b;
                d = 900 * b;
                for (c = 0; c <= 1; c++) stage.wishVel[c] >= d ? stage.wishVel[c] = d : stage.wishVel[c] < -d && (stage.wishVel[c] = -d);
                b *= stage.friction;
                for (c = 0; c <= 1; c++) stage.wishVel[c] > b ? stage.wishVel[c] -= b : stage.wishVel[c] < -b ? stage.wishVel[c] += b : stage.wishVel[c] = 0;
                b = stage.stageX >= a.center[0] ? a.nextScene(stage.currentScene) : a.prevScene(stage.currentScene);
                userInput._enabled == !0 && (a = parseInt(b) >= 0 && typeof scenes[b] != "undefined" ? stage.perfectCenterY(a.center, scenes[b].center) : a.center[1], stage.wishVel[1] -= (stage.stageY + stage.wishVel[1] - a) / 15);
                stage.panStage(stage.wishVel[0], stage.wishVel[1]);
                for (c = 0; c < stage.onFrameCallbacks.length; c++) stage.onFrameCallbacks[c].call()
            }
        },
        panStage: function (a, b) {
            var c = director.autoMovement();
            a -= c[0];
            b -= c[1];
            a = a.toFixed(1);
            b = b.toFixed(1);
            if (!(a == 0 && b == 0)) {
                var c = scenes[stage.currentScene],
                    d;
                if (a > 0) {
                    var e = c.center[0] + c.size[0] / 2;
                    stage.stageX + a >= e && (d = c.nextScene(stage.currentScene))
                } else a < 0 && (e = c.center[0] - c.size[0] / 2, stage.stageX + a < e && (d = c.prevScene(stage.currentScene)));
                if (typeof d == "undefined" || d < 0) b > 0 ? (e = c.center[1] + c.size[1] / 2, stage.stageY + b >= e && (d = stage.sceneAtPoint([stage.stageX + a, stage.stageY + b]))) : b < 0 && (e = c.center[1] - c.size[1] / 2, stage.stageY + b < e && (d = stage.sceneAtPoint([stage.stageX + a, stage.stageY + b])));
                parseInt(d) >= 0 && stage.currentScene != d && (c = scenes[d], c.state < 2 && stage.createScene(d), stage.activateScene(d));
                if (c.triggers.length) for (d = 0; d < c.triggers.length; d++) if (e = c.triggers[d].atX + scenes[stage.currentScene].center[0], typeof c.triggers[d].onForward == "function" && stage.stageX < e && stage.stageX + a >= e) c.triggers[d].onForward();
                else if (typeof c.triggers[d].onBackward == "function" && stage.stageX > e && stage.stageX + a <= e) c.triggers[d].onBackward();
                stage.stageX = parseFloat(stage.stageX + a);
                stage.stageY = parseFloat(stage.stageY + b);
                stage.positionElements();
                stage.checkSceneBounds(c)
            }
        },
        sceneAtPoint: function (a) {
            for (var b = 0; b < scenes.length; b++) if (a[0] < scenes[b].center[0] + scenes[b].size[0] / 2 && a[0] >= scenes[b].center[0] - scenes[b].size[0] / 2 && a[1] < scenes[b].center[1] + scenes[b].size[1] / 2 && a[1] >= scenes[b].center[1] - scenes[b].size[1] / 2) return b;
            return null
        },
        checkSceneBounds: function (a) {
            var b;
            b = a.nextScene(stage.currentScene);
            stage.stageX + stage.width / 2 >= a.center[0] + a.size[0] / 2 ? parseInt(b) >= 0 ? stage.createScene(b) : stage.stageX > a.center[0] + 200 && (stage.wishVel[0] -= 10 * (stage.stageX - a.center[0] * 0.015)) : parseInt(b) >= 0 && scenes[b].state >= 2 && stage.hideScene(b);
            b = a.prevScene(stage.currentScene);
            stage.stageX - stage.width / 2 <= a.center[0] - a.size[0] / 2 ? parseInt(b) >= 0 ? stage.createScene(b) : stage.stageX < a.center[0] - 200 && (stage.wishVel[0] += 10 * (a.center[0] - stage.stageX * 0.015)) : parseInt(b) >= 0 && scenes[b].state >= 2 && stage.hideScene(b)
        },
        perfectCenterY: function (a, b) {
            return -(b[1] - a[1]) / 2 * (Math.cos(Math.PI * ((stage.stageX - a[0]) / (b[0] - a[0]))) - 1) + a[1]
        },
        preloadScene: function (a) {
            if (!(scene[a].state > 0)) for (var b, c = 0; c < scenes[a].elements.length; c++) if (b = scenes[a].elements[c].image)(new Image).src = b
        },
        createScene: function (a) {
            if (typeof scenes[a] == "undefined") return !1;
            var b = scenes[a];
            if (b.state >= 1) return stage.showScene(a);
            var c = $("#container");
            b.state = 2;
            for (i in b.elements) {
                var d = b.elements[i],
                    e;
                d.html ? (e = $("<div>" + d.html + "</div>"), d.html.indexOf("<img") >= 0 ? e.find("img").bind("load", stage.loadedElement) : (e.css({
                    top: -2E3,
                    left: -2E3
                }), setTimeout(function () {
                    stage.loadedElement.call(e.get(0))
                }, 800))) : (e = $('<img src="' + d.image + '" />'), e.bind("load", stage.loadedElement));
                director.loading(1);
                d.scene = a;
                d.DOMElement = e;
                e.data("propIndex", [a, i].join(","));
                e.css({
                    visibility: "hidden",
                    position: "absolute",
                    zIndex: Math.floor(d.layer * 10)
                });
                d.layer = 1 + (d.layer - 2) * stage.llaxability * 0.1;
                e.addClass("prop");
                c.append(e)
            }
            //director.sceneHandlers(null);
            b.onCreate()
        },
        activateScene: function (a, b) {
            if (!b) scenes[stage.currentScene].onDeactivate();
            $("#container");
            var c = scenes[a];
            stage.currentScene = parseInt(a);
            if (!b) window.location.hash = c.id;
            c.onActivate(b);
        },
        showScene: function (a) {
            if (!(scenes[a].state >= 2)) {
                var b = $("#container"),
                    c;
                for (c in scenes[a].elements) b.append(scenes[a].elements[c].DOMElement);
                scenes[a].state = 2
            }
        },
        hideScene: function (a) {
            if (typeof scenes[a] == "undefined") return !1;
            if (scenes[a].state < 2) return !1;
            var b = scenes[a].elements,
                c;
            for (c in b) scenes[a].elements[c].DOMElement.detach();
            scenes[a].state = 1
        },
        loadedElement: function () {
            var a = $(this).closest(".prop");
            stage.positionProp(a);
            director.loading(-1)
        },
        positionElements: function (a) {
            if (typeof a == "undefined") for (a = 0; a < scenes.length; a++) {
                if (!(scenes[a].state < 2)) for (var b in scenes[a].elements) stage.positionElement.call(scenes[a].elements[b])
            } else for (b in scenes[a].elements) stage.positionElement.call(scenes[a].elements[b])
        },
        positionProp: function (a) {
            if ((a = a.data("propIndex")) && a.length > 0) a = a.split(","), a = scenes[a[0]].elements[a[1]], typeof a == "object" && stage.positionElement.call(a)
        },
        positionElement: function () {
            if (this.DOMElement != void 0) {
                var a = this.DOMElement[0],
                    b = this,
                    c = $.layout.className;
                if (b.size === void 0 || c == "trident8" || c == "trident7" || c == "trident9" || c == "prestof") {
                    var d = [parseFloat(a.offsetWidth), parseFloat(a.offsetHeight)];
                    if (d[0] > 0 && d[1] > 0) b.size = d;
                    else {
                        setTimeout(function () {
                            stage.positionElement.call(b)
                        }, 500);
                        return
                    }
                }
                var d = scenes[b.scene],
                    e = (stage.stageY - (d.center[1] + b.pos[1])) * b.layer;
                a.style.left = stage.width / 2 - b.size[0] / 2 - (stage.stageX - (d.center[0] + b.pos[0])) * b.layer + "px";
                a.style.top = stage.height / 2 - b.size[1] / 2 - e + "px";
                if (b.loaded != !0) a.style.visibility = "visible", a.style.position = "absolute", b.loaded = !0, b.html && b.html.indexOf("home_video") > -1 && (c == "trident8" || c == "trident7" || c == "prestof") && stage.panStage(0, -5)
            }
        }
    },
    modalPopup = {
        create: function (a, b, c) {
            $("div.modalPopup").hide();
            userInput.setEnabled(!1);
            var d = $('<div class="modalPopup">').html(a);
            b && d.addClass(b);
            if (c) modalPopup.closeCallback = c;
            d.hide();
            d.find("img").bind("load", modalPopup.position);
            d.find("a.close").click(function () {
                $(document).click()
            });
            d.click(function (a) {
                a.stopPropagation()
            });
            $(document).one("click", jQuery.proxy(modalPopup.close, d));
            $("#container").append(d);
            d.compatFadeIn(200);
            setTimeout(function () {
                modalPopup.position.call(d)
            }, 200);
            modalPopup.position.call(d);
            return d
        },
        position: function () {
            var a = $(this).closest(".modalPopup"),
                b = scenes[stage.currentScene].center;
            a.width() > 0 && a.height() > 0 && a.css({
                left: b[0] - stage.stageX + stage.width / 2 - a.width() / 2,
                top: b[1] - stage.stageY + stage.height / 2 - a.height() / 2
            })
        },
        close: function () {
            var a = $(this).closest(".modalPopup");
            a.find("video, embed").remove();
            a.compatFadeOut(200, function () {
                a.remove()
            });
            userInput.setEnabled(!0);
            typeof FB == "object" && FB.Dialog.remove(FB.Dialog._active);
            if (typeof modalPopup.closeCallback == "function") modalPopup.closeCallback(), modalPopup.closeCallback = null
        }
    };
$(director.init);
