var FCL={};FCL.SETTINGS={name:"FCL.SETTINGS",flashVars:{expressInstall:"/fcl/js/ext/swfobject/expressInstall.swf",minVersion:"9.0.0"},datePicker:{showOn:"both",buttonImage:"/fcl/img/datepicker.gif",dateFormat:"dd/mm/yy",buttonText:"Choose date",buttonImageOnly:true}};
(function($){FCL.UTIL={name:"FCL.UTIL",init:function(){this.handleErrors(this);$.fn.fclExternalLinks=function(){return FCL.UTIL.externalLinks(this)};$.fn.fclTruncateText=function(settings){settings=settings||{};
return FCL.UTIL.truncateText(this,settings)};$.fn.fclIsImageBroken=function(){return FCL.UTIL.isImageBroken(this)};String.prototype.fclFormat=this.format
},popup:function(url,windowName,width,height){var name=(typeof windowName=="undefined")?"popup":windowName;var width=(typeof width=="undefined")?380:width;
var height=(typeof height=="undefined")?220:height;var win=window.open(url,windowName,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+width+",height="+height);
win.focus();return win},isEmailValid:function(email){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(email)
},isValidPostCode:function(postCode){postCode=postCode.toString().match(/\d+/g)[0];if(postCode.length!==4||parseInt(postCode,10)<0||parseInt(postCode,10)>=9000){return false
}return true},formatCurrency:function(amount){var amount,amountArray;amount=amount.toString().match(/[\d\.]+/)[0];amountArray=[];if(amount.indexOf(".")>-1){amountArray.unshift(amount.substring(amount.indexOf(".")));
amount=amount.substring(0,amount.indexOf("."))}for(var i=amount.length;i>0;i-=3){amountArray.unshift(amount.substring(i,i-3))}return amountArray.join(",").replace(",.",".")
},getUrlVars:function(strUrl,param){var queryString="",urlVars="",urlObj={};if(strUrl==""||typeof strUrl=="undefined"){queryString=window.location.search
}else{queryString=strUrl}if(queryString==""){return""}urlVars=queryString.substring(1).split("&");for(var i=0;i<urlVars.length;i++){var urlVar=urlVars[i].split("=");
urlObj[urlVar[0]]=decodeURIComponent(urlVar[1])}if(typeof param!="undefined"){if(typeof urlObj[param]!="undefined"){return urlObj[param]}else{return""}}return urlObj
},getUrlVar:function(key){return this.getUrlVars("",key)},log:function(expression){try{console.log(expression)}catch(e){}},camelCaseSplit:function(str){var s=this.trim(str);
return(/\S[A-Z]/.test(s))?s.replace(/(.)([A-Z])/g,function(t,a,b){return a+" "+b.toLowerCase()}):s.replace(/( )([a-z])/g,function(t,a,b){return b.toUpperCase()
})},camelCaseToTitleText:function(str){var numbers,parts,result;numbers=str.match(/\d+/g);str=str.replace(/\d+/g,"@");parts=FCL.UTIL.camelCaseSplit(str);
result=FCL.UTIL.titleCaps(parts);if(numbers===null){return result}for(var i=0;i<numbers.length;i++){result=result.replace(/@/,numbers[i])}return result
},format:function(){var args=[].slice.call(arguments);if(this.toString()!="[object Object]"){args.unshift(this.toString())}var pattern=new RegExp("{([1-"+args.length+"])}","g");
return String(args[0]).replace(pattern,function(match,index){return args[index]})},newLineToBr:function(str){return str.replace(/(\r\n|[\r\n])/g,"<br />")
},truncateText:function($e,settings){if($e.length==0){return $e}var defaults={maxLength:180,finish:"&hellip;",stopChar:".",ignoreStopChar:false};settings=(typeof settings!="undefined")?$.extend(defaults,settings):defaults;
return $e.each(function(){var text=$.trim($(this).text()).replace(/[\n\r\t]+/gm," ").replace(/\.[ ]+([A-Z0-9a-z]+)/gm,". $1").replace(/\.([a-zA-Z0-9]+)/gmi,". $1");
var position=settings.maxLength;var prevStrPos=0;var search=true;var count=0;while(search){var strPos=prevStrPos+text.substring(prevStrPos).indexOf(settings.stopChar);
if(strPos>=settings.maxLength||(prevStrPos-1)==strPos||count>10){search=false;break}if(strPos<settings.maxLength){position=strPos;prevStrPos=position+1
}}var truncatedString=(settings.ignoreStopChar)?text.substring(0,settings.maxLength).replace("&hellip;","").replace("…",""):text.substring(0,position);
if(position!=settings.maxLength){$(this).html(truncatedString+settings.stopChar);if(settings.ignoreStopChar){$(this).html($(this).html().substring(0,$(this).html().length-1)+settings.finish)
}}else{if(truncatedString.indexOf(settings.stopChar)==-1&&text.length<settings.maxLength){$(this).html(truncatedString+settings.finish)}else{var spaceCharPos=truncatedString.lastIndexOf(" ");
$(this).html(truncatedString.substring(0,spaceCharPos)+settings.finish)}}var html=$(this).html();var lastChar=html.charAt(html.length-2);if(lastChar==settings.stopChar||lastChar==" "){$(this).html(html.substring(0,html.length-2)+settings.finish)
}return $(this)})},filterInputText:function(str){try{return str.replace(/\s+/gm," ").match(/[a-zA-Z0-9\(\), \.!\/:%@&\?\+_=\-\$]+/gm).join("")}catch(e){return""
}},automateWebTrendsVars:function(){var template='<meta name="{1}" content="{2}" />';var $head=$("head");var metaKeys=["WT.ti","WT.cg_n","WT.cg_s","WT.seg_2"];
var metaProps=window.location.pathname.split("/");metaProps[0]=document.title;for(var i=0;i<metaKeys.length;i++){if($head.find('meta[name="'+metaKeys[i]+'"]').length==0&&typeof metaProps[i]!="undefined"){$head.append(this.format(template,metaKeys[i],metaProps[i]))
}}},registerGAPageView:function(settings){var settings=settings||{},defaults={basePath:"/on-page-event/enquiry/",path:"general-enquiry"};if(typeof settings=="string"){settings={bashPath:"",path:settings}
}settings=$.extend(defaults,settings);if(typeof _gaq!="undefined"){return _gaq.push(["_trackPageview",settings.basePath+settings.path])}if(typeof pageTracker!="undefined"){return pageTracker._trackPageview(settings.basePath+settings.path)
}},trim:function(str){return str.replace(/^\s+|\s+$/g,"")},sluggify:function(str){return this.urlify(str)},urlify:function(str){return str.replace(/^\s+|\s+$/g,"").replace(/[^a-zA-Z0-9 ]+/g,"").replace(/ /g,"-").toLowerCase()
},getEnv:function(){var host=window.location.host.substring(0,window.location.host.indexOf("."));var env="";switch(host){case"int":env="development";break;
case"stage":env="staging";break;case"newstage":env="staging";break;case"www":env="production";break;default:env="production";break}return env},getJS:function(path,method){$.getScript(path,function(data){$(function(){if(typeof method=="string"){eval(method)
}if(typeof method=="function"){method()}})})},externalLinks:function($el){return $el.bind("click",function(e){e.preventDefault();window.open($(this).attr("href"))
})},handleErrors:function(object){var func,method;for(func in object){method=object[func];if(typeof method=="function"){object[func]=function(func,method){return function(){try{return method.apply(this,arguments)
}catch(e){var objectName,errorMessage,lineNumber;objectName=(typeof object.name!="undefined")?object.name+".":"";lineNumber=(typeof e.lineNumber!="undefined")?" (line number "+e.lineNumber+")":"";
errorMessage="ERROR: "+objectName+func+"(): "+e.message+lineNumber;FCL.UTIL.log(errorMessage);if(FCL.UTIL.getUrlVar("debug").toLowerCase()=="true"||FCL.UTIL.getEnv()=="development"){alert(errorMessage)
}}}}(func,method)}}},throwError:function(message){var env=this.getEnv();if(env=="staging"||env=="development"){alert("ERROR: "+message)}},isEmptyObject:function(object){var isEmpty=true;
var arrayTester=$.type||$.isArray;if(arrayTester(object)=="array"){if(object.length>0){isEmpty=false}return isEmpty}for(var name in object){if(Object.prototype.hasOwnProperty.call(object,name)){isEmpty=false
}}return isEmpty},isImageBroken:function(image){$image=$(image);if($image.attr("complete")==false||$image.attr("naturalWidth")==0||$image.attr("readyState")=="uninitialized"||this.trim($image.attr("src"))==""){return true
}return false},_titleCaps:function(str){this.log("This method is deprecated, use FCL.UTIL.titleCaps instead.");return this.titleCaps(str)},ajaxQuery:function(query,template,callback,type,context,engine){if(typeof query=="undefined"||typeof template=="undefined"||typeof callback=="undefined"){return FCL.UTIL.throwError("UTIL.ajaxSecureQuery needs query, template and callback defined")
}var context=context||window;var engine=' engine="{1}"'.fclFormat(engine)||"";var type=type||"html";var query='<securequery template="{1}"{2}>{3}</securequery>'.fclFormat(template,engine,query);
$.post("/ajax/sitecat",{content:query},function(data){if(type=="json"){data=(new Function("return "+data))()}callback.call(context,data)},"html")}};(function(){var small="(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)";
var punct="([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]*)";FCL.UTIL.titleCaps=function(title){var parts=[],split=/[:.;?!] |(?: |^)["Ò]/g,index=0;while(true){var m=split.exec(title);
parts.push(title.substring(index,m?m.index:title.length).replace(/\b([A-Za-z][a-z.'Õ]*)\b/g,function(all){return/[A-Za-z]\.[A-Za-z]/.test(all)?all:upper(all)
}).replace(RegExp("\\b"+small+"\\b","ig"),lower).replace(RegExp("^"+punct+small+"\\b","ig"),function(all,punct,word){return punct+upper(word)}).replace(RegExp("\\b"+small+punct+"$","ig"),upper));
index=split.lastIndex;if(m){parts.push(m[0])}else{break}}return parts.join("").replace(/ V(s?)\. /ig," v$1. ").replace(/(['Õ])S\b/ig,"$1s").replace(/\b(AT&T|Q&A)\b/ig,function(all){return all.toUpperCase()
})};function lower(word){return word.toLowerCase()}function upper(word){return word.substr(0,1).toUpperCase()+word.substr(1)}})();FCL.UTIL.init()})(jQuery);
(function(a){FCL.DATETIME={name:"FCL.DATETIME",init:function(){FCL.UTIL.handleErrors(this);Date.prototype.fclFormat=this.format},todaysDate:function(){return this.futureDateDays(0)
},tomorrowsDate:function(){return this.futureDateDays(1)},weekFromToday:function(){return this.futureDateDays(7)},firstDayNextMonth:function(){var b=new Date();
nextMonth=new Date(b.getFullYear(),b.getMonth()+1,1);nextMonth.getDate()+"/"+(nextMonth.getMonth()+1)+"/"+nextMonth.getFullYear();return this.leadingZero(nextMonth.getDate())+"/"+this.leadingZero(nextMonth.getMonth()+1)+"/"+nextMonth.getFullYear()
},futureDateDays:function(c){var b=new Date();b.setDate(b.getDate()+c);return this.leadingZero(b.getDate())+"/"+this.leadingZero(b.getMonth()+1)+"/"+this.leadingZero(b.getFullYear())
},timeHHMM:function(){var b=new Date();return this.leadingZero(b.getHours())+this.leadingZero(b.getMinutes())},timeHHMMSS:function(){var b=new Date();return this.leadingZero(b.getHours())+":"+this.leadingZero(b.getMinutes())+":"+this.leadingZero(b.getSeconds())
},convertUSFormat:function(b,f){var f=(typeof(f)=="undefined")?"-":f;var c=new RegExp("([0-9]{2})/([0-9]{2})/([0-9]{4})","m");var e=c.exec(b);return e[2]+f+e[1]+f+e[3]
},convertUStoAUSDate:function(b,f){var f=(typeof(f)=="undefined")?"-":f;var c=new RegExp("([0-9]{2})/([0-9]{2})/([0-9]{4})","m");var e=c.exec(b);return e[2]+f+e[1]+f+e[3]
},isValidDate:function(c,f,b){var e=new Date(parseInt(c,10),parseInt(f,10)-1,parseInt(b,10));if(e.getDate()!=parseInt(b,10)||e.getMonth()!=(parseInt(f,10)-1)||e.getFullYear()!=parseInt(c,10)){return false
}return true},dateToYYYYMMDD:function(b){return(b.getFullYear()+this.leadingZero(b.getMonth()+1)+this.leadingZero(b.getDate())).toString()},dateToDDMMYYYY:function(b){return(this.leadingZero(b.getDate())+this.leadingZero(b.getMonth()+1)+b.getFullYear()).toString()
},stringToDate:function(b){try{var c=b.match(/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/);if(this.isValidDate(c[3],c[2],c[1])===false){return false}return new Date(c[3],parseInt(c[2],10)-1,parseInt(c[1],10))
}catch(f){return false}},leadingZero:function(c){var b=c.toString();if(b.length==1){b="0"+b}return b},isDepartureReturnDateValid:function(f,b){var e=this.stringToDate(f);
var c=this.stringToDate(b);if(e>c){return false}return true},isLeapYear:function(b){b=parseInt(b,10);if(b%4==0){if(b%100!=0){return true}else{if(b%400==0){return true
}else{return false}}}return false},compareDates:function(f,e){var c=e.getTime()-f.getTime();var b={};b.weeks=Math.round(c/(1000*60*60*24*7));b.days=Math.ceil(c/(1000*60*60*24));
b.hours=Math.ceil(c/(1000*60*60));b.minutes=Math.ceil(c/(1000*60));b.seconds=Math.ceil(c/(1000));b.milliseconds=c;return b},compareDatesDDMMYYYY:function(c,b){c=c.split("/");
c=new Date(c[2],c[1],c[0]);b=b.split("/");b=new Date(b[2],b[1],b[0]);return this.compareDates(c,b)},format:function(){var f,k,j=[].slice.call(arguments),b="",c="",e=["January","February","March","April","May","June","July","August","September","October","November","December"],l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g={d:function(){return(f.getDate()<10?"0":"")+f.getDate()
},D:function(){return l[f.getDay()].substring(0,3)},j:function(){return f.getDate()},l:function(){return l[f.getDay()]},N:function(){return f.getDay()+1
},S:function(){return(f.getDate()%10==1&&f.getDate()!=11?"st":(f.getDate()%10==2&&f.getDate()!=12?"nd":(f.getDate()%10==3&&f.getDate()!=13?"rd":"th")))
},w:function(){return f.getDay()},F:function(){return e[f.getMonth()]},m:function(){return(f.getMonth()<9?"0":"")+(f.getMonth()+1)},M:function(){return e[f.getMonth()].substring(0,3)
},n:function(){return f.getMonth()+1},Y:function(){return f.getFullYear()},y:function(){return(""+f.getFullYear()).substr(2)},a:function(){return f.getHours()<12?"am":"pm"
},A:function(){return f.getHours()<12?"AM":"PM"},g:function(){return f.getHours()%12||12},G:function(){return f.getHours()},h:function(){return((f.getHours()%12||12)<10?"0":"")+(f.getHours()%12||12)
},H:function(){return(f.getHours()<10?"0":"")+f.getHours()},i:function(){return(f.getMinutes()<10?"0":"")+f.getMinutes()},s:function(){return(f.getSeconds()<10?"0":"")+f.getSeconds()
},O:function(){return(-f.getTimezoneOffset()<0?"-":"+")+(Math.abs(f.getTimezoneOffset()/60)<10?"0":"")+(Math.abs(f.getTimezoneOffset()/60))+"00"},P:function(){return(-f.getTimezoneOffset()<0?"-":"+")+(Math.abs(f.getTimezoneOffset()/60)<10?"0":"")+(Math.abs(f.getTimezoneOffset()/60))+":"+(Math.abs(f.getTimezoneOffset()%60)<10?"0":"")+(Math.abs(f.getTimezoneOffset()%60))
},T:function(){var o=f.getMonth();f.setMonth(0);var n=f.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");f.setMonth(o);return n},Z:function(){return -f.getTimezoneOffset()*60
},c:function(){return f.format("Y-m-d")+"T"+f.format("H:i:sP")},r:function(){return f.toString()},U:function(){return f.getTime()/1000}};if(typeof this.getMonth=="function"){f=this;
k=j[0]}else{f=j[0];k=j[1]}for(var h=0;h<k.length;h++){var c=k.charAt(h);if(g[c]){b+=g[c].call()}else{b+=c}}return b}};FCL.DATETIME.init()})(jQuery);(function(a){FCL.FORMS={name:"FCL.FORMS",errorStrings:{alert:{summaryStart:"",summaryEnd:":",errorStart:"\n",errorEnd:"",errorItemStart:"  - ",errorItemEnd:"\n"},dialog:{summaryStart:"<p>",summaryEnd:":</p>",errorStart:"<ul>",errorEnd:"</ul>",errorItemStart:"<li>",errorItemEnd:"</li>"}},init:function(){a.fn.fclDefaultInput=function(b){return FCL.FORMS.inputTextShowHide(this,b)
};a.fn.fclReplaceSubmitButton=function(b){return FCL.FORMS.replaceSubmitButton(this,b)}},invalidForm:function(j,c,g,m,b){var h=this,g=g||{},k=c.numberOfInvalids(),f="",l="",m=m||"alert",b=b||"Form Validation Errors";
if(k==0){return}f=(k==1?"1 field has errors":k+" fields have errors");l=this.errorStrings[m].summaryStart+f+this.errorStrings[m].summaryEnd+this.errorStrings[m].errorStart;
a.each(c.errorMap,function(n,o){var e="";if(typeof g[n]!="undefined"){e=g[n]}else{e=FCL.UTIL.camelCaseToTitleText(n)}l+="{1}{2}: {3}{4}".fclFormat(h.errorStrings[m].errorItemStart,e,o,h.errorStrings[m].errorItemEnd)
});l+=this.errorStrings[m].errorEnd;switch(m){case"dialog":a('<div id="fclErrorDialog" title="{1}">{2}</div>'.fclFormat(b,l)).dialog({modal:true,buttons:{Ok:function(){a(this).dialog("close")
}}});break;default:alert(l);break}},inputTextShowHide:function(c,b){if(c.length===0){return c}if(typeof b=="undefined"){return FCL.UTIL.throwError('Please specify "defaultText argument')
}if(c.val()==""){c.val(b)}try{c.data("defaultText",b);c.bind("focus",function(g){if(a(this).val()===a(this).data("defaultText")){a(this).val("")}});c.bind("blur",function(g){if(a(this).val()==""){a(this).val(a(this).data("defaultText"))
}})}catch(f){}return c},replaceSubmitButton:function(e,c){if(e.length==0||c==""){return e}var b=e;while(b[0].tagName.toLowerCase()!=="form"){b=b.parent()
}if(b.find("img.formProcessing").length==0){e.after("<img />").next().hide().attr("class","formProcessing").attr("src",c).attr("alt","Your form request is being processed").attr("title","Your form request is being processed")
}b.bind("replaceSubmit",function(){e.hide();a(this).find(".formProcessing").show()});return e},checkFormFieldExistsNotEmpty:function(b){if(b.length==0||b.val()==""){return false
}var c=a(b[0]).attr("type");if(c!="radio"&&c!="checkbox"){return true}var e=false;b.each(function(){if(a(this).attr("checked")){e=true}});return e}};FCL.UTIL.handleErrors(FCL.FORMS);
FCL.FORMS.init()})(jQuery);(function(a){FCL.TM={name:"FCL.TM",init:function(){if(typeof a.cookie!="function"){FCL.UTIL.throwError("Tourism Media Tracking requires jQuery cookie plugin. Aborting.")
}this.cookieTracking()},isWithinThreeClicks:function(){return(a.cookie("tourismMediaClicks")!=null&&parseInt(a.cookie("tourismMediaClicks"),10)<=3)},cookieTracking:function(){if(window.location.pathname.indexOf("world-travel")==1){a.cookie("tourismMediaClicks",0,{path:"/"})
}if(window.location.pathname.indexOf("world-travel")!=1&&a.cookie("tourismMediaClicks")!=null){a.cookie("tourismMediaClicks",parseInt(a.cookie("tourismMediaClicks"),10)+1,{path:"/"})
}},googleAnalyticsReporting:function(b){b=(typeof(b)=="undefined"?function(){d=new Date();return d.getTime()}():b);if(this.isWithinThreeClicks()||FCL.UTIL.getUrlVar("tourismMediaTracking")=="true"){FCL.UTIL.registerGAPageView({path:"tourism-media/"+b})
}}};FCL.UTIL.handleErrors(FCL.TM);FCL.TM.init()})(jQuery);(function(a){FCL.CTC={name:"FCL.CTC",brand:"",displayMessages:{callInProgress:"<span>Call in progress...</span>",areaCodeMissing:"<span>Please enter your area code before your telephone number</span>",postCodeMissing:'<span class="hghlghterr">Please enter your postcode</span>',postCodeInvalid:"Australian postcodes are 3 or 4 digit numbers between 200-300\nor 800-9999.",connectingNow:"<span>Connecting you now...</span>",dialing:"<span>Dialling...</span>",connected:"<span>Connected</span>",ringing:"<span>Ringing...</span>"},errorMessages:{standard:"<span>Thank you for calling {1}. You have contacted us outside of office hours. Please try us again between 9am and 5pm.</span>",emptyStandard:"<span>{2}</span>",noCredit:"<span>{2}</span>",maximumFreeCalls:"<span>You have used all your free calls.<br>Please join to continue using Pep-Talk</span>",numberInvalid:"<span>The number you have entered is invalid. Please enter your full number including area code.</span>",outOfHours:"<span>Thank you for calling {1}. You have contacted us outside of office hours. Please try us again between 9am and 5pm.</span>",busy:"<span>A {1} Consultant has tried to contact you but was unable to reach you.</span>",consultantsBusy:"<span>Our consultants are unavailable just at the moment. Please try us again shortly.</span>",noAnswer:"<span>One of our Travel Consultants has just tried calling you.  When you are ready please try us again.</span>",noConsultantAnswer:"<span>All our Consultants are on other calls at the moment. Please try calling back in a moment.</span>",hangUp:"<span>It appears our call has ended. Please call back to speak with one of our travel consultants.</span>"},statesPlid:{"0":"","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","default":""},fclTestPlid:"3kzZaba",$form:null,fieldMappings:{pcode:"Post Code"},init:function(f,b,c,e){if(typeof f=="undefined"){FCL.UTIL.throwError("No brand supplied, aborting setup of click to call");
return}if(typeof b=="undefined"){FCL.UTIL.throwError("No plids supplied, aborting setup of click to call");return}this.statesPlid=b;this.displayMessages=a.extend(this.displayMessages,c);
this.errorMessages=a.extend(this.errorMessages,e);this.$form=a("#ctcForm");this.setupForm();this.setupValidation()},setupForm:function(){this.$form.find("#phone").bind("keypress",function(){getKeyCode(1)
});this.$form.find("#pcode").bind("keypress",function(){getKeyCode(2)})},setPlid:function(){var c=this.$form.find("#pcode").val().charAt(0);var b=(typeof this.statesPlid[c]!="undefined")?this.statesPlid[c]:this.statesPlid["default"];
if(this.$form.find("#pcode").val()=="FCL"){b=this.fclTestPlid}this.$form.find("#plid").val(b)},setupValidation:function(){var b=this;a.validator.addMethod("phone",function(f,c,h){try{a(c).val(function(e,j){return j.match(/\d+/g).join("")
});if(a(c).val().length<8){return false}}catch(g){return false}return true},a.format("Phone number must consist of at least 8 digits"));this.$form.validate({rules:{phone:{required:true,phone:true},pcode:{required:true,digits:true}},invalidHandler:function(f,c){FCL.FORMS.invalidForm(f,c,b.fieldMappings)
},submitHandler:function(c){try{do_dsdial();FCL.UTIL.registerGAPageView({basePath:"/on-page-event/",path:"click-to-call"})}catch(f){FCL.UTIL.log(f)}return false
}})}};FCL.UTIL.handleErrors(FCL.CTC)})(jQuery);var callinprogress=0;var myDomain=document.URL.substring(7,document.URL.indexOf("/",7));function setPlidForState(){FCL.CTC.setPlid()
}function do_dsdial(){FCL.SIGNALS.send("FCL.CTC","callStarted");var o=/^0/;var c=/^\+/;var n=/\w/;var m=document.getElementById("phone").value;var b=document.getElementById("ctc_info");
var l=document.getElementById("phone");var j=document.getElementById("pcode").value;if(callinprogress==1){b.innerHTML=FCL.CTC.displayMessages.callInProgress;
return}m=m.replace(n,"");if(m==""){l.value="Enter your number";return}var h=document.getElementById("phone").value;if((h.length>=1)&&(h.substring(0,1)!=0)){b.innerHTML=FCL.CTC.displayMessages.areaCodeMissing;
return}if(document.getElementById("pcode").value==""){b.innerHTML=FCL.CTC.displayMessages.postCodeMissing;return}errorMsg=FCL.CTC.displayMessages.postCodeInvalid;
if(document.getElementById("pcode").value.toUpperCase()!="FCL"){numberOfDigits=0;for(i=0;i<document.getElementById("pcode").value.length;i++){digit=parseInt(document.getElementById("pcode").value.charAt(i));
if(isNaN(digit)){b.innerHTML=errorMsg;return}numberOfDigits++}if(numberOfDigits!=3&&numberOfDigits!=4){b.innerHTML=errorMsg;return}}setPlidForState();var e=document.getElementById("plid").value;
m=m.replace(o,"");m=m.replace(/\s/g,"");var k=m;k=k.replace(c,"%2B");var g=document.location.protocol;var a=g+"//"+myDomain+"/ptt/pt-dialer.cgi";var f="PLID="+e+"&wantxml=yes&cmd=call&aparty="+k+"&pcode="+j;
b.style.display="block";b.innerHTML=FCL.CTC.displayMessages.connectingNow;resetCookie("phone",k);ajax(a,f,parse_results)}function parse_results(m){var e=document.getElementById("ctc_info");
try{var a=m.getElementsByTagName("rc").item(0).firstChild.data}catch(f){FCL.SIGNALS.send("FCL.CTC","error",f);e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.standard.fclFormat(FCL.CTC.brand,"");
return}if(a!=1){var k=m.getElementsByTagName("errmsg").item(0).firstChild.data;if(k=="no credit"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.noCredit.fclFormat("",m.getElementsByTagName("reason").item(0).firstChild.data)
}else{if(k=="maximum free calls reached"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.maximumFreeCalls}else{if(k=="aparty number invalid"){e.style.display="block";
e.innerHTML=FCL.CTC.errorMessages.numberInvalid}else{if(k=="out of hours"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.outOfHours.fclFormat(FCL.CTC.brand,"")
}else{e.innerHTML=FCL.CTC.errorMessages.emptyStandard.fclFormat("",k)}}}}FCL.SIGNALS.send("FCL.CTC","error",k);callinprogress=0}else{var g="";try{g=m.getElementsByTagName("status").item(0).firstChild.data
}catch(f){callinprogress=0;FCL.SIGNALS.send("FCL.CTC","error","terminated")}var c=m.getElementsByTagName("ptid").item(0).firstChild.data;if(g=="dialling"){FCL.SIGNALS.send("FCL.CTC","dialling");
e.style.display="block";e.innerHTML=FCL.CTC.displayMessages.dialing;callinprogress=1}else{if(g=="call"){FCL.SIGNALS.send("FCL.CTC","connected");e.style.display="block";
e.innerHTML=FCL.CTC.displayMessages.connected;callinprogress=0}else{if(g=="ready"){FCL.SIGNALS.send("FCL.CTC","ready");e.style.display="block";e.innerHTML=FCL.CTC.displayMessages.ringing;
callinprogress=1}else{if(g=="failed"){var l=m.getElementsByTagName("reason").item(0).firstChild.data;callinprogress=0;FCL.SIGNALS.send("FCL.CTC","error",l);
if(l=="busy"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.busy.fclFormat(FCL.CTC.brand)}else{if(l=="busy-b"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.consultantsBusy
}else{if(l=="noanswer"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.noAnswer}else{if(l=="noanswer-b"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.noConsultantAnswer
}else{if(l=="hangup"){e.style.display="block";e.innerHTML=FCL.CTC.errorMessages.hangUp}}}}}}}}}if((g!="call")&&(g!="failed")&&(g!="")){var j=document.location.protocol;
var b=j+"//"+myDomain+"/ptt/pt-popoverlib.cgi";var h="cmd=getstatus&ptid="+c;ajax(b,h,parse_results)}}}function ajax(b,e,a){var c=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");
c.open("POST",b,true);if(c.overrideMimeType){c.overrideMimeType("text/xml")}c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){var f=c.responseXML;
if(f){a(f)}}};c.send(e)}function URLencode(f){var b="";var a=0;f=f.toString();var e=/(^[a-zA-Z0-9_.]*)/;while(a<f.length){var c=e.exec(f.substr(a));if(c!=null&&c.length>1&&c[1]!=""){b+=c[1];
a+=c[1].length}else{if(f[a]==" "){b+="+"}else{var g=f.charCodeAt(a);var h=g.toString(16);b+="%"+(h.length<2?"0":"")+h.toUpperCase()}a++}}return b}function do_rollover(){}function do_rollback(){}function resetCookie(b,a){if(readCookie(b)){eraseCookie(b);
setCookie(b,a)}}function setCookie(c,e,f){if(f){var b=new Date();b.setTime(b.getTime()+(f*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""
}document.cookie=c+"="+e+a+"; path=/"}function readCookie(b){var f=b+"=";var a=document.cookie.split(";");for(var e=0;e<a.length;e++){var g=a[e];while(g.charAt(0)==" "){g=g.substring(1,g.length)
}if(g.indexOf(f)==0){return g.substring(f.length,g.length)}}return null}function eraseCookie(a){setCookie(a,"",-1)}function ShowCTCHelper(){elem=document.getElementById("side-ctc-helper");
elem.style.display="block"}function HideCTCHelper(a){elem=document.getElementById("side-ctc-helper");elem.style.display="none"}function getKeyCode(a){var b;
if(a==1){b=document.getElementById("phone")}else{if(a==2){b=document.getElementById("pcode")}}b.onkeydown=function(c){var c=window.event||c;if(c.keyCode==13){do_dsdial()
}}}(function(a){a.fn.fclTabs=function(c){var e=["showTab"];var b=Array.prototype.slice.call(arguments,1);if(a.inArray(c,e)>-1){return FCL.TABS["_"+c].apply(FCL.TABS,[this[0]].concat(b))
}return this.each(function(){if(typeof c=="string"){FCL.TABS["_"+c].apply(FCL.TABS,[this].concat(b))}else{FCL.TABS.init(this,c||{})}})};FCL.TABS={name:"FCL.TABS",init:function(m,n){var l=(typeof m.jquery=="undefined"?a(m):m),c=false,g,f,b,j=0;
var h={persistent:false,cookieTitle:"tabCookie",selectedTabIndex:0,sameHeight:false,checkForBookmark:false,scrollToBookmark:false};var n=a.extend(h,n);
if(n.persistent){try{f=l.find('a[href="'+a.cookie(n.cookieTitle)+'"]');if(f.length>0){n.selectedTabIndex=a(f.attr("href")).index()}}catch(k){n.persistent=false
}}if(n.persistent==false&&n.checkForBookmark===true){g=l.find('a[href="'+window.location.hash.replace("tab-","")+'"]');if(g.length>0){c=true;n.selectedTabIndex=g.parent().index()
}}n.selectedTabIndex=(typeof n.selectedTabIndex=="undefined")?0:parseInt(n.selectedTabIndex,10);if(l.find("a:eq("+n.selectedTabIndex+")").length===0){n.selectedTabIndex=0
}if(n.sameHeight){this._setupChangeListener()}l.find("a").each(function(){if(FCL.TABS._isContentTab(a(this))==false){return}if(n.sameHeight){a(a(this).attr("href")).tabContentChange(function(){FCL.TABS._refreshTabs(l)
})}a(this).bind("click",function(o){o.preventDefault();FCL.TABS._showTab(l,a(this).parent().index())})});l.data("options",n);if(n.sameHeight){this._refreshTabs(l)
}l.find("a:eq("+n.selectedTabIndex+")").trigger("click");if(n.scrollToBookmark==true&&c===true){b=g.height()+10;setTimeout(function(){a("html, body").animate({scrollTop:g.offset().top-g.height()},1500)
},750)}return l},_isContentTab:function(b){return(b.attr("href").indexOf("#")===0)},_setupChangeListener:function(b){var c;a.fn.tabContentChange=function(e){return this.bind("tabContentChange",e)
};a.event.special.tabContentChange={setup:function(h,g){var e=this,j=a(this),f=j.text();c=setInterval(function(){if(f!=j.text()){f=j.text();a.event.special.tabContentChange.handler.call(e)
}},500)},teardown:function(e){clearInterval(c)},handler:function(e){a.event.handle.call(this,{type:"tabContentChange"})}};return b},_refreshTabs:function(b){var c=0;
b.find("a").each(function(g){if(FCL.TABS._isContentTab(a(this))==false){return}var f=a(a(this).attr("href"));f.css({height:"auto"});c=(f.height()>c)?f.height():c
});b.find("a").each(function(f){if(FCL.TABS._isContentTab(a(this))==false){return}a(a(this).attr("href")).css("height",c)});return b},_showTab:function(c,b){$tabs=a(c);
var e=$tabs.find("li:nth("+b+") a");var f=e.parent().parent();$currentSelectedTab=f.find(".selected");$tabContent=a(e.attr("href"));f.find("a").each(function(){if(FCL.TABS._isContentTab(a(this))==false){return
}if(a(this).attr("href")!=e.attr("href")){a(a(this).attr("href")).addClass("hide")}});$currentSelectedTab.removeClass("selected");e.addClass("selected");
if($tabContent.attr("class").indexOf("hide")>-1||$tabContent.attr("class").indexOf("hidden")>-1){$tabContent.css("opacity","hide").removeClass("hide").removeClass("hidden");
$tabContent.animate({opacity:"show"},350)}if($tabs.data("options").persistent){a.cookie(options.cookieTitle,e.attr("href"))}return e}};FCL.UTIL.handleErrors(FCL.TABS)
})(jQuery);(function(a){FCL.GIMP={name:"FCL.GIMP",settings:{baseUrl:"/sendEnquiry?",brand:"FC",forwardUrl:"/company/contact-us/enquiry-success",failUrl:"/company/contact-us/enquiry-failure",ignoreFields:["failUrl","forwardUrl"]},init:function(){var b=this;
FCL.UTIL.handleErrors(this);a.fn.fclGetGimpUrl=function(c){var c=c||[];return b.getUrl(this,c)}},setSubject:function(c){if(c.find('input[name="subject"]').length==0){return
}var b=c.find('input[name="subject"]');var e=b.val().match(/\{([a-zA-Z0-9])+\}/g);if(e==null){return}a.each(e,function(f){var j=e[f].match(/[a-zA-Z0-9]+/)[0];
var g=c.find(FCL.UTIL.format('input[name="{1}"]',j));var h=(typeof g.val()!="undefined")?g.val():"";b.val(b.val().replace(e[f],h))})},checkRequiredFields:function(b,c){c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="type"]')))?"":"type=General+Enquiry+Contact+Details&";
c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="email"]')))?"":"email=email@email.com&";c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="postCode"]')))?"":"postCode=0000&";
c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="brand"]')))?"":"brand="+this.settings.brand+"&";c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="emailNewsletter"]')))?"":"emailNewsletter=No&";
c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="forwardUrl"]')))?"":"forwardUrl="+this.settings.forwardUrl+"&";c+=(FCL.FORMS.checkFormFieldExistsNotEmpty(b.find('input[name="failUrl"]')))?"":"failUrl="+this.settings.failUrl+"&";
return c},getUrl:function(e,g){var b=this.settings.baseUrl,g=g||[],j,c,h,f;this.setSubject(e);e.find('input[type="text"], input[type="hidden"], input[type="checkbox"]:checked, input[type="radio"]:checked, select, textarea').each(function(){if(a(this).attr("name")!=""){var k=a(this).attr("name");
b+=k+"="+encodeURIComponent(FCL.UTIL.filterInputText(a(this).val()))+"&"}});j=e.find('input[name="fullName"]');if(j.length>0){c=j.val().split(" ");h=encodeURIComponent(FCL.UTIL.filterInputText(c.shift()));
f=encodeURIComponent(FCL.UTIL.filterInputText(c.join(" ")));if(b.indexOf("firstName=")==-1){b+="firstName={1}&".fclFormat(h)}if(b.indexOf("lastName=")==-1){b+="lastName={1}&".fclFormat(f)
}}a.each(g,function(k){if(b.indexOf(g[k]+"=")==-1){b+="{1}=&".fclFormat(g[k]);return}});b=this.checkRequiredFields(e,b);return b.substring(0,b.length-1)
}};FCL.GIMP.init()})(jQuery);(function(a){FCL.MAILER={name:"FCL.MAILER",settings:{baseUrl:"/mailer?",EMAIL_TO:"",EMAIL_CC:"",EMAIL_BCC:"",EMAIL_SUBJECT:"",EMAIL_SUCCESS_URL:"",EMAIL_FAIL_URL:"",EMAIL_TEMPLATE:"",EMAIL_CONTENT1:"",EMAIL_CONTENT2:"",EMAIL_CONTENT3:"",EMAIL_CONTENT4:"",EMAIL_CONTENT5:""},getRequestUrl:function(e){var c=a.extend(this.settings,e);
var b=c.baseUrl;a.each(c,function(f,g){if(g!=""&&f!="baseUrl"){b+=f+"="+FCL.UTIL.filterInputText(g)+"&"}});return b.substring(0,b.length-1)}};FCL.UTIL.handleErrors(FCL.MAILER)
})(jQuery);(function(a){FCL.CURRENCY={name:"FCL.CURRENCY",init:function(){var b=this;a.getScript("http://www.aquariussoft.com/scripts/getdatajs.aspx",function(){a.getScript("http://www.aquariussoft.com/scripts/convertcurrency.js",function(){a("#cur_convertForm, #cur_convertTo, #cur_fromAmount").bind("change",function(){a("#cur_toAmount").val("")
});a("#currencyConversionForm").bind("submit",function(c){c.preventDefault();calculate(0)})})})}};FCL.UTIL.handleErrors(FCL.CURRENCY)})(jQuery);
