$(function(){var n=$("section.features");var z=n.children("div");var D=n.children("ul").find("li");var s=D.length;var v=0;D.find("a").click(function(){var e=$(this);D.removeClass("active");z.removeClass("active");e.parent().addClass("active");z.filter(e.attr("rel")).addClass("active");return false});D.removeClass("active").eq(v).addClass("active");function k(e){if(e.length>500){var i=e.indexOf(" ",490);return e.substring(0,i>485?i:500)+"..."}return e}var c=$(".social .blog ul");try{$.each(tumblr_api_read.posts,function(G,l){if(G>0){return}var e="<li>";switch(l.type){case"regular":e+="<a href='"+l.url+"'>"+l["regular-title"]+"</a><p>"+k(l["regular-body"]).replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g,function(i){return'<a href="'+i+'">'+i+"</a>"}).replace(/#(\S+)/g,'<a href="https://twitter.com/#!/#$1">#$1</a>').replace(/@(\S+)/g,'<a href="https://twitter.com/#!/$1">@$1</a>')+"</p>";break;case"photo":e+="<figure><a href='"+l.url+"'><img src='"+l["photo-url-75"]+"' /></a><figcaption>"+k(l["photo-caption"]).replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g,function(i){return'<a href="'+i+'">'+i+"</a>"}).replace(/#(\S+)/g,'<a href="https://twitter.com/#!/#$1">#$1</a>').replace(/@(\S+)/g,'<a href="https://twitter.com/#!/$1">@$1</a>')+"</figcaption></figure>";break;case"link":e+="<a href='"+l["link-url"]+"'>"+l["link-text"]+"</a><p>"+k(l["link-description"]).replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g,function(i){return'<a href="'+i+'">'+i+"</a>"}).replace(/#(\S+)/g,'<a href="https://twitter.com/#!/#$1">#$1</a>').replace(/@(\S+)/g,'<a href="https://twitter.com/#!/$1">@$1</a>')+"</p>";break;case"quote":e+="<blockquote><a href='"+l.url+"'>"+l["quote-text"]+"</a></blockquote><cite>"+k(l["quote-source"])+"</cite>";break;case"video":e+="<a href='"+l.url+"'>"+l["video-caption"]+"</a>";break;case"answer":e+="<a href='"+l.url+"'>"+l.question+"</a><p>"+l.answer.cutLongString(l.answer)+"</p>";break}e+="<span>Posted on "+l.date+"</span></li>";c.append(e)})}catch(y){}var q=$(".social .networks ul");$.ajax({url:"http://twitter.com/favorites/groundlink.json?count=3&callback=?",dataType:"json",success:function(e){$.each(e,function(G,l){q.append("<li><a href='http://twitter.com/"+l.user.name+"'><img src='"+l.user.profile_image_url+"' alt='@"+l.user.name+"' /></a><p><a href='http://twitter.com/"+l.user.name+"'>@"+l.user.name+"</a><br/>"+l.text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g,function(i){return'<a href="'+i+'">'+i+"</a>"}).replace(/\B@([_a-z0-9]+)/ig,function(i){return i.charAt(0)+'<a href="http://twitter.com/'+i.substring(1)+'">'+i.substring(1)+"</a>"})+"</p></li>")})}});return;var r;var F,E;function u(i){function e(l){if(l==null){return"00"}l=parseInt(l);if(l==0||isNaN(l)){return"00"}l=Math.max(0,l);l=Math.min(l,255);l=Math.round(l);return"0123456789ABCDEF".charAt((l-l%16)/16)+"0123456789ABCDEF".charAt(l%16)}return e(i[0])+e(i[1])+e(i[2])}$.fx.step.gradient=function(e){if(!e.colorInit){var i=e.options;e.startTop=i.startTop;e.endTop=i.endTop;e.startBottom=i.startBottom;e.endBottom=i.endBottom;e.colorInit=true}if(jQuery.browser.msie){e.elem.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr=#"+u([Math.max(Math.min(parseInt((e.pos*(e.endTop[0]-e.startTop[0]))+e.startTop[0],10),255),0),Math.max(Math.min(parseInt((e.pos*(e.endTop[1]-e.startTop[1]))+e.startTop[1],10),255),0),Math.max(Math.min(parseInt((e.pos*(e.endTop[2]-e.startTop[2]))+e.startTop[2],10),255),0)])+",EndColorStr=#"+u([Math.max(Math.min(parseInt((e.pos*(e.endBottom[0]-e.startBottom[0]))+e.startBottom[0],10),255),0),Math.max(Math.min(parseInt((e.pos*(e.endBottom[1]-e.startBottom[1]))+e.startBottom[1],10),255),0),Math.max(Math.min(parseInt((e.pos*(e.endBottom[2]-e.startBottom[2]))+e.startBottom[2],10),255),0)])+")"}else{if($.browser.webkit){e.elem.style.backgroundImage="-webkit-gradient(linear,left top,left bottom,color-stop(0,rgb("+Math.max(Math.min(parseInt((e.pos*(e.endTop[0]-e.startTop[0]))+e.startTop[0],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endTop[1]-e.startTop[1]))+e.startTop[1],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endTop[2]-e.startTop[2]))+e.startTop[2],10),255),0)+")),color-stop(1, rgb("+Math.max(Math.min(parseInt((e.pos*(e.endBottom[0]-e.startBottom[0]))+e.startBottom[0],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endBottom[1]-e.startBottom[1]))+e.startBottom[1],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endBottom[2]-e.startBottom[2]))+e.startBottom[2],10),255),0)+")))"}else{if($.browser.mozilla){e.elem.style.backgroundImage="-moz-linear-gradient(top, rgb("+Math.max(Math.min(parseInt((e.pos*(e.endTop[0]-e.startTop[0]))+e.startTop[0],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endTop[1]-e.startTop[1]))+e.startTop[1],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endTop[2]-e.startTop[2]))+e.startTop[2],10),255),0)+"),rgb("+Math.max(Math.min(parseInt((e.pos*(e.endBottom[0]-e.startBottom[0]))+e.startBottom[0],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endBottom[1]-e.startBottom[1]))+e.startBottom[1],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endBottom[2]-e.startBottom[2]))+e.startBottom[2],10),255),0)+")"}else{e.elem.style.backgroundColor="rgb("+Math.max(Math.min(parseInt((e.pos*(e.endTop[0]-e.startTop[0]))+e.startTop[0],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endTop[1]-e.startTop[1]))+e.startTop[1],10),255),0)+","+Math.max(Math.min(parseInt((e.pos*(e.endTop[2]-e.startTop[2]))+e.startTop[2],10),255),0)+")"}}}};var p=$("#bg section");F=p.eq(0);E=p.eq(1);var h=$("<ul></ul>").appendTo("#bg");p.removeClass("active").eq(0).fadeIn(jQuery.browser.msie?500:1500,function(){p.filter(":visible").addClass("active");h.fadeIn()});if(p.length>1){$.each(p,function(l,e){h.append($("<li><a href='#"+$(e).attr("class")+"'>&bull;</a></li>"))});var a=h.find("a").removeClass("active");a.eq(0).addClass("active");var b=function(){r=setInterval(function(){t()},10000)};var A=function(){clearInterval(r);p.stop().fadeOut(250,function(){$(this).removeClass("active").css("margin-left","-480px")});a.removeClass("active")};var t=function(e){F=p.filter(".active");if(e){A();b();E=p.filter("."+e)}else{E=F.next("section").length?F.next("section"):p.first()}F.animate({"margin-left":"-800",opacity:0},750,"swing",function(){a.removeClass("active").filter("[href=#"+E.attr("class")+"]").addClass("active");E.fadeIn(jQuery.browser.msie?500:1500).addClass("active");F.removeClass("active").css("margin-left","-480px");if(jQuery.browser.msie){F.fadeTo(1).hide()}else{F.css("opacity",1).hide()}})};a.click(function(i){t($(i.target).attr("href").substr(1));$(i.target).addClass("active");return false});b()}if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))){function g(e,l){if(window[e]!==undefined){return window[e]}var i=document.documentElement;if(i&&i[l]){return i[l]}return document.body[l]}function f(){return g("pageYOffset","scrollTop")}function m(){return g("pageXOffset","scrollLeft")}function C(){return g("innerWidth","clientWidth")}function x(){return g("innerHeight","clientHeight")}function j(e){e.css({top:f()+"px",left:m()+"px"});return e.width(C()).height(x())}function d(e){return e.bind("touchstart",function(){return false})}function B(e){if(e==true){$("head meta[name=viewport]").remove();$("head").prepend('<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10.0, minimum-scale=1, user-scalable=1" />')}else{$("head meta[name=viewport]").remove();$("head").prepend('<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" />')}}function o(G){var i=$('<div id="galleryShade">').css({top:0,left:0,background:"#000",opacity:1,"z-index":1000});var e=Math.max(screen.width,screen.height)*(screen.width||1)+Math.max(m(),f())+100;i.css({position:"absolute"}).width(e).height(e);i.insertBefore(G)}jQuery.cookie=function(G,H,i){if(arguments.length>1&&(H===null||typeof H!=="object")){i=jQuery.extend({},i);if(H===null){i.expires=-1}if(typeof i.expires==="number"){var J=i.expires,l=i.expires=new Date();l.setDate(l.getDate()+J)}return(document.cookie=[encodeURIComponent(G),"=",i.raw?String(H):encodeURIComponent(String(H)),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join(""))}i=H||{};var e,I=i.raw?function(K){return K}:decodeURIComponent;return(e=new RegExp("(?:^|; )"+encodeURIComponent(G)+"=([^;]*)").exec(document.cookie))?I(e[1]):null};if(!$.cookie("IPHONE_SPLASH")){B(false);var w=j(d($('<div id="galleryViewport">').css({position:"fixed",top:0,left:0,background:"#222","overflow-x":"hidden","overflow-y":"auto","z-index":1001}).appendTo("body")));o(w);w.html('<div id="splash" style="color:#fff;width:90%;margin:0.4em auto 0 auto;text-align:center;text-shadow: 0px 2px 1px rgba(1,1,1,0.9);"><span style="font-size:1.3em;color:#fff;display:block;">Using an iPhone?</span><span style="font-size:1.6em;color:#fd8917;display:block;font-weight:bold;margin-top:0.3em;">Make the most of it with our App!</span><img src="/images/v2/iphone/iphone-splash.png" style="float:left;margin-top:1em;width:40%"/><ul style="margin-left:0.3em;margin-top:1em;float:right;list-style:square;color:#fff;width:49%;text-align:left;line-height:1.5em;font-size:1.3em;"><li>One click reservation</li><li style="margin:1em 0 1em 0;">ASAP booking</li><li>Real time monitoring</li></ul><a id="app-store" href="http://itunes.apple.com/us/app/limores/id328349912?mt=8#" style="position:absolute;bottom:10%;-webkit-border-radius:10px;border-radius:10px;width:90%;text-align:center;display:block;float:left;text-decoration:none;background:#fd8917;font-weight:bold;font-size:1.2em;text-shadow: 0px 1px 2px rgba(255,255,255,0.6);padding:1em 0;color:rgba(1,1,1,0.8)">Download the GroundLink App</a><a href="/booking/index.html" id="hide-splash" style="position:absolute;bottom:1%;-webkit-border-radius:5px;border-radius:5px;float:left;clear:left;margin-top:0.6em;background:#4c4c4c;padding:0.5em 0;width:90%;color:#fff;text-decoration:none;font-weight:bold;">Go to mobile site</a></div>');$("a#hide-splash").bind("click touchstart",function(){document.location=$(this).attr("href");return false});$("a#app-store").bind("click touchstart",function(){document.location=$(this).attr("href")});$(window).bind("orientationchange",function(){window.scrollTo(0,1);j(w)});setTimeout(function(){$(window).trigger("orientationchange")},500)}}});
