/* ---------------------------------------------------------------------------
	
	Jacksonville Landing Master Javascript file
	http://www.jacksonvillelanding.com
	
	author: nGen Works
	http://ngenworks.com
	
--------------------------------------------------------------------------- */

// Cufon replacements
Cufon.replace('.notice h3', { hover: true, fontFamily: 'Futura Bold' });


function init()
{

	//$('#feature-content div').each(function() { $(this).hide(); });
	
	$('#feature-nav li a').each(function() {
		$(this).click(function() {
			$('#feature-content div').each(function() { $(this).hide(); });
			$('#feature-nav li').each(function() { $(this).removeClass('here'); });
			$(this).parent().toggleClass('here');
			
			switch( $(this).parent().attr('id') ) {
				case 'fnav-parking':
					$('#parking-info').show();
					break;
					
				case 'fnav-vendor':
					$('#featured-vendor').show();
					break;
					
				case 'fnav-hotels':
					$('#hotels-nearby').show();
					break;
					
				case 'fnav-groups':
					$('#groups-events').show();
					break;
			}
			
			return false;
		});
	});

	// Set sort by select to trigger onChange
	$("#sort-options").change(function() {
		page_url = jQuery.url.attr("path");
		window.location=page_url + '?sort=' + $(this).val();
	});
	
}

//Wait till the page has loaded
$(document).ready(function(){
	//////////////////////////////////////////////////////
	//INITIALIZE
	//////////////////////////////////////////////////////
	init();
});