$(document).ready(function() {
  // Options for SuperBGImage
  $.fn.superbgimage.options = {
    //id: 'background', // id for the containter
    //z_index: -1,
    transition : 1, // 0-none, 1-fade, 2-slide down, 3-slide left, 4-slide top, 5-slide right, 6-blind horizontal, 7-blind vertical, 90-slide right/left, 91-slide top/down
    //randomtransition: 1, // 0-none, 1-use random transition (0-7)
    slideshow : 1, // 0-none, 1-autostart slideshow
    slide_interval : 10000, // interval for the slideshow
    randomimage : 0, // 0-none, 1-random image
    speed : 'slow' // animation speed
  };

  // initialize SuperBGImage
  $('#superbgimage').superbgimage().hide();

  $('#superbgimage').height($('#wrap').height());

  $("#zoom-gallery").jCarouselLite({
    auto: 2200,
    speed: 2000
});

$('a.triggeron').trigger('click');


$('a.triggeron').click(function() {
  $(this).hide();
  $('#searchbox').delay(250).fadeIn('slow');
});

$('a.trigger').click(function() {
  $('#searchbox').hide();
  $('a.triggeron').delay(250).fadeIn('slow');
});


  var promotions_qty = $('.featureoffer ul li').size();
  var next_promotion = 0;
  var rotate_promotions = function() {
    if(next_promotion == promotions_qty) {
      next_promotion = 0
    }
    $('.featureoffer ul li').hide();
    $('.featureoffer ul li').eq(next_promotion).fadeIn(500);
    next_promotion++;
  };
  //rotate_promotions();
  $('.featureoffer ul li').hide();
  setInterval(rotate_promotions, 6000);

  $('a.view-packages[href$="pdf"]').attr('target', '_blank');
  
  
   if($.browser.msie && $.browser.version=="6.0") {
  
  //alert("Im the annoying IE6");

	Cufon.replace('.featureoffer h2, .featureoffer h3, h1, h1.inside', {
  fontFamily : 'Century Gothic'
});

	} else {
	
	Cufon.replace('h1, h1.inside, .footer .lowernav li a, .subnav li a, .menu li a', {
  fontFamily : 'Century Gothic'
});

Cufon.replace('.featureoffer h2', {
  fontFamily : 'Century Gothic'
});

Cufon.replace('.featureoffer h3', {
  fontFamily : 'eurofurence regular'
});

Cufon.replace('.title', {
  fontFamily : 'eurofurence regular'
});
	
	}
  
  
});

$(window).resize(function() {
  $('#superbgimage').height($('#wrap').height());
});

