
function selectHomeType(grptype)
	{
		$('#lnkSFH').css({'text-decoration':'none'});
		$('#lnkTH').css({'text-decoration':'none'});
		$('#lnkVL').css({'text-decoration':'none'});
	
		switch (grptype)
       	{
        	case "singlefamily":
                    
				$('#lnkSFH').css({'text-decoration':'underline'});	
            	$('#divVillas').hide();
				$('#divSFHomes').show();
				
				displayHomes("richland");
                
                break;
                    
            case "townhomes":
                
				$('#lnkTH').css({'text-decoration':'underline'});
				$('#divSFHomes').hide();
				$('#divVillas').hide();
				
				displayHomes(grptype);
				
                break;
					
            case "villas":
                
				$('#lnkVL').css({'text-decoration':'underline'});
				$('#divSFHomes').hide();
				$('#divVillas').show();
				
				displayHomes("villasamherst");
					
                break;
                    
            default:
                
        };
	
	};
	
	function displayHomes(hmtype)
	{
		
		$("img[homessf!='']").each(function(){
            
                $(this).attr('src', '/images/clear.gif');
                
            });
			
		$("a[homessf!='']").each(function(){
            
                $(this).css('color', '#aa9d71');
                
            });
	
		$("img[homessf='" + hmtype + "']").attr('src', '/images/red_arrow.gif');
		$("a[homessf='" + hmtype + "']").css('color', '#7a0026');
	
		if(hmtype == 'stovermanor' || hmtype == 'stoverclassic')
		{
			$("#tblVisualTourManor").show();
			$("#tblVisualTourBentley").hide();
			
			$("#StoverVisTourImg").attr("src","/images/visualtour_photo_" + hmtype + "_sm.jpg");

		}
		else if(hmtype == 'villasbentley')	
		{
			$("#tblVisualTourBentley").show();
			$("#tblVisualTourManor").hide();
		}
		else
		{
			$("#tblVisualTourManor").hide();
			$("#tblVisualTourBentley").hide();
		};
	
	
		$("#divHomesDisplay").load("/homes/" + hmtype + ".html");
		
		
	};
	
	function openFloorPlan(hmtype)
	{
	
		$("#divFloorPlan").html("<table style='width:775px;' align='center' border='0'><tr>" +
									"<td align='left'><a class='darkred' href='/pdf/" + hmtype + "_floorplan.pdf' target='_blank'>Download PDF</a></td>" +
									"<td align='right'><a class='darkred' href='javascript:void(0);' onclick='$.unblockUI();return false;'>Close Window</a></td>" +
									"</tr>" +
									"<tr><td colspan='2' style='vertical-align:center;'><br><img src='/images/homes/popup_" + hmtype + "_plan.gif'></td></tr></table>");
		
		$.blockUI({ message: $('#divFloorPlan'), css: {}, 
                                                overlayCSS:  { 
                                                        backgroundColor:'#333333', 
                                                        opacity: '0.7' }, 
                                                fadeIn: 500 });
												
										
	
	};
	
	function thumbSwap(divid,mouse)
	{
		if(mouse == "over")
		{
			document.getElementById(currThumbOverDivId).style.borderColor = "#ffffff";
		
			currThumbOverDivId = divid;
		
			document.getElementById(divid).style.borderColor = "#7a0026";
			document.getElementById(divid).style.cursor = "pointer";
			document.getElementById("HomesMainImg").src="/images/homes/" + divid + "_lrg.jpg";
		}
		else
		{
			document.getElementById(currThumbOverDivId).style.cursor = "default";
		};
	};