/*!
 * Stellar.js v0.6.2
 * http://markdalgleish.com/projects/stellar.js
 *
 * Copyright 2014, Mark Dalgleish
 * This content is released under the MIT license
 * http://markdalgleish.mit-license.org
 */
function landingSignupTracking(){typeof isLandingPage!="undefined"&&isLandingPage===!0&&typeof _gaq!="undefined"&&$("#signupForm").submit(function(){_gaq.push(["_setDomainName","none"]);_gaq.push(["_setAllowLinker",!0]);_gaq.push(["_setCampNameKey",utmCampaign]);_gaq.push(["_setCampMediumKey","button"]);_gaq.push(["_setCampSourceKey","site"]);_gaq.push(["_setCampContentKey","integrationComponents"]);_gaq.push(["_linkByPost",this])})}var Froogaloop,newLandingForm,landing;(function(n,t,i,r){function f(t,i){this.element=t;this.options=n.extend({},h,i);this._defaults=h;this._name=u;this.init()}var u="stellar",h={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(n){n.hide()},showElement:function(n){n.show()}},e={scroll:{getLeft:function(n){return n.scrollLeft()},setLeft:function(n,t){n.scrollLeft(t)},getTop:function(n){return n.scrollTop()},setTop:function(n,t){n.scrollTop(t)}},position:{getLeft:function(n){return parseInt(n.css("left"),10)*-1},getTop:function(n){return parseInt(n.css("top"),10)*-1}},margin:{getLeft:function(n){return parseInt(n.css("margin-left"),10)*-1},getTop:function(n){return parseInt(n.css("margin-top"),10)*-1}},transform:{getLeft:function(n){var t=getComputedStyle(n[0])[o];return t!=="none"?parseInt(t.match(/(-?[0-9]+)/g)[4],10)*-1:0},getTop:function(n){var t=getComputedStyle(n[0])[o];return t!=="none"?parseInt(t.match(/(-?[0-9]+)/g)[5],10)*-1:0}}},c={position:{setLeft:function(n,t){n.css("left",t)},setTop:function(n,t){n.css("top",t)}},transform:{setPosition:function(n,t,i,r,u){n[0].style[o]="translate3d("+(t-i)+"px, "+(r-u)+"px, 0)"}}},v=function(){var r=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,i=n("script")[0].style,t="";for(var u in i)if(r.test(u)){t=u.match(r)[0];break}return"WebkitOpacity"in i&&(t="Webkit"),"KhtmlOpacity"in i&&(t="Khtml"),function(n){return t+(t.length>0?n.charAt(0).toUpperCase()+n.slice(1):n)}}(),o=v("transform"),l=n("<div />",{style:"background:#fff"}).css("background-position-x")!==r,s=l?function(n,t,i){n.css({"background-position-x":t,"background-position-y":i})}:function(n,t,i){n.css("background-position",t+" "+i)},y=l?function(n){return[n.css("background-position-x"),n.css("background-position-y")]}:function(n){return n.css("background-position").split(" ")},a=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(n){setTimeout(n,1e3/60)};f.prototype={init:function(){this.options.name=u+"_"+Math.floor(Math.random()*1e9);this._defineElements();this._defineGetters();this._defineSetters();this._handleWindowLoadAndResize();this._detectViewport();this.refresh({firstLoad:!0});this.options.scrollProperty==="scroll"?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===i.body&&(this.element=t);this.$scrollElement=n(this.element);this.$element=this.element===t?n("body"):this.$scrollElement;this.$viewportElement=this.options.viewportElement!==r?n(this.options.viewportElement):this.$scrollElement[0]===t||this.options.scrollProperty==="scroll"?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var n=this,t=e[n.options.scrollProperty];this._getScrollLeft=function(){return t.getLeft(n.$scrollElement)};this._getScrollTop=function(){return t.getTop(n.$scrollElement)}},_defineSetters:function(){var t=this,r=e[t.options.scrollProperty],i=c[t.options.positionProperty],u=r.setLeft,f=r.setTop;this._setScrollLeft=typeof u=="function"?function(n){u(t.$scrollElement,n)}:n.noop;this._setScrollTop=typeof f=="function"?function(n){f(t.$scrollElement,n)}:n.noop;this._setPosition=i.setPosition||function(n,r,u,f,e){t.options.horizontalScrolling&&i.setLeft(n,r,u);t.options.verticalScrolling&&i.setTop(n,f,e)}},_handleWindowLoadAndResize:function(){var i=this,r=n(t);i.options.responsive&&r.bind("load."+this.name,function(){i.refresh()});r.bind("resize."+this.name,function(){i._detectViewport();i.options.responsive&&i.refresh()})},refresh:function(i){var r=this,u=r._getScrollLeft(),f=r._getScrollTop();i&&i.firstLoad||this._reset();this._setScrollLeft(0);this._setScrollTop(0);this._setOffsets();this._findParticles();this._findBackgrounds();i&&i.firstLoad&&/WebKit/.test(navigator.userAgent)&&n(t).load(function(){var n=r._getScrollLeft(),t=r._getScrollTop();r._setScrollLeft(n+1);r._setScrollTop(t+1);r._setScrollLeft(n);r._setScrollTop(t)});this._setScrollLeft(u);this._setScrollTop(f)},_detectViewport:function(){var n=this.$viewportElement.offset(),t=n!==null&&n!==r;this.viewportWidth=this.$viewportElement.width();this.viewportHeight=this.$viewportElement.height();this.viewportOffsetTop=t?n.top:0;this.viewportOffsetLeft=t?n.left:0},_findParticles:function(){var t=this,u=this._getScrollLeft(),f=this._getScrollTop(),i;if(this.particles!==r)for(i=this.particles.length-1;i>=0;i--)this.particles[i].$element.data("stellar-elementIsActive",r);(this.particles=[],this.options.parallaxElements)&&this.$element.find("[data-stellar-ratio]").each(function(){var i=n(this),f,e,o,s,h,c,u,l,a,v=0,y=0,p=0,w=0;if(i.data("stellar-elementIsActive")){if(i.data("stellar-elementIsActive")!==this)return}else i.data("stellar-elementIsActive",this);t.options.showElement(i);i.data("stellar-startingLeft")?(i.css("left",i.data("stellar-startingLeft")),i.css("top",i.data("stellar-startingTop"))):(i.data("stellar-startingLeft",i.css("left")),i.data("stellar-startingTop",i.css("top")));o=i.position().left;s=i.position().top;h=i.css("margin-left")==="auto"?0:parseInt(i.css("margin-left"),10);c=i.css("margin-top")==="auto"?0:parseInt(i.css("margin-top"),10);l=i.offset().left-h;a=i.offset().top-c;i.parents().each(function(){var t=n(this);if(t.data("stellar-offset-parent")===!0)return v=p,y=w,u=t,!1;p+=t.position().left;w+=t.position().top});f=i.data("stellar-horizontal-offset")!==r?i.data("stellar-horizontal-offset"):u!==r&&u.data("stellar-horizontal-offset")!==r?u.data("stellar-horizontal-offset"):t.horizontalOffset;e=i.data("stellar-vertical-offset")!==r?i.data("stellar-vertical-offset"):u!==r&&u.data("stellar-vertical-offset")!==r?u.data("stellar-vertical-offset"):t.verticalOffset;t.particles.push({$element:i,$offsetParent:u,isFixed:i.css("position")==="fixed",horizontalOffset:f,verticalOffset:e,startingPositionLeft:o,startingPositionTop:s,startingOffsetLeft:l,startingOffsetTop:a,parentOffsetLeft:v,parentOffsetTop:y,stellarRatio:i.data("stellar-ratio")!==r?i.data("stellar-ratio"):1,width:i.outerWidth(!0),height:i.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var i=this,u=this._getScrollLeft(),f=this._getScrollTop(),t;(this.backgrounds=[],this.options.parallaxBackgrounds)&&(t=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(t=t.add(this.$element)),t.each(function(){var t=n(this),e=y(t),h,c,l,a,v,p,o,w=0,b=0,k=0,d=0;if(t.data("stellar-backgroundIsActive")){if(t.data("stellar-backgroundIsActive")!==this)return}else t.data("stellar-backgroundIsActive",this);t.data("stellar-backgroundStartingLeft")?s(t,t.data("stellar-backgroundStartingLeft"),t.data("stellar-backgroundStartingTop")):(t.data("stellar-backgroundStartingLeft",e[0]),t.data("stellar-backgroundStartingTop",e[1]));l=t.css("margin-left")==="auto"?0:parseInt(t.css("margin-left"),10);a=t.css("margin-top")==="auto"?0:parseInt(t.css("margin-top"),10);v=t.offset().left-l-u;p=t.offset().top-a-f;t.parents().each(function(){var t=n(this);if(t.data("stellar-offset-parent")===!0)return w=k,b=d,o=t,!1;k+=t.position().left;d+=t.position().top});h=t.data("stellar-horizontal-offset")!==r?t.data("stellar-horizontal-offset"):o!==r&&o.data("stellar-horizontal-offset")!==r?o.data("stellar-horizontal-offset"):i.horizontalOffset;c=t.data("stellar-vertical-offset")!==r?t.data("stellar-vertical-offset"):o!==r&&o.data("stellar-vertical-offset")!==r?o.data("stellar-vertical-offset"):i.verticalOffset;i.backgrounds.push({$element:t,$offsetParent:o,isFixed:t.css("background-attachment")==="fixed",horizontalOffset:h,verticalOffset:c,startingValueLeft:e[0],startingValueTop:e[1],startingBackgroundPositionLeft:isNaN(parseInt(e[0],10))?0:parseInt(e[0],10),startingBackgroundPositionTop:isNaN(parseInt(e[1],10))?0:parseInt(e[1],10),startingPositionLeft:t.position().left,startingPositionTop:t.position().top,startingOffsetLeft:v,startingOffsetTop:p,parentOffsetLeft:w,parentOffsetTop:b,stellarRatio:t.data("stellar-background-ratio")===r?1:t.data("stellar-background-ratio")})}))},_reset:function(){for(var t,r,u,i,n=this.particles.length-1;n>=0;n--)t=this.particles[n],r=t.$element.data("stellar-startingLeft"),u=t.$element.data("stellar-startingTop"),this._setPosition(t.$element,r,r,u,u),this.options.showElement(t.$element),t.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(n=this.backgrounds.length-1;n>=0;n--)i=this.backgrounds[n],i.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),s(i.$element,i.startingValueLeft,i.startingValueTop)},destroy:function(){this._reset();this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name);this._animationLoop=n.noop;n(t).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var i=this,r=n(t);r.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name);typeof this.options.horizontalOffset=="function"?(this.horizontalOffset=this.options.horizontalOffset(),r.bind("resize.horizontal-"+this.name,function(){i.horizontalOffset=i.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset;typeof this.options.verticalOffset=="function"?(this.verticalOffset=this.options.verticalOffset(),r.bind("resize.vertical-"+this.name,function(){i.verticalOffset=i.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var r=this._getScrollLeft(),u=this._getScrollTop(),n,f,t,l,a,v=!0,y=!0,e,o,h,c,i;if(this.currentScrollLeft!==r||this.currentScrollTop!==u||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){for(this.currentScrollLeft=r,this.currentScrollTop=u,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight,i=this.particles.length-1;i>=0;i--)n=this.particles[i],f=n.isFixed?1:0,this.options.horizontalScrolling?(e=(r+n.horizontalOffset+this.viewportOffsetLeft+n.startingPositionLeft-n.startingOffsetLeft+n.parentOffsetLeft)*-(n.stellarRatio+f-1)+n.startingPositionLeft,h=e-n.startingPositionLeft+n.startingOffsetLeft):(e=n.startingPositionLeft,h=n.startingOffsetLeft),this.options.verticalScrolling?(o=(u+n.verticalOffset+this.viewportOffsetTop+n.startingPositionTop-n.startingOffsetTop+n.parentOffsetTop)*-(n.stellarRatio+f-1)+n.startingPositionTop,c=o-n.startingPositionTop+n.startingOffsetTop):(o=n.startingPositionTop,c=n.startingOffsetTop),this.options.hideDistantElements&&(y=!this.options.horizontalScrolling||h+n.width>(n.isFixed?0:r)&&h<(n.isFixed?0:r)+this.viewportWidth+this.viewportOffsetLeft,v=!this.options.verticalScrolling||c+n.height>(n.isFixed?0:u)&&c<(n.isFixed?0:u)+this.viewportHeight+this.viewportOffsetTop),y&&v?(n.isHidden&&(this.options.showElement(n.$element),n.isHidden=!1),this._setPosition(n.$element,e,n.startingPositionLeft,o,n.startingPositionTop)):n.isHidden||(this.options.hideElement(n.$element),n.isHidden=!0);for(i=this.backgrounds.length-1;i>=0;i--)t=this.backgrounds[i],f=t.isFixed?0:1,l=this.options.horizontalScrolling?(r+t.horizontalOffset-this.viewportOffsetLeft-t.startingOffsetLeft+t.parentOffsetLeft-t.startingBackgroundPositionLeft)*(f-t.stellarRatio)+"px":t.startingValueLeft,a=this.options.verticalScrolling?(u+t.verticalOffset-this.viewportOffsetTop-t.startingOffsetTop+t.parentOffsetTop-t.startingBackgroundPositionTop)*(f-t.stellarRatio)+"px":t.startingValueTop,s(t.$element,l,a)}},_handleScrollEvent:function(){var i=this,n=!1,r=function(){i._repositionElements();n=!1},t=function(){n||(a(r),n=!0)};this.$scrollElement.bind("scroll."+this.name,t);t()},_startAnimationLoop:function(){var n=this;this._animationLoop=function(){a(n._animationLoop);n._repositionElements()};this._animationLoop()}};n.fn[u]=function(t){var i=arguments;return t===r||typeof t=="object"?this.each(function(){n.data(this,"plugin_"+u)||n.data(this,"plugin_"+u,new f(this,t))}):typeof t=="string"&&t[0]!=="_"&&t!=="init"?this.each(function(){var r=n.data(this,"plugin_"+u);r instanceof f&&typeof r[t]=="function"&&r[t].apply(r,Array.prototype.slice.call(i,1));t==="destroy"&&n.data(this,"plugin_"+u,null)}):void 0};n[u]=function(){var i=n(t);return i.stellar.apply(i,Array.prototype.slice.call(arguments,0))};n[u].scrollProperty=e;n[u].positionProperty=c;t.Stellar=f})(jQuery,this,document);
/*!
 * verge 1.9.1+201402130803
 * https://github.com/ryanve/verge
 * MIT License 2013 Ryan Van Etten
 */
!function(n,t,i){"undefined"!=typeof module&&module.exports?module.exports=i():n[t]=i()}(this,"verge",function(){function o(){return{width:f(),height:e()}}function h(n,t){var i={};return t=+t||0,i.width=(i.right=n.right+t)-(i.left=n.left-t),i.height=(i.bottom=n.bottom+t)-(i.top=n.top-t),i}function i(n,t){return n=n&&!n.nodeType?n[0]:n,n&&1===n.nodeType?h(n.getBoundingClientRect(),t):!1}function c(n){n=null==n?o():1===n.nodeType?i(n):n;var t=n.height,r=n.width;return t="function"==typeof t?t.call(n):t,r="function"==typeof r?r.call(n):r,r/t}var n={},t="undefined"!=typeof window&&window,s="undefined"!=typeof document&&document,r=s&&s.documentElement,u=t.matchMedia||t.msMatchMedia,l=u?function(n){return!!u.call(t,n).matches}:function(){return!1},f=n.viewportW=function(){var n=r.clientWidth,i=t.innerWidth;return i>n?i:n},e=n.viewportH=function(){var n=r.clientHeight,i=t.innerHeight;return i>n?i:n};return n.mq=l,n.matchMedia=u?function(){return u.apply(t,arguments)}:function(){return{}},n.viewport=o,n.scrollX=function(){return t.pageXOffset||r.scrollLeft},n.scrollY=function(){return t.pageYOffset||r.scrollTop},n.rectangle=i,n.aspect=c,n.inX=function(n,t){var r=i(n,t);return!!r&&r.right>=0&&r.left<=f()},n.inY=function(n,t){var r=i(n,t);return!!r&&r.bottom>=0&&r.top<=e()},n.inViewport=function(n,t){var r=i(n,t);return!!r&&r.bottom>=0&&r.right>=0&&r.top<=e()&&r.left<=f()},n});Froogaloop=function(){function t(n){return new t.fn.init(n)}function i(n,t,i){if(!i.contentWindow.postMessage)return!1;var r=i.getAttribute("src").split("?")[0],n=JSON.stringify({method:n,value:t});"//"===r.substr(0,2)&&(r=window.location.protocol+r);i.contentWindow.postMessage(n,r)}function u(t){var i,u;try{i=JSON.parse(t.data);u=i.event||i.method}catch(s){}if("ready"!=u||r||(r=!0),t.origin!=e)return!1;var t=i.value,o=i.data,f=""===f?null:i.player_id;return(i=f?n[f][u]:n[u],u=[],!i)?!1:(void 0!==t&&u.push(t),o&&u.push(o),f&&u.push(f),0<u.length?i.apply(null,u):i.call())}function f(t,i,r){r?(n[r]||(n[r]={}),n[r][t]=i):n[t]=i}var n={},r=!1,e="";return t.fn=t.prototype={element:null,init:function(n){"string"==typeof n&&(n=document.getElementById(n));this.element=n;n=this.element.getAttribute("src");"//"===n.substr(0,2)&&(n=window.location.protocol+n);for(var n=n.split("/"),i="",t=0,r=n.length;t<r;t++){if(3>t)i+=n[t];else break;2>t&&(i+="/")}return e=i,this},api:function(n,t){if(!this.element||!n)return!1;var r=this.element,e=""!==r.id?r.id:null,o=!t||!t.constructor||!t.call||!t.apply?t:null,u=t&&t.constructor&&t.call&&t.apply?t:null;return u&&f(n,u,e),i(n,o,r),this},addEvent:function(n,t){if(!this.element)return!1;var u=this.element,e=""!==u.id?u.id:null;return f(n,t,e),"ready"!=n?i("addEventListener",n,u):"ready"==n&&r&&t.call(null,e),this},removeEvent:function(t){if(!this.element)return!1;var u=this.element,r;n:{if((r=""!==u.id?u.id:null)&&n[r]){if(!n[r][t]){r=!1;break n}n[r][t]=null}else{if(!n[t]){r=!1;break n}n[t]=null}r=!0}"ready"!=t&&r&&i("removeEventListener",t,u)}},t.fn.init.prototype=t.fn,window.addEventListener?window.addEventListener("message",u,!1):window.attachEvent("onmessage",u),window.Froogaloop=window.$f=t}();$(document).ready(function(){newLandingForm();landingSignupTracking();landing.video.init();pageScroll();addWwhExpandClass()});newLandingForm=function(){$(".js-newlanding-signup-form").submit(function(){var n,t,i;return $(".js-newlanding-signup-form input").removeClass("missing"),$(".firstname-hint").hide(),$(".lastname-hint").hide(),$(".emailaddress-hint").hide(),$(".password-hint").hide(),n=!0,t=$(".js-firstname"),t.val()||(t.addClass("missing"),$(".firstname-hint").show(),n=!1),i=$(".js-lastname"),i.val()||(i.addClass("missing"),$(".lastname-hint").show(),n=!1),$(".js-emailaddress").val()||($(".js-emailaddress").addClass("missing"),$(".emailaddress-hint").show(),n=!1),(!$(".js-password").val()||$(".js-password").val().length<8)&&($(".js-password").addClass("missing"),$(".password-hint").show(),n=!1),typeof _gaq!="undefined"&&n&&_gaq.push(["_trackEvent","newLandingSignupForm","submitted"]),n});$(".js-newlanding-signup-form input").focus(function(){var n=$(this);n.hasClass("missing")&&n.removeClass("missing")})};landing={};landing.video={};landing.video.init=function(){landing.video.addExpand()};landing.video.addExpand=function(){var n=document.getElementById("landing-video-place-holder-image");$(n).click(function(){var n=document.getElementById("landing-action-wrapper");$(n).addClass("expand");landing.video.play()})};landing.video.play=function(){var n=document.getElementById("landing-video"),t=$f(n);t.api("play")};var pageScroll=function(){$(".js-scroll-btn").click(function(){$("html, body").animate({scrollTop:$(this.rel).offset().top},1500)})},sectionTimeCount=function(){var n={view1:0,view2:0,view3:0,view4:0},t=function(){var t=document.getElementById("landing-section-1"),i=document.getElementById("landing-section-2"),r=document.getElementById("landing-section-3"),u=document.getElementById("landing-section-4"),f;verge.inViewport(t,-300)&&(n.view1+=.5,document.getElementById("view-section-1").innerHTML=parseInt(n.view1,10));verge.inViewport(i,-300)&&(n.view2+=.5,document.getElementById("view-section-2").innerHTML=parseInt(n.view2,10));verge.inViewport(r,-300)&&(n.view3+=.5,document.getElementById("view-section-3").innerHTML=parseInt(n.view3,10),f=document.getElementById("landing-section-3").className+=" animate-in");verge.inViewport(u,-100)&&(n.view4+=.5,document.getElementById("view-section-4").innerHTML=parseInt(n.view4,10))},i=setInterval(function(){t()},500)},addWwhExpandClass=function(){var n=document.getElementById("landing-section-3"),t=function(){verge.inViewport(n,-300)&&(n.className+=" animate-in",clearInterval(i))},i=setInterval(function(){t()},500)}