(function ($) {

/**
 * A progressbar object. Initialized with the given id. Must be inserted into
 * the DOM afterwards through progressBar.element.
 *
 * method is the function which will perform the HTTP request to get the
 * progress bar state. Either "GET" or "POST".
 *
 * e.g. pb = new progressBar('myProgressBar');
 *      some_element.appendChild(pb.element);
 */
Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
  var pb = this;
  this.id = id;
  this.method = method || 'GET';
  this.updateCallback = updateCallback;
  this.errorCallback = errorCallback;

  // The WAI-ARIA setting aria-live="polite" will announce changes after users
  // have completed their current activity and not interrupt the screen reader.
  this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id);
  this.element.html('<div class="bar"><div class="filled"></div></div>' +
                    '<div class="percentage"></div>' +
                    '<div class="message">&nbsp;</div>');
};

/**
 * Set the percentage and status message for the progressbar.
 */
Drupal.progressBar.prototype.setProgress = function (percentage, message) {
  if (percentage >= 0 && percentage <= 100) {
    $('div.filled', this.element).css('width', percentage + '%');
    $('div.percentage', this.element).html(percentage + '%');
  }
  $('div.message', this.element).html(message);
  if (this.updateCallback) {
    this.updateCallback(percentage, message, this);
  }
};

/**
 * Start monitoring progress via Ajax.
 */
Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
  this.delay = delay;
  this.uri = uri;
  this.sendPing();
};

/**
 * Stop monitoring progress via Ajax.
 */
Drupal.progressBar.prototype.stopMonitoring = function () {
  clearTimeout(this.timer);
  // This allows monitoring to be stopped from within the callback.
  this.uri = null;
};

/**
 * Request progress data from server.
 */
Drupal.progressBar.prototype.sendPing = function () {
  if (this.timer) {
    clearTimeout(this.timer);
  }
  if (this.uri) {
    var pb = this;
    // When doing a post request, you need non-null data. Otherwise a
    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
    $.ajax({
      type: this.method,
      url: this.uri,
      data: '',
      dataType: 'json',
      success: function (progress) {
        // Display errors.
        if (progress.status == 0) {
          pb.displayError(progress.data);
          return;
        }
        // Update display.
        pb.setProgress(progress.percentage, progress.message);
        // Schedule next timer.
        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
      },
      error: function (xmlhttp) {
        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
      }
    });
  }
};

/**
 * Display errors on the page.
 */
Drupal.progressBar.prototype.displayError = function (string) {
  var error = $('<div class="messages error"></div>').html(string);
  $(this.element).before(error).hide();

  if (this.errorCallback) {
    this.errorCallback(this);
  }
};

})(jQuery);
;
// ColorBox v1.3.19 - jQuery lightbox plugin
// (c) 2011 Jack Moore - jacklmoore.com
// License: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Z(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bc(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[$(-1),$(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),ba(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Z("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||bb(),bc(m),bc(i,K.onLoad),K.h=K.height?_(K.height,"y")-N-L:K.innerHeight&&_(K.innerHeight,"y"),K.w=K.width?_(K.width,"x")-O-M:K.innerWidth&&_(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=_(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=_(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Z(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):ba(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Z(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this);;
(function ($) {

Drupal.behaviors.initColorbox = {
  attach: function (context, settings) {
    if (!$.isFunction($.colorbox)) {
      return;
    }
    $('a, area, input', context)
      .filter('.colorbox')
      .once('init-colorbox-processed')
      .colorbox(settings.colorbox);
  }
};

{
  $(document).bind('cbox_complete', function () {
    Drupal.attachBehaviors('#cboxLoadedContent');
  });
}

})(jQuery);
;
(function ($) {

Drupal.behaviors.initColorboxStockholmsyndromeStyle = {
  attach: function (context, settings) {
    $(document).bind('cbox_open', function () {
      // Hide close button initially.
      $('#cboxClose', context).css('opacity', 0);
    });
    $(document).bind('cbox_load', function () {
      // Hide close button. (It doesn't handle the load animation well.)
      $('#cboxClose', context).css('opacity', 0);
    });
    $(document).bind('cbox_complete', function () {
      // Show close button with a delay.
      $('#cboxClose', context).fadeTo('fast', 0, function () {$(this).css('opacity', 1)});
    });
  }
};

})(jQuery);
;
(function ($) {

Drupal.behaviors.initColorboxLoad = {
  attach: function (context, settings) {
    if (!$.isFunction($.colorbox)) {
      return;
    }
    $.urlParams = function (url) {
      var p = {},
          e,
          a = /\+/g,  // Regex for replacing addition symbol with a space
          r = /([^&=]+)=?([^&]*)/g,
          d = function (s) { return decodeURIComponent(s.replace(a, ' ')); },
          q = url.split('?');
      while (e = r.exec(q[1])) {
        e[1] = d(e[1]);
        e[2] = d(e[2]);
        switch (e[2].toLowerCase()) {
          case 'true':
          case 'yes':
            e[2] = true;
            break;
          case 'false':
          case 'no':
            e[2] = false;
            break;
        }
        if (e[1] == 'width') { e[1] = 'innerWidth'; }
        if (e[1] == 'height') { e[1] = 'innerHeight'; }
        p[e[1]] = e[2];
      }
      return p;
    };
    $('a, area, input', context)
      .filter('.colorbox-load')
      .once('init-colorbox-load-processed', function () {
        var params = $.urlParams($(this).attr('href'));
        $(this).colorbox($.extend({}, settings.colorbox, params));
      });
  }
};

})(jQuery);
;
// $Id: extlink.js,v 1.8 2010/05/26 01:25:56 quicksketch Exp $
(function ($) {

function extlinkAttach(context) {
  // Strip the host name down, removing ports, subdomains, or www.
  var pattern = /^(([^\/:]+?\.)*)([^\.:]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/;
  var host = window.location.host.replace(pattern, '$3$4');
  var subdomain = window.location.host.replace(pattern, '$1');

  // Determine what subdomains are considered internal.
  if (Drupal.settings.extlink.extSubdomains) {
    var subdomains = "([^/]*\\.)?";
  }
  else if (subdomain == 'www.' || subdomain == '') {
    var subdomains = "(www\\.)?";
  }
  else {
    var subdomains = subdomain.replace(".", "\\.");
  }

  // Build regular expressions that define an internal link.
  var internal_link = new RegExp("^https?://" + subdomains + host, "i");

  // Extra internal link matching.
  var extInclude = false;
  if (Drupal.settings.extlink.extInclude) {
    extInclude = new RegExp(Drupal.settings.extlink.extInclude.replace(/\\/, '\\'));
  }

  // Extra external link matching.
  var extExclude = false;
  if (Drupal.settings.extlink.extExclude) {
    extExclude = new RegExp(Drupal.settings.extlink.extExclude.replace(/\\/, '\\'));
  }

  // Find all links which are NOT internal and begin with http (as opposed
  // to ftp://, javascript:, etc. other kinds of links.
  // When operating on the 'this' variable, the host has been appended to
  // all links by the browser, even local ones.
  // In jQuery 1.1 and higher, we'd use a filter method here, but it is not
  // available in jQuery 1.0 (Drupal 5 default).
  var external_links = new Array();
  var mailto_links = new Array();
  $("a:not(." + Drupal.settings.extlink.extClass + ", ." + Drupal.settings.extlink.mailtoClass + ")", context).each(function(el) {
    try {
      var url = this.href.toLowerCase();
      if (url.indexOf('http') == 0 && (!url.match(internal_link) || (extInclude && url.match(extInclude))) && !(extExclude && url.match(extExclude))) {
        external_links.push(this);
      }
      else if (url.indexOf('mailto:') == 0) {
        mailto_links.push(this);
      }
    }
    // IE7 throws errors often when dealing with irregular links, such as:
    // <a href="node/10"></a> Empty tags.
    // <a href="http://user:pass@example.com">example</a> User:pass syntax.
    catch(error) {
      return false;
    }
  });

  if (Drupal.settings.extlink.extClass) {
    // Apply the "ext" class to all links not containing images.
    if (parseFloat($().jquery) < 1.2) {
      $(external_links).not('[img]').addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.extClass + '></span>'); });
    }
    else {
      $(external_links).not($(external_links).find('img').parents('a')).addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.extClass + '></span>'); });
    }
  }

  if (Drupal.settings.extlink.mailtoClass) {
    // Apply the "mailto" class to all mailto links not containing images.
    if (parseFloat($().jquery) < 1.2) {
      $(mailto_links).not('[img]').addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>'); });
    }
    else {
      $(mailto_links).not($(mailto_links).find('img').parents('a')).addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>'); });
    }
  }

  if (Drupal.settings.extlink.extTarget) {
    // Apply the target attribute to all links.
    $(external_links).attr('target', Drupal.settings.extlink.extTarget);
  }

  if (Drupal.settings.extlink.extAlert) {
    // Add pop-up click-through dialog.
    $(external_links).click(function(e) {
     return confirm(Drupal.settings.extlink.extAlertText);
    });
  }

  // Work around for Internet Explorer box model problems.
  if (($.support && !($.support.boxModel === undefined) && !$.support.boxModel) || ($.browser.msie && parseInt($.browser.version) <= 7)) {
    $('span.ext, span.mailto').css('display', 'inline-block');
  }
}

Drupal.behaviors.extlink = {
  attach: function(context){
    extlinkAttach(context);
  }
}

})(jQuery);
;
( function() { var tmpCultRes = {cz : { sd: 'd. m. yyyy', tld: 'www.skyscanner.cz'},da : { sd: 'dd-mm-yyyy', tld: 'www.skyscanner.dk'},de : { sd: 'dd.mm.yyyy', tld: 'www.skyscanner.de'},en : { sd: 'm/d/yyyy', tld: 'www.skyscanner.net'},es : { sd: 'm/d/yyyy', tld: 'www.skyscanner.es'},fi : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.fi'},fr : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.fr'},gr : { sd: 'd/m/yyyy', tld: 'gr.skyscanner.com'},hu : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.hu'},it : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.it'},ja : { sd: 'yyyy/mm/dd', tld: 'www.skyscanner.jp'},ko : { sd: 'yyyy-mm-dd', tld: 'www.skyscanner.kr'},nl : { sd: 'd-m-yyyy', tld: 'www.skyscanner.nl'},no : { sd: 'dd.mm.yyyy', tld: 'www.skyscanner.no'},pl : { sd: 'dd.mm.yyyy', tld: 'www.skyscanner.pl'},pt : { sd: 'dd-mm-yyyy', tld: 'www.skyscanner.pt'},ro : { sd: 'dd.mm.yyyy', tld: 'ro.skyscanner.com'},ru : { sd: 'dd.mm.yyyy', tld: 'www.skyscanner.ru'},sv : { sd: 'yyyy-mm-dd', tld: 'www.skyscanner.se'},tr : { sd: 'dd.mm.yyyy', tld: 'www.skyscanner.com.tr'},uk : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.com.ua'},zh : { sd: 'yyyy/m/d', tld: 'cn.skyscanner.com'},zw : { sd: 'yyyy/m/d', tld: 'www.skyscanner.com.tw'},ms : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.com.my'},th : { sd: 'dd/mm/yyyy', tld: 'th.skyscanner.com'},vi : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.com.vn'},id : { sd: 'dd/mm/yyyy', tld: 'www.skyscanner.co.id'}}; var tmpSupLangs =  new Array('CZ','DA','DE','EN','ES','FI','FR','GR','HU','IT','JA','KO','NL','NO','PL','PT','RO','RU','SV','TR','UK','ZH','ZW','MS','TH','VI','ID'); var tmpSs={loader:{RootUrl:"http://www.skyscanner.net",ApiServer:"http://api.skyscanner.net",ApiKey:"7b5122ea-ed36-4c95-baff-1b5f4c8822d4",KeyVerified:true,v:"33346",Path:"api/",AjaxApiMode:"ajax",CSSPath:"/style/",UrlParameters:"",UsageSuccessfullyVerified:"1",Ucy:"US",today:new Date(parseInt("1327235641758")),AppendAssociateIdToUrl:"true"=="true",dynamicApiLoadMarkers:new Array(),PARAMS:{V:"v",KEY:"key",VERSION:"version"},firstdayofweek:"0",modules:{maps:new Module("maps","1","#server#/xml/cache/api/#name#/#version#/#name#.js?#key_param#=#api_key#&#v_param#=#v#",null),snippets:new Module("snippets","1","#server#/xml/cache/api/#name#/#version#/#name#_#lang_id#.js?#key_param#=#api_key#&#v_param#=#v#","#server#/xml/cache/api/#name#/#version#/#name#.css?#key_param#=#api_key#&#v_param#=#v#")}},maps:{tracking:{freeInt:{associateId:"INT_GEN_00016_00001&apikey=7b5122ea-ed36-4c95-baff-1b5f4c8822d4",widgetAssociateId:"INT_WIG_00016_00002&apikey=7b5122ea-ed36-4c95-baff-1b5f4c8822d4"},params:"ss-aid=MAP&utm_campaign=INT_GEN_00016&utm_content=00001&utm_source=map&utm_medium=integration"}},supportedLanguages:tmpSupLangs,cultureResources:tmpCultRes};if(typeof skyscanner=="undefined"){skyscanner=tmpSs}else{skyscanner.extendObject(skyscanner,tmpSs)}function setOnLoadCallback(a){skyscanner.$E.attachEventHandler(window,"load",a)}function addParameters(a,f){var e=skyscanner.loader.UrlParameters;e=e.split("&");if(e!=null&&e.length>0){for(var b=0;b<e.length;b++){var d=true;if(f!=null){for(var c in f){if(e[b].indexOf(f[c]+"=")>=0){d=false;break}}}if(d){if(e[b]!=""){if(a.indexOf("?")>=0){a+="&"}else{a+="?"}a+=e[b]}}}}return a}function joinFunctions(a){return function(){for(var b=0;b<a.length;b++){a[b]()}}}function Exception(b){var a=new Error(b);a.toString=function(){return this.message};return a}skyscanner.setOnLoadCallback=setOnLoadCallback;skyscanner.loader.addParameters=addParameters;skyscanner.Exception=Exception; function exportSymbol(c,d){var e=c.split(/\./);var b=window;for(var a=0;a<e.length-1;a++){if(!b[e[a]]){b[e[a]]={}}b=b[e[a]]}b[e[e.length-1]]=d}exportSymbol("skyscanner.exportSymbol",exportSymbol);function usingNamespace(d){var e=d.split(/\./);var b=window;for(var a=0;a<e.length;a++){if(!b[e[a]]){return}b=b[e[a]]}for(var f in b){window[f]=f}}exportSymbol("skyscanner.usingNamespace",usingNamespace);function extendObject(b,a){if(!a||!b){return}for(var d in a){var c=a[d];if(typeof c=="function"){continue}if(!(d in b)){b[d]=c}else{if(typeof c=="object"){extendObject(b[d],c)}else{b[d]=c}}}}exportSymbol("skyscanner.extendObject",extendObject); function Module(b,a,d,c){this.Name=b;this.latestVersion=a;this.jsUrlTemp=d;this.cssUrlTemp=c}Module.prototype.getURL=function(b,a){if(this.jsUrlTemp!=null){return this.fillPlaceholders(this.jsUrlTemp,b,a)}else{return null}};Module.prototype.getCssURL=function(b,a){if(this.cssUrlTemp!=null){return this.fillPlaceholders(this.cssUrlTemp,b,a)}else{return null}};Module.prototype.fillPlaceholders=function(a,e,d){if(typeof(e)=="undefined"||e==null||e==""){e=this.latestVersion}a=a.replace(/#server#/gi,skyscanner.loader.ApiServer);a=a.replace(/#name#/gi,this.Name);a=a.replace(/#version_param#/gi,skyscanner.loader.PARAMS.VERSION);a=a.replace(/#version#/gi,e);a=a.replace(/#v_param#/gi,skyscanner.loader.PARAMS.V);a=a.replace(/#v#/gi,skyscanner.loader.v);a=a.replace(/#key_param#/gi,skyscanner.loader.PARAMS.KEY);var c="";if(skyscanner.loader.ApiKey!=null&&skyscanner.loader.KeyVerified){c=skyscanner.loader.ApiKey}a=a.replace(/#api_key#/gi,encodeURIComponent(c));var b="en";if(d&&d.cultureid!=undefined){b=encodeURIComponent(d.cultureid)}a=a.replace(/#lang_id#/gi,b);return a};Module.load=function(b,a,f){var c=skyscanner.loader.modules[b];if(!c){throw Exception("Module: '"+b+"' not found.")}else{var d=new ScriptRequest();var e=f&&f.callback!=null;if(f&&f.callback!=null){d.onComplete=f.callback}d.send(skyscanner.loader.addParameters(c.getURL(a,f),skyscanner.loader.PARAMS));Module.loadCss(b,a,f)}};Module.createCSSNode=function(b){var c=document.getElementsByTagName("head")[0];var a=document.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=b;c.appendChild(a);return a};Module.loadCss=function(d,a,g){var f=false;if(g){f=g.nocss!=null&&g.nocss}if(!f){var e=skyscanner.loader.modules[d];if(!e){throw Exception("Module: '"+d+"' not found!")}var c=e.getCssURL();if(c!=null){c=skyscanner.loader.addParameters(c,skyscanner.loader.PARAMS);Module.createCSSNode(c)}}if(g){var b=g.overridecss;if(b!=null&&b!=""){skyscanner.loader.setOverrideCss(b,a)}else{skyscanner.loader.overrideCSSEl=null}}};Module.loadAndWait=function(b,j,g,m){var f=skyscanner.loader.modules[b];if(!f){throw Exception("Module: '"+b+"' not found!")}else{var c=skyscanner.loader.addParameters(f.getURL(j,g),skyscanner.loader.PARAMS);var h=skyscanner.loader.dynamicApiLoadMarkers[c];if(typeof(h)=="undefined"&&h!=true){skyscanner.loader.dynamicApiLoadMarkers[c]=true;var k=document;var l=k.getElementsByTagName("head").item(0);var i=document.createElement("script");i.setAttribute("type","text/javascript");i.setAttribute("charset","utf-8");i.setAttribute("src",c);l.appendChild(i);Module.loadCss(b,j,g);var e=document.createElement("div");skyscanner.loader.cssMarker=e;skyscanner.loader.cssMarker.attemptCount=0;e.className="ss_snippets_marker";e.style.width="1px";e.style.height="1px";e.style.visibility="hidden";document.body.appendChild(e)}var a=new skyscanner.loader.ApiWait(b,function(){if(m!=null&&m!=undefined){m()}});a.wait()}};function getOverrideCcssEl(){return skyscanner.loader.overrideCSSEl}function setOverrideCss(b,a){if(b!=null&&b!=""){if(a==null&&skyscanner.snippets.version){a=skyscanner.snippets.version}if(b.indexOf(skyscanner.loader.PARAMS.VERSION+"=")<0){if(b.indexOf("?")>=0){b+="&"}else{b+="?"}}b+=skyscanner.loader.PARAMS.VERSION+"="+a;if(b.indexOf(skyscanner.loader.PARAMS.V+"=")<0){if(b.indexOf("?")>=0){b+="&"}else{b+="?"}}b+=skyscanner.loader.PARAMS.V+"="+skyscanner.loader.v}if(skyscanner.loader.overrideCSSEl){if(b!=null&&b!=""){skyscanner.loader.overrideCSSEl.href=b}else{if(skyscanner.loader.overrideCSSEl.removeNode){skyscanner.loader.overrideCSSEl.removeNode(true)}else{skyscanner.loader.overrideCSSEl.href="";skyscanner.loader.overrideCSSEl.parentNode.removeChild(skyscanner.loader.overrideCSSEl)}skyscanner.loader.overrideCSSEl=null}}else{skyscanner.loader.overrideCSSEl=Module.createCSSNode(b)}}exportSymbol("skyscanner.loadAndWait",Module.loadAndWait);exportSymbol("skyscanner.loader.getOverrideCcssEl",getOverrideCcssEl);exportSymbol("skyscanner.loader.setOverrideCss",setOverrideCss);exportSymbol("skyscanner.load",Module.load);exportSymbol("skyscanner.loader.Module",Module); function ApiWait(a,b){this.apiName=a;this.onReadyCallback=b}ApiWait.prototype.wait=function(){var c=false;if(this.apiName=="maps"&&skyscanner.maps!=undefined&&skyscanner.maps.Map!=undefined){c=true}if(this.apiName=="snippets"&&skyscanner.snippets!=undefined&&skyscanner.snippets.WhoFliesControl!=undefined){c=true;if(typeof skyscanner.loader.cssMarker!="undefined"){var b="";if(document.defaultView&&document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(skyscanner.loader.cssMarker,null);b=a.getPropertyValue("display")}else{b=skyscanner.loader.cssMarker.currentStyle.display}if(b==null){b=""}b=b.toLowerCase().trim();c=b=="none"||skyscanner.loader.cssMarker.attemptCount>5;skyscanner.loader.cssMarker.attemptCount++}}if(c){this.onReadyCallback()}else{var d=this;setTimeout(function(){d.wait()},200)}};exportSymbol("skyscanner.loader.ApiWait",ApiWait); function Event(){}Event.preventDefault=function(a){skyscanner.$D.stopPropagation(a)};Event.attachEventHandler=function(a,b,d){if(a.addEventListener){a.addEventListener(b,d,false)}else{if(a.attachEvent){a.attachEvent("on"+b,d)}else{var c=a["on"+b];if(c!=null){a["on"+b]=joinFunctions([d,c])}a["on"+b]=d}}};Event.addListener=function(d,a,c,b){Event.attachEventHandler(d,a,function(f){if(typeof f=="undefined"){f=window.event}c.call(b,f)})};Event.getTarget=function(b){var a=b.target||b.srcElement;try{if(a&&3==a.nodeType){return a.parentNode}}catch(b){}return a};exportSymbol("skyscanner.snippets.core.Event",Event);skyscanner.$E=skyscanner.snippets.core.Event; (function(){var a=function(){var u=navigator.userAgent.toLowerCase(),g=/webkit/.test(u)&&!/chrome/.test(u),p=/opera/.test(u),f=/firefox/.test(u),k=/chrome/.test(u)&&!g,l=/msie/.test(u)&&!p,i=/mozilla/.test(u)&&!/(compatible|webkit)/.test(u),d=0,s,v,q,e=false;var r=function(){return g},t=function(){return p},b=function(){return k},n=function(){return l},c=function(){return e},h=function(){return i},j=function(){return f},o=function(){return d};if(r()){s=/afari\/([\d.]+)/;v=u.match(s);if(v){q=parseFloat(v[1]);q=Math.round(q);if(q<=100){d=1}if(q<=125&&q>100){d=1.25}if(q<=312&&q>125){d=1.3}if(q<=419&&q>312){d=2}if(q>419){d=3}}}if(n()){s=/msie ([\d.]+)/;v=u.match(s);if(v){d=parseFloat(v[1])}}if(j()){s=/firefox\/([\d.]+)/;v=u.match(s);if(v){d=parseFloat(v[1])}}if(l){if(document.compatMode&&document.compatMode.toLowerCase()=="backcompat"){e=true}}var m=function(){var x="",w="";if(r()){w="webkit"}else{if(t()){w="opera"}else{if(j()){w="ff"}else{if(n()){w="ie"}}}}x+=" ss_"+w;var y=o();if(y>0){x+=" ss_"+w+Math.round(y)}return x};return{getBrowserCss:m,isSafari:r,isOpera:t,isIE:n,isQuirkMode:c,isMozilla:h,isFF:j,isChrome:b,getVer:o,version:d}};exportSymbol("skyscanner.snippets.core.Browser",new a())})(); function ScriptRequest(){this.requestid=null;this.callbackParameterName="callback";this.onComplete=null;this.onFailure=null}ScriptRequest.getRequestId=function(){var e=1;do{var f=true;for(var c in ScriptRequest.callbacks){var b=c;var d=new RegExp("^requestid([0-9]+)$");var a=d.exec(b);if(a!=null){b=a[1]|0;if(b==e){f=false;break}}}if(!f){e++}}while(!f);return e};ScriptRequest.callbacks={};exportSymbol("skyscanner.loader.callbacks",ScriptRequest.callbacks);function initiateCallbacks(b,a,c){ScriptRequest.callbacks[b]=function(f){delete ScriptRequest.callbacks[b].failureFunction;for(var e=0;e<ScriptRequest.callbacks[b].actualCallbacks.length;e++){var d=ScriptRequest.callbacks[b].actualCallbacks[e];setTimeout(function(){d(f,b)},0)}delete ScriptRequest.callbacks[b]};setTimeout(function(){if(typeof ScriptRequest.callbacks[b]!="undefined"&&typeof ScriptRequest.callbacks[b].failureFunction=="function"&&ScriptRequest.callbacks[b].failureFunction==c){setTimeout(function(){ScriptRequest.callbacks[b].failureFunction(b)},0)}},5000);ScriptRequest.callbacks[b].failureFunction=c;ScriptRequest.callbacks[b].actualCallbacks=[a];return"skyscanner.loader.callbacks."+b}var UserAgentNames={};function isUserAgent(a){if(a in UserAgentNames){return UserAgentNames[a]}return UserAgentNames[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var AppVersions={};function isAppVersion(a){if(a in AppVersions){return AppVersions[a]}return AppVersions[a]=navigator.appVersion.toLowerCase().indexOf(a)!=-1}ScriptRequest.prototype.send=function(url,cleanup,fnc){this.requestid="requestid"+ScriptRequest.getRequestId();var fullUrl=url;var self=this;if(cleanup==undefined){cleanup=false}if(this.onComplete!=null){initiateCallbacks(this.requestid,this.onComplete,this.onFailure);var queryStringStart=fullUrl.indexOf("?");if(queryStringStart!=-1){var params=fullUrl.substring(queryStringStart+1).split("&");var callbackFound=false;for(var i=0;i<params.length;i++){if(params[i].indexOf(this.callbackParameterName+"=")!=-1){callbackArgs=params[i].split("=");ScriptRequest.callbacks[this.requestid].actualCallbacks.push(eval(callbackArgs[1]));params[i]=this.callbackParameterName+"=skyscanner.loader.callbacks."+this.requestid;callbackFound=true;fullUrl=fullUrl.substring(0,queryStringStart+1)+params.join("&");break}}if(!callbackFound){fullUrl+="&"+this.callbackParameterName+"=skyscanner.loader.callbacks."+this.requestid}}else{fullUrl+="?"+this.callbackParameterName+"=skyscanner.loader.callbacks."+this.requestid}}if(!cleanup){document.write('<script charset="utf-8" src="'+fullUrl+'" type="text/javascript"><\/script>');return}var headElement=document.getElementsByTagName("head")[0];var scriptElement=document.createElement("script");scriptElement.setAttribute("type","text/javascript");scriptElement.setAttribute("charset","utf-8");var onLoadHandler=function(){if(cleanup){scriptElement.onload=null;var parent=scriptElement.parentNode;parent.removeChild(scriptElement);delete scriptElement}};var onReadyStateChangeHandler=function(event){if(!event){event=window.event}var element=event.target?event.target:event.srcElement;if(!element){return}if(element.readyState=="loaded"||element.readyState=="complete"){element.onreadystatechange=null;onLoadHandler()}};if(navigator.product=="Gecko"){scriptElement.onload=onLoadHandler}else{scriptElement.onreadystatechange=onReadyStateChangeHandler}scriptElement.setAttribute("src",fullUrl);headElement.appendChild(scriptElement);return this.requestid};exportSymbol("skyscanner.loader.ScriptRequest",ScriptRequest); skyscanner.loader.apiLoaderloaded = true; })();

