/*
INSTRUCTION: You need to include this within html content 
<div id="image-container">&nbsp;</div>
*/
$(document).ready(function(){

	function ToggleNav( elem ) {

	        var currHtml = $(".hidden").html();
		var newHtml = elem.next(".hidden").html();
	        $('div#image-container').html(newHtml);
		
		if (elem.next(".hidden").is(":hidden")) {
		
			//$(".hidden").slideUp(100);
			$(".tab").removeClass('active');
			elem.addClass('active');
			//elem.next(".hidden").slideDown(100);
			
		}
	}
	
	ToggleNav( $("h2.one") );
	
	// Drop down navigation menu
	//$('.parent a').addClass('dropdown');
	$('.parent').hover(
		function() { $('ul', this).css('display', 'block'); },
		function() { $('ul', this).css('display', 'none');
	});
	
	if ($('#nav_main ul li:last-child')) {
		$('#nav_main ul li:last-child').addClass('last');	
	}
	
	$("#plot_content .inactive").hide();
	
	$("#floors a").click(function () {
		var id = $(this).attr("id"); // Get the ID of the link to define which tab and content area to trigger
		if ($("#plot_content .park_view_"+id).is(":hidden")) {
			$("#floors li a").removeClass('active');
			$("#floors li #"+id).addClass('active');
			$("#plot_content .plots").hide();
			$("#plot_content .park_view_"+id).show();
		}
	});
	
	$("#park_rise_floors a").click(function () {
		var id = $(this).attr("id"); // Get the ID of the link to define which tab and content area to trigger
		if ($("#plot_content ."+id).is(":hidden")) {
			$("#park_rise_floors li a").removeClass('active');
			$("#park_rise_floors li #"+id).addClass('active');
			$("#plot_content .plots").hide();
			$("#plot_content ."+id).show();
		}
	});
		
	$(".excess").show();

	$(".hide").hide();
	
	$(".tab").click(function () {

		return ToggleNav( $(this) );
	});
	
	
	$(".one").click(function () { $(".col4b .tab").slideUp(100); $(".col4b .one").slideDown(200);  });
	$(".two").click(function () { $(".col4b .tab").slideUp(100); $(".col4b .two").slideDown(200);  });
	$(".three").click(function () { $(".col4b .tab").slideUp(100); $(".col4b .three").slideDown(200);  });
	$(".four").click(function () { $(".col4b .tab").slideUp(100); $(".col4b .four").slideDown(200);  });
	$(".five").click(function () { $(".col4b .tab").slideUp(100); $(".col4b .five").slideDown(200);  });
	
	//$('.png').ifixpng();
		
	var slides = $('#slides div').size();

	if(slides > 1) {		
	$('#slides').bxSlider({
		alignment: 'horizontal',        // 'horizontal', 'vertical' - direction in which slides will move
		controls: false,                 // determines if default 'next'/'prev' controls are displayed
		speed: 800,                     // amount of time slide transition lasts (in milliseconds)
		pager: false,                    // determines if a numeric pager is displayed (1 2 3 4...)
		pager_short: false,             // determines if a 'short' numeric pager is displayed (1/4)
		pager_short_separator: ' / ',   // text to be used to separate the short pager
		margin: 0,                      // if 'horizontal', applies a right margin to each slide, if 'vertical' a bottom margin is applied. example: margin: 50
		next_text: 'next',              // text to be displayed for the 'next' control
		next_image: '',                 // image to be used for the 'next' control
		prev_text: 'prev',              // text to be displayed for the 'prev' control
		prev_image: '',                 // image to be used for the 'prev' control
		auto: true,                     // determines if slides will move automatically
		pause: 4500,                    // time between each slide transition (auto mode only) 
		auto_direction: 'next',         // order in which slides will transition (auto mode only)
		auto_hover: true,               // determines if slideshow will pause while mouse is hovering over slideshow
		auto_controls: false,           // determines if 'start'/'stop' controls are displayed (auto mode only)
		ticker: false,                  // determines if slideshow will behave as a constant ticker
		ticker_controls: false,         // determines if 'start'/'stop' ticker controls are displayed (ticker mode only)
		ticker_direction: 'next',       // order in which slides will transition (ticker mode only)
		ticker_hover: true,             // determines if slideshow will pause while mouse is hovering over slideshow
		stop_text: 'stop',              // text to be displayed for the 'stop' control
		start_text: 'start',            // text to be displayed for the 'start' control
		wrapper_class: 'bxslider_wrap'  // class name to be used for the outer wrapper of the slideshow
	});
	}

 
});
