$(document).ready(function(){
	$(".propgroup").mouseover(function(){
		$(this).css("background-color", "#efefef");
		$(this).mouseout(function(){
			$(this).css("background-color", "#ffffff");
		});
	});
	$(".propgrouprented").mouseover(function(){
		$(this).addClass("propgroup");
		$(this).removeClass("propgrouprented");
		$(this).mouseout(function(){
			$(this).addClass("propgrouprented");
			$(this).removeClass("propgroup");
		});
	});
		$(".propunit").mouseover(function(){
		$(this).css("background-color", "#efefef");
		$(this).mouseout(function(){
			$(this).css("background-color", "#ffffff");
		});
	});
			$(".propunitrented").mouseover(function(){
		$(this).addClass("propunit");
		$(this).removeClass("propunitrented");
		$(this).mouseout(function(){
			$(this).addClass("propunitrented");
			$(this).removeClass("propunit");
		});
	});
//removed if statements so it works whether coming from a detail page or not
		$("#rental_select").change(function(){
			 $.ajax({
			   type: "POST",
			   url: "ajax/rental_application.php",
			   data: "property_id="+$(this).val(),
			   success: function(msg){
					$("#apartment_select").html("");
					$("#apartment_select").append(msg);
			   }
			 });
		});	

});