/***********************************************************************

Author:     Sander Tiekstra
Company:    Tiekstramedia
URL:        http://www.tiekstramedia.nl

***********************************************************************/




$(function(){

// Set up Sliders
// **************
  $('#slider1').anythingSlider({
    startStopped    : false, // If autoPlay is on, this can force it to start stopped
    width           : null,   // Override the default CSS width
    theme           : 'metallic',
    autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
    resumeDelay     : 10000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
    onSlideComplete : function(slider){
      // alert('Welcome to Slide #' + slider.currentPage);
    }
  });

// Fly Out Menu (including Cufon refresh to fix Cufon hover)

  function addMega(){
    $('object:not(#slideshow):not(#image), embed:not(#slideshow):not(#image)').css('visibility', 'hidden');
    $(this).addClass("hovering");
    }

  function removeMega(){
    $('object:not(#slideshow):not(#image), embed:not(#slideshow):not(#image)').css('visibility', 'visible');
    $(this).removeClass("hovering");
    Cufon.refresh();
    }

  var megaConfig = {
    interval: 0,
    sensitivity: 10,
    over: addMega,
    timeout: 0,
    out: removeMega
  };

  $("li.mega").hoverIntent(megaConfig);


  /* Initiate
  ------------------------------------------------------------------*/
  // Replace hr
  replaceHr();

  // Add custom class first main navigation item
    $("#main-navigation ul li:first-child").addClass("first");

  // Check and initiate specials navigation
  if ($('#specials-navigation').length > 0) initSpecialsNav();

  // Check and initiate date picker
  if ($('.calendar').length > 0) initDatePicker();

  // Check and initiate post its
  if ($('.postit').length > 0) initPostIt();

  // Check and initiate another attachment
  if ($('#anotherattachment').length > 0) initAnotherattachment();

  // Navigation add class last item
  $("#sub-navigation ul li:last-child").addClass("no-border");

  // Footer navigation add class last item
  $(".footernav ul li:last-child").addClass("no-border");

  // .home functions
  if ($('body').hasClass('home')) homeFunc();

  // .home-sub functions
  if ($('body').hasClass('home-sub')) homeSubFunc();

  // .landing-page functions
  if ($('body').hasClass('landing-page')) landingPageFunc();

  // .microsite functions
  if ($('#coll-number-picker').length > 0) collNumberPicker();

  // Add .radio and .checkbox to hide custom borders
  $("input:radio").addClass("radio");
  $("input:checkbox").addClass("checkbox");

  // Add video button on div image
  $(".video a").prepend('<em>Button</em>');

  // FAQ Contentpage
    $('.faq dt>a').click(function() {
        $(this).parent().toggleClass('active').next().toggle();
    });

  // Expanding textarea
  if ($('textarea.expanding').length > 0) {
    $.getScript("/static/menzis/menzis2009/js/lib/jquery.autogrow.js", function(){
      $('textarea.expanding').autogrow();
    });
  }

  // Add Fancybox
  if ($('[rel*="overlay"]').length > 0) fancybox();
  if ($('[rel*="popup"]').size() > 0) $('[rel*="popup"]').addClass('iframe').fancybox({'frameWidth': 740, 'frameHeight': 500, 'type': 'iframe', 'honeOnContentClick': false});
  if ($('[rel*="inline"]').length > 0) {
    $('[rel=inline]').fancybox({'frameWidth': 480, 'frameHeight': 385, 'hideOnContentClick': false});
  }
  $('#fancy_overlay').live('click', function () {
    $(this).remove();
    $('#fancy_wrap').remove();
  });
  $('#fancy_close').live('click', function () {
    $('#fancy_overlay').remove();
    $('#fancy_wrap').remove();
  });

  // Search results functions
  $(".video span").append("<span>Play button</span>");

  // Tabs
  var tabContainers=$('div.tabs > div');tabContainers.each(function(){this.id+= '-element';}).addClass('hide').filter(':first').removeClass('hide').addClass('show');
  $('div.tabs ul.tab-nav a').click(function(){tabContainers.removeClass('show').addClass('hide');tabContainers.filter(this.hash + '-element').removeClass('hide').addClass('show');$('div.tabs ul.tab-nav a').removeClass('selected');$(this).addClass('selected');}).filter(':first').click();

  // open selected tab
  if (document.location.hash.charAt(1) != '&') {
  if ($('a[href=' + document.location.hash + ']').size() > 0) { $('a[href=' + document.location.hash + ']').trigger('click'); window.scrollTo(0,0); }
  }

  // Add and remove class on block
  $('.link-hover').hover(function(){ $(this).addClass('link-block') },function(){ $(this).removeClass('link-block')})

  // Bigger target video
  $('.link-hover-vid').hover(function(){ $(this).addClass('link-block-vid') },function(){ $(this).removeClass('link-block-vid')})

  // Bigger target
  $(".link-hover").click(function(){

    var href = $(this).find('a').attr('href');
      href = (href.indexOf('http://') !== -1) ? href : $('base').attr('href') + href;

    document.location.href = href;
    return false;

  });

  /* Functions
  ------------------------------------------------------------------*/
  // Input help text (by Joe Lencioni, http://webservices.blog.gustavus.edu/2008/06/23/text-input-example-text-with-jquery/)
  function switchText()
  {
    if ($(this).val() == $(this).attr('title'))
      $(this).val('').removeClass('hint');
    else if ($.trim($(this).val()) == '')
      $(this).addClass('hint').val($(this).attr('title'));
  }

  $('#site-search, body.microsite .highlight').find('input[type=text][title!=""]').each(function() {
    if ($.trim($(this).val()) == '') $(this).val($(this).attr('title'));
    if ($(this).val() == $(this).attr('title')) $(this).addClass('hint');
  }).focus(switchText).blur(switchText);

  $('#site-search, body.microsite .highlight').find('form').submit(function() {
    $(this).find('input[type=text][title!=""]').each(function() {
      if ($(this).val() == $(this).attr('title')) $(this).val('');
    });
  });


  // Behaviour for specials navigation
  function initSpecialsNav() {
    $('#specials-navigation ul li').each(function() {
      $(this).mouseover(function() {
        $('#specials-navigation ul li.breadcrumb').removeClass('breadcrumb');
        $('#specials-navigation ul li.last-child-breadcrumb').removeClass('last-child-breadcrumb');

        if ($(this).hasClass('last-child')) {
          $(this).addClass('last-child-breadcrumb');
        }
        $(this).addClass('breadcrumb');
      });
    });
  }


  // Replace hr
  function replaceHr() {
    $('hr').wrap('<div class="hr"></div>');
  }


  // Fancybox
  function fancybox() {
    $.getScript("/static/menzis/menzis2009/js/jquery.fancybox.js", function(){
      var frameHeight = $(window).height() - 110;
      $('[rel*="overlay"]').fancybox({
        'frameWidth': 470,
        'frameHeight': frameHeight,
        'hideOnContentClick': false,
        'padding': 35,
        'zoomSpeedIn': 0,
        'overlayOpacity': .5,
        'callbackOnStart': function () {
          $('#fancy_wrap').css("opacity", "0");
        },
        'callbackOnShow': function () {
          fancyboxCallback();
          $('#fancy_wrap').animate({
            opacity: 1
          }, 250 );
        }
      });
    });

    function fancyboxCallback() {

      $('#fancy_ajax').addClass("content").wrapInner("<div id='page'></div>");
      $('#fancy_ajax').css({paddingRight: "25px"});

      Cufon.replace('#page h1, #page h2, #sub-navigation h2, #page h3, #page .content .bar span .score');

      Cufon.replace('p.call-to-action-mini a em, p.call-to-action a em', {
        hover: true,
        hoverables: { em: true }
      });

      if( $('#fancy_outer').css("height").split("px")[0] > $('#fancy_ajax').outerHeight() + 70 ) {
        $('#fancy_outer').css("height", $('#fancy_ajax').outerHeight() + 70);
      } else {
        $('#fancy_ajax').css({height: "100%", overflow: "auto"});
      }

      $.fn.fancybox.scrollBox();
    }

  };


  // .home functions
  function homeFunc() {

  }


  // .home-sub functions
  function homeSubFunc() {

  }


  // .landing-page functions
  function landingPageFunc() {
    var h = 0;
    var rows = $('.row');
    for (var i=0; i < $(rows).length; i++) {
      var maxHeight = $(rows)[i];
      h = $(maxHeight).outerHeight() > h ? $(maxHeight).outerHeight() : h;
    };
    $(rows).height(h + 10 + 'px');
  }


  // .microsite functions
  function collNumberPicker() {
    $('#coll-number-picker').hide();
    $('a.coll-number-picker').click(function() {
      $('#coll-number-picker').fadeToggle(250);
      return false;
    });

    $('#coll-number-picker span.coll-number').click(function() {
      var text = $(this).text();
      $('#coll-number-input').removeClass('hint').val(text).focus();
      $('a.coll-number-picker').trigger('click');
    });
  }


  // Date Picker
  function initDatePicker() {
    $.getScript("/static/menzis/menzis2009/js/lib/date.js", function(){
      $.getScript("/static/menzis/menzis2009/js/lib/jquery.datepicker.js", function(){

        // IE6-div-ontop-of-select-fix
        if ($.browser.msie && $.browser.version == 6.0 && $('select').length > 0) {
          $.getScript("/static/menzis/menzis2009/js/lib/jquery.bgiframe.js");
        }

        var today = new Date();
        var currentYear = today.getFullYear();

        $('.calendar')
          .datePicker({
            verticalOffset: '-5',
            startDate: '01/01/' + (currentYear - 10),
            endDate: '31/12/' + (currentYear + 10)
          })
          .bind(
            'click',
            function() {
              $(this).dpDisplay();
              this.blur();
              return false;
            }
          )
          .bind(
            'dateSelected',
            function(e, selectedDate, $td)
            {
              var day   = selectedDate.getDate();
              var month = selectedDate.getMonth() + 1;
              var year  = selectedDate.getFullYear();

              $(this).parent().find('.day').val(day);
              $(this).parent().find('.month').val(month);
              $(this).parent().find('.year').val(year);
            }
          );

        $('.dp-choose-date').html("<img src='/static/menzis/menzis2009/assets/layout/icn.agenda.gif' />");


        $('.day, .month, .year').change(function() {
          var day     = $(this).parent().find('.day').val();
          var month   = $(this).parent().find('.month').val();
          var year    = $(this).parent().find('.year').val();
          var calendar  = $(this).parent().find('.calendar');

          // update input.calendar
          calendar.val(day + '/' + month + '/' + year);

          // update the selected date
          var d = new Date(
            year,
            month-1,
            day
          );
          calendar.dpSetSelected(d.asString());
        });

      });
    });
  };


  // Postit notes
  function initPostIt() {
    $(".postit").after("<img src='assets/layout/icn.postit.gif' class='postit_icon' />");
    $(".postit_icon").click(function () {
      $(".postit:visible").hide();
      $(this).parent("div").css("overflow","visible");
      $(this).prevAll("input:text").css("background","#fff299");
      $(this).prev().show();
    });
    $(".postit").click(function () {
      $(this).parent("div").css("overflow","hidden");
      $(this).prevAll("input:text").css("background","#fff");
      $(this).hide();
    });
    $(".postit").append("<span class='postit_close'>Close</span>");
  }


    // Adding upload inputs
  function initAnotherattachment(args) {
      $('#anotherattachment').bind('click', function() {
          var max_attachments = 5; // Maximaal aantal file input velden in bijbehorende ul
          // Maak li met input en verwijder link en voeg deze toe aan ul
          var ul = $(this).parent().children('ul');
          var count = ul.children().length;
          var name = 'bijlage_'+(count+1);
          var li = $(document.createElement('li'));
          var file = $(document.createElement('input'));
          file.attr('type', 'file');
          file.attr('name', name);
          li.append(file);
          var a = $(document.createElement('a'));
          a.attr('href', 'javascript:;');
          a.html('Verwijder');
          li.append(a);
          ul.append(li);
          // Actie voor verwijder link
          a.bind('click', function() {
              if (li.parent().children().length == max_attachments) {
                  li.parent().parent().children('.maxattachments').remove();
                  $('#anotherattachment').show();
              }
              li.remove();
          });
          // Verberg toevoegen link en laat bericht zien dat maximum bereikt is
          if (count+1 == max_attachments) {
              var span = $(document.createElement('span'));
              span.attr('class', 'maxattachments');
              span.html('U heeft het maximaal aantal bijlages bereikt.');
              $(this).parent().append(span);
              $(this).hide();
          }
      });
  }
  $('.two-cols>div:nth-child(2n)').addClass('last');
  $('.three-cols>div:nth-child(3n)').addClass('last');
  $('.four-cols>div:nth-child(4n)').addClass('last');
  $('#footer ul li:last-child').addClass('last');
  $('#target-group-navigation ul li:last-child').addClass('last');

});


// Replace NotesSoft width Cufón

Cufon.replace('#main-navigation li a.menuitem', {
  hover: {
  color: '#09357a'
  }
});

Cufon.replace('#hometxt h2, #news-socials h3, #linkindex h2, #home-columns h2, #microsite .column h3, #microsite .header h1, #microsite .teaser h2, .doormat-blue ul li h4, #shortcuts div.specials div.news h3, .home h1, #shortcuts div.doormat h3, #socials li h4, #header h3 em, #header div#mijn-menzis h3, #main-navigation li a.menuitem, div.toptaken h2, div.toptaken ul a, #page h1, #page h2, #page h3, #page .content .bar span .score, #sub-navigation h2, .doormat-blue h3, body.home-wb #container h3, body.microsite h2, body.landing-page h2, body.microsite h3, body.landing-page h3');

Cufon.replace('#shortcuts h2, #shortcuts .doormat h3 a, #shortcuts .corporate h3, p.call-to-action-mini a, p.call-to-action a, #socials li h4, div.toptaken ul a', {
  hover: true
});

Cufon.replace('#site-search form button, body.page-not-found button, #mijnmenzislogin button', {
  hover: true,
  hoverables: { button: true }
});








/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 *
 * Version 1.0
 * Updated 12/109/2008
 *
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
 *
 * Usage: $(object).equalHeights([minHeight], [maxHeight]);
 *
 * Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
 * Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
 * Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
 * than 300 pixels tall. Elements with too much content will gain a scrollbar.
 *
 */

(function($) {
  $.fn.equalHeights = function(minHeight, maxHeight) {
    tallest = (minHeight) ? minHeight : 0;
    this.each(function() {
      if($(this).height() > tallest) {
        tallest = $(this).height();
      }
    });
    if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
    return this.each(function() {
      $(this).height(tallest).css("overflow","auto");
    });
  };
})(jQuery);


// Fade Toggle
jQuery.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);


};

//Fancybox
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}(';(7($){$.n.2a=7(){C G.2b(7(){9 b=$(G).u(\'2c\');5(b.Y(/^2Y\\(["\']?(.*\\.2d)["\']?\\)$/i)){b=2Z.$1;$(G).u({\'2c\':\'30\',\'2e\':"31:32.33.34(35=L, 38="+($(G).u(\'3a\')==\'2f-3b\'?\'3c\':\'3d\')+", R=\'"+b+"\')"}).2b(7(){9 a=$(G).u(\'1E\');5(a!=\'2g\'&&a!=\'2h\')$(G).u(\'1E\',\'2h\')})}})};9 l,4,Z=H,y=1j 1k,1l,1m=1,1n=/\\.(3e|3f|2d|3g|3h)(.*)?$/i;9 m=($.2i.3i&&2j($.2i.3j.2k(0,1))<8);$.n.o=7(j){j=$.3k({},$.n.o.2l,j);9 k=G;7 2m(){l=G;4=j;2n();C H};7 2n(){5(Z)C;5($.1F(4.1G)){4.1G()}4.q=[];4.p=0;5(j.q.Q>0){4.q=j.q}z{9 a={};5(!l.1o||l.1o==\'\'){9 a={D:l.D,S:l.S};5($(l).1p("1a:1q").Q){a.11=$(l).1p("1a:1q")}4.q.2o(a)}z{9 b=$(k).2e("a[1o="+l.1o+"]");9 a={};3l(9 i=0;i<b.Q;i++){a={D:b[i].D,S:b[i].S};5($(b[i]).1p("1a:1q").Q){a.11=$(b[i]).1p("1a:1q")}4.q.2o(a)}3m(4.q[4.p].D!=l.D){4.p++}}}5(4.1H){5(m){$(\'1I, 1J, 1K\').u(\'1L\',\'3n\')}$("#1b").u(\'1M\',4.2p).O()}13()};7 13(){$("#1c, #1d, #T, #M").U();9 b=4.q[4.p].D;5(b.Y(/#/)){9 c=14.3o.D.3p(\'#\')[0];c=b.3q(c,\'\');c=c.2k(c.2q(\'#\'));1e(\'<6 s="3r">\'+$(c).1N()+\'</6>\',4.1r,4.1s)}z 5(b.Y(1n)){y=1j 1k;y.R=b;5(y.3s){1O()}z{$.n.o.2r();$(y).E().15(\'3t\',7(){$(".P").U();1O()})}}z 5(b.Y("16")||l.3u.2q("16")>=0){1e(\'<16 s="2s" 3v="$.n.o.2t()" 3w="3x\'+I.V(I.3y()*3z)+\'" 2u="0" 3A="0" R="\'+b+\'"></16>\',4.1r,4.1s)}z{$.3B(b,7(a){1e(\'<6 s="3C">\'+$(a).3D(\'.3E\').1N()+\'</6>\',4.1r,4.1s)})}};7 1O(){5(4.2v){9 w=$.n.o.1f();9 r=I.1P(I.1P(w[0]-36,y.v)/y.v,I.1P(w[1]-3F,y.x)/y.x);9 a=I.V(r*y.v);9 b=I.V(r*y.x)}z{9 a=y.v;9 b=y.x}1e(\'<1a 3G="" s="3H" R="\'+y.R+\'" />\',a,b)};7 2w(){5((4.q.Q-1)>4.p){9 a=4.q[4.p+1].D;5(a.Y(1n)){1t=1j 1k();1t.R=a}}5(4.p>0){9 a=4.q[4.p-1].D;5(a.Y(1n)){1t=1j 1k();1t.R=a}}};7 1e(a,b,c){Z=L;9 d=4.2x;5(m){$("#A")[0].1u.2y("x");$("#A")[0].1u.2y("v")}5(d>0){b+=d*2;c+=d*2;$("#A").u({\'F\':d+\'J\',\'2z\':d+\'J\',\'2A\':d+\'J\',\'K\':d+\'J\',\'v\':\'2B\',\'x\':\'2B\'});5(m){$("#A")[0].1u.2C(\'x\',\'(G.2D.3I - 20)\');$("#A")[0].1u.2C(\'v\',\'(G.2D.3J - 20)\')}}z{$("#A").u({\'F\':0,\'2z\':0,\'2A\':0,\'K\':0,\'v\':\'2E%\',\'x\':\'2E%\'})}5($("#t").1v(":17")&&b==$("#t").v()&&c==$("#t").x()){$("#A").1Q("2F",7(){$("#A").1w().1x($(a)).1R("1y",7(){1g()})});C}9 w=$.n.o.1f();9 e=(b+36)>w[0]?w[2]:(w[2]+I.V((w[0]-b-36)/2));9 f=(c+1z)>w[1]?w[3]:(w[3]+I.V((w[1]-c-1z)/2));9 g={\'K\':e,\'F\':f,\'v\':b+\'J\',\'x\':c+\'J\'};5($("#t").1v(":17")){$("#A").1Q("1y",7(){$("#A").1w();$("#t").1S(g,4.2G,4.2H,7(){$("#A").1x($(a)).1R("1y",7(){1g()})})})}z{5(4.1T>0&&4.q[4.p].11!==1U){$("#A").1w().1x($(a));9 h=4.q[4.p].11;9 i=$.n.o.1V(h);$("#t").u({\'K\':(i.K-18)+\'J\',\'F\':(i.F-18)+\'J\',\'v\':$(h).v(),\'x\':$(h).x()});5(4.1W){g.1M=\'O\'}$("#t").1S(g,4.1T,4.2I,7(){1g()})}z{$("#A").U().1w().1x($(a)).O();$("#t").u(g).1R("1y",7(){1g()})}}};7 2J(){5(4.p!=0){$("#1d, #2K").E().15("W",7(e){e.2L();4.p--;13();C H});$("#1d").O()}5(4.p!=(4.q.Q-1)){$("#1c, #2M").E().15("W",7(e){e.2L();4.p++;13();C H});$("#1c").O()}};7 1g(){2J();2w();$(X).1A(7(e){5(e.1X==27){$.n.o.1h();$(X).E("1A")}z 5(e.1X==37&&4.p!=0){4.p--;13();$(X).E("1A")}z 5(e.1X==39&&4.p!=(4.q.Q-1)){4.p++;13();$(X).E("1A")}});5(4.1B){$(14).15("1Y 1Z",$.n.o.2N)}z{$("6#t").u("1E","2g")}5(4.21){$("#22").W($.n.o.1h)}$("#1b, #T").15("W",$.n.o.1h);$("#T").O();5(4.q[4.p].S!==1U&&4.q[4.p].S.Q>0){$(\'#M 6\').1N(4.q[4.p].S);$(\'#M\').O()}5(4.1H&&m){$(\'1I, 1J, 1K\',$(\'#A\')).u(\'1L\',\'17\')}5($.1F(4.23)){4.23()}Z=H};C G.E(\'W\').W(2m)};$.n.o.2N=7(){9 a=$.n.o.1f();$("#t").u(\'K\',(($("#t").v()+36)>a[0]?a[2]:a[2]+I.V((a[0]-$("#t").v()-36)/2)));$("#t").u(\'F\',(($("#t").x()+1z)>a[1]?a[3]:a[3]+I.V((a[1]-$("#t").x()-1z)/2)))};$.n.o.1i=7(a,b){C 2j($.3K(a.3L?a[0]:a,b,L))||0};$.n.o.1V=7(a){9 b=a.3M();b.F+=$.n.o.1i(a,\'3N\');b.F+=$.n.o.1i(a,\'3O\');b.K+=$.n.o.1i(a,\'3P\');b.K+=$.n.o.1i(a,\'3Q\');C b};$.n.o.2t=7(){$(".P").U();$("#2s").O()};$.n.o.1f=7(){C[$(14).v(),$(14).x(),$(X).3R(),$(X).3S()]};$.n.o.2O=7(){5(!$("#P").1v(\':17\')){2P(1l);C}$("#P > 6").u(\'F\',(1m*-40)+\'J\');1m=(1m+1)%12};$.n.o.2r=7(){2P(1l);9 a=$.n.o.1f();$("#P").u({\'K\':((a[0]-40)/2+a[2]),\'F\':((a[1]-40)/2+a[3])}).O();$("#P").15(\'W\',$.n.o.1h);1l=3T($.n.o.2O,3U)};$.n.o.1h=7(){Z=L;$(y).E();$("#1b, #T").E();5(4.21){$("#22").E()}$("#T, .P, #1d, #1c, #M").U();5(4.1B){$(14).E("1Y 1Z")}1C=7(){$("#1b, #t").U();5(4.1B){$(14).E("1Y 1Z")}5(m){$(\'1I, 1J, 1K\').u(\'1L\',\'17\')}5($.1F(4.24)){4.24()}Z=H};5($("#t").1v(":17")!==H){5(4.25>0&&4.q[4.p].11!==1U){9 a=4.q[4.p].11;9 b=$.n.o.1V(a);9 c={\'K\':(b.K-18)+\'J\',\'F\':(b.F-18)+\'J\',\'v\':$(a).v(),\'x\':$(a).x()};5(4.1W){c.1M=\'U\'}$("#t").2Q(H,L).1S(c,4.25,4.2R,1C)}z{$("#t").2Q(H,L).1Q("2F",1C)}}z{1C()}C H};$.n.o.2S=7(){9 a=\'\';a+=\'<6 s="1b"></6>\';a+=\'<6 s="22">\';a+=\'<6 B="P" s="P"><6></6></6>\';a+=\'<6 s="t">\';a+=\'<6 s="2T">\';a+=\'<6 s="T"></6>\';a+=\'<6 s="N"><6 B="N 3V"></6><6 B="N 3W"></6><6 B="N 3X"></6><6 B="N 3Y"></6><6 B="N 3Z"></6><6 B="N 41"></6><6 B="N 42"></6><6 B="N 43"></6></6>\';a+=\'<a D="2U:;" s="1d"><1D B="26" s="2K"></1D></a><a D="2U:;" s="1c"><1D B="26" s="2M"></1D></a>\';a+=\'<6 s="A"></6>\';a+=\'<6 s="M"></6>\';a+=\'</6>\';a+=\'</6>\';a+=\'</6>\';$(a).2V("44");$(\'<2W 45="0" 46="0" 47="0"><2X><19 B="M" s="48"></19><19 B="M" s="49"><6></6></19><19 B="M" s="4a"></19></2X></2W>\').2V(\'#M\');5(m){$("#2T").4b(\'<16 B="4c" 4d="2f" 2u="0"></16>\');$("#T, .N, .M, .26").2a()}};$.n.o.2l={2x:10,2v:L,1W:H,1T:0,25:0,2G:4e,2I:\'28\',2R:\'28\',2H:\'28\',1r:4f,1s:4g,1H:L,2p:0.3,21:L,1B:L,q:[],1G:29,23:29,24:29};$(X).4h(7(){$.n.o.2S()})})(4i);',62,267,'||||opts|if|div|function||var||||||||||||||fn|fancybox|itemCurrent|itemArray||id|fancy_outer|css|width||height|imagePreloader|else|fancy_content|class|return|href|unbind|top|this|false|Math|px|left|true|fancy_title|fancy_bg|show|fancy_loading|length|src|title|fancy_close|hide|round|click|document|match|busy||orig||_change_item|window|bind|iframe|visible||td|img|fancy_overlay|fancy_right|fancy_left|_set_content|getViewport|_finish|close|getNumeric|new|Image|loadingTimer|loadingFrame|imageRegExp|rel|children|first|frameWidth|frameHeight|objNext|style|is|empty|append|normal|50|keydown|centerOnScroll|__cleanup|span|position|isFunction|callbackOnStart|overlayShow|embed|object|select|visibility|opacity|html|_proceed_image|min|fadeOut|fadeIn|animate|zoomSpeedIn|undefined|getPosition|zoomOpacity|keyCode|resize|scroll||hideOnContentClick|fancy_wrap|callbackOnShow|callbackOnClose|zoomSpeedOut|fancy_ico||swing|null|fixPNG|each|backgroundImage|png|filter|no|absolute|relative|browser|parseInt|substr|defaults|_initialize|_start|push|overlayOpacity|indexOf|showLoading|fancy_frame|showIframe|frameborder|imageScale|_preload_neighbor_images|padding|removeExpression|right|bottom|auto|setExpression|parentNode|100|fast|zoomSpeedChange|easingChange|easingIn|_set_navigation|fancy_left_ico|stopPropagation|fancy_right_ico|scrollBox|animateLoading|clearInterval|stop|easingOut|build|fancy_inner|javascript|appendTo|table|tr|url|RegExp|none|progid|DXImageTransform|Microsoft|AlphaImageLoader|enabled|||sizingMethod||backgroundRepeat|repeat|crop|scale|jpg|gif|bmp|jpeg|msie|version|extend|for|while|hidden|location|split|replace|fancy_div|complete|load|className|onload|name|fancy_iframe|random|1000|hspace|get|fancy_ajax|find|content|60|alt|fancy_img|clientHeight|clientWidth|curCSS|jquery|offset|paddingTop|borderTopWidth|paddingLeft|borderLeftWidth|scrollLeft|scrollTop|setInterval|66|fancy_bg_n|fancy_bg_ne|fancy_bg_e|fancy_bg_se|fancy_bg_s||fancy_bg_sw|fancy_bg_w|fancy_bg_nw|body|cellspacing|cellpadding|border|fancy_title_left|fancy_title_main|fancy_title_right|prepend|fancy_bigIframe|scrolling|300|425|355|ready|jQuery'.split('|'),0,{}))

// Hide divs in microsite popup
$(document).ready(function () {
   $('#fancy_frame').load(function () {
       $('#fancy_frame').contents().find('div.header, div#header').hide();
   });
});










