// ------------------------------------------------------------------IMAGE SLIDESHOW

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 4000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 6000 );
});




// ------------------------------------------------------------------ MAP OVERLAYS

$(function() {
	$("a[rel]").overlay({
	
	expose: {color: '#000'},
	onBeforeLoad: function() { 
 
            // grab wrapper element inside content 
            var wrap = this.getContent().find(".contentWrap"); 
 
            // load the page specified in the trigger 
            wrap.load(this.getTrigger().attr("href")); 
        } });
	
});









// ------------------------------------------------------------------ DROPDOWN MENUS


$(function(){
	$(".nav_item_dropdown").tooltip({
	tip: '.dropdown',
	position: 'bottom center',
	offset: [5,49],
	delay: 500});
	});

// SCROLLABLE TEXT	
	
$(function(){   
  $(".scrollable").scrollable({ 
    size: 1,
	clickable: false,
    vertical: true,
	loop: true,
	speed: 800}).circular().autoscroll();
});




// ------------------------------------------------------------------ MY ONLINE RESERVATIONS



