$(document).ready(function() {
  /**
   * ACCORDION
   */
  $("#slideRight .slideWrapper .slideContent").accordion({
    header: ".title",
    animated: 'easeslide',
    fillSpace: true,
    collapsible: true
  });

  /**
   * CUFON
   */
  Cufon.replace('ul#nav li a, #slideRight h3.title, #book h2, #book .button a, #vouchers, ul li h2', {
    fontFamily: 'Minion',
    textShadow: '#fff 0px 0px',
	hover: true
  });
  
  Cufon.replace('#slogan', {
    fontFamily: 'CenturyOldst BT',
    textShadow: 'rgba(0,0,0,0.75) 2px 2px',
	hover: true
  });

  /**
   * SCROLL PANE
   */
  $('.scroll-pane').each(function() {
    $(this).show();
    $(this).jScrollPane({showArrows: true});

    if (!$(this).hasClass('ui-accordion-content-active')) {
      $(this).hide();
    }
  });

  /**
   * DROPDOWN
   */
  $("ul.dropdown li, ul.sub li").dropdown();

  /**
   * SLIDE
   */
  $('#slideLeft').show();
  $('#slideLeft').css({ width: '0px' });
  var width = 440; //set slide amount here
  $('#slideLeft').animate({width: width + 'px' }, 'slow');
      
  $('#slideRight').show();
  $('#slideRight').css({ width: '0px' });
  var width = 360; //set slide amount here
  $('#slideRight').animate({width: width + 'px' }, 'slow');
  
	// FLOATING BANNER START	  
		$.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"); 
			});
		});
	// FLOATING BANNER END

 /**
   * LIGHTBOX
   */
  //$('#gallery a').lightBox();


/** SUPERBGIMAGE **/

// 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: 6000, // interval for the slideshow
		randomimage: 0, // 0-none, 1-random image
		speed: 'slow' // animation speed
	};

	// initialize SuperBGImage
	$('#superbgimage').superbgimage().hide();

setTimeout( "$('#superbgimage').css('background-color','black');", 4000);


});

jQuery(function(jQuery){
	var obj = jQuery("#fl_banner"); 
	setTimeout(function(){ 
    	obj.fadeOut("slow"); 
  	}, 2000 ); 
});

