
Cufon.replace('nav > ul > li > a, .tabs > li > a, .bottom .right h1', {
  fontFamily: 'Gill Sans',
  hover: true
});
Cufon.replace('.featured h1, .featured h2', {
  fontFamily: 'Gill Sans MT Std',
  textShadow: '1px 1px rgba(0,0,0,0.5)',
  hover: true
});
Cufon.replace('h2.slogan', {
  fontFamily: 'Gill Sans',
  textShadow: '1px 1px rgba(0,0,0,0.5)',
  hover: true
});

$(function() {
  // Options for SuperBGImage
  $.fn.superbgimage.options = {
    transition: 1,
    slideshow: 1,
    slide_interval: 6000,
    randomimage: 0,
    speed: 'slow'
  };

  // initialize SuperBGImage
  $('#thumbs').superbgimage().hide();

  // Carousel Start
  $('#specialsoffers div.carousel > ul').html($('#specialsoffers div.carousel > ul > li'));
  
  $('#specialsoffers').show();
  $("#specialsoffers .carousel").jCarouselLite({
    btnNext: ".next",
    btnPrev: ".prev",
    auto: 4000,
    speed: 1000,
    visible: 1
  });

  $('#events div.carousel > ul').html($('#events div.carousel > ul > li'));
  
  $('#events').show();
  $("#events .carousel").jCarouselLite({
    btnNext: ".next",
    btnPrev: ".prev",
    auto: 4000,
    speed: 1000,
    visible: 1
  });


 /* $('#reviews div.carousel > ul').html($('#reviews div.carousel > ul > li'));
  $('#reviews').show();
  $("#reviews .carousel").jCarouselLite({
    btnNext: ".next",
    btnPrev: ".prev",
    auto: 4000,
    speed: 1000,
    visible: 2
  });
  $('#reviews').hide();*/
  
  // Carousel End

$("ul.tabs").tabs("div.panes > div");
  
  $('.scroll').jScrollPane({showArrows:false});
  
});


// jQuery based floating banner
$(document).ready(function() {

  // HOME PAGE FLOATING PROMOTION ROTATOR

  var promotions_qty = $('.featured ul li').size();
  var next_promotion = 0;

  var rotate_promotions = function() {
    if (next_promotion == promotions_qty) {
      next_promotion = 0
    }

    $('.featured ul li').hide();
    $('.featured ul li').eq(next_promotion).fadeIn(500);

    next_promotion++;
  };

  rotate_promotions();

  setInterval(rotate_promotions, 8000);

  // HOME PAGE FLOATING PROMOTION ROTATOR END

$.get('/floating-banner.htm', function(data) {
    $('#f_banner_wrapper').html($(data).filter('#fl_banner'));


	  	jQuery("#fl_banner").animate({ 
        top: jQuery(window).height()/2 - jQuery("#fl_banner").height()/2,
        left: jQuery(window).width()/2 - jQuery("#fl_banner").width()/2
      }, 2500 );
	  
	jQuery("#fl_banner").bind("mouseenter",function(){
    	jQuery(".closer", this).fadeIn("fast");
    }).bind("mouseleave",function(){
    	jQuery(".closer", this).fadeOut("fast");
    });
	
	jQuery("#fl_banner").click(function () { 
      jQuery(this).fadeOut("slow"); 
    });
});

});

jQuery(function(jQuery){
	var obj = jQuery("#fl_banner"); 
	setTimeout(function(){ 
    	obj.fadeOut("slow"); 
  	}, 10000 ); 
});
