function checkPlayerversion() {
  var playerVersion = swfobject.getFlashPlayerVersion(); 
  if(!(swfobject.hasFlashPlayerVersion("7.0.0"))){
    endIntro();
  }
}

$().ready(function() {

  if(!$.browser.msie || $.browser.version != '6.0' ){
  }

  /* select_jump_url */
  
  $('select.select_jump_url').change(function(){
    $(location).attr('href',$(this).val());
  });

  //splash
  
  $('#snav').hide();
  $('#skip').click(function(e){
    e.preventDefault();
    endIntro();
    return false;
  });

  $("#snav a").fadeTo(0,0)
  .mouseover(function () {
    $(this).stop(true, true).fadeTo(800,1);
  })
  .mouseout(function () {
    $(this).stop(true, true).fadeTo(800,0);
  });

  
  // Winemakers tab
  
  selected_index = $('#winemakers_header li.on').index();
  if(selected_index < 0) selected_index = 0;
  $( "#winemakers" ).tabs({
    selected : selected_index
  });
  
  // Wine grid
  
  $(".wine_list_single a").hover(function() {
    $(this).css({'z-index' : '10'});
    $(this).children('img').stop()
      .animate({
        top: '-5px',
        left: '-10px',
        width: '190px',
        height: '100px'
      }, 300, 'easeInOutCubic');
      ;
    } , function() {
    $(this).css({'z-index' : '0'}); 
    $(this).children('img').stop()
      .animate({
        top: '0',
        left: '0',
        width: '171px',
        height: '90px'
      }, 300, 'easeInOutCubic');
  });
  
  // vineyards
  
  if($('#vineyards_gallery').length > 0){
    $('#vineyards_gallery').cycle({
      startingSlide: Math.floor(Math.random() * ($('#vineyards_gallery li').length - 1)),
      timeout: 3500,
      speed: 1000,
      easing: 'easeInOutCubic',
      delay: 500,
      prev: '.vineyards_gallery_nav_prev',
      next: '.vineyards_gallery_nav_next',
      pauseOnPagerHover: true,
      pause: true
    });
  }
  
  if($.browser.msie){
    $('a.vineyards_gallery_nav').focus(function(){
      $(this).blur();
    });
  }
  
  // soho finder
  
  $('#finder_wrapper ul.oversea_contacts li h3').click(function(e){
    $('#finder_wrapper ul.oversea_contacts li .details').slideUp();
    $(this).next('.details').stop().slideToggle();
  });

//END of $().ready(function() {
});

function endIntro() {
  $('#movie').remove();
  $('#snav').fadeIn();
}

