/*  Show Hide Floorplans  */
function openFloorPlan(currentPlan) {
	var x;
	var floorPlans = new Array();
	floorPlans[0] = "exterior";
	floorPlans[1] = "firstFloor";
	floorPlans[2] = "secondFloor";
	
	for (x in floorPlans) {
		if(floorPlans[x] == currentPlan) {
			//hide off button for current plan
			jQuery('div.information').find('p#'+floorPlans[x]+'Link-off').hide().end();
			//show on button for current plan
			jQuery('div.information').find('p#'+floorPlans[x]+'Link-on').show().end();
			//show large image for current plan
			jQuery('div.imageArea').find('img.'+floorPlans[x]).fadeIn().end();
		} else {
			//turn off all on buttons that aren't current
			jQuery('div.information').find('p#'+floorPlans[x]+'Link-on').hide().end();
			//turn on all off buttons that aren't current
			jQuery('div.information').find('p#'+floorPlans[x]+'Link-off').show().end();
			//hide all large images that aren't current
			jQuery('div.imageArea').find('img.'+floorPlans[x]).hide().end();
		}
	}
}


jQuery(document).ready(function() {
	openFloorPlan('exterior');
	jQuery('div.imageArea').find('img.firstFloor').hide().end().find('img.secondFloor').hide().end();
	jQuery('div.information').find('p#exteriorLink-off').click(function(){openFloorPlan('exterior')}); 
	jQuery('div.information').find('p#firstFloorLink-off').click(function() {openFloorPlan('firstFloor')}); 
	jQuery('div.information').find('p#secondFloorLink-off').click(function() {openFloorPlan('secondFloor')});  
 });