$(document).bind('contentReady',function(event,content){Cufon.set('fontFamily','Lane Narrow');Cufon.replace('#header .right-side .contact .item');Cufon.set('fontFamily','Apple Symbols');Cufon.replace('#nav > li',{hover:true,hoverables:{li:true},textless:{li:true},ignore:{ul:true}});Cufon.replace('#main-banner .heading .headline');Cufon.replace('#main-banner .side-links a');content.find('input[type="radio"]').ezMark({radioCls:'radio',selectedCls:'radio-checked'});content.find('input[type="checkbox"]').ezMark({checkboxCls:'checkbox',checkedCls:'checkbox-checked'});content.find('.tabs').tabs();content.find('.accordion').accordion({autoHeight:false,active:false,header:'> .item > .title'});content.find("select.custom, .row .inner select").sSelect({ddMaxHeight:'300px',defaultText:''});content.find('.panel.our-fleet .carousel').jcarousel({scroll:1,buttonNextHTML:'<div>Next</div>',buttonPrevHTML:'<div>Prev</div>'});content.find('.aircraft-gallery .carousel').jcarousel({wrap:'last',scroll:5});var navWidth=$('#nav').width(),navItemNum=$('#nav > li').length,navItemMargin=parseInt($('#nav > li').css('margin-right')),navItemPadding=parseInt($('#nav > li > a').css('padding-right')),navItemOffset=(navItemNum-1)*(navItemMargin+navItemPadding),navItemWidth=Math.floor((navWidth-navItemOffset)/navItemNum),navLastItemWidth=navItemWidth+navWidth-((navItemNum*navItemWidth)+navItemOffset);content.find('#nav > li > a > span').css({'width':navItemWidth+'px'});content.find('#nav > li:last-child > a > span').css({'width':navLastItemWidth+'px'});var latestNewsData={pause:7000,delay:600}
slideLatestNews($('#footer .module.latest-news .content a:first-child'));function slideLatestNews(newsItem){var currentItem=$(newsItem),nextItem=$(currentItem).next();if(!nextItem.length){nextItem=$('#footer .module.latest-news .content a:first-child');}
currentItem.css({'display':'none'}).fadeIn(latestNewsData.delay).delay(latestNewsData.pause).fadeOut(latestNewsData.delay,function(){slideLatestNews(nextItem);});}
rbIndex=1;content.find('.app-decibelcms-module-webform .add-stage').click(function(){var journeyStageNum=$('.app-decibelcms-module-webform .journey-stage').length;createJourneyStage(++journeyStageNum);return false;})});function createJourneyStage(index){++rbIndex;var newJourney=$($('.clone-stage-field').html().replace(/INDEX/g,rbIndex));$('.app-decibelcms-module-webform .journey-stage-add').before(newJourney);newJourney.find('.remove-stage').click(removeJourneyStages);newJourney.find('.app-decibel-widget-ddatewidget input[type=text]').removeClass('hasDatepicker').datepicker();}
function recalculateJourneyStages(){$('.app-decibelcms-module-webform .journey-stage').has('.remove-stage').each(function(i){var thisStage=$(this),index=i+2;$(thisStage).find('.section-name').text('Journey Stage '+index);});}
function removeJourneyStages(){$(this).parents('.journey-stage').remove();recalculateJourneyStages();return false;}
var lpMTagConfig={'lpServer':"server.iad.liveperson.net",'lpNumber':"82679923",'lpProtocol':(document.location.toString().indexOf('https:')==0)?'https':'http'};function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}
if(src.indexOf('http')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)
src=src+'?';else
src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}}
var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);}
if(window.attachEvent)
window.attachEvent('onload',lpAddMonitorTag);else
window.addEventListener("load",lpAddMonitorTag,false);
