/***************************************************************
 * Tabs - Provide tabs on the ship page
 */
(function($){$.extend({tabs:{remoteCount:0}});$.fn.tabs=function(initial,settings){if(typeof initial=='object')settings=initial;settings=$.extend({initial:(initial&&typeof initial=='number'&&initial>0)?--initial:0,disabled:null,bookmarkable:$.ajaxHistory?true:false,remote:false,spinner:'Loading&#8230;',hashPrefix:'remote-tab-',fxFade:null,fxSlide:null,fxShow:null,fxHide:null,fxSpeed:'normal',fxShowSpeed:null,fxHideSpeed:null,fxAutoHeight:false,onClick:null,onHide:null,onShow:null,navClass:'tabs-nav',selectedClass:'tabs-selected',disabledClass:'tabs-disabled',containerClass:'tabs-container',hideClass:'tabs-hide',loadingClass:'tabs-loading',tabStruct:'div'},settings||{});$.browser.msie6=$.browser.msie&&($.browser.version&&$.browser.version<7||/6.0/.test(navigator.userAgent));function unFocus(){scrollTo(0,0);}return this.each(function(){var container=this;var nav=$('ul.'+settings.navClass,container);nav=nav.size()&&nav||$('>ul:eq(0)',container);var tabs=$('a',nav);if(settings.remote){tabs.each(function(){var id=settings.hashPrefix+(++$.tabs.remoteCount),hash='#'+id,url=this.href;this.href=hash;$('<div id="'+id+'" class="'+settings.containerClass+'"></div>').appendTo(container);$(this).bind('loadRemoteTab',function(e,callback){var $$=$(this).addClass(settings.loadingClass),span=$('span',this)[0],tabTitle=span.innerHTML;if(settings.spinner){span.innerHTML='<em>'+settings.spinner+'</em>';}setTimeout(function(){$(hash).load(url,function(){if(settings.spinner){span.innerHTML=tabTitle;}$$.removeClass(settings.loadingClass);callback&&callback();});},0);});});}var containers=$('div.'+settings.containerClass,container);containers=containers.size()&&containers||$('>'+settings.tabStruct,container);nav.is('.'+settings.navClass)||nav.addClass(settings.navClass);containers.each(function(){var $$=$(this);$$.is('.'+settings.containerClass)||$$.addClass(settings.containerClass);});var hasSelectedClass=$('li',nav).index($('li.'+settings.selectedClass,nav)[0]);if(hasSelectedClass>=0){settings.initial=hasSelectedClass;}if(location.hash){tabs.each(function(i){if(this.hash==location.hash){settings.initial=i;if(($.browser.msie||$.browser.opera)&&!settings.remote){var toShow=$(location.hash);var toShowId=toShow.attr('id');toShow.attr('id','');setTimeout(function(){toShow.attr('id',toShowId);},500);}unFocus();return false;}});}if($.browser.msie){unFocus();}containers.filter(':eq('+settings.initial+')').show().end().not(':eq('+settings.initial+')').addClass(settings.hideClass);$('li',nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass);tabs.eq(settings.initial).trigger('loadRemoteTab').end();if(settings.fxAutoHeight){var _setAutoHeight=function(reset){var heights=$.map(containers.get(),function(el){var h,jq=$(el);if(reset){if($.browser.msie6){el.style.removeExpression('behaviour');el.style.height='';el.minHeight=null;}h=jq.css({'min-height':''}).height();}else{h=jq.height();}return h;}).sort(function(a,b){return b-a;});if($.browser.msie6){containers.each(function(){this.minHeight=heights[0]+'px';this.style.setExpression('behaviour','this.style.height = this.minHeight ? this.minHeight : "1px"');});}else{containers.css({'min-height':heights[0]+'px'});}};_setAutoHeight();var cachedWidth=container.offsetWidth;var cachedHeight=container.offsetHeight;var watchFontSize=$('#tabs-watch-font-size').get(0)||$('<span id="tabs-watch-font-size">M</span>').css({display:'block',position:'absolute',visibility:'hidden'}).appendTo(document.body).get(0);var cachedFontSize=watchFontSize.offsetHeight;setInterval(function(){var currentWidth=container.offsetWidth;var currentHeight=container.offsetHeight;var currentFontSize=watchFontSize.offsetHeight;if(currentHeight>cachedHeight||currentWidth!=cachedWidth||currentFontSize!=cachedFontSize){_setAutoHeight((currentWidth>cachedWidth||currentFontSize<cachedFontSize));cachedWidth=currentWidth;cachedHeight=currentHeight;cachedFontSize=currentFontSize;}},50);}var showAnim={},hideAnim={},showSpeed=settings.fxShowSpeed||settings.fxSpeed,hideSpeed=settings.fxHideSpeed||settings.fxSpeed;if(settings.fxSlide||settings.fxFade){if(settings.fxSlide){showAnim['height']='show';hideAnim['height']='hide';}if(settings.fxFade){showAnim['opacity']='show';hideAnim['opacity']='hide';}}else{if(settings.fxShow){showAnim=settings.fxShow;}else{showAnim['min-width']=0;showSpeed=1;}if(settings.fxHide){hideAnim=settings.fxHide;}else{hideAnim['min-width']=0;hideSpeed=1;}}var onClick=settings.onClick,onHide=settings.onHide,onShow=settings.onShow;tabs.bind('triggerTab',function(){var li=$(this).parents('li:eq(0)');if(container.locked||li.is('.'+settings.selectedClass)||li.is('.'+settings.disabledClass)){return false;}var hash=this.hash;if($.browser.msie){$(this).trigger('click');if(settings.bookmarkable){$.ajaxHistory.update(hash);location.hash=hash.replace('#','');}}else if($.browser.safari){var tempForm=$('<form action="'+hash+'"><div><input type="submit" value="h" /></div></form>').get(0);tempForm.submit();$(this).trigger('click');if(settings.bookmarkable){$.ajaxHistory.update(hash);}}else{if(settings.bookmarkable){location.hash=hash.replace('#','');}else{$(this).trigger('click');}}});tabs.bind('disableTab',function(){var li=$(this).parents('li:eq(0)');if($.browser.safari){li.animate({opacity:0},1,function(){li.css({opacity:''});});}li.addClass(settings.disabledClass);});if(settings.disabled&&settings.disabled.length){for(var i=0,k=settings.disabled.length;i<k;i++){tabs.eq(--settings.disabled[i]).trigger('disableTab').end();}};tabs.bind('enableTab',function(){var li=$(this).parents('li:eq(0)');li.removeClass(settings.disabledClass);if($.browser.safari){li.animate({opacity:1},1,function(){li.css({opacity:''});});}});tabs.bind('click',function(e){var trueClick=e.clientX;var clicked=this,li=$(this).parents('li:eq(0)'),toShow=$(this.hash),toHide=containers.filter(':visible');if(container['locked']||li.is('.'+settings.selectedClass)||li.is('.'+settings.disabledClass)||typeof onClick=='function'&&onClick(this,toShow[0],toHide[0])===false){this.blur();return false;}container['locked']=true;if(toShow.size()){if($.browser.msie&&settings.bookmarkable){var toShowId=this.hash.replace('#','');toShow.attr('id','');setTimeout(function(){toShow.attr('id',toShowId);},0);}var resetCSS={display:'',overflow:'',height:''};if(!$.browser.msie){resetCSS['opacity']='';}function switchTab(){if(settings.bookmarkable&&trueClick){$.ajaxHistory.update(clicked.hash);}toHide.animate(hideAnim,hideSpeed,function(){$(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass);toHide.addClass(settings.hideClass).css(resetCSS);if(typeof onHide=='function'){onHide(clicked,toShow[0],toHide[0]);}if(!(settings.fxSlide||settings.fxFade||settings.fxShow)){toShow.css('display','block');}toShow.animate(showAnim,showSpeed,function(){toShow.removeClass(settings.hideClass).css(resetCSS);if($.browser.msie){toHide[0].style.filter='';toShow[0].style.filter='';}if(typeof onShow=='function'){onShow(clicked,toShow[0],toHide[0]);}container['locked']=null;});});}if(!settings.remote){switchTab();}else{$(clicked).trigger('loadRemoteTab',[switchTab]);}}else{alert('There is no such container.');}var scrollX=window.pageXOffset||document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft||0;var scrollY=window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop||0;setTimeout(function(){window.scrollTo(scrollX,scrollY);},0);this.blur();return settings.bookmarkable&&!!trueClick;});if(settings.bookmarkable){$.ajaxHistory.initialize(function(){tabs.eq(settings.initial).trigger('click').end();});}});};var tabEvents=['triggerTab','disableTab','enableTab'];for(var i=0;i<tabEvents.length;i++){$.fn[tabEvents[i]]=(function(tabEvent){return function(tab){return this.each(function(){var nav=$('ul.tabs-nav',this);nav=nav.size()&&nav||$('>ul:eq(0)',this);var a;if(!tab||typeof tab=='number'){a=$('li a',nav).eq((tab&&tab>0&&tab-1||0));}else if(typeof tab=='string'){a=$('li a[@href$="#'+tab+'"]',nav);}a.trigger(tabEvent);});};})(tabEvents[i]);}$.fn.activeTab=function(){var selectedTabs=[];this.each(function(){var nav=$('ul.tabs-nav',this);nav=nav.size()&&nav||$('>ul:eq(0)',this);var lis=$('li',nav);selectedTabs.push(lis.index(lis.filter('.tabs-selected')[0])+1);});return selectedTabs[0];};})(jQuery);

/***************************************************************
 * History/Remote - Works with the tabs plugin for enabling history support and bookmarking
 */
(function($){$.ajaxHistory=new function(){var RESET_EVENT='historyReset';var _currentHash=location.hash;var _intervalId=null;var _observeHistory;this.update=function(){};var _defaultReset=function(){$('.remote-output').empty();};$(document).bind(RESET_EVENT,_defaultReset);if($.browser.msie){var _historyIframe,initialized=false;$(function(){_historyIframe=$('<iframe style="display: none;"></iframe>').appendTo(document.body).get(0);var iframe=_historyIframe.contentWindow.document;iframe.open();iframe.close();if(_currentHash&&_currentHash!='#'){iframe.location.hash=_currentHash.replace('#','');}});this.update=function(hash){_currentHash=hash;var iframe=_historyIframe.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=hash.replace('#','');};_observeHistory=function(){var iframe=_historyIframe.contentWindow.document;var iframeHash=iframe.location.hash;if(iframeHash!=_currentHash){_currentHash=iframeHash;if(iframeHash&&iframeHash!='#'){$('a[@href$="'+iframeHash+'"]').click();location.hash=iframeHash;}else if(initialized){location.hash='';$(document).trigger(RESET_EVENT);}}initialized=true;};}else if($.browser.mozilla||$.browser.opera){this.update=function(hash){_currentHash=hash;};_observeHistory=function(){if(location.hash){if(_currentHash!=location.hash){_currentHash=location.hash;$('a[@href$="'+_currentHash+'"]').click();}}else if(_currentHash){_currentHash='';$(document).trigger(RESET_EVENT);}};}else if($.browser.safari){var _backStack,_forwardStack,_addHistory;$(function(){_backStack=[];_backStack.length=history.length;_forwardStack=[];});var isFirst=false,initialized=false;_addHistory=function(hash){_backStack.push(hash);_forwardStack.length=0;isFirst=false;};this.update=function(hash){_currentHash=hash;_addHistory(_currentHash);};_observeHistory=function(){var historyDelta=history.length-_backStack.length;if(historyDelta){isFirst=false;if(historyDelta<0){for(var i=0;i<Math.abs(historyDelta);i++)_forwardStack.unshift(_backStack.pop());}else{for(var i=0;i<historyDelta;i++)_backStack.push(_forwardStack.shift());}var cachedHash=_backStack[_backStack.length-1];$('a[@href$="'+cachedHash+'"]').click();_currentHash=location.hash;}else if(_backStack[_backStack.length-1]==undefined&&!isFirst){if(document.URL.indexOf('#')>=0){$('a[@href$="'+'#'+document.URL.split('#')[1]+'"]').click();}else if(initialized){$(document).trigger(RESET_EVENT);}isFirst=true;}initialized=true;};}this.initialize=function(callback){if(typeof callback=='function'){$(document).unbind(RESET_EVENT,_defaultReset).bind(RESET_EVENT,callback);}if(location.hash&&typeof _addHistory=='undefined'){$('a[@href$="'+location.hash+'"]').trigger('click');}if(_observeHistory&&_intervalId==null){_intervalId=setInterval(_observeHistory,200);}};};$.fn.remote=function(output,settings,callback){callback=callback||function(){};if(typeof settings=='function'){callback=settings;}settings=$.extend({hashPrefix:'remote-'},settings||{});var target=$(output).size()&&$(output)||$('<div></div>').appendTo('body');target.addClass('remote-output');return this.each(function(i){var href=this.href,hash='#'+(this.title&&this.title.replace(/\s/g,'_')||settings.hashPrefix+(i+1)),a=this;this.href=hash;$(this).click(function(e){if(!target['locked']){if(e.clientX){$.ajaxHistory.update(hash);}target.load(href,function(){target['locked']=null;callback.apply(a);});}});});};$.fn.history=function(callback){return this.click(function(e){if(e.clientX){$.ajaxHistory.update(this.hash);}typeof callback=='function'&&callback();});};})(jQuery);
/* >>> Initialize tabs */

$(function(){$('#ships_container').tabs({fxSlide:true,fxFade:false,fxSpeed:'slow'});$('#airports_container').tabs({});$('#hotels_container').tabs({});});


/***************************************************************
 * Form validation - used to validate the call back form. 
 */
jQuery.extend(jQuery.fn,{validate:function(options){var validator=new jQuery.validator(options,this[0]);if(validator.settings.onsubmit){this.find("input.cancel:submit").click(function(){this.form.cancel=true;});this.submit(function(event){if(validator.settings.debug)event.preventDefault();if(this.cancel||validator.form()){this.cancel=false;if(validator.settings.submitHandler){validator.settings.submitHandler(validator.currentForm);return false;}return true;}else{validator.focusInvalid();return false;}});}validator.settings.onblur&&validator.elements.blur(function(){validator.settings.onblur.call(validator,this);});validator.settings.onkeyup&&validator.elements.keyup(function(){validator.settings.onkeyup.call(validator,this);});var checkables=jQuery([]);validator.elements.each(function(){if(validator.checkable(this))checkables.push(validator.checkableGroup(this));});validator.settings.onchange&&checkables.click(function(){validator.settings.onchange.call(validator,this);});return validator;},push:function(t){return this.setArray(jQuery.merge(this.get(),t));}});jQuery.extend(jQuery.expr[":"],{blank:"!jQuery.trim(a.value)",filled:"!!jQuery.trim(a.value)",unchecked:"!a.checked"});String.format=function(source,params){if(arguments.length==1)return function(param){return String.format(source,param);};if(arguments.length>2)params=jQuery.makeArray(arguments).slice(1);if(params.constructor!=Array)params=[params];jQuery.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}"),n);});return source;};jQuery.validator=function(options,form){this.settings=jQuery.extend({},jQuery.validator.defaults,options);this.currentForm=form;this.labelContainer=this.settings.errorLabelContainer;this.errorContext=this.labelContainer.length&&this.labelContainer||jQuery(form);this.containers=this.settings.errorContainer.add(this.settings.errorLabelContainer);this.submitted={};this.reset();this.refresh();};jQuery.extend(jQuery.validator,{defaults:{messages:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:jQuery([]),errorLabelContainer:jQuery([]),onsubmit:true,ignore:[],onblur:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.required(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onchange:function(element){if(element.name in this.submitted)this.element(element);}},setDefaults:function(settings){jQuery.extend(jQuery.validator.defaults,settings);},messages:{required:"This field is required.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gÃ¼ltiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxLength:String.format("Please enter a value no longer than {0} characters."),minLength:String.format("Please enter a value of at least {0} characters."),rangeLength:String.format("Please enter a value between {0} and {1} characters long."),rangeValue:String.format("Please enter a value between {0} and {1}."),maxValue:String.format("Please enter a value less than or equal to {0}."),minValue:String.format("Please enter a value greater than or equal to {0}.")},prototype:{form:function(){this.prepareForm();for(var i=0,element;element=this.elements[i];i++){this.check(element);}jQuery.extend(this.submitted,this.errorMap);return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);var result=this.check(element);this.showErrors();return result;},showErrors:function(errors){if(errors){jQuery.extend(this.errorMap,errors);for(name in errors){this.errorList.push({message:errors[name],element:jQuery("[@name="+name+"]:first",this.currentForm)[0]});}this.successList=jQuery.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if(jQuery.fn.resetForm)jQuery(this.currentForm).resetForm();this.prepareForm();this.hideErrors();this.elements.removeClass(this.settings.errorClass);},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){this.showErrors();return this.errorList.length==0;},focusInvalid:function(){if(this.settings.focusInvalid){try{jQuery(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&jQuery.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},refresh:function(){var validator=this;validator.rulesCache={};this.elements=jQuery(this.currentForm).find("input, select, textarea, button").not(":submit").not(":reset").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in validator.rulesCache||!validator.rules(this).length)return false;validator.rulesCache[this.name]=validator.rules(this);return true;});this.elements.focus(function(){validator.lastActive=this;if(validator.settings.focusCleanup){jQuery(this).removeClass(validator.settings.errorClass);validator.errorsFor(this).hide();}});},clean:function(selector){return jQuery(selector)[0];},errors:function(){return jQuery(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(element){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=jQuery([]);this.toHide=jQuery([]);},prepareForm:function(){this.reset();this.toHide=this.errors().push(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(this.clean(element));},check:function(element){element=this.clean(element);jQuery(element).removeClass(this.settings.errorClass);var rules=this.rulesCache[element.name];for(var i=0,rule;rule=rules[i++];){try{var result=jQuery.validator.methods[rule.method].call(this,jQuery.trim(element.value),element,rule.parameters);if(result===-1)break;if(!result){jQuery(element).addClass(this.settings.errorClass);this.formatAndAdd(rule,element);return false;}}catch(e){this.settings.debug&&window.console&&console.error("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}if(rules.length&&this.settings.success)this.successList.push(element);return true;},message:function(id,method){var m=this.settings.messages[id];return m&&(m.constructor==String?m:m[method]);},formatAndAdd:function(rule,element){var message=this.message(element.name,rule.method)||element.title||jQuery.validator.messages[rule.method]||"<strong>Warning: No message defined for "+element.name+"</strong>";if(typeof message=="function")message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle.push(toToggle.parents(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0,error;error=this.errorList[i];i++){this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow.push(this.containers);}for(var i=0,element;element=this.successList[i];i++){this.showLabel(element);}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);if(this.settings.overrideErrors||label.attr("generated")){label.html(message);}}else{label=jQuery("<"+this.settings.errorElement+">").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+">").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,jQuery(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow.push(label);},errorsFor:function(element){return this.errors().filter("[@for="+this.idOrName(element)+"]");},idOrName:function(element){return this.checkable(element)?element.name:element.id||element.name;},rules:function(element){var data=this.data(element);if(!data)return[];var rules=[];if(typeof data=="string"){var transformed={};transformed[data]=true;data=transformed;}jQuery.each(data,function(key,value){rules[rules.length]={method:key,parameters:value};});return rules;},data:function(element){return this.settings.rules?this.settings.rules[element.name]:this.settings.meta?jQuery(element).data()[this.settings.meta]:jQuery(element).data();},checkable:function(element){return/radio|checkbox/i.test(element.type);},checkableGroup:function(element){return jQuery(element.form||document).find('[@name="'+element.name+'"]');},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return jQuery("option:selected",element).length;case'input':if(this.checkable(element))return this.checkableGroup(element).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!jQuery(param,element.form).length;},"function":function(param,element){return param(element);}},required:function(element){return!jQuery.validator.methods.required.call(this,jQuery.trim(element.value),element);}},methods:{required:function(value,element,param){if(!this.depend(param,element))return-1;switch(element.nodeName.toLowerCase()){case'select':var options=jQuery("option:selected",element);return options.length>0&&(element.type=="select-multiple"||(jQuery.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return value.length>0;}},minLength:function(value,element,param){return this.required(element)||this.getLength(value,element)>=param;},maxLength:function(value,element,param){return this.required(element)||this.getLength(value,element)<=param;},rangeLength:function(value,element,param){var length=this.getLength(value,element);return this.required(element)||(length>=param[0]&&length<=param[1]);},minValue:function(value,element,param){return this.required(element)||value>=param;},maxValue:function(value,element,param){return this.required(element)||value<=param;},rangeValue:function(value,element,param){return this.required(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.required(element)||/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/i.test(value);},url:function(value,element){return this.required(element)||/^(https?|ftp):\/\/[A-Z0-9](\.?[A-Z0-9Ã„ÃœÃ–][A-Z0-9_\-Ã„ÃœÃ–]*)*(\/([A-Z0-9Ã„ÃœÃ–][A-Z0-9_\-\.Ã„ÃœÃ–]*)?)*(\?([A-Z0-9Ã„ÃœÃ–][A-Z0-9_\-\.%\+=&Ã„ÃœÃ–]*)?)?$/i.test(value);},date:function(value,element){return this.required(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.required(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.required(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.required(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.required(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.required(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.required(element))return true;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.required(element)||value.match(new RegExp(".("+param+")$"));},equalTo:function(value,element,param){return value==jQuery(param).val();}},addMethod:function(name,method,message){jQuery.validator.methods[name]=method;jQuery.validator.messages[name]=message;}});
/* >>> Initialize Form validation */

$().ready(function(){$("#form").validate({errorLabelContainer:$("#form div.error ul"),wrapper:'li'});$('form#form').submit(function(){$("#destination").validate();$('#done').css('display','none');});});



/***************************************************************
 * Accordion - right-hand side subnavigation. 
 */	
(function($){$.Accordion={};$.extend($.Accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click"},Animations:{slide:function(settings,additions){settings=$.extend({easing:"swing",duration:300},settings,additions);if(!settings.toHide.size()){settings.toShow.animate({height:"show"},{duration:settings.duration,easing:settings.easing,complete:settings.finished});return;}
var hideHeight=settings.toHide.height(),showHeight=settings.toShow.height(),difference=showHeight/hideHeight;settings.toShow.css({height:0,overflow:'hidden'}).show();settings.toHide.filter(":hidden").each(settings.finished).end().filter(":visible").animate({height:"hide"},{step:function(n){settings.toShow.height(Math.ceil((hideHeight-($.fn.stop?n*hideHeight:n))*difference));},duration:settings.duration,easing:settings.easing,complete:settings.finished});},bounceslide:function(settings){this.slide(settings,{easing:settings.down?"bounceout":"swing",duration:settings.down?1000:200});},easeslide:function(settings){this.slide(settings,{easing:"easeinout",duration:700})}}});$.fn.extend({nextUntil:function(expr){var match=[];this.each(function(){for(var i=this.nextSibling;i;i=i.nextSibling){if(i.nodeType!=1)continue;if($.filter(expr,[i]).r.length)break;match.push(i);}});return this.pushStack(match);},Accordion:function(settings){if(!this.length)
return this;settings=$.extend({},$.Accordion.defaults,{header:$(':first-child',this)[0].tagName},settings);if(settings.navigation){var current=this.find("a").filter(function(){return this.href==location.href;});if(current.length){if(current.filter(settings.header).length){settings.active=current;}else{settings.active=current.parent().parent().prev();current.addClass("current");}}}
var container=this,headers=container.find(settings.header),active=findActive(settings.active),running=0;if(settings.fillSpace){var maxHeight=this.parent().height();headers.each(function(){maxHeight-=$(this).height();});headers.nextUntil(settings.header).height(maxHeight);}else if(settings.autoheight){var maxHeight=0;headers.nextUntil(settings.header).each(function(){maxHeight=Math.max(maxHeight,$(this).height());}).height(maxHeight);}
headers.not(active||"").nextUntil(settings.header).hide();active.addClass(settings.selectedClass);function findActive(selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$("<div>"):headers.filter(":eq(0)");}
function toggle(toShow,toHide,data,clickedActive,down){var finished=function(cancel){running=cancel?0:--running;if(running)
return;container.trigger("change",data);};running=toHide.size()==0?toShow.size():toHide.size();if(settings.animated){if(!settings.alwaysOpen&&clickedActive){toShow.slideToggle(settings.animated);finished(true);}else{$.Accordion.Animations[settings.animated]({toShow:toShow,toHide:toHide,finished:finished,down:down});}}else{if(!settings.alwaysOpen&&clickedActive){toShow.toggle();}else{toHide.hide();toShow.show();}
finished(true);}}
function clickHandler(event){if(!event.target&&!settings.alwaysOpen){active.toggleClass(settings.selectedClass);var toHide=active.nextUntil(settings.header);var toShow=active=$([]);toggle(toShow,toHide);return;}
var clicked=$(event.target);if(clicked.parents(settings.header).length)
while(!clicked.is(settings.header))
clicked=clicked.parent();var clickedActive=clicked[0]==active[0];if(running||(settings.alwaysOpen&&clickedActive)||!clicked.is(settings.header))
return;active.toggleClass(settings.selectedClass);if(!clickedActive){clicked.addClass(settings.selectedClass);}
var toShow=clicked.nextUntil(settings.header),toHide=active.nextUntil(settings.header),data=[clicked,active,toShow,toHide],down=headers.index(active[0])>headers.index(clicked[0]);active=clickedActive?$([]):clicked;toggle(toShow,toHide,data,clickedActive,down);return!toShow.length;};function activateHandler(event,index){if(arguments.length==1)
return;clickHandler({target:findActive(index)[0]});};return container.bind(settings.event,clickHandler).bind("activate",activateHandler);},activate:function(index){return this.trigger('activate',[index]);}});})(jQuery);

/* >>> Initialize accordion **/

$(function(){var temp=window.location.href.split("/");var ship_name=temp[5];jQuery('#n').Accordion({header:'.head',active:'.selected',alwaysOpen:false,animated:'easeslide'});});



/***************************************************************
 * Easing - Other plugins use this for visual effects.  
 */
jQuery.easing={easein:function(x,t,b,c,d){return c*(t/=d)*t+b},easeinout:function(x,t,b,c,d){if(t<d/2)return 2*c*t*t/(d*d)+b;var a=t-d/2;return-2*c*a*a/(d*d)+2*c*a/d+c/2+b},easeout:function(x,t,b,c,d){return-c*t*t/(d*d)+2*c*t/d+b},expoin:function(x,t,b,c,d){var a=1;if(c<0){a*=-1;c*=-1}return a*(Math.exp(Math.log(c)/d*t))+b},expoout:function(x,t,b,c,d){var a=1;if(c<0){a*=-1;c*=-1}return a*(-Math.exp(-Math.log(c)/d*(t-d))+c+1)+b},expoinout:function(x,t,b,c,d){var a=1;if(c<0){a*=-1;c*=-1}if(t<d/2)return a*(Math.exp(Math.log(c/2)/(d/2)*t))+b;return a*(-Math.exp(-2*Math.log(c/2)/d*(t-d))+c+1)+b},bouncein:function(x,t,b,c,d){return c-jQuery.easing['bounceout'](x,d-t,0,c,d)+b},bounceout:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},bounceinout:function(x,t,b,c,d){if(t<d/2)return jQuery.easing['bouncein'](x,t*2,0,c,d)*.5+b;return jQuery.easing['bounceout'](x,t*2-d,0,c,d)*.5+c*.5+b},elasin:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},elasout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},elasinout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},backin:function(x,t,b,c,d){var s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},backout:function(x,t,b,c,d){var s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},backinout:function(x,t,b,c,d){var s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},linear:function(x,t,b,c,d){return c*t/d+b}};

/***************************************************************
 * Metadata - Other plugins use this for parsing metadata from elements. 
 */
(function($){$.meta={type:"class",name:"metadata",setType:function(type,name){this.type=type;this.name=name;},cre:/({.*})/,single:'metadata'};var setArray=$.fn.setArray;$.fn.setArray=function(arr){return setArray.apply(this,arguments).each(function(){if(this.nodeType==9||$.isXMLDoc(this)||this.metaDone)return;var data="{}";if($.meta.type=="class"){var m=$.meta.cre.exec(this.className);if(m)
data=m[1];}else if($.meta.type=="elem"){if(!this.getElementsByTagName)return;var e=this.getElementsByTagName($.meta.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(this.getAttribute!=undefined){var attr=this.getAttribute($.meta.name);if(attr)
data=attr;}
if(!/^{/.test(data))
data="{"+data+"}";eval("data = "+data);if($.meta.single)
this[$.meta.single]=data;else
$.extend(this,data);this.metaDone=true;});};$.fn.data=function(){return this[0][$.meta.single];};})(jQuery);





$(function(){var newsitems;var curritem=0;var iPause=0;$(document).ready(function(){var tickerSelector="ul#ticker li";newsitems=$(tickerSelector).hide().hover(function(){$(this).addClass("hovered");iPause=1;},function(){$(this).removeClass("hovered");iPause=0;}).filter(":eq(0)").show().add(tickerSelector).size();newsitems--;setInterval(ticknews,4000);});




function ticknews(){if(iPause==0){$("#ticker li:eq("+curritem+")").fadeOut("slow",function(){$(this).hide();});curritem=++curritem%newsitems;$("#ticker li:eq("+curritem+")").fadeIn("slow");}}});





function showPic(whichpic){var temp=window.location.href.split("/");var domain=temp[2];var profileSuffix="-sp.";var deckImgURL=whichpic.href;deckImgURL=deckImgURL.replace(/http:\/\/www.virginholidayscruises.co.uk/,'');deckImgURL=deckImgURL.replace(/http:\/\/virgin/,'');var temp=new Array();temp=deckImgURL.split('.');var deckImgURLFirstPart=temp[0];var deckImgFormatSuffix=temp[1];var profileImgURL=deckImgURLFirstPart+profileSuffix+deckImgFormatSuffix;if(document.getElementById){document.getElementById('profile-holder').src='http://'+domain+'/'+profileImgURL;document.getElementById('deck-holder').src='http://'+domain+'/'+deckImgURL;if(whichpic.title){document.getElementById('desc').childNodes[0].nodeValue=whichpic.title;}else{document.getElementById('desc').childNodes[0].nodeValue=whichpic.childNodes[0].nodeValue;}
return false;}else{return true;}}

/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.20
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){8 m=\'2.20\';8 n=$.1Z.21&&/2U 6.0/.1q(2V.2W);4 1A(){7(22.23&&22.23.1A)22.23.1A(\'[E] \'+2X.2Y.2Z.30(31,\'\'))};$.F.E=4(l){Q C.1j(4(){l=l||{};7(l.2s==2t){32(l){24\'33\':7(C.11)1H(C.11);C.11=0;Q;24\'25\':C.1i=1;Q;24\'34\':C.1i=0;Q;35:l={1k:l}}}7(C.11)1H(C.11);C.11=0;C.1i=0;8 c=$(C);8 d=l.26?$(l.26,C):c.36();8 e=d.37();7(e.M<2){1A(\'38; 39 3a 3b: \'+e.M);Q}8 f=$.3c({},$.F.E.2u,l||{},$.2v?c.2v():$.3d?c.3e():{});7(f.27)f.28=f.29||e.M;f.I=f.I?[f.I]:[];f.1e=f.1e?[f.1e]:[];f.1e.2w(4(){f.2a=0});7(f.1r)f.1e.J(4(){1l(e,f,0,!f.1m)});7(n&&f.1I&&!f.2x)2b(d);8 g=C.3f;f.D=U((g.1B(/w:(\\d+)/)||[])[1])||f.D;f.A=U((g.1B(/h:(\\d+)/)||[])[1])||f.A;f.V=U((g.1B(/t:(\\d+)/)||[])[1])||f.V;7(c.y(\'1J\')==\'3g\')c.y(\'1J\',\'3h\');7(f.D)c.D(f.D);7(f.A&&f.A!=\'1K\')c.A(f.A);7(f.1n){f.1s=[];1C(8 i=0;i<e.M;i++)f.1s.J(i);f.1s.3i(4(a,b){Q 3j.1n()-0.5});f.1o=0;f.1c=f.1s[0]}S 7(f.1c>=e.M)f.1c=0;8 h=f.1c||0;d.y({1J:\'2y\',x:0,9:0}).1L().1j(4(i){8 z=h?i>=h?e.M-(i-h):h-i:e.M-i;$(C).y(\'z-1M\',z)});$(e[h]).y(\'1f\',1).T();7($.1Z.21)e[h].2z.2A(\'2c\');7(f.1g&&f.D)d.D(f.D);7(f.1g&&f.A&&f.A!=\'1K\')d.A(f.A);7(f.25)c.3k(4(){C.1i=1},4(){C.1i=0});8 j=$.F.E.L[f.1k];7($.2B(j))j(c,d,f);S 7(f.1k!=\'2d\')1A(\'3l 3m: \'+f.1k);d.1j(4(){8 a=$(C);C.W=(f.1g&&f.A)?f.A:a.A();C.X=(f.1g&&f.D)?f.D:a.D()});f.B=f.B||{};f.K=f.K||{};f.G=f.G||{};d.1N(\':2e(\'+h+\')\').y(f.B);7(f.1b)$(d[h]).y(f.1b);7(f.V){7(f.17.2s==2t)f.17={3n:3o,3p:3q}[f.17]||3r;7(!f.1O)f.17=f.17/2;3s((f.V-f.17)<3t)f.V+=f.17}7(f.2f)f.1P=f.1Q=f.2f;7(!f.1t)f.1t=f.17;7(!f.1D)f.1D=f.17;f.2C=e.M;f.1h=h;7(f.1n){f.O=f.1h;7(++f.1o==e.M)f.1o=0;f.O=f.1s[f.1o]}S f.O=f.1c>=(e.M-1)?0:f.1c+1;8 k=d[h];7(f.I.M)f.I[0].1R(k,[k,k,f,2g]);7(f.1e.M>1)f.1e[1].1R(k,[k,k,f,2g]);7(f.1E&&!f.14)f.14=f.1E;7(f.14)$(f.14).2h(\'1E\',4(){Q 2i(e,f,f.1m?-1:1)});7(f.2j)$(f.2j).2h(\'1E\',4(){Q 2i(e,f,f.1m?1:-1)});7(f.1u)2D(e,f);7(f.V||f.1r)C.11=1S(4(){1l(e,f,0,!f.1m)},f.1r?10:f.V+(f.2E||0));f.3u=4(a){8 b=$(a),s=b[0];7(!f.29)f.28++;e.J(s);7(f.18)f.18.J(s);f.2C=e.M;b.y(\'1J\',\'2y\').y(f.B).2F(c);7(n&&f.1I&&!f.2x)2b(b);7(f.1g&&f.D)b.D(f.D);7(f.1g&&f.A&&f.A!=\'1K\')d.A(f.A);s.W=(f.1g&&f.A)?f.A:b.A();s.X=(f.1g&&f.D)?f.D:b.D()}})};4 1l(a,b,c,d){7(b.2a)Q;8 p=a[0].1T,1v=a[b.1h],14=a[b.O];7(p.11===0&&!c)Q;7(!c&&!p.1i&&((b.27&&(--b.28<=0))||(b.1U&&!b.1n&&b.O<b.1h))){7(b.2k)b.2k(b);Q}7(c||!p.1i){7(b.I.M)$.1j(b.I,4(i,o){o.1R(14,[1v,14,b,d])});8 e=4(){7($.1Z.21&&b.1I)C.2z.2A(\'2c\');$.1j(b.1e,4(i,o){o.1R(14,[1v,14,b,d])})};7(b.O!=b.1h){b.2a=1;7(b.1V)b.1V(1v,14,b,e,d);S 7($.2B($.F.E[b.1k]))$.F.E[b.1k](1v,14,b,e);S $.F.E.2d(1v,14,b,e)}7(b.1n){b.1h=b.O;7(++b.1o==a.M)b.1o=0;b.O=b.1s[b.1o]}S{8 f=(b.O+1)==a.M;b.O=f?0:b.O+1;b.1h=f?a.M-1:b.O-1}7(b.1u)$.F.E.2l(b.1u,b.1h)}7(b.V&&!b.1r)p.11=1S(4(){1l(a,b,0,!b.1m)},b.V);S 7(b.1r&&p.1i)p.11=1S(4(){1l(a,b,0,!b.1m)},10)};$.F.E.2l=4(a,b){$(a).3v(\'a\').3w(\'2G\').2c(\'a:2e(\'+b+\')\').3x(\'2G\')};4 2i(a,b,c){8 p=a[0].1T,V=p.11;7(V){1H(V);p.11=0}b.O=b.1h+c;7(b.O<0){7(b.1U)Q 1F;b.O=a.M-1}S 7(b.O>=a.M){7(b.1U)Q 1F;b.O=0}7(b.1W&&2m b.1W==\'4\')b.1W(c>0,b.O,a[b.O]);1l(a,b,1,c>=0);Q 1F};4 2D(b,c){8 d=$(c.1u);$.1j(b,4(i,o){8 a=(2m c.2n==\'4\')?$(c.2n(i,o)):$(\'<a 3y="#">\'+(i+1)+\'</a>\');7(a.3z(\'3A\').M==0)a.2F(d);a.2h(c.2H,4(){c.O=i;8 p=b[0].1T,V=p.11;7(V){1H(V);p.11=0}7(2m c.2o==\'4\')c.2o(c.O,b[c.O]);1l(b,c,1,!c.1m);Q 1F})});$.F.E.2l(c.1u,c.1c)};4 2b(b){4 1X(s){8 s=U(s).3B(16);Q s.M<2?\'0\'+s:s};4 2I(e){1C(;e&&e.3C.3D()!=\'3E\';e=e.1T){8 v=$.y(e,\'2J-2K\');7(v.3F(\'3G\')>=0){8 a=v.1B(/\\d+/g);Q\'#\'+1X(a[0])+1X(a[1])+1X(a[2])}7(v&&v!=\'3H\')Q v}Q\'#3I\'};b.1j(4(){$(C).y(\'2J-2K\',2I(C))})};$.F.E.2d=4(a,b,c,d){8 e=$(a),$n=$(b);$n.y(c.B);8 f=4(){$n.1Y(c.K,c.1t,c.1P,d)};e.1Y(c.G,c.1D,c.1Q,4(){7(c.N)e.y(c.N);7(!c.1O)f()});7(c.1O)f()};$.F.E.L={2L:4(a,b,c){b.1N(\':2e(\'+c.1c+\')\').y(\'1f\',0);c.I.J(4(){$(C).T()});c.K={1f:1};c.G={1f:0};c.N={P:\'Y\'}}};$.F.E.3J=4(){Q m};$.F.E.2u={1k:\'2L\',V:3K,1r:0,17:3L,1t:R,1D:R,14:R,2j:R,1W:R,1u:R,2o:R,2H:\'1E\',2n:R,I:R,1e:R,2k:R,2f:R,1P:R,1Q:R,1G:R,K:R,G:R,B:R,N:R,1V:R,A:\'1K\',1c:0,1O:1,1n:0,1g:0,25:0,27:0,29:0,2E:0,26:R,1I:0,1U:0}})(2M);(4($){$.F.E.L.3M=4(d,e,f){d.y(\'12\',\'19\');f.I.J(4(a,b,c){$(C).T();c.B.x=b.1w;c.G.x=0-a.1w});f.1b={x:0};f.K={x:0};f.N={P:\'Y\'}};$.F.E.L.3N=4(d,e,f){d.y(\'12\',\'19\');f.I.J(4(a,b,c){$(C).T();c.B.x=0-b.1w;c.G.x=a.1w});f.1b={x:0};f.K={x:0};f.N={P:\'Y\'}};$.F.E.L.3O=4(d,e,f){d.y(\'12\',\'19\');f.I.J(4(a,b,c){$(C).T();c.B.9=b.1x;c.G.9=0-a.1x});f.1b={9:0};f.K={9:0}};$.F.E.L.3P=4(d,e,f){d.y(\'12\',\'19\');f.I.J(4(a,b,c){$(C).T();c.B.9=0-b.1x;c.G.9=a.1x});f.1b={9:0};f.K={9:0}};$.F.E.L.3Q=4(f,g,h){f.y(\'12\',\'19\').D();h.I.J(4(a,b,c,d){$(C).T();8 e=a.1x,2p=b.1x;c.B=d?{9:2p}:{9:-2p};c.K.9=0;c.G.9=d?-e:e;g.1N(a).y(c.B)});h.1b={9:0};h.N={P:\'Y\'}};$.F.E.L.3R=4(f,g,h){f.y(\'12\',\'19\');h.I.J(4(a,b,c,d){$(C).T();8 e=a.1w,2q=b.1w;c.B=d?{x:-2q}:{x:2q};c.K.x=0;c.G.x=d?e:-e;g.1N(a).y(c.B)});h.1b={x:0};h.N={P:\'Y\'}};$.F.E.L.3S=4(d,e,f){f.I.J(4(a,b,c){$(a).y(\'H\',1)});f.B={H:2};f.K={D:\'T\'};f.G={D:\'1L\'}};$.F.E.L.3T=4(d,e,f){f.I.J(4(a,b,c){$(a).y(\'H\',1)});f.B={H:2};f.K={A:\'T\'};f.G={A:\'1L\'}};$.F.E.L.1G=4(g,h,j){8 w=g.y(\'12\',\'2N\').D();h.y({9:0,x:0});j.I.J(4(){$(C).T()});j.17=j.17/2;j.1n=0;j.1G=j.1G||{9:-w,x:15};j.18=[];1C(8 i=0;i<h.M;i++)j.18.J(h[i]);1C(8 i=0;i<j.1c;i++)j.18.J(j.18.2O());j.1V=4(a,b,c,d,e){8 f=e?$(a):$(b);f.1Y(c.1G,c.1t,c.1P,4(){e?c.18.J(c.18.2O()):c.18.2w(c.18.3U());7(e)1C(8 i=0,2r=c.18.M;i<2r;i++)$(c.18[i]).y(\'z-1M\',2r-i);S{8 z=$(a).y(\'z-1M\');f.y(\'z-1M\',U(z)+1)}f.1Y({9:0,x:0},c.1D,c.1Q,4(){$(e?C:a).1L();7(d)d()})})}};$.F.E.L.3V=4(d,e,f){f.I.J(4(a,b,c){$(C).T();c.B.x=b.W;c.K.A=b.W});f.1b={x:0};f.B={A:0};f.K={x:0};f.G={A:0};f.N={P:\'Y\'}};$.F.E.L.3W=4(d,e,f){f.I.J(4(a,b,c){$(C).T();c.K.A=b.W;c.G.x=a.W});f.1b={x:0};f.B={x:0,A:0};f.G={A:0};f.N={P:\'Y\'}};$.F.E.L.3X=4(d,e,f){f.I.J(4(a,b,c){$(C).T();c.B.9=b.X;c.K.D=b.X});f.B={D:0};f.K={9:0};f.G={D:0};f.N={P:\'Y\'}};$.F.E.L.3Y=4(d,e,f){f.I.J(4(a,b,c){$(C).T();c.K.D=b.X;c.G.9=a.X});f.B={9:0,D:0};f.K={9:0};f.G={D:0};f.N={P:\'Y\'}};$.F.E.L.2P=4(d,e,f){f.1b={x:0,9:0};f.N={P:\'Y\'};f.I.J(4(a,b,c){$(C).T();c.B={D:0,A:0,x:b.W/2,9:b.X/2};c.K={x:0,9:0,D:b.X,A:b.W};c.G={D:0,A:0,x:a.W/2,9:a.X/2}})};$.F.E.L.3Z=4(d,e,f){f.I.J(4(a,b,c){c.B={D:0,A:0,1f:1,9:b.X/2,x:b.W/2,H:1};c.K={x:0,9:0,D:b.X,A:b.W}});f.G={1f:0};f.N={H:0}};$.F.E.L.40=4(d,e,f){8 w=d.y(\'12\',\'19\').D();e.T();f.I.J(4(a,b,c){$(a).y(\'H\',1)});f.B={9:w,H:2};f.N={H:1};f.K={9:0};f.G={9:w}};$.F.E.L.41=4(d,e,f){8 h=d.y(\'12\',\'19\').A();e.T();f.I.J(4(a,b,c){$(a).y(\'H\',1)});f.B={x:h,H:2};f.N={H:1};f.K={x:0};f.G={x:h}};$.F.E.L.42=4(d,e,f){8 h=d.y(\'12\',\'19\').A();8 w=d.D();e.T();f.I.J(4(a,b,c){$(a).y(\'H\',1)});f.B={x:h,9:w,H:2};f.N={H:1};f.K={x:0,9:0};f.G={x:h,9:w}};$.F.E.L.43=4(d,e,f){f.I.J(4(a,b,c){c.B={9:C.X/2,D:0,H:2};c.K={9:0,D:C.X};c.G={9:0};$(a).y(\'H\',1)})};$.F.E.L.44=4(d,e,f){f.I.J(4(a,b,c){c.B={x:C.W/2,A:0,H:2};c.K={x:0,A:C.W};c.G={x:0};$(a).y(\'H\',1)})};$.F.E.L.45=4(d,e,f){f.I.J(4(a,b,c){c.B={9:b.X/2,D:0,H:1,P:\'1y\'};c.K={9:0,D:C.X};c.G={9:a.X/2,D:0};$(a).y(\'H\',2)});f.N={H:1,P:\'Y\'}};$.F.E.L.46=4(d,e,f){f.I.J(4(a,b,c){c.B={x:b.W/2,A:0,H:1,P:\'1y\'};c.K={x:0,A:C.W};c.G={x:a.W/2,A:0};$(a).y(\'H\',2)});f.N={H:1,P:\'Y\'}};$.F.E.L.47=4(e,f,g){8 d=g.2Q||\'9\';8 w=e.y(\'12\',\'19\').D();8 h=e.A();g.I.J(4(a,b,c){c.B={H:2,P:\'1y\'};7(d==\'2R\')c.B.9=-w;S 7(d==\'2S\')c.B.x=h;S 7(d==\'2T\')c.B.x=-h;S c.B.9=w;$(a).y(\'H\',1)});g.K={9:0,x:0};g.G={9:0,x:0};g.N={H:2,P:\'Y\'}};$.F.E.L.48=4(e,f,g){8 d=g.2Q||\'9\';8 w=e.y(\'12\',\'19\').D();8 h=e.A();g.I.J(4(a,b,c){c.B.P=\'1y\';7(d==\'2R\')c.G.9=w;S 7(d==\'2S\')c.G.x=-h;S 7(d==\'2T\')c.G.x=h;S c.G.9=-w;$(a).y(\'H\',2)});g.K={9:0,x:0};g.B={H:1,x:0,9:0};g.N={H:1,P:\'Y\'}};$.F.E.L.49=4(d,e,f){8 w=d.y(\'12\',\'2N\').D();8 h=d.A();f.I.J(4(a,b,c){$(a).y(\'H\',2);c.B.P=\'1y\';7(!c.G.9&&!c.G.x)c.G={9:w*2,x:-h/2,1f:0};S c.G.1f=0});f.B={9:0,x:0,H:1,1f:1};f.K={9:0};f.N={H:2,P:\'Y\'}};$.F.E.L.4a=4(o,p,q){8 w=o.y(\'12\',\'19\').D();8 h=o.A();q.B=q.B||{};8 s;7(q.1d){7(/4b/.1q(q.1d))s=\'1p(1a 1a \'+h+\'Z 1a)\';S 7(/4c/.1q(q.1d))s=\'1p(1a \'+w+\'Z \'+h+\'Z \'+w+\'Z)\';S 7(/4d/.1q(q.1d))s=\'1p(1a \'+w+\'Z 1a 1a)\';S 7(/4e/.1q(q.1d))s=\'1p(\'+h+\'Z \'+w+\'Z \'+h+\'Z 1a)\';S 7(/2P/.1q(q.1d)){8 t=U(h/2);8 l=U(w/2);s=\'1p(\'+t+\'Z \'+l+\'Z \'+t+\'Z \'+l+\'Z)\'}}q.B.1d=q.B.1d||s||\'1p(1a 1a 1a 1a)\';8 d=q.B.1d.1B(/(\\d+)/g);8 t=U(d[0]),r=U(d[1]),b=U(d[2]),l=U(d[3]);8 u=2g;q.I.J(4(g,i,j){7(u){u=1F;Q}8 k=$(g).y(\'H\',2);8 m=$(i).y({H:3,P:\'1y\'});8 n=1,1z=U((j.1t/13))-1;4 f(){8 a=t?t-U(n*(t/1z)):0;8 c=l?l-U(n*(l/1z)):0;8 d=b<h?b+U(n*((h-b)/1z||1)):h;8 e=r<w?r+U(n*((w-r)/1z||1)):w;m.y({1d:\'1p(\'+a+\'Z \'+e+\'Z \'+d+\'Z \'+c+\'Z)\'});(n++<=1z)?1S(f,13):k.y(\'P\',\'Y\')}f()});q.N={};q.K={9:0};q.G={9:0}}})(2M);',62,263,'||||function|||if|var|left||||||||||||||||||||||||top|css||height|cssBefore|this|width|cycle|fn|animOut|zIndex|before|push|animIn|transitions|length|cssAfter|nextSlide|display|return|null|else|show|parseInt|timeout|cycleH|cycleW|none|px||cycleTimeout|overflow||next|||speed|els|hidden|0px|cssFirst|startingSlide|clip|after|opacity|fit|currSlide|cyclePause|each|fx|go|rev|random|randomIndex|rect|test|continuous|randomMap|speedIn|pager|curr|offsetHeight|offsetWidth|block|count|log|match|for|speedOut|click|false|shuffle|clearTimeout|cleartype|position|auto|hide|index|not|sync|easeIn|easeOut|apply|setTimeout|parentNode|nowrap|fxFn|prevNextClick|hex|animate|browser||msie|window|console|case|pause|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|true|bind|advance|prev|end|updateActivePagerLink|typeof|pagerAnchorBuilder|pagerClick|nextW|nextH|len|constructor|String|defaults|metadata|unshift|cleartypeNoBg|absolute|style|removeAttribute|isFunction|slideCount|buildPager|delay|appendTo|activeSlide|pagerEvent|getBg|background|color|fade|jQuery|visible|shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|arguments|switch|stop|resume|default|children|get|terminating|too|few|slides|extend|meta|data|className|static|relative|sort|Math|hover|unknown|transition|slow|600|fast|200|400|while|250|addSlide|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t'.split('|'),0,{}));



$(function(){$('#slideshowPrevNext').css({display:'block'}).cycle({fx:'fade',speed:'fast',timeout:0,before:onBefore,after:onAfter,next:'#next',prev:'#prev'});function onBefore(){$('#output').html('<h2 style="text-align:center">'+this.alt+'</h2>');}
function onAfter(){$('#output').html('<h2 style="text-align:center">'+this.alt+'</h2>');}
$('#slideshowPrevNext2').css({display:'block'}).cycle({fx:'fade',speed:'fast',timeout:0,before:onBefore2,after:onAfter2,next:'#next2',prev:'#prev2'});function onBefore2(){$('#output2').html('<h2 style="text-align:center">'+this.alt+'</h2>');}
function onAfter2(){$('#output2').html('<h2 style="text-align:center">'+this.alt+'</h2>');}

function onDealAfter(){$('#slideshowOutput').html('<h2 style="text-align:center">'+this.alt+'</h2>');}
$('.slideshowNav').css({display:'block'});$('.slideshowNav2').css({display:'block'});});

/**
 * CREDITS
 * All plugins used are under GPL, MIT or share-alike licence.
 * Tabs              (c) Klaus Hartl, http://stilbuero.de/tabs/
 * History/Remote    (c) Klaus Hartl, http://stilbuero.de/jquery/history/ 
 * TableSorter       (c) Christian Bach, http://tablesorter.com
 * Metadata          (c) John Resig, Yehuda Katz, JÃ¶rn Zaefferer 
 * Form Validation   (c) JÃ¶rn Zaefferer, http://bassistance.de/jquery-plugins/jquery-plugin-validation/ 
 * LavaLamp          (c) Ganeshji Marwaha, http://gmarwaha.com/blog/?p=7 
 * Easing            (c) George Smith, http://gsgd.co.uk/sandbox/jquery.easing.php
 * Accordion         (c) Jorn Zaefferer, Frank Marcia, http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
 * Flash             (c) Luke Lutman, http://jquery.lukelutman.com/plugins/flash
 * JTip              (c) Cody Lindley, http://www.codylindley.com 
 */
 
$(document).ready(function(){$('#hotels_container ul li a').click(function(data){var hotel_code=$(this).attr("href").substr(1);var offer_id=$('#offer_id').attr("value");var cruise_type=$('#cruise_type').attr("value");$.post('../../airports_prices.php',{hotel_code:hotel_code,offer_id:offer_id,cruise_type:cruise_type},function(data){$('#airports_container').empty().append(data).tabs();$("table.sr").tablesorter({widgets:['zebra']});});return false;});});






$(document).ready(function(){$('#m li a span').css('display','none');$('#paging').css('display','inline');var gcs=$('.gcs label#query_label').remove().text();var newsletter_email_label=$('#newsletter label#email_label').remove().text();var sky_newsletter_email_label=$('#sky_newsletter label#email_label').remove().text();var newsletter_post_code_label=$('#newsletter label#post_code_label').remove().text();var reference_label=$('#reference label').remove().text().replace(/:/,'');var inline_signup=$('#inline_signup #email_label').remove().text().replace(/:/,'');var news_search=$('#news_search').remove().text().replace(/:/,'');if(window.location.href.search('email')==-1){$('#newsletter #email').val(newsletter_email_label);}
if(window.location.href.search('email')==-1){$('#sky_newsletter #email').val(sky_newsletter_email_label);}
$('form#form #s_label').css('display','none');$('#newsletter #post_code').val(newsletter_post_code_label);$('#reference #ref').val(reference_label);$('#inline_signup #email').val(inline_signup);$('#news_search').val(news_search);$('.gcs input#query').val(gcs);$('.gcs input#query').focus(function(){$(this).val('');});$('#news_search').focus(function(){$(this).val('');});$('#inline_signup #email').focus(function(){$(this).val('');});$('#sky_newsletter #email').focus(function(){$('#sky_newsletter #email').val('');});$('#newsletter #email').focus(function(){$('#newsletter #email').val('');});$('#newsletter #post_code').focus(function(){$('#newsletter #post_code').val('');});$('#reference #ref').focus(function(){$('#reference #ref').val('');});});$(document).ready(function(){$('#decklist li:first').addClass('current');$('#decklist li a').click(function(){$('#decklist li').removeClass('current');var id=$(this).text().toLowerCase().replace(/^\s+|\s+$/g,'').replace(/\s/g,'-');$('#decklist li#deck-'+id).addClass('current');return false;});});


$(document).ready(function(){$('#go').hover(function(){$(this).attr("src","http://www.virginholidayscruises.co.uk/a/i/g/search-over.png");},function(){$(this).attr("src","http://www.virginholidayscruises.co.uk/a/i/g/search.png");});});


$(document).ready(function(){$('form#form input#other_where').css('display','none');$('form#form #other_where_label').css('display','none');$('form input#other_timeframe').css('display','none');$('form #other_timeframe_label').css('display','none');$('form input#other_hear_how').css('display','none');$('form #other_hear_how_label').css('display','none');$('form select#where').change(function(){var value=$(this).val().toLowerCase();if(value=='other'){$('form input#other_where').css('display','inline');$('form #other_where_label').css('display','inline');}else{$('form input#other_where').css('display','none');$('form #other_where_label').css('display','none');}});$('form select#timeframe').change(function(){var value=$(this).val().toLowerCase();if(value=='other'){$('form input#other_timeframe').css('display','inline');$('form #other_timeframe_label').css('display','inline');}else{$('form input#other_timeframe').css('display','none');$('form #other_timeframe_label').css('display','none');}});$('form select#hear_how').change(function(){var value=$(this).val().toLowerCase();if(value=='other'){$('form input#other_hear_how').css('display','inline');$('form #other_hear_how_label').css('display','inline');}else{$('form input#other_hear_how').css('display','none');$('form #other_hear_how_label').css('display','none');}});$('#phone_number a').click(function(){return false;});$('form#form input#enquire').click(function(){$('form#form input#ready_to_book').val('Call me back - Enquiry Only');});$('form#form input#book').click(function(){var temp=window.location.href.split("/");var domain=temp[2];$('form#form input#ready_to_book').val('Continue...');});var temp=window.location.href.split("/");var domain=temp[2];$("#ports").hide();$("#toggle_ports").toggle(function(){$("#ports").show("slow");document.getElementById('toggle_ports').src='http://'+domain+'/a/i/icons/up-01.gif';document.getElementById('toggle_ports').alt='Hide Ports';},function(){$("#ports").hide("slow");document.getElementById('toggle_ports').src='http://'+domain+'/a/i/icons/down-01.gif';});});


$(document).ready(function(){
		$('#sortby').change(function(e) {
			var currentlySortedBy = $("#sortby :selected").text();
			var sortedby = $(this).val();
			var page_id = $('#page_id').val();
			var temp = window.location.href.split("/");
  			var domain = temp[2]; 
			
			if(sortedby=='')return;
           $('#currentlySortedBy').empty().append(currentlySortedBy); 
			$.ajax({
					type: "GET",
   					url: 'http://'+domain+'/'+'get_offers_ajax.php',	
					data: ({sortedby : sortedby, page_id:page_id}),			
					success: function(html){
				    	$("#cruisedeals").empty().append(html);  		
						 						
				  	}
					
				});
        });	
	});


function stop_newsletter_loading(){
	
	$('form#quick_newsflash_form #newsletter_loading').hide();
	$("form#quick_newsflash_form #newsletter_msg").css("display","inline");
}	 

$(document).ready(function(){
 var newsletter_email_label = $('form#quick_newsflash_form #email_label').remove().text();
 $('form#quick_newsflash_form  #email').val(newsletter_email_label);
 $('form#quick_newsflash_form #email').focus(function(){
    if($(this).val()=='Your e-mail address'){
		$(this).val('');
	}	
  });
  
		$("form#quick_newsflash_form").submit(function () {
			
			var email = $("#email").val(); 
			var temp = window.location.href.split("/");
  			var domain = temp[2];   
			
			$.post('http://'+domain+'/do_newsletter.php',{ email:email, position:"newsletter"}, function(json) {	  			
				
				var data = eval('(' + json + ')');
				$("form#quick_newsflash_form #newsletter_msg").html(data.msg);
			
				
				$('form#quick_newsflash_form #newsletter_loading').show();
				
				if(data.output=='y'){								
					setTimeout("stop_newsletter_loading()", 1500);									
					$('form#quick_newsflash_form #email').hide();
					$('form#quick_newsflash_form #sign-up').hide();	
				}
				else if(data.output=='e3'){													
					setTimeout("stop_newsletter_loading()", 1500);									
				}else{
					setTimeout("stop_newsletter_loading()", 1500);													
				}
				
  			});		
			return false;
		});
});

$(document).ready(function(){var temp=window.location.href.split("#");var url=temp[0];url=url.replace(/itineraries.php/,'').replace(/public.php/,'').replace(/cabins.php/,'').replace(/deck-plans.php/,'');$('#n ul li ul li a').each(function(){var menu_url=$(this).attr("href");if(menu_url==url){$(this).addClass('active');}});$('#n ul li a').each(function(){var menu_url=$(this).attr("href");if(menu_url==url){$(this).addClass('active');}});

/*
  
 $('ol#decklist a').hover(
      function () {
       // alert($('ol#decklist li.current').text());
        var first = $('ol#decklist li.current').text();
        var deckImgURL = this.href;
        var profileSuffix = "-sp.";
       
        
        var temp = new Array();
        temp = deckImgURL.split('.');
        var deckImgURLFirstPart = temp[0];
        var deckImgFormatSuffix = temp[1];
        var profileImgURL = deckImgURLFirstPart + profileSuffix + deckImgFormatSuffix;
       
        
        document.getElementById('profile-holder').src = profileImgURL;
		document.getElementById('deck-holder').src = deckImgURL;  
		
      }, 
      function () {
        document.getElementById('profile-holder').src = document.getElementById('init-deck-sp').src;
		document.getElementById('deck-holder').src = document.getElementById('init-deck').src;  
      }
    );*/

});
//datepicker
/*
$(document).ready(function(){
    $('.dateRange').datepicker({beforeShow: customRange});

    // Customize two date pickers to work as a date range
    function customRange(input) {
    	return {minDate: (input.id == 'dTo' ? $('#depart_from').datepicker('getDate') : null),
    		maxDate: (input.id == 'dFrom' ? $('#depart_to').datepicker('getDate') : null)};
    }
});*/
/*dropdowns*/




style_list();

function dropdowns()
{	
	var cruise_departure_type = '';
	var destination = '';
	var operator = '';
	var virgin_flights = '';
	var families = '';
	var ship_code = '';
	var query = '';
	var form_values = new Array();
	
	cruise_departure_type = $('#cruise_departure_type_restrict').val();
	operator = $('#operator_restrict').val();
	ship_code = $('#ship_code_restrict').val();
	destination = $('#destination_restrict').val();
	virgin_flights = $('#virgin_flights').val();
	families = $('#families').val();	
	year = $('#year_restrict').val();
	
	for (j = 0; j < document.search.length; j++)
	{
		if (document.search[j].name && document.search[j].value && document.search[j].type == 'select-one')
		{
			query += document.search[j].name + '=' + document.search[j].value + '&';
			form_values[document.search[j].name] = document.search[j].value;
		}
		else if (document.search[j].type == 'hidden' && document.search[j].name.search('restrict') == 0)
		{
			query += document.search[j].name + '=' + document.search[j].value + '&';
		}
		
		document.search[j].disabled = true;
	}
	
	if (!query)
	{
		
		enable_form();
		return false;
	}
	
	var xml = getXMLObj();
	
	if (!xml)
	{
		enable_form();
		return false;
	}
	
	xml.onreadystatechange=function()
	{
		if(xml.readyState==4)
		{
			var response = xml.responseText;
			 
		//	document.write(response); //for debug
			if (response)
			{
				var dropdown = eval('(' + response + ')');
				
				for (menu in dropdown.dropdowns)
				{
					
					if (document.search[menu].options != undefined) {
					
					
					
						first_menu = document.search[menu].options[0];
						
						document.search[menu].options.length = 0;
						document.search[menu].options[0] = first_menu;
						var i = 1;
						
						for (field in dropdown.dropdowns[menu]) {
							document.search[menu].options[i] = new Option(field, dropdown.dropdowns[menu][field]);
							if (form_values[menu] == dropdown.dropdowns[menu][field]) {
								document.search[menu].options[i].selected = true;
							}
							i++;
						}
					}
				}
				
				if (document.getElementById('best_price') != undefined)
				{
					document.getElementById('best_price').innerHTML = '£' + dropdown.best_price['price'];
				}
			}
			//disable_form();
			loading();
			
			
		}
	}
	var temp = window.location.href.split("/");
  	var domain = temp[2];               // I may still need to peel of port number and such.
	
	if(year!== null && year!= undefined){		
		query = query + '&year=' + year
	}
	if(virgin_flights=='Y' && virgin_flights!= undefined){
		query = query + '&virgin_flights=' + virgin_flights
	}
	if(ship_code!== null && ship_code!= undefined){		
		query = query + '&ship_code=' + ship_code
	}
	if(families!== null && families!= undefined){		
		query = query + '&families=' + families
	}
	if(destination!== null  && destination!= undefined){		
		query = query + '&destination=' + destination
	}
	if(ship_code!== null && ship_code!= undefined){		
		query = query + '&ship_code=' + ship_code
	}
	if(operator!== null && operator!= undefined){		
		query = query + '&operator=' + operator
	}
	if(cruise_departure_type!== null && cruise_departure_type!= undefined){		
		query = query + '&cruise_departure_type=' + cruise_departure_type
	}
	
	xml.open('POST','http://'+domain+'/dynamic_dropdowns.php',true);
	xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xml.send(query);
}


function getXMLObj()
{
	if(window.XMLHttpRequest)
	{
		return new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		return false;
	}
}
function disable_form()
{
	for (j = 0; j < document.search.length; j++)
	{
		document.search[j].disabled = true;
	}
}
function enable_form()
{
	for (j = 0; j < document.search.length; j++)
	{
		document.search[j].disabled = false;
	}
}
function style_list(){
	$(document).ready(function(){		
		$('#main_search form option').each(function(){
			var val = $(this).text();
			//document.write(val)
			if (val.indexOf("(All)") >= '0') {
				$(this).addClass('opt_emph');
			}			
		});
		
	});
}
function reset_dropdowns()
{
	for (j = 0; j < document.search.length; j++)
	{
		if (document.search[j].type == 'select-one')
		{
			document.search[j].options[0].selected = true;
		}
	}	
}
function stop_loading(){
	$('#dropdown_loading').hide();	
	style_list();
	enable_form();	
	$('#main_search #go').show();
	$('#main_search #reset').show();
}
function loading()
{
	$('#main_search #go').hide();
	$('#main_search #reset').hide();
	$('#dropdown_loading').show();	
	setTimeout("stop_loading()", 500)
			   
	
}

$(document).ready(function(){
	$('#reset').click(function(){			
		reset_dropdowns();		
		dropdowns();
		return false;
	});
});

function flexWin(url,w,h,t,l,r,s){if(document.getElementById||document.layers||document.all){var window_width=w;var window_height=h;}
var window_left=l;var window_top=t;window.open(url,"flexwin","resizable="+r+",scrollbars="+s+",width="+window_width+",height="+window_height+",top="+window_top+",left="+window_left+"");}


function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}


function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}

function eraseCookie(name) {
	createCookie(name,"",-1);
}
//createCookie(document.search[j].name,document.search[j].value,1);

$(document).ready(function(){
		
		$('.itin_slideshow').css('display','block').cycle({      fx:     'fade',	        speed:  'medium'  	});

		
  	});
