//jQuery.noConflict();

jQuery(document).ready(function() {
    
	jQuery('a.fancybox').fancybox({
		'titlePosition'	: 'inside'
		
	});
	
    jQuery('div#navigation div').hide();
    jQuery('div#navigation').removeClass('dropdown');
    
    jQuery('div#navigation > ul > li').hover(
        function() {
            var hoverclass = jQuery(this).attr('class');
            jQuery('div#navigation div').hide();
            jQuery('div#navigation div.'+hoverclass).show();
            jQuery('div#navigation > ul > li a').removeClass('nav-active');
            jQuery('a', this).addClass('nav-active');
            jQuery('div#navigation').addClass('dropdown');
        },
        function() {
            var hoverclass = jQuery(this).attr('class');
            jQuery('div#navigation div:not(.'+hoverclass+')').hide();
        }
    );
        
    jQuery('#container').hover(
        function() {
            jQuery('div#navigation div').hide();
            jQuery('div#navigation').removeClass('dropdown');
            jQuery('div#navigation > ul > li a').removeClass('nav-active');
            jQuery('div#navigation > ul > li a.former-active').addClass('nav-active');
        }
    );
        
    jQuery('#content').hover(
        function() {
            jQuery('div#navigation div').hide();
            jQuery('div#navigation').removeClass('dropdown');
            jQuery('div#navigation > ul > li a').removeClass('nav-active');
            jQuery('div#navigation > ul > li a.former-active').addClass('nav-active');
        }
    );
        
    jQuery('.room-detail > div').each(function() {
        jQuery('table', this).hide();
        var self = this;
        jQuery('.header-4', this).click(function() {
             jQuery('table', self).toggle();
             return false;
        });
    });
    
    jQuery('.two-columns').columnize({ 
        columns: 2,
        lastNeverTallest: true
        /*doneFunc : function(){
            jQuery('.two-columns .first').each(function() {
                var header = jQuery('h4', this).html();
                jQuery('h4', this).remove();
                jQuery(this).before('<h4>'+header+'</h4>');
                var subheader = jQuery('h5', this).html();
                jQuery('h5', this).remove();
                jQuery(this).before('<h5>'+subheader+'</h5>');
            })
        }*/
    });
    
     jQuery('.two-columns-header').columnize({ 
        columns: 2,
        lastNeverTallest: true
    });
    
});
