Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=1"> 
  <meta name="apple-mobile-web-app-capable" content="yes">
  <title>MXManual</title>
  <link href="css/jqueryui.css" rel="stylesheet" type="text/css">
  <link href="css/jquery.mobile-1.4.2.min.css" rel="stylesheet" type="text/css">
  <link href="css/nprogress.css" rel="stylesheet" type="text/css">
  <link href="css/MXManual.css" rel="stylesheet" type="text/css">
  <link href="css/schematics.css" rel="stylesheet" type="text/css">
  <link rel="apple-touch-icon" href="thumb.png">
</head>
<body>
  <div data-role="page">

<!-- HEADER, BUTTONS, TAB ROW, FSI LOGO -->
    <div id="header">
      <div class='back_btn'></div>
      <button id='menu_btn' data-inline='true'>MENU</button>
      <button id='images_btn' data-inline='true'>IMAGES</button>
      <button id='prev' class='page_control' data-inline='true'>PREV</button>
      <button id='next' class='page_control' data-inline='true'>NEXT</button>

      <div id="header_links">
        <li gotoURL="review_area">Review Notes</li>|
        <li gotoURL="animated_schematics">Animated Schematics</li>|
        <li gotoURL="acronyms">Acronyms</li>|
        <li gotoURL="synoptics">Synoptics</li>|
        <li gotoURL="home_page" class="head_active">Home</li>
      </div>

      <div id="fsi_logo"></div>
    </div>    

<!-- HOME PAGE -->
    <div id="home_page" class="MXPage">
      <canvas id="plane_view" width="650" height="650"></canvas>
      <canvas id="plane_view_touch" width="650" height="650"></canvas>
      
    </div>

<!-- PAGE BY PAGE MTM -->
    <div id="book_page" class="MXPage"></div>

<!-- ANIMATED SCHEMATICS PAGE -->
    <div id="animated_schematics" class="MXPage">
      <div id="schematics_holder"></div>
    </div>

<!-- ACRONYM LIST -->
    <div id="acronyms" class="MXPage">
      <div id="acronyms_page"></div>
      <div id="alphabet">
        <li>!</li>
        <li>A</li>
        <li>B</li>
        <li>C</li>
        <li>D</li>
        <li>E</li>
        <li>F</li>
        <li>G</li>
        <li>H</li>
        <li>I</li>
        <li>J</li>
        <li>K</li>
        <li>L</li>
        <li>M</li>
        <li>N</li>
        <li>O</li>
        <li>P</li>
        <li>Q</li>
        <li>R</li>
        <li>S</li>
        <li>T</li>
        <li>U</li>
        <li>V</li>
        <li>W</li>
        <li>X</li>
        <li>Y</li>
        <li>Z</li>
        <li>&micro;</li>
      </div>
    </div>

<!-- SEARCHABLE ACRONYM BOX -->
    <div id="acronym_box">
      <div id="acronym_tab">Acronyms</div>
      <form name="search_form" id="search_form">
        <input type="text" autocapitalize="off" autocorrect="off" id="search_text" name="search_text" value="" placeholder="Enter Acronym Here" />
      </form>
      <div id="results"></div>
    </div>

<!-- SYNOPTICS -->
    <div id="synoptics" class="MXPage">
      <div id="synoptics_list"></div>
    </div>

<!-- NOTES -->
    <div id="note_icon"></div>
    <div id="note_pad">
      <textarea id="note_text" autocomplete="off" autocorrect="off" spellcheck="false"></textarea>
      <button id="save_note" data-theme="c" data-inline="true">Save</button>
      <button id="delete_note" data-theme="c" data-inline="true">Delete</button>
      <button id="cancel_note" data-theme="c" data-inline="true">Cancel</button>
    </div>

<!-- NOTES REVIEW -->
    <div id="review_area" class="MXPage">
      <h3>Notes</h3>
      <button id='edit_notes' data-inline='true' data-mini='true' data-theme='c'>Edit Notes</button>
      <button id='copy_notes' data-inline='true' data-mini='true' data-theme='c'>Copy Notes</button>

      <div id="notes_holder"></div>
    </div> 

<!-- SCHEMATICS -->
    <div id="schematic_load" class="MXPage">
      <div id="schematic_background"></div>
      <div class='back_btn'></div>
      <div id="controlsWrap">
      <div id="schematic_slider" class="slider"></div>
      <div id="btnWrap">
        <button class="btn" id="schem_rewind">&#9668;&#9668;</button>
        <button class="btn" id="schem_play">&#9658;</button>
        <button class="btn" id="schem_forward">&#9658;&#9658;</button>
        <button class="btn" id="schem_pause">||</button>
      </div>
    </div>
    </div>

<!-- MAIN MENU -->
    <div id="menu_holder">
      <div id="menu_1" class="menu_box">
        <li ata='LIM'>Limitations and Specifications</li><li ata='2'>ATA 100: Publications</li><li ata='6'>ATA 6-12: Aircraft General</li><li ata='21'>ATA 21: Air Conditioning</li><li ata='22'>ATA 22: Auto Flight</li><li ata='23'>ATA 23: Communications</li><li ata='24'>ATA 24: Electrical Power</li><li ata='25'>ATA 25: Equipment and Furnishings</li><li ata='26'>ATA 26: Fire Protection</li><li ata='27'>ATA 27: Flight Controls</li><li ata='28'>ATA 28: Fuel</li><li ata='29'>ATA 29: Hydraulics</li><li ata='30'>ATA 30: Ice and Rain Protection</li><li ata='31'>ATA 31: Indicating and Recording</li><li ata='32'>ATA 32: Landing Gear</li><li ata='33'>ATA 33: Lights</li><li ata='34'>ATA 34: Navigation</li><li ata='35'>ATA 35: Oxygen</li><li ata='36'>ATA 36: Pneumatics</li>
      </div>
      <div id="menu_2" class="menu_box"></div>
      <div id="menu_3" class="menu_box"></div>
    </div>

<!-- CHAPTER IMAGES -->
    <div id="images_holder" class="MXPage">
      <div id="images_wrapper"></div>
      <div class="dummy_x">X</div>
    </div>

<!-- DEVELOPMENT CONSOLE -->
<!-- <div id="console">TEST</div> -->

  </div>
  <script type="text/javascript" src="js/lib/jquery.js"></script>
  <script type="text/javascript" src="js/lib/jquerymobile.js"></script>
  <script type="text/javascript" src="js/lib/jquerynicescroll.js"></script>
  <script type="text/javascript" src="js/lib/jquery-touchpunch.min.js"></script>
  <script type="text/javascript" src="js/lib/jquery-ui-1.9.2.custom.min.js"></script>
  <script type="text/javascript" src="js/lib/kinetic.js"></script>
  <script type="text/javascript" src="js/lib/kineticPlugin.js"></script>
  <script type="text/javascript" src="js/lib/nprogress.js"></script>
  <script type="text/javascript" src="js/lib/timelinelite.js"></script>
  <script type="text/javascript" src="js/lib/tweenmax.js"></script>
  <script type="text/javascript" src="js/app/models/ChapterImages.js"></script>
  <script type="text/javascript" src="js/app/models/Chapters.js"></script>
  <script type="text/javascript" src="js/app/models/MenuStructure.js"></script>
  <script type="text/javascript" src="js/app/models/Schematics.js"></script>
  <script type="text/javascript" src="js/app/models/SynopticsData.js"></script>
  <script type="text/javascript" src="js/app/Acronyms.js"></script>
  <script type="text/javascript" src="js/app/ChapterPages.js"></script>
  <script type="text/javascript" src="js/app/ChapterSwitch.js"></script>
  <script type="text/javascript" src="js/app/DrawPlanes.js"></script>
  <script type="text/javascript" src="js/app/Helpers.js"></script>
  <script type="text/javascript" src="js/app/ImageThumbs.js"></script>
  <script type="text/javascript" src="js/app/MainMenu.js"></script>
  <script type="text/javascript" src="js/app/MainNavigation.js"></script>
  <script type="text/javascript" src="js/app/MXHistory.js"></script>
  <script type="text/javascript" src="js/app/Notes.js"></script>
  <script type="text/javascript" src="js/app/PageNumber.js"></script>
  <script type="text/javascript" src="js/app/ReviewNotes.js"></script>
  <script type="text/javascript" src="js/app/SchematicLoad.js"></script>
  <script type="text/javascript" src="js/app/ScrollPageNum.js"></script>
  <script type="text/javascript" src="js/app/Synoptics.js"></script>
  <script src="js/Init.js"></script>
</body>
</html>
              
            
!

CSS

              
                .MXPage {
	position:absolute;
	top:50px;
	left:0;
	right:0;
	bottom:0;
	display:none;
}
#console {
	position:absolute;
	bottom:0;
	right:0;
	left:0;
	height:70px;
	overflow:auto;
	background-color:white;
	color:black;
	z-index:99999;
}
/* Animated Schematics */
#animated_schematics {
	display:none;
}
/* acronyms */
#acronyms {
	display:none;
}
#acronyms_page {
	position:absolute;
	top:50px;
	bottom:25px;
	left:0;
	right:0;
	z-index:100;
	overflow:auto;
	padding-left:10px;
	margin-right:50px;
	padding-right:7px;
}
#acronyms_page .app_sector {
	border:1px solid rgb(32,83,146);
	padding:8px;
	margin-bottom:10px;
}
#acronyms_page acro {
	vertical-align:top;
	font-weight:bold;
	display:inline-block;
	width:25%;
}
#acronyms_page def {
	width:75%;
	text-align:left;
	display:inline-block;
}
#acronyms_page li {
	padding:3px;
	border-bottom:1px solid rgb(150,150,150);
	display:block;
}
#acronyms_page .app_key {
	background-color:rgb(32,83,146);
	color:white;
	padding-left:8px;
	text-shadow:none;
	font-weight:bold;
	border-radius:10px;
}
#alphabet {
	position:fixed;
	right:0;
	top:100px;
	bottom:0;
	width:50px;
	background-color:rgb(32,83,146);
	padding-top:7px;
}
#alphabet li {
	list-style-type:none;
	text-align:center;
	border:0;
	line-height:19px;
	font-size:16px;
	font-weight:bold;
	color:white;
	text-shadow:none;
	cursor:pointer;
}
#letter_mag {
	position:fixed;
	width:80px;
	height:80px;
	border-radius:80px;
	background-color:rgb(32,83,146);
	border:2px solid white;
	color:white;
	text-shadow:none;
	z-index:200;
	font-size:30px;
	line-height:80px;
	text-align:center;
}
#alphabet li.acronym_select {
	background-color:white;
	color:rgb(32,83,146);
}
/* Searchable acronyms tab */
#acronym_box {
	position:absolute;
	font-weight:bold;
	font-size:16px;
	text-align:center;
	padding:5px auto 5px auto;
	border:1px solid #B3B3B3;
	background:linear-gradient(rgb(240,240,240), rgb(221,221,221)) repeat scroll 0% 0% rgb(238,238,238);
	background-image:-webkit-linear-gradient(#F0F0F0,#DDD);
	background-image:linear-gradient(#F0F0F0,#DDD);
	color:rgb(62,62,62);
	text-shadow:0px 1px 1px rgb(255,255,255);
	z-index:200;
	border-top-right-radius:15px;
	border-top-left-radius:15px;
	width:220px;
	min-height:100px;
	bottom:-75px;
	right:80px;	
}
#acronym_tab {
	text-align:center;
	cursor:pointer;
}
#acronym_box .ui-input-text {
	width:80%;
	margin-right:auto;
	margin-left:auto;
	color:black;
}
#acronym_box #search_text {
	width:95%;
}
#acronym_box li {
	list-style-type:none;
	text-align:left;
	margin-left:12%;
	margin-top:15px;
	margin-bottom:5px;
}
#acronym_box label {
	margin-bottom:0px;
	font-weight:bold;
}
.ui-page {
	position:absolute;
	top:0;
	right:0;
	bottom:0;
	left:0;
}
.ui-mobile .ui-page-active {
	overflow:hidden;
}
/* synoptics */
#synoptics {
	display:none;
}
#synoptics_list {
	position:absolute;
	top:35px;
	left:25px;
	right:25px;
	bottom:25px;
	overflow:hidden;
	padding-right:8px;
}
#synoptics .syn_thumb {
	position:relative;
	width:200px;
	height:230px;
	background-size:contain;
	background-repeat:no-repeat;
	background-position:center;
	display:inline-block;
	margin:5px;
	margin-bottom:0;
}
#synoptics .syn_sector {
	position:relative;
	height:265px;
	margin-bottom:20px;
	overflow-x:auto;
	overflow-y:hidden;
	white-space:nowrap;
}
#synoptics .syn_key {
	font-size:18px;
	font-weight:bold;
	font-style:italic;
}
#synoptics .syn_caption {
	font-weight:bold;
	background-color:rgba(255,255,255,0.7);
	position:absolute;
	bottom:0;
	right:0;
	left:0;
	padding:3px;
	text-align:center;
}
#synoptics .syn_sector.Syn1_6 {
	height:225px;
}
#synoptics .syn_sector.Syn1_6 .syn_thumb {
	height:190px;
	width:160px;
}
#synoptics .syn_sector.Syn1_6 .syn_caption {
	font-size:14px;
}
/* home page */
#home_page {
	z-index:100;
	top:60px;
	left:10px;
	right:10px;
	display:block;
}
#plane_view {
	float:left;
}
#plane_view_touch {
	position:absolute;
	top:0;
	left:0;
}
#plane_view_data {
	float:left;
	margin-top:50px;
	height:600px;
	width:350px;
	overflow:auto;
	border-radius:15px;
}
#first_view {
	border:1px solid #CCC;
	border-radius:15px;
}
#plane_view_data.pvSelect {
	margin-left:0;
	width:350px;
	background-color:rgba(100,100,100,0.3);
	border:0;
	border-bottom-left-radius:0;
	border-top-left-radius:0;
}
#plane_view_data p {
	padding-left:5px;
	padding-right:5px;
}
#plane_view_data h4 {
	text-align:center;
	font-size:20px;
	margin:5px;
}
#home_page button {
	padding:5px 10px;
	width:150px;
	outline:none;
	cursor:pointer;
	position:absolute;
	top:0;
	right:200px;
}
/*.ui-btn-text:active {
	color:#c77405;
}*/
.ata_link {
	background: rgb(68,101,142); /* Old browsers */
	background: -moz-linear-gradient(top,  rgba(68,101,142,1) 0%, rgba(40,87,145,1) 23%, rgba(7,69,145,1) 42%, rgba(49,91,142,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(68,101,142,1)), color-stop(23%,rgba(40,87,145,1)), color-stop(42%,rgba(7,69,145,1)), color-stop(100%,rgba(49,91,142,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  rgba(68,101,142,1) 0%,rgba(40,87,145,1) 23%,rgba(7,69,145,1) 42%,rgba(49,91,142,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  rgba(68,101,142,1) 0%,rgba(40,87,145,1) 23%,rgba(7,69,145,1) 42%,rgba(49,91,142,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  rgba(68,101,142,1) 0%,rgba(40,87,145,1) 23%,rgba(7,69,145,1) 42%,rgba(49,91,142,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  rgba(68,101,142,1) 0%,rgba(40,87,145,1) 23%,rgba(7,69,145,1) 42%,rgba(49,91,142,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#44658e', endColorstr='#315b8e',GradientType=0 ); /* IE6-9 */
	border-radius:40px;
	height:80px;
	cursor:pointer;
	list-style-type:none;
	color:white;
	text-shadow:none;
	margin:5px;
	margin-right:8px;
	border:1px solid #CCC;
	box-shadow:1px 1px 1px #999;
}
.ata_link:active, .ata_link:hover {
	background: rgb(252,234,187); /* Old browsers */
	background: -moz-linear-gradient(top,  rgba(252,234,187,1) 0%, rgba(252,205,77,1) 18%, rgba(248,181,0,1) 34%, rgba(251,223,147,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,234,187,1)), color-stop(18%,rgba(252,205,77,1)), color-stop(34%,rgba(248,181,0,1)), color-stop(100%,rgba(251,223,147,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  rgba(252,234,187,1) 0%,rgba(252,205,77,1) 18%,rgba(248,181,0,1) 34%,rgba(251,223,147,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  rgba(252,234,187,1) 0%,rgba(252,205,77,1) 18%,rgba(248,181,0,1) 34%,rgba(251,223,147,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  rgba(252,234,187,1) 0%,rgba(252,205,77,1) 18%,rgba(248,181,0,1) 34%,rgba(251,223,147,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  rgba(252,234,187,1) 0%,rgba(252,205,77,1) 18%,rgba(248,181,0,1) 34%,rgba(251,223,147,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#fbdf93',GradientType=0 ); /* IE6-9 */
	color:#333;
}
.ata_link div {
	background-size:contain;
	background-repeat:no-repeat;
	width:59px;
	height:59px;
	margin:10px;
	float:left;
	border:1px solid #999;
	border-radius:50px;
	opacity:0.9;
}
.ata_link h5 {
	font-family:HelvThin;
	margin-top:0;
	padding-top:20px;
	font-size:25px;
	margin-bottom:0;
	font-weight:normal;
}
.ata_link p {
	font-family:HelvThin;
	margin-top:0;
	font-size:16px;
}
#book_page {
	top:50px;
	bottom:25px;
	right:0px;
	z-index:100;
	overflow:auto;
	display:none;
	padding-left:8px;
	padding-right:8px;
}
#book_page page {
	position:relative;
	width:100%;
	height:100%;
	display:none;
}
#book_page h2, #book_page h3, #book_page h4, #book_page h5, #book_page h6, #book_page h7 {
	-webkit-margin-before:0.5em;
	-webkit-margin-after:0.5em;
}
#book_page h1 {
	font-size:18pt;
	margin-bottom:5px;
	margin-top:5px;
}
#book_page h2 {
	font-size:16pt;
}
#book_page h3 {
	font-size:15pt;
}
#book_page h4 {
	font-size:14pt;
}
#book_page h5 {
	font-size:13pt;
}
#book_page h6 {
	font-size:12pt;
}
#book_page h7 {
	font-size:11pt;
	font-weight:bold;
}
#book_page p, #book_page li {
	font-size:11.5pt;
	z-index:80;
}
#book_page li.numbered {
	list-style-type: decimal;
	text-indent:25px;
}
#book_page li.secondary {
	text-indent:15px;
}
#book_page li.tertiary {
	text-indent:30px;
}
#book_page li.fourth {
	text-indent:45px;
}
#book_page p {
	text-align:justify;
}
.columns {
	-moz-column-count:2; /* Firefox */
	-webkit-column-count:2; /* Safari and Chrome */
	column-count:2;
	-moz-column-gap:20px; /* Firefox */
	-webkit-column-gap:20px; /* Safari and Chrome */
	column-gap:20px;
	padding-bottom:25px;
	padding-top:15px;
	height:650px !important;
}
.number {
	position:absolute;
	display:none;
	bottom:20px;
	right:10px;
}
/* /////////////// FOOTER ////////////// */
#footer {
	position:absolute;
	bottom:0px;
	left:0px;
	right:0px;
	padding:3px 5px 3px 5px;
	font-size:12px;
	text-shadow:none;
	font-weight:bold;
	z-index:100;
}
#footer #page_num_holder {
	float:right;
	border:1px solid #AAA;
	border-radius:10px;
	padding:3px 5px;
	background-color:#FFF;
	display:none;
	cursor:pointer;
}
#footer #page_num_holder:active {
	background-color:#CCC;
}
#page_num_finder {
	position:absolute;
	bottom:30px;
	right:5px;
	left:5px;
	background-color:white;
	border:1px solid #AAA;
	height:35px;
	white-space:nowrap;
	overflow-y:auto;
	overflow-x:hidden;
	display:none;
}
#page_num_finder span {
	padding:5px;
	margin:4px;
	line-height:20px;
	font-size:14px;
	height:100%;
	border-bottom-right-radius:8px;
	border-bottom-left-radius:8px;
	background-color:rgba(150,150,150,0.5);
	cursor:pointer;
}
#page_num_finder span.current {
	background-color:white;
}
/* header */
#header {
	position:absolute;
	top:0;
	left:0;
	right:0;
	height:50px;
	border-bottom:1px solid rgb(32,83,146);
	z-index:100;
}
#fsi_logo {
	position:absolute;
	top:55px;
	right:8px;
	background-image:url(../images/fsi_logo_blue.png);
	background-size:contain;
	background-repeat:no-repeat;
	width:170px;
	height:40px;
}
#header button {
	margin-top:8px;
	margin-right:5px;
	float:left;
	padding: 5px 10px 5px 10px;
	outline:none;
}
#prev, #next, #images_btn {
	display:none;
}
#header button.menu_btn_on, .ui-btn:active {
	background:rgb(32,83,146);
	color:white;
}
.back_btn {
	float:left;
	width:40px;
	height:40px;
	background-size:contain;
	background-image:url(../images/back_arrow-01.png);
	background-position:-5px -5px;
	background-size:100px auto;
	margin-top:8px;
	margin-left:10px;
}
#schematic_load .back_btn {
	position:absolute;
	top:0;
	left:0;
}
.back_btn:active {
	background-position:-55px -5px;
}
/* Header TABS */
@font-face {
	font-family:HelvThin;
	src:url(fonts/HelveticaNeueLTStd-Th.otf);
}
#header_links {
	position:absolute;
	right:100px;
	top:22px;
	color:#AAA;
}
#header_links li {
	color:#333;
	font-family:HelvThin;
	list-style-type: none;
	display:inline-block;
	margin-right:4px;
	font-size:17px;
	cursor:pointer;
	padding:3px;
	border-radius:10px;
}
#header_links li:hover {
	color:#c77405;
}
#header_links li:active, #header_links li.head_active {
	background-color:#fbcb09;
	background-color:#fdf5ce;
	color:#c77405;
}
/* All Images */
#images_holder {
	background-color:rgba(0,0,0,0.7);
	z-index:500;
	display:none;	
}
#images_wrapper {
	position:relative;
	margin-right:auto;
	margin-left:auto;
	width:875px;
	height:650px;
	margin-top:5px;
	overflow:auto;
}
.thumb {
	position:relative;
	width:200px;
	height:150px;
	background-color:white;
	float:left;
	margin:8px;
	background-size:contain;
	background-repeat:no-repeat;
	background-position:top center;
}
.thumb_caption {
	position:absolute;
	bottom:3px;
	right:3px;
	left:3px;
	background-color:rgba(255,255,255,0.5);
	font-size:12px;
	font-weight:bold;
}
.dummy_x {
	position:absolute;
	top:35px;
	right:0;
	width:100px;
	height:700px;
	text-align:right;
	padding-top:10px;
	padding-right:15px;
	font-size:22px;
	font-weight:bold;
	color:white;
	cursor:pointer;
}
#zoomed_img .dummy_x {
	color:rgb(50,50,50);
}
/* Menu */
#menu_canvas {
	position:absolute;
	top:0;
	left:0;
}
#menu_holder {
	position:absolute;
	background-color:rgba(255,255,255,0.7);
	top:50px;
	left:0;
	right:0;
	bottom:0;
	z-index:500;
	display:none;
}
.menu_box {
	width:200px;
	position:relative;
	max-height:690px;
	float:left;
	height:auto;
	padding-right:10px;
}
.menu_box li {
	padding:3px 5px;
	list-style-type: none;
	color:#555;
	background: #f2f2f2; /* Old browsers */
	background: -moz-linear-gradient(top,  #f2f2f2 0%, #e1e1e1 38%, #c8c8c8 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f2f2), color-stop(38%,#e1e1e1), color-stop(100%,#c8c8c8)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #f2f2f2 0%,#e1e1e1 38%,#c8c8c8 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #f2f2f2 0%,#e1e1e1 38%,#c8c8c8 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #f2f2f2 0%,#e1e1e1 38%,#c8c8c8 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #f2f2f2 0%,#e1e1e1 38%,#c8c8c8 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f2f2', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */
	margin:3px;
	border:1px solid #b5c6d0;
	cursor:pointer;
	border-radius:10px;
	font-size:14px;
	font-weight:bold;
}
.menu_box li:active, .menu_box li.active_menu_item {
	background:#f2f2f2;
	border-color:black;
	color:#000;
	text-shadow:none;
}
.menu_box .page_number {
	float:right;
	color:#c77405;
	font-size:12px;
}
.menu_box .TOC_num {
	float:left;
	color:rgb(32,83,146);
	margin-right:5px;
	font-size:12px;
}
.menu_box li.active_menu_item .TOC_num {
	color:white;
}
/* Schematics */
#schematics_holder {
	position:absolute;
	top:35px;
	left:25px;
	right:25px;
	bottom:25px;
	overflow:auto;
	padding-right:8px;
}
#schematics_holder .schem_thumb {
	position:absolute;
	top:0;
	left:50px;
	width:150px;
	height:150px;
	background-size:cover;
	background-repeat:no-repeat;
	background-position:center bottom;
	border-radius:80px;
	box-shadow:0px 2px 2px #666;
	border:1px solid #999;
	overflow:hidden;
	cursor:pointer;
}
.schem_thumb .schem_over {
	width:100%;
	height:100%;
	background: -moz-radial-gradient(center, ellipse cover,  rgba(255,255,255,0.52) 11%, rgba(160,160,160,0.27) 70%, rgba(170,170,170,0.15) 100%); /* FF3.6+ */
	background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(11%,rgba(255,255,255,0.52)), color-stop(70%,rgba(160,160,160,0.27)), color-stop(100%,rgba(170,170,170,0.15))); /* Chrome,Safari4+ */
	background: -webkit-radial-gradient(center, ellipse cover,  rgba(255,255,255,0.52) 11%,rgba(160,160,160,0.27) 70%,rgba(170,170,170,0.15) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-radial-gradient(center, ellipse cover,  rgba(255,255,255,0.52) 11%,rgba(160,160,160,0.27) 70%,rgba(170,170,170,0.15) 100%); /* Opera 12+ */
	background: -ms-radial-gradient(center, ellipse cover,  rgba(255,255,255,0.52) 11%,rgba(160,160,160,0.27) 70%,rgba(170,170,170,0.15) 100%); /* IE10+ */
	background: radial-gradient(ellipse at center,  rgba(255,255,255,0.52) 11%,rgba(160,160,160,0.27) 70%,rgba(170,170,170,0.15) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#85ffffff', endColorstr='#26aaaaaa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.schem_thumb .schem_over:hover, .schem_thumb .schem_over:active {
	opacity:0;
}
#schematics_holder li {
	position:relative;
	list-style-type:none;
	display:inline-block;
	width:250px;
	height:250px;
	float:left;
	margin-right:10px;
}
#schematics_holder .schem_caption {
	font-weight:bold;
	text-align:center;
	position:absolute;
	top:160px;
	bottom:0;
	left:0;
	right:0;
}
#schematics_holder .schem_caption span {
	clear:both;
	font-size:14px;
}
#active_btn {
	position:relative;
	clear:both;
	width:580px;
	margin-right:auto;
	margin-left:auto;
	margin-top:25px;
	padding-top:4px;
	padding-bottom:4px;
	text-align:center;
	font-weight:bold;
	border:1px solid rgb(241,218,54);
	background: rgb(254,252,234); /* Old browsers */
	background: -moz-linear-gradient(top,  rgba(254,252,234,1) 0%, rgba(241,218,54,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(254,252,234,1)), color-stop(100%,rgba(241,218,54,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  rgba(254,252,234,1) 0%,rgba(241,218,54,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  rgba(254,252,234,1) 0%,rgba(241,218,54,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  rgba(254,252,234,1) 0%,rgba(241,218,54,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  rgba(254,252,234,1) 0%,rgba(241,218,54,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fefcea', endColorstr='#f1da36',GradientType=0 ); /* IE6-9 */
	border-radius:8px;
	cursor:pointer;
}
#active_btn:active {
	background: rgb(241,218,54); /* Old browsers */
	background: -moz-linear-gradient(top,  rgba(241,218,54,1) 0%, rgba(254,252,234,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(241,218,54,1)), color-stop(100%,rgba(254,252,234,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(254,252,234,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(254,252,234,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(254,252,234,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  rgba(241,218,54,1) 0%,rgba(254,252,234,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1da36', endColorstr='#fefcea',GradientType=0 ); /* IE6-9 */
}
#schematic_load {
	top:0px;
	background-color:#CCC;
	font-family:Arial, Helvetica, sans-serif;
	font-weight:bold;
	font-size:14px;
	display:none;
	z-index:300;
}
.slider {
	width:600px;
	height:15px !important;
	margin:8px 0px 8px 6px !important;
	float:left !important;
	border:1px solid rgb(100,100,100);
	position:relative !important;
}
.ui-slider-handle.ui-state-default {
	border:1px solid rgb(100,100,100);
	border-radius:0;
}
.ui-slider-horizontal .ui-slider-handle {
	top:-0.2em;
}
.ui-slider {
	position:relative !important;
	float:left;
}
#controlsWrap {
	position:absolute;
	bottom:50px;
	left:20px;
}
#schematic_load #btnWrap {
	width:200px;
	height:45px;
	float:left;
	margin-left:20px;
	position:relative !important;
}
#schematic_load .btn {
	width:45px;
	height:45px;
	-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
	-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
	box-shadow:inset 0px 1px 0px 0px #ffffff;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e0e0e0), color-stop(1, #918f91) );
	background:-moz-linear-gradient( center top, #e0e0e0 5%, #918f91 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e0e0e0', endColorstr='#918f91');
	background-color:#e0e0e0;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #dcdcdc;
	display:inline-block;
	color:#545354;
	font-family:Arial;
	font-size:15px;
	font-weight:bold;
	padding:0 2px 2px 2px;
	text-align:center;
	text-decoration:none;
	text-shadow:1px 1px 0px #ffffff;
	outline:none;
}
#schematic_load .btn:active {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #918f91), color-stop(1, #e0e0e0) );
	background:-moz-linear-gradient( center top, #918f91 5%, #e0e0e0 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#918f91', endColorstr='#e0e0e0');
	background-color:#918f91;
}
.schematic_close {
	position:absolute;
	top:50px;
	right:25px;
	width:100px;
	text-align:right;
	height:35px;
	font-size:22px;
	cursor:pointer;
}
.schematic_close:active {
	color:white;
	text-shadow:1px 1px 0px black;
}
.callout {
	background-color:white;
	color:black;
	text-align:center;
	border-radius:10px;
	width:150px;
	position:absolute;
	padding:5px;
	box-shadow:1px 1px 3px #666;
	cursor:pointer;
}
/* Images */
#zoomed_img {
	font-family:Helvetica,Arial,sans-serif;
	position:absolute;
	top:0;
	left:0;
	bottom:0;
	right:0;
	background-color:white;
	background-size:contain;
	background-position:center;
	background-repeat:no-repeat;
	z-index:300;
}
.insert_img {
	position:relative;
	background-size:contain;
	background-repeat:no-repeat;
	background-position:center;
}
.insert_img.right {
	float:right;	
	height:400px;
	width:400px;	
	margin:8px;
	z-index:100;
}
.insert_img.left {
	float:left;
	height:400px;
	width:400px;
	margin:8px;
	z-index:100;
}
.insert_img.full {
	clear:both;
	height:600px;
	width:90%;
	margin-right:5%;
	margin-left:5%;
}
.insert_img.bottom {
	clear:both;
	height:400px;
	width:90%;
	margin-right:5%;
	margin-left:5%;
}
.insert_img.half {
	clear:both;
	height:300px;
	width:90%;
	margin-right:5%;
	margin-left:5%;
}
.insert_img.fourth {
	float:left;
	height:300px;
	width:40%;
	margin-right:5%;
	margin-left:5%;
}
.caption {
	position:absolute;
	bottom:-10px;
	right:0;
	left:0;
	text-align:center;
	font-size:14px;
	/*background-color:rgba(255,255,255,0.4);*/
	font-weight:bold;
}
#zoomed_img .caption {
	bottom:5px;
}
/* Text elements */
cas {
	background-color:black;
	text-shadow:none;
	padding-right:2px;
	padding-left:2px;
	font-weight:bold;
	font-size:14px;
}
.amber {
	color:#FFCD36;
}
.red {
	color:#EC1E24;
}
.blue {
	color:#2AACE2;
}
.pink {
	color:#EC008C;
}
.green {
	color:#50B848;
}
li.indent {
	text-indent:25px;	
}
li.indent2 {
	text-indent:40px;	
}
fignum, tabnum {
	color:red;
	font-weight:bold;
	cursor:pointer;
}
fignum:active {
	color:blue;
}
tabnum {
	color:blue;
}
tabnum:active {
	color:red;
}
.note, .warning, .caution {
	text-align:justify;
	margin-left:10%;
	margin-right:10%;
	margin-bottom:5px;
}
.note_head {
	text-align:center !important;
	font-weight:bold;
}
.warning_head, .caution_head {
	width:150px;
	height:35px;
	background-image:url("../images/warning.png");
	background-size:contain;
	background-repeat:no-repeat;
	margin-left:auto;
	margin-right:auto;
}
.caution_head {
	background-image:url("../images/caution.png");
}
/* Note taking styles */
#note_icon {
	width:45px;
	height:45px;
	background-size:80%;
	background-repeat:no-repeat;
	background-image:url(../images/comment.png);
	background-position:center;
	position:absolute;
	top:50px;
	right:180px;
	z-index:100;
	display:none;
}
.hungry {
	background-color:rgba(200,200,200,0.5);
}
.drooling {
	background-color:rgba(255,255,0,0.5);
}
.eaten {
	background-color:rgba(180,180,180,0.5);
}
#note_pad {
	width:400px;
	height:290px;
	position:absolute;
	top:50px;
	left:25px;
	background-color:#FCF064;
	border-radius:25px;
	box-shadow:-1px 1px 3px #666;
	display:none;
	z-index:110;
}
#note_pad textarea {
	position:relative;
	top:20px;
	width:90%;
	margin-right:5%;
	margin-left:5%;
	height:210px;
	min-height:210px;
	color:black;
}
#note_pad .ui-btn {
	width:25%;
	float:left;
	margin-left:5%;
	margin-top:20px;
	padding:.5em 1em;
}
#delete_note {
	color:red;
}
.note_indic {
	width:20px;
	height:20px;
	border:1px solid #A6A8AB;
	float:left;
	background-color:#FCF064;
	margin-right:5px;
	border-radius:20px;
}
.note_indic:active {
	border-color:black;
	background-color:#FFF100;
}
#review_area {
	position:absolute;
	top:50px;
	left:0;
	right:0;
	bottom:0;
	padding:15px;
	color:black;
}
#review_area h3 {
	margin-top:0px;
	display:inline-block;
	margin-right:20px;
}
#review_area ul {
	margin-right:50px;
}
#review_area h5 {
	padding:5px;
	border:1px solid gray;
	border-radius:5px;
	margin-bottom:4px;
	background-color:rgb(200,200,200);
}
.delete {
	width:30px;
	height:30px;
	border-radius:15px;
	background-image:url(../images/delete.png);
	background-size:contain;
	background-position:center;
	background-repeat:no-repeat;
	float:left;
	margin-right:8px;
	margin-top:-5px;
	display:none;
	cursor:pointer;
}
#review_area li {
	list-style-type: none;
	border-bottom:1px solid rgb(200,200,200);
	padding:5px 0 10px 0;
	margin:5px;
}
#review_area .trail {
	float:right;
	font-weight:bold;
	font-size:12px;
}
#areYouSure {
	position:fixed;
	top:200px;
	width:280px;
	height:130px;
	padding-top:20px;
	text-align:center;
	background-color:#ddd;
	color:black;
	font-weight:bold;
	border-radius:25px;
	box-shadow:1px 1px 3px black;
	z-index:200;
}

textarea#all_notes {
	position:absolute;
	top:80px;
	font-size:12pt;
	width:90%;
	right:5%;
	left:5%;
	bottom:5%;
}
#close_textarea {
	float:right;
	background-color:white;
	border-radius:8px;
	color:rgb(32,83,146);
	padding:3px 8px;
	font-weight:bold;
	font-size:14px;
}
#all_notes_instruct {
	position:absolute;
	height:30px;
	top:50px;
	background-color:white;
	color:black;
	padding-left:5px;
	padding-right:5px;
	font-size:14px;
	left:50px;
	right:50px;
}
#notes_holder {
	overflow:auto;
	position:absolute;
	top:70px;
	right:15px;
	left:15px;
	bottom:25px;
}
/* Portrait View Styles */
@media only screen and (min-device-width: 768px) and (orientation : portrait) {
	#header {
		height:100px;
	}
	#fsi_logo {
		top:105px;
	}
	#header_links {
		top:74px;
		right:10px;
	}
	#menu_holder, #acronyms, #synoptics, #schematics_holder {
		top:100px;
	}
	#home_page, #book_page {
		top:110px;
	}
	#alphabet {
		top:150px;
	}
	#book_page page {
		width:752px;
		height:896px;
	}
	#icon_holder {
		width:630px;
	}
/*	#acronym_box {
		right:10px;	
	}*/
	#note_icon {
		top:105px;
	}
	#home_page button {
		top:50px;
		right:10px;
	}
	#plane_view_data {
		clear:both;
		margin-top:0;
		height:210px;
		width:650px;
	}
	#plane_view_data #first_view {
		margin-top:10px;
	}
	#plane_view_data.pvSelect {
		width:650px;
		background-color:rgba(100,100,100,0.3);
		border:0;
		border-top-right-radius:0;
		border-top-left-radius:0;
	}
	.menu_box {
		max-height:900px;
	}
}/* LEGEND */
.legend_head {
	margin:3px 0;
}
.legend {
	position:absolute;
	text-align:center;
}
.legend .legend_item {
	font-size:11px;
	border:1px solid gray;
	border-radius:10px;
	background-color:white;
	margin-bottom:5px;
}
.legend .legend_item p {
	margin:5px;
}
.legend .legend_line {
	height:3px;
	width:50px;
	border:1px solid black;
	margin:0 auto 5px auto;
}
/* RECTANGLES */
.sch_rect {
	position:absolute;
}

              
            
!

JS

              
                var back_stage = new Kinetic.Stage({
	container: 'schematic_background',
	width: 1024,
	height: 768
});
var back_layer = new Kinetic.Layer();
var Images = {
	carets: 'js/app/schematics/NST/images/Carets-01.png',
	shifts: 'js/app/schematics/NST/images/Shifts-01.png',
	inlet_filter: 'js/app/schematics/NST/images/InletFilter-01.png',
	hydraulic_motor: 'js/app/schematics/NST/images/motor-01.png',
	grnStripe: 'js/app/schematics/NST/images/GreenStripe-01.png',
	compensator: 'js/app/schematics/NST/images/Compensator-01.png',
	handle: 'js/app/schematics/NST/images/LandingGearHandle-01.png',
	arrow: 'js/app/schematics/NST/images/WtArrow-01.png'
}

var imgCount = Object.keys(Images).length;
var i = 0;

for(var item in Images){
	window[item] = new Image();
	window[item].onload = function(){
		i = i + 1;
		if(i == imgCount){
			initAjax();
		}
	}
	window[item].src = Images[item];
}

Array.min = function( array ){
    return Math.min.apply( Math, array );
};
Array.max = function( array ){
    return Math.max.apply( Math, array );
};

function initAjax(){
	$.ajax({
		type: "GET",
		dataType: "xml",
		url: "js/app/schematics/NST/background.svg",
		success: function(xml){
			$(xml).find("g").each(function(){
				var id = $(this).attr("id");
				if(id == "LEGEND"){
					var legend_title = $(this).find("text").eq(0);
					var coords = legend_title.attr("transform");
					var matrix = coords.split(" ");
					var textX = parseInt(matrix[4]);
					var textY = matrix[5];
					textY = parseInt(textY.substr(0, textY.length - 1));
					var text = legend_title.text();

					var legend_text = new Kinetic.Text({
						x: textX,
						y: textY,
						text: text,
						fontSize: 16,
						fontFamily: 'Arial',
						fontStyle:'bold',
						fill: 'black'
					});

					back_layer.add(legend_text);


					$(this).find("rect").each(function(){
						var fill = $(this).attr("fill");
						var x = parseInt($(this).attr("x"));
						var y = parseInt($(this).attr("y"));
						var text = $(this).next().text();
						var legend_width = 150;
						var type = $(this).attr("id");
						
						
						var rect = new Kinetic.Rect({
							x:x,
							y:y+8,
							width:legend_width,
							height:30,
							fill:'#FFF',
							stroke:'#666',
							strokeWidth:1,
							cornerRadius:8
						});
						var text = new Kinetic.Text({
							x:x+5,
							y:y+10,
							text:text,
							width:legend_width-6,
							fontSize:12,
							fontFamily:'Arial',
							align:'center',
							fill:'black'
						})
						var line = new Kinetic.Rect({
							x:x+40,
							y:y+28,
							width:legend_width-80,
							height:5,
							fill:fill,
							stroke:'#000',
							strokeWidth:0.5
						})
						if(type == "stripe"){
							line.fill('')
							line.fillPatternImage(grnStripe);
						}
						back_layer.add(rect).add(text).add(line);
					})
				} else if(id == "SCHEMATIC"){
					$(this).find("rect").each(function(){
						var width = parseInt($(this).attr("width"));
						var height = parseInt($(this).attr("height"));
						var fill = $(this).attr("fill");
						var x = parseInt($(this).attr("x"));
						var y = parseInt($(this).attr("y"));
			
						var rect = new Kinetic.Rect({
							x: x,
							y: y,
							width: width,
							height: height,
							fill: fill
						});
						back_layer.add(rect);
					});

					$(this).find("line").each(function(){
						var type = $(this).attr("id");
						if(typeof type !== "undefined"){
							if(type.substr(0,4) == "thin"){
								type = "thin";
							}
						}

						var x1 = $(this).attr("x1");
						var y1 = $(this).attr("y1");
						var x2 = $(this).attr("x2");
						var y2 = $(this).attr("y2");
						var stroke = $(this).attr("stroke");
						var strokeW = 5;
						if(type == "thin"){
							strokeW = 1;
						}

						var line = new Kinetic.Line({
							points: [x1,y1,x2,y2],
							stroke: 'black',
							strokeWidth: strokeW
						});

						var innerLine = new Kinetic.Line({
							points: [x1,y1,x2,y2],
							stroke: stroke,
							strokeWidth: 3
						})				

						back_layer.add(line);
						if(type !== "thin"){
							back_layer.add(innerLine);
						}
						
					});
				
					$(this).find("polyline").each(function(){
						var points = $(this).attr("points").split(" ");
						var new_points = [];
						$.each(points,function(ind,item){
							if(item !== ""){
								var split_item = item.split(",");
								new_points.push(split_item[0],split_item[1]);
							}
						})
						var polyline = new Kinetic.Line({
							points: new_points,
							stroke: 'black',
							strokeWidth: 5
						});
						var innerPolyLine = new Kinetic.Line({
							points: new_points,
							stroke: 'white',
							strokeWidth: 3
						})
						back_layer.add(polyline);
						back_layer.add(innerPolyLine);
					});

					$(this).find("polygon").each(function(){
						var points = $(this).attr("points").split(" ");
						var new_points = [];
						$.each(points, function(ind,item){
							if(item !== ""){
								var split_item = item.split(",");
								new_points.push(split_item[0],split_item[1]);
							}
						})
						var polygon = new Kinetic.Line({
							points: new_points,
							closed: true,
							fill: 'black'
						})
						back_layer.add(polygon);
					})
		
					$(this).find("text").each(function(){						
						var coords = $(this).attr("transform");
						var matrix = coords.split(" ");
						var textX = parseInt(matrix[4]);
						var textY = matrix[5];
						textY = parseInt(textY.substr(0, textY.length - 1));
						
						var font = parseInt($(this).attr("font-size"));
						var tspan = $(this).find("tspan");
						var type = $(this).attr("id");
						//var rotation = parseInt(matrix[3]);
						var rotation = 0;
						var talign;						

						if(typeof $(this).attr("font-size") == "undefined"){
							font = parseInt(tspan.attr("font-size"));
						}
						
						if(typeof type !== "undefined"){
							if(type.substr(0,6) == "rotate"){
								textX = textX - 15;
								textY = textY + 5;
								type = "rotate";
							}
							if(type.substr(0,6) == "center"){
								talign = 'center';
							}
							if(type.substr(0,5) == "right"){
								talign = 'right';
							}
							if(type.substr(0,4) == "left"){
								talign = 'left';
							}
						}
						
						if(type === 'rotate'){
							rotation =  270;
						}

						var full_text = "";
						
						if(tspan.length > 0){
							var xDifs = [];
							var textWs = [];
							//approximate pixel width of 1 letter..
							var pixW = font - 2;

							tspan.each(function(i){
								var textW = $(this).text().length;
								var label = $(this).text();
								x = parseFloat($(this).attr("x"));
								xDifs.push(x);
								textWs.push(textW);
								if(i == tspan.length){
						 			//last one
						 			full_text += label
						 		}
								else{
						 			full_text += label+"\n"
						 		}
							});

							//find longest/shortest xDif
							var smallest = Array.min(xDifs);
							
							//adjust text box X position based on tspan x values
							textX = textX + smallest
						}
						else{
							full_text = $(this).text();
						}
						
						text = new Kinetic.Text({
							x: textX + 5,
							y: textY - 8,
							text: full_text,
							fontSize: font,
							fontFamily: 'Arial',
							fill: 'black',
							align: talign,
							rotation: rotation
						});
						
						back_layer.add(text);
					});
				}
			})

		},
		complete: function(){
			var lines = new Kinetic.Layer();
			var image_layer = new Kinetic.Layer();
			var red = "#FF0000";
			var green = "#009900";
			var width = 3;
			
			function drawImage(name, x, y, image, width, height){
				window[name] = new Kinetic.Image({
					x: x,		y: y,
					image: image,
					width: width, 	height: height,
					id:name
				});
			}
			function drawSprite(name, x, y, scaleX, scaleY, image, animation, white, red, green, pos1, pos2, pos3, pos4, pos5){
				window[name] = new Kinetic.Sprite({
					x: x, 	y: y,
					scaleX: scaleX, 	scaleY: scaleY,
					image: image,
					animation: animation,
					animations: {
						white: white,
						red: red,
						green: green,
						pos1: pos1,
						pos2: pos2,
						pos3: pos3,
						pos4: pos4,
						pos5: pos5
					},
					id:name
				});
			}
			function drawLine(name, points, fill, stroke, closed, strokeWidth){			
				window[name] = new Kinetic.Line({
					points: points,
					fill: fill,
					stroke: stroke,
					closed: closed,
					strokeWidth: strokeWidth,
					id: name
				});
				//var id = name;
				//console.log(id);
			}
			function drawRect(name, x, y, width, height, fill, stroke, scaleX, scaleY){
				window[name] = new Kinetic.Rect({
					x: x,
					y: y,
					width: width,
					height: height,
					fill: fill,
					stroke: stroke,
					fillPatternImage: grnStripe,
					fillPatternScaleX: scaleX,
					fillPatternScaleY: scaleY,
					id:name
				});
			}
			function drawBackground(){
				back_stage.add(back_layer);
				back_stage.add(lines);
				back_stage.add(image_layer);
			}
			
			drawSprite("caret1", 544, 242, 0.52, 0.52, carets, 'white', [13, 10, 44, 59], [55, 10, 44, 59]);
			drawSprite("caret2", 885, 68, 0.52, 0.52, carets, 'white', [13, 10, 44, 59]);
			drawSprite("caret3", 814, 393.5, 0.52, 0.52, carets, 'white', [13, 10, 44, 59]);
			drawSprite("caret4", 814, 483, 0.52, 0.52, carets, 'white', [13, 10, 44, 59]);
			drawSprite("caret5", 761, 210, 0.52, 0.52, carets, 'red', null, [159, 11, 44, 59]);
			drawSprite("ISV_Shift", 600, 221.5, 0.45, 0.47, shifts, 'pos1', null, null, null, [0, 0, 95, 220], [105, 0, 95, 220]);
			drawSprite("SOV1_Shift", 473.5, 135, 0.47, 0.47, shifts, 'pos1', null, null, null, [197, 0, 443, 92], [197, 104, 443, 92]);
			drawSprite("SCV_Shift", 418, 325, 0.45, 0.47, shifts, 'pos1', null, null, null, [700, 0, 479, 90], [700, 94, 479, 90], [700, 188, 479, 90], [700, 281, 479, 90]);
			drawSprite("SOV2_Shift", 274, 230, 0.52, 0.47, shifts, 'pos1', null, null, null, [1259, 0, 300, 90], [1259, 91, 300, 90], [1259, 195, 300, 90], [1259, 288, 300, 90]);
			drawSprite("WO_Shift", 545, 427.25, 0.52, 0.5, shifts, 'pos1', null, null, null, [1629, 0, 100, 245], [1734, 0, 100, 245], [1837, 0, 100, 245]);
			drawSprite("Compensator", 825, 136, 0.45, 0.45, compensator, 'white', [9, 9, 88, 146], null, [125, 9, 88, 146]);
			drawSprite("lgh", 937, 200, 0.55, 0.55, handle, 'pos1', null, null, null, [20, 0, 150, 195], [187, 0, 150, 195]);
			drawImage("filter", 811, 227, inlet_filter, 62, 62);
			drawImage("motor", 770, 417, hydraulic_motor, 148, 98);
			drawImage("whiteArrow", 895, 255, arrow, 25, 5);
			
			image_layer.add(caret1).add(caret2).add(caret3).add(caret4).add(caret5).add(ISV_Shift).add(SOV1_Shift).add(SCV_Shift).add(SOV2_Shift).add(WO_Shift).add(Compensator).add(lgh).add(filter).add(motor).add(whiteArrow);

			drawRect("WO_Box1", 557.5, 549, 19, 17, "#BBBDBF", "black");
			drawRect("WO_Box2", 567.5, 426, 19, 34, "#BBBDBF", "black");
			drawRect("WO_Box3", 567.5, 393, 19, 34, "#BBBDBF", "black");
			//drawRect("signal", 15, 683.35, 18, 18, "", "", 1, 15);
			drawLine("WO_Tri1", [567, 553, 563, 560, 571, 560], "black", "black", true);
			drawLine("WO_Tri2", [573, 440, 581, 440, 577, 446], "black", "black", true);
			drawLine("WO_Tri3", [573, 405, 581, 405, 577, 411], "black", "black", true);
			//Adds overlaying shapes to the layer
			lines.add(WO_Box1).add(WO_Box2).add(WO_Box3).add(WO_Tri1).add(WO_Tri2).add(WO_Tri3);
			
			drawLine("NST_R01", [938.4, 258.167, 868, 258.167], "", red, "", 3);
			drawLine("NST_R02", [816.367, 258.167, 640.383, 258.167, 770.833, 258.167, 770.833, 111.783, 621.283, 111.783, 621.283, 141.667], "", red, "", 3);
			drawRect("NST_R03a", 619.75, 177, 3, 25.5, "", "", 1.15, 1.15);
			drawLine("NST_R03", [621.283, 177.82, 621.283, 225.45], "", red, "", 3);
			drawLine("NST_R03b", [621.283, 177.82, 621.283, 225.45], "", "black", "", 5);
			drawLine("NST_R04", [604.267, 258.167, 604.267, 258.167], "", red, "", 3);
			drawLine("NST_R05", [549.1, 257.633, 549.1, 257.633], "", red, "", 3);
			drawLine("NST_R06", [504.233, 256.633, 504.233, 256.633], "", red, "", 3);
			drawLine("NST_R07", [582.817, 257.9, 582.817, 257.9], "", red, "", 3);
			drawLine("NST_R08", [582.817, 214.22, 582.817, 214.22], "", red, "", 3);
			drawLine("NST_R09", [380.033, 214.22, 380.033, 214.22], "", red, "", 3);
			drawLine("NST_R10", [477.5, 366, 477.5, 366], "", red, "", 3);
			drawLine("NST_R11", [477.5, 484.133, 477.5, 484.133], "", red, "", 3);
			drawRect("NST_R12", 378, 269, 3, 0, "", "", 1.15, 1.15);
			drawLine("NST_R12a", [379.42, 269.767, 379.42, 269.767], "", red, "", 3);
			drawRect("NST_R13", 379, 307, 0, 3, "", "", 0.75, 0.75);
			drawLine("NST_R13a", [379.42, 308.82, 379.42, 308.82], "", red, "", 3);
			drawRect("NST_R14", 343, 307, 3, 0, "", "", 1.15, 1.15);
			drawLine("NST_R14a", [344.73, 308.82, 344.73, 308.82], "", red, "", 3);
			drawRect("NST_R15", 343, 555.75, 0, 3, "", "", 0.75, 0.75);
			drawLine("NST_R15a", [344.73, 557.05, 344.73, 557.05], "", red, "", 3);
			drawLine("NST_R16", [588.37, 483.5, 588.37, 483.5], "", red, "", 3);
			drawLine("NST_R17", [646.6, 483.5, 646.6, 483.5], "", red, "", 3);
			drawLine("NST_R18", [646.6, 515, 646.6, 515], "", red, "", 3);
			drawLine("NST_R19", [804.33, 515, 804.33, 515], "", red, "", 3);
			drawLine("NST_R20", [804.33, 499.2, 804.33, 499.2], "", red, "", 3);
			drawLine("NST_R21", [601.05, 483, 601.05, 483], "", red, "", 3);
			drawLine("NST_R22", [601.05, 434.3, 601.05, 434.3], "", red, "", 3);
			//Adds each red line to the layer
			lines.add(NST_R01).add(NST_R02).add(NST_R03b).add(NST_R03).add(NST_R04).add(NST_R05).add(NST_R06).add(NST_R07).add(NST_R08).add(NST_R09).add(NST_R10).add(NST_R11).add(NST_R12).add(NST_R13).add(NST_R14).add(NST_R15).add(NST_R12a).add(NST_R13a).add(NST_R14a).add(NST_R15a).add(NST_R16).add(NST_R17).add(NST_R18).add(NST_R19).add(NST_R20).add(NST_R21).add(NST_R22);
			
			drawLine("NST_G01", [597.433, 141.667, 597.433, 141.667], "", green, "", 3);
			drawLine("NST_G02", [597.433, 111.267, 597.433, 111.267], "", green, "", 3);
			drawLine("NST_G03", [475.433, 111.267, 475.433, 111.267], "", green, "", 3);
			drawLine("NST_G04", [362.467, 111.267, 362.467, 111.267], "", green, "", 3);		
			drawLine("NST_G05", [208.8, 111.267, 208.8, 111.267], "", green, "", 3);
			drawLine("NST_G06", [191.217, 111.267, 191.217, 111.267], "", green, "", 3);
			drawLine("NST_G07", [191.217, 586.083, 191.217, 586.083], "", green, "", 3);
			drawLine("NST_G08", [645.017, 586.083, 645.017, 586.083], "", green, "", 3);
			drawLine("NST_G09", [645.017, 534.783, 645.017, 534.783], "", green, "", 3);
			drawLine("NST_G10", [866.617, 534.783, 866.617, 534.783], "", green, "", 3);
			drawLine("NST_G11", [866.617, 515.417, 866.617, 515.417], "", green, "", 3);
			drawLine("NST_G12", [849.25, 499.2, 849.25, 499.2], "", green, "", 3);
			drawLine("NST_G13", [849.25, 499.2, 849.25, 499.2], "", green, "", 3);
			drawLine("NST_G14", [849.25, 409.683, 849.25, 409.683], "", green, "", 3);
			drawLine("NST_G15", [360.033, 111.267, 360.033, 111.267], "", green, "", 3);
			drawLine("NST_G16", [360.033, 111.267, 360.033, 111.267], "", green, "", 3);
			drawLine("NST_G17", [360.033, 84.383, 360.033, 84.383], "", green, "", 3);
			drawLine("NST_G18", [209.8, 84.383, 209.8, 84.383], "", green, "", 3);
			drawLine("NST_G19", [209.8, 577.7, 209.8, 577.7], "", green, "", 3);
			drawLine("NST_G20", [566.5, 577.7, 566.5, 577.7], "", green, "", 3);
			drawLine("NST_G21", [566.5, 577.7, 566.5, 577.7], "", green, "", 3);
			drawLine("NST_G22", [611, 577.7, 611, 577.7], "", green, "", 3);
			drawLine("NST_G23", [611, 498.667, 611, 498.667], "", green, "", 3);
			drawLine("NST_G24", [360.033, 84.383, 360.033, 84.383], "", green, "", 3);
			drawLine("NST_G25", [478.05, 84.383, 478.05, 84.383], "", green, "", 3);
			drawLine("NST_G26", [793.083, 84.383, 793.083, 84.383], "", green, "", 3);
			drawLine("NST_G27", [793.083, 377.233, 793.083, 377.233], "", green, "", 3);
			drawLine("NST_G28", [576, 377.233, 576, 377.233], "", green, "", 3);
			drawLine("NST_G29", [793.083, 84.383, 793.083, 84.383], "", green, "", 3);
			drawLine("NST_G30", [843.32, 84.383, 843.32, 84.383], "", green, "", 3);
			drawLine("NST_G31", [843.32, 120.5, 843.32, 120.5], "", green, "", 3);
			drawLine("NST_G32", [478.05, 84.383, 478.05, 84.383], "", green, "", 3);
			drawLine("NST_G33", [504.233, 366, 504.233, 366], "", green, "", 3);
			drawLine("NST_G34", [504.233, 466.15, 504.233, 466.15], "", green, "", 3);
			drawLine("NST_G35", [587.37, 467.27, 587.37, 467.27], "", green, "", 3);
			drawLine("NST_G36", [646.07, 467.27, 646.07, 467.27], "", green, "", 3);
			drawLine("NST_G37", [646.07, 394.52, 646.07, 394.52], "", green, "", 3);
			drawLine("NST_G38", [804.43, 394.52, 804.43, 394.52], "", green, "", 3);
			drawLine("NST_G39", [803.4, 409.7, 803.4, 409.7], "", green, "", 3);
			drawLine("NST_G40", [622.52, 467.8, 622.52, 467.8], "", green, "", 3);
			drawLine("NST_G41", [622.52, 403.42, 622.52, 403.42], "", green, "", 3);
			//Adds each green line to the layer
			lines.add(NST_G01).add(NST_G02).add(NST_G03).add(NST_G04).add(NST_G05).add(NST_G06).add(NST_G07).add(NST_G08).add(NST_G09).add(NST_G10).add(NST_G11).add(NST_G12).add(NST_G13).add(NST_G14).add(NST_G15).add(NST_G16).add(NST_G17).add(NST_G18).add(NST_G19).add(NST_G20).add(NST_G21).add(NST_G22).add(NST_G23).add(NST_G24).add(NST_G25).add(NST_G26).add(NST_G27).add(NST_G28).add(NST_G29).add(NST_G30).add(NST_G31).add(NST_G32).add(NST_G33).add(NST_G34).add(NST_G35).add(NST_G36).add(NST_G37).add(NST_G38).add(NST_G39).add(NST_G40).add(NST_G41);
		
			drawBackground();

			var init = new TimelineLite({onUpdate:updateSlider});
			var sov1 = new TimelineLite();
			var sov1a = new TimelineLite();
			var start = new TimelineLite();
			var ISV_delay = new TimelineLite();
			var sov2 = new TimelineLite();
			var sov1b = new TimelineLite();
			var comp = new TimelineLite();
			var compa = new TimelineLite();
			var scv = new TimelineLite();
			var scv1 = new TimelineLite();
			var scv1a = new TimelineLite();
			var scv2 = new TimelineLite();
			var hm = new TimelineLite();
			var hm1 = new TimelineLite();
			var boxes = new TimelineLite();
			
			init.to(ISV_Shift, 1, {kinetic:{y: 198}, ease: Power0.easeInOut,				
				   onComplete: function(){
					ISV_Shift.animation('pos2');
				   },
				   onReverseComplete: function(){
					   ISV_Shift.animation('pos1');
					   lgh.animation('pos1');
				   }})
				.to(NST_R03, 1.1, {kinetic:{points: [621.283, 177.817, 621.283, 201.45]}, ease: Power0.easeInOut,
					onComplete: function(){
						lines.add(NST_R03a);
						NST_R03.stroke('none');
					},
					onReverseComplete: function(){
						lines.add(NST_R03);
						NST_R03.stroke(red);
					}}, 0)
				.to(NST_R03b, 1.1, {kinetic:{points: [621.283, 177.82, 621.283, 201.45]}, ease: Power0.easeInOut,
					onComplete: function(){
						NST_R03b.stroke('none');
					},
					onReverseComplete: function(){
						NST_R03b.stroke('black');
					}
				}, 0)
				.append(sov1).append(start).append(ISV_delay);
				
			start.to(NST_R04, 0.75, {kinetic:{points: [604.267, 258.167, 563.967, 258.167]}, ease: Power0.easeInOut})
				.set(caret1, {kinetic:{},
					onComplete: function(){
						caret1.animation('red');
					},
					onReverseComplete: function(){
						caret1.animation('white');
					}})
				
				.to(NST_R05, 0.75, {kinetic:{points: [549.1, 257.633, 503.233, 257.633]}, ease: Power0.easeInOut})
				.to(NST_R06, 1, {kinetic:{points: [504.233, 257.633, 504.233, 330.883]}, ease: Power0.easeInOut})
					.set(SCV_Shift, {kinetic:{},
						onComplete: function(){
							SCV_Shift.animation('pos2');
						},
						onReverseComplete: function(){
							SCV_Shift.animation('pos1');
						}
					});
			
			ISV_delay.to(NST_R07, 0.75, {kinetic:{points: [582.817, 257.9, 582.817, 213.22]}, ease: Power0.easeInOut}, 0.5)
				.to(NST_R08, 1.75, {kinetic:{points: [582.817, 214.22, 379.033, 214.22]}, ease: Power0.easeInOut})
				.to(NST_R09, 0.25, {kinetic:{points: [380.033, 214.22, 380.033, 236.4]}, ease: Power0.easeInOut})
					.set(SOV2_Shift, {kinetic:{},
						onComplete: function(){
							SOV2_Shift.animation('pos3');
						},
						onReverseComplete: function(){
							SOV2_Shift.animation('pos2');
						}
					});
				
			init.to(SOV1_Shift, 1, {kinetic:{x: 516}, ease: Power0.easeInOut,
				onComplete: function(){
					SOV1_Shift.animation('pos2');
				},
				onReverseComplete: function(){
					SOV1_Shift.animation('pos1');
				}}, 0);
				
			sov1.to(NST_G01, 0.25, {kinetic:{points: [597.433, 141.667, 597.433, 110.267]}, ease: Power0.easeInOut})
				.to(NST_G02, 0.75, {kinetic:{points: [597.433, 111.267, 480.333, 111.267]}, ease: Power0.easeInOut})
				.to(NST_G03, 0.75, {kinetic:{points: [475.433, 111.267, 362.467, 111.267]}, ease: Power0.easeInOut})
				.append(sov1a).append(sov1b)
				.to(NST_G04, 0.75, {kinetic:{points: [362.467, 111.267, 212.467, 111.267]}, ease: Power0.easeInOut})
				.to(NST_G05, 0.25, {kinetic:{points: [208.8, 111.267, 190.217, 111.267]}, ease: Power0.easeInOut})
				.to(NST_G06, 2, {kinetic:{points: [191.217, 111.267, 191.217, 587.083]}, ease: Power0.easeInOut})
				.to(NST_G07, 2, {kinetic:{points: [191.217, 586.083, 646.017, 586.083]}, ease: Power0.easeInOut})
				.to(NST_G08, 0.5, {kinetic:{points: [645.017, 586.083, 645.017, 533.783]}, ease: Power0.easeInOut})
				.to(NST_G09, 1.25, {kinetic:{points: [645.017, 534.783, 867.617, 534.783]}, ease: Power0.easeInOut})
				.to(NST_G10, 0.25, {kinetic:{points: [866.617, 534.783, 866.617, 514.417]}, ease: Power0.easeInOut})
				.to(NST_G11, 0.25, {kinetic:{points: [866.617, 515.417, 849.25, 499.2]}, ease: Power0.easeInOut})
				.to(NST_G12, 0.2, {kinetic:{points: [849.25, 499.2, 832.483, 499.2]}, ease: Power0.easeInOut})
				.to(NST_G13, 0.5, {kinetic:{points: [849.25, 499.2, 849.25, 407.683]}, ease: Power0.easeInOut})
				.to(NST_G14, 0.2, {kinetic:{points: [849.25, 409.683, 834.167, 409.683]}, ease: Power0.easeInOut});
				
			sov1a.to(NST_G15, 0.75, {kinetic:{points: [360.033, 111.267, 360.033, 236.067]}, ease: Power0.easeInOut})
				.set(SOV2_Shift, {kinetic:{},
					onComplete: function(){
						SOV2_Shift.animation('pos2');
					},
					onReverseComplete: function(){
						SOV2_Shift.animation('pos1');
					}})
				.append(sov2);
				
			sov1b.to(NST_G16, 0.25, {kinetic:{points: [360.033, 111.267, 360.033, 83.383]}, ease: Power0.easeInOut})
				.append(comp)
				.to(NST_G17, 1.5, {kinetic:{points: [360.033, 84.383, 208.8, 84.383]}, ease: Power0.easeInOut})
				.to(NST_G18, 3.5, {kinetic:{points: [209.8, 84.383, 209.8, 578.7]}, ease: Power0.easeInOut})
				.to(NST_G19, 2.5, {kinetic:{points: [209.8, 577.7, 567.5, 577.7]}, ease: Power0.easeInOut})
				.to(NST_G20, 0.2, {kinetic:{points: [566.5, 577.7, 566.5, 565.15]}, ease: Power0.easeInOut}, 7.7)
				.to(NST_G21, 0.5, {kinetic:{points: [566.5, 577.7, 612, 577.7]}, ease: Power0.easeInOut}, 7.7)
				.to(NST_G22, 0.75, {kinetic:{points: [611, 577.7, 611, 497.667]}, ease: Power0.easeInOut})
				.to(NST_G23, 0.25, {kinetic:{points: [611, 498.667, 590.467, 498.667]}, ease: Power0.easeInOut});			
				
			comp.to(NST_G24, 1, {kinetic:{points: [360.033, 84.383, 479.05, 84.383]}, ease: Power0.easeInOut})
				.append(scv)
				.to(NST_G25, 2.25, {kinetic:{points: [478.05, 84.383, 794.083, 84.383]}, ease: Power0.easeInOut})
				.append(compa)
				.to(NST_G26, 2, {kinetic:{points: [793.083, 84.383, 793.083, 378.233]}, ease: Power0.easeInOut})
				.to(NST_G27, 1.5, {kinetic:{points: [793.083, 377.233, 575, 377.233]}, ease: Power0.easeInOut})
				.to(NST_G28, .25, {kinetic:{points: [576, 377.233, 576, 392]}, ease: Power0.easeInOut});
				
			compa.to(NST_G29, 1, {kinetic:{points: [793.083, 84.383, 890.68, 84.383]}, ease: Power0.easeInOut})
				.to(NST_G30, 0.75, {kinetic:{points: [843.32, 84.383, 843.32, 137]}, ease: Power0.easeInOut}, 0.5)
					.set(Compensator, {kinetic:{},
						 onComplete: function(){
							 Compensator.animation('green');
						 },
						 onReverseComplete: function(){
							 Compensator.animation('white');
						 }
					})
				.to(NST_G31, 0.2, {kinetic:{points: [843.32, 120.5, 854.4, 120.5]}, ease: Power0.easeInOut}, 1);
				
			scv.to(NST_G32, 2.5, {kinetic:{points: [478.05, 84.383, 478.05, 332.02]}, ease: Power0.easeInOut})
				.set(SCV_Shift, {kinetic:{},
					onComplete: function(){
						SCV_Shift.animation('pos3');
					},
					onReverseComplete: function(){
						SCV_Shift.animation('pos2');
					}
				})
			.to(SCV_Shift, 1, {kinetic:{x: 461}, ease: Power0.easeInOut})
				.set(SCV_Shift, {kinetic:{},
					onComplete: function(){
						SCV_Shift.animation('pos1');
					},
					onReverseComplete: function(){
						SCV_Shift.animation('pos3');
					}
				})
			.to(SCV_Shift, 1, {kinetic:{x: 380}, ease: Power0.easeInOut}, 4.25)
				.set(SCV_Shift, {kinetic:{},
					onComplete: function(){
						SCV_Shift.animation('pos4');
					},
					onReverseComplete: function(){
						SCV_Shift.animation('pos1');
					}
				})
			.append(scv1)
			.to(NST_R10, 1, {kinetic:{points: [477.5, 366, 477.5, 485.133]}, ease: Power0.easeInOut})
			.to(NST_R11, 1, {kinetic:{points: [477.5, 484.133, 548.72, 484.133]}, ease: Power0.easeInOut})
				.set(WO_Shift, {kinetic:{},
					onComplete: function(){
						WO_Shift.animation('pos2');
					},
					onReverseComplete: function(){
						WO_Shift.animation('pos1');
					}
				})
			.to(SCV_Shift, 1, {kinetic:{x: 418}, ease: Power0.easeInOut})
				.set(SCV_Shift, {kinetic:{},
					onComplete: function(){
						SCV_Shift.animation('pos3');
						WO_Shift.animation('pos1');
					},
					onReverseComplete: function(){
						SCV_Shift.animation('pos4');
						WO_Shift.animation('pos2');
					}
				})
			.to(NST_R11, 0, {kinetic:{points: [477.5, 484.133, 477.5, 484.133]}, ease: Power4})
			.to(NST_R10, 0, {kinetic:{points: [477.5, 366, 477.5, 366]}, ease: Power4})
			.to(NST_G33, 0, {kinetic:{points: [504.233, 365, 504.233, 366]}, ease: Power4})
			.to(NST_G34, 0, {kinetic:{points: [504.233, 466.15, 504.233, 466.15]}, ease: Power4})
			.to(NST_R12, 0, {kinetic:{height: 0}, ease: Power4})
			.to(NST_R13, 0, {kinetic:{width: 0}, ease: Power4})
			.to(NST_R14, 0, {kinetic:{height: 0}, ease: Power4})
			.to(NST_R15, 0, {kinetic:{width: 0}, ease: Power4})
			.to(SOV2_Shift, 1, {kinetic:{x: 313}, ease: Power0.easeInOut})	
				.set(SOV2_Shift, {kinetic:{},
					onComplete: function(){
						SOV2_Shift.animation('pos4');
					},
					onReverseComplete: function(){
						SOV2_Shift.animation('pos3');
					}
				})
			.to(NST_R12a, 0.75, {kinetic:{points: [379.42, 269.767, 379.42, 309.82]}, ease: Power0.easeInOut})
			.append(scv2)
			.to(NST_R13a, 0.75, {kinetic:{points: [379.42, 308.82, 343.73, 308.82]}, ease: Power0.easeInOut})
			.to(NST_R14a, 2, {kinetic:{points: [344.73, 308.82, 344.73, 558.05]}, ease: Power0.easeInOut})
			.to(NST_R15a, 2, {kinetic:{points: [344.73, 557.05, 556.6, 557.05]}, ease: Power0.easeInOut})
			.append(boxes)
			.to(WO_Shift, 1, {kinetic:{y: 379, scaleY: 0.51}, ease: Power0.easeInOut})
				.set(SCV_Shift, {kinetic:{},
					onComplete: function(){
						SCV_Shift.animation('pos4');
					},
					onReverseComplete: function(){
						SCV_Shift.animation('pos1');
					}
				})
			.append(scv1a)
			.to(NST_R10, 1, {kinetic:{points: [477.5, 366, 477.5, 485.133]}, ease: Power0.easeInOut})
			.to(NST_R11, 1, {kinetic:{points: [477.5, 484.133, 548.72, 484.133]}, ease: Power0.easeInOut})
				.set(WO_Shift, {kinetic:{},
					onComplete: function(){
						WO_Shift.animation('pos3');
					},
					onReverseComplete: function(){
						WO_Shift.animation('pos1');
					}
				})
			.append(hm)
			.append(hm1)	
			
			scv1.to(NST_G33, 1, {kinetic:{points: [504.233, 366, 504.233, 467.15]}, ease: Power0.easeInOut})
				.to(NST_G34, 1, {kinetic:{points: [504.233, 466.15, 548.62, 466.15]}, ease: Power0.easeInOut})
			
			scv1a.to(NST_G33, 1, {kinetic:{points: [504.233, 366, 504.233, 467.15]}, ease: Power0.easeInOut})
				.to(NST_G34, 1, {kinetic:{points: [504.233, 466.15, 548.62, 466.15]}, ease: Power0.easeInOut})
	
			scv2.to(SCV_Shift, 1, {kinetic:{x: 380}, ease: Power0.easeInOut}, 2)
				.set(SCV_Shift, {kinetic:{},
					onComplete: function(){
						SCV_Shift.animation('pos1')
					},
					onReverseComplete: function(){
						SCV_Shift.animation('pos3');
					}
				})
				
			sov2.to(NST_R12, 0.5, {kinetic:{height: 40}, ease: Power0.easeInOut})
				.to(NST_R13, 0.25, {kinetic:{width: -35}, ease: Power0.easeInOut})
				.to(NST_R14, 1.75, {kinetic:{height: 252}, ease: Power0.easeInOut})
				.to(NST_R15, 1.25, {kinetic:{width: 214}, ease: Power0.easeInOut});
																	
			hm.to(NST_G35, 1, {kinetic:{points:[587.37, 467.27, 647.07, 467.27]}, ease: Power0.easeInOut})							
				.to(NST_G36, 1.5, {kinetic:{points:[646.07, 467.27, 646.07, 393.52]}, ease: Power0.easeInOut})
				.to(NST_G37, 1.75, {kinetic:{points:[646.07, 394.52, 805.43, 394.52]}, ease: Power0.easeInOut})
				.to(NST_G38, 0.5, {kinetic:{points:[804.43, 394.52, 804.43, 421.32]}, ease: Power0.easeInOut})
				.to(NST_G39, 0.2, {kinetic:{points: [803.4, 409.7, 819.07, 409.7]}, ease: Power0.easeInOut}, 4.5)
				.to(NST_G40, 1, {kinetic:{points: [622.52, 467.8, 622.52, 402.42]}, ease: Power0.easeInOut}, 0.5)
				.to(NST_G41, 0.75, {kinetic:{points: [622.52, 403.42, 586.83, 403.42]}, ease: Power0.easeInOut}, 1.5)
				
			hm1.to(NST_R16, 1, {kinetic:{points: [588.37, 483.5, 647.6, 483.5]}, ease: Power0.easeInOut}, 0)
				.to(NST_R17, 1.5, {kinetic:{points: [646.6, 483.5, 646.6, 516]}, ease: Power0.easeInOut})
				.to(NST_R18, 1.75, {kinetic:{points: [646.6, 515, 805.33, 515]}, ease: Power0.easeInOut})
				.to(NST_R19, 0.5, {kinetic:{points: [804.33, 515, 804.33, 485.067]}, ease: Power0.easeInOut})
				.to(NST_R20, 0.2, {kinetic:{points: [804.33, 499.2, 818.7, 499.2]}, ease: Power0.easeInOut}, 4.5)
				.to(NST_R21, 1, {kinetic:{points: [601.05, 483, 601.05, 433.3]}, ease: Power0.easeInOut}, 0.15)
				.to(NST_R22, 0.2, {kinetic:{points: [601.05, 434.3, 590.83, 434.3]}, ease: Power0.easeInOut}, 1.13)
				
			boxes.to(WO_Box1, 1, {kinetic:{y: 503, height: 62}, ease: Power0.easeInOut})
				.to(WO_Box2, 1, {kinetic:{y: 395, height: 17}, ease: Power0.easeInOut}, 0)
				.to(WO_Box3, 1, {kinetic:{y: 382, height: 16}, ease: Power0.easeInOut}, 0)
				.to(NST_G28, 1, {kinetic:{points: [576, 377.233, 576, 381.5]}, ease: Power0.easeInOut}, 0)
				.to(WO_Tri2, 1, {kinetic:{y: -38}, ease: Power0.easeInOut}, 0)
				.to(WO_Tri3, 1, {kinetic:{y: -18}, ease: Power0.easeInOut}, 0);

			var playBtn = $("#schem_play");
				rewindBtn = $("#schem_rewind");
				forwardBtn = $("#schem_forward");
				pauseBtn = $("#schem_pause");
				
			$("#schematic_slider").slider({
				range: false,
				min: 0,
				max: 100,
				step:0.1,
				value:0,
				slide: function ( event, ui ) {
					init.progress( ui.value/100 ).pause();
				}
			});          
			function updateSlider() {
				$("#schematic_slider").slider("value", init.progress() *100);
			} 
			init.pause();
			lgh.on("click touchstart", function(ev){
				lgh.animation('pos2');
				init.timeScale(0.6).play();
				ev.preventDefault();
			});
			playBtn.on("vclick", function(ev){
				lgh.animation('pos2');
				init.timeScale(0.6).play();
				ev.preventDefault();
			});
			rewindBtn.on("vclick", function(ev){
				init.timeScale(1.8).reverse();
				ev.preventDefault();
			});
			forwardBtn.on("vclick", function(ev){
				init.timeScale(1.8).play();
				ev.preventDefault();
			});
			pauseBtn.on("vclick", function(ev){
				init.pause();
				ev.preventDefault();
			});

			var itemData = {
				SOV1_Shift: {
					title:"SOV 1 Normal Open"
				},
				SOV2_Shift: {
					title:"SOV 2 Normal Closed"
				},
				ISV_Shift : {
					title:"Inlet Shutoff Valve"
				},
				SCV_Shift: {
					title:"Servo Control Valve"
				},
				WO_Shift: {
					title:"Bypass Relief Damping Valve"
				},
				motor: {
					title:"Hydraulic Motor"
				},
				filter: {
					title:"Inlet Filter"
				},
				lgh: {
					title:"Landing Gear Handle"
				},
				Compensator: {
					title:"Compensator"
				}
			}

			back_stage.on("click touchstart", function(ev){
				var tar = ev.targetNode;
				drawCallout(tar.getId(),ev);
				//print ID to console for development
				console.log(tar.getId());
			})

			function drawCallout(item,ev){
				$(".callout").remove();

				if(item in itemData){
					var item_data = itemData[item];
					var title = item_data.title;
					var x = ev.pageX+5;
					var y = ev.pageY+5;

					if(x+155 > window.innerWidth){
						x = x-150;
					}

					$("#schematic_load").append("<div class='callout' style='top:"+y+"px;left:"+x+"px'>"+title+"</div>");					
				}
			}
		}
	});

	$("#schema
              
            
!
999px
Save your sass for CSS. Everywhere else be kind.

Console