/* Call on Document load */

$.noConflict();
jQuery(document).ready(function($) {
    slideshow();
    nav_menu();
    item_slider();
});

/* Effect Functions */

function slideshow() {
    jQuery('#slideshow').cycle({ 
	fx: 'fade', 
	speed:  800, 
	timeout: 5000, 
	pager:  null
    });
}

function nav_menu() {
    jQuery('ul#navbar').superfish({ 
        delay:       200,                            
        animation:   {opacity:'show',height:'show'},  
        speed:       'fast',                          
        autoArrows:  true,
        dropShadows: false                 
    }); 	
}

function item_slider() {
    slider_num = jQuery('.room').size();
    jQuery('.room').each(function(num) {
	num = num +1;
	jQuery(".big_"+num+" ul li").hide();
	jQuery(".big_"+num+" ul li:first-child").show();
	
	jQuery(".thumbs_"+num+" ul li").click(function() {
	    jQuery(".big_"+num+" ul li").hide();
	    var myIndex = jQuery(this).attr("title");
	    myIndex = parseInt(myIndex);
	    jQuery(".big_"+num+" ul li:nth-child("+myIndex+")").fadeIn();
	});
    });
}


