function Room(args) {
	//get an array of parameters
	for(var i in args) {
		this[i] = args[i];
	}

	//variable for a reference to the 'room' class
	var _self = this;

	//make an 'upimage'
	var img = document.createElement("img");
	img.src = this['upimage'];
		
	this['upimage'] = img;
	
	//make an 'overimage'
	img = document.createElement("img");
	img.src = this['overimage'];
		
	this['overimage'] = img;
	
	//set attributes for the default image
	img = document.createElement("img");
	img.id = this['ID'];
	img.src = this['upimage'].src;
	img.style.width = this['width'];
	img.style.height = this['height'];
	img.style.top = this['top'];
	img.style.left = this['left'];
	img.style.position = "absolute";
	
	//mouse events for the class
	$(img).mouseover(function () {
		this.src = _self['overimage'].src;
		img.style.cursor = "pointer";
	});
	
	$(img).mouseout(function () {
		this.src = _self['upimage'].src;
		img.style.cursor = "normal";
	});
	
	//when the user clicks on a room...
		//first, the picture to be displayed has its source attribute set by the Room object's 'clickimage' attribute
		//second, all of the html elements are populated with the appropriate Room object's data members
		//second, a jquery object is made handle the onclick event that will actually display the image, and then a click event to remove it
	$(img).click(function () {
		window.document.getElementById("main_pic").src = _self['clickimage'];
		$("h4#room_title").text(_self['name']);
		$("h4#room_size").text(_self['sqft']);
		$("td#classroom").text(_self['classroom']);
		$("td#long_tables").text(_self['lngTables']);
		$("td#theatrecapacity").text(_self['theatre']);
		$("td#u_shaped_tables").text(_self['uTables']);
		$("td#conference").text(_self['conference']);
		$("td#round_tables").text(_self['rndTable']);
		$("div#inside:hidden").fadeIn("slow").click(function () {
			$("div#inside").fadeOut("slow");
		});
	});
	
	//set the default image
	this['image'] = img;
}

$(document).ready(function () {
	var Ohio = new Room({
		ID: "ohio",
		upimage: "images/room/ohio.jpg",
		overimage: "images/room/oh_rollover.jpg",
		clickimage: "images/room/ohio-room.jpg",
		width: "86px",
		height: "89px",
		left: "327px",
		top: "49px",
		name: "Ohio Room",
		sqft: "44'x48'",
		classroom: "70",
		theatre: "250",
		conference: "n/a",
		rndTable: "80",
		lngTables: "200",
		uTables: "40"
	});
	
	var Pennsylvania = new Room({
		ID: "pa",
		upimage: "images/room/pa.jpg",
		overimage: "images/room/pa_rollover.jpg",
		clickimage: "images/room/pennsylvania-room.jpg",
		width: "67px",
		height: "89px",
		left: "260px",
		top: "49px",
		name: "Pennsylvania Room",
		sqft: "44'x36'",
		classroom: "60",
		theatre: "200",
		conference: "n/a",
		rndTable: "80",
		lngTables: "160",
		uTables: "40"
	});
		
	var Maryland = new Room({
		ID: "md",
		upimage: "images/room/md.jpg",
		overimage: "images/room/md_rollover.jpg",
		clickimage: "images/room/maryland-room.jpg",
		width: "48px",
		height: "89px",
		left: "212px",
		top: "49px",
		name: "Maryland Room",
		sqft: "44'x26'",
		classroom: "50",
		theatre: "130",
		conference: "n/a",
		rndTable: "50",
		lngTables: "88",
		uTables: "30"
	});
	
	var Virginia = new Room({
		ID: "va",
		upimage: "images/room/va.jpg",
		overimage: "images/room/va_rollover.jpg",
		clickimage: "images/room/virginia-room.jpg",
		width: "75px",
		height: "89px",
		left: "137px",
		top: "49px",
		name: "Virginia Room",
		sqft: "44'x41'",
		classroom: "60",
		theatre: "250",
		conference: "n/a",
		rndTable: "80",
		lngTables: "180",
		uTables: "50"
	});

	var Kentucky = new Room({
		ID: "ky",
		upimage: "images/room/kentucky.jpg",
		overimage: "images/room/ky_rollover.png",
		clickimage: "images/room/kentucky-room.jpg",
		width: "62px",
		height: "100px",
		left: "40px",
		top: "0px",
		name: "Kentucky Room",
		sqft: "43'x28'",
		classroom: "60",
		theatre: "120",
		conference: "n/a",
		rndTable: "80",
		lngTables: "120",
		uTables: "50"
	});

	var Executive = new Room({
		ID: "executive",
		upimage: "images/room/executive2.jpg",
		overimage: "images/room/executive_rollover2.jpg",
		clickimage: "images/room/executive-board-room.jpg",
		width: "74px",
		height: "54px",
		left: "150px",
		top: "248px",
		name: "Excutive Board Room",
		sqft: "17'x27'",
		classroom: "n/a",
		theatre: "n/a",
		conference: "12",
		rndTable: "n/a",
		lngTables: "n/a",
		uTables: "n/a"
	});
	
	var CamHenderson = new Room({
		ID: "cam",
		upimage: "images/room/cam.jpg",
		overimage: "images/room/cam_rollover.png",
		clickimage: "images/room/cam-henderson-room.jpg",
		width: "47px",
		height: "54px",
		left: "361px",
		top: "249px",
		name: "Cam Henderson Room",
		sqft: "24'x27'",
		classroom: "20",
		theatre: "50",
		conference: "20",
		rndTable: "32",
		lngTables: "32",
		uTables: "20"
	});
	
	var LittleBigGreen = new Room({
		ID: "little",
		upimage: "images/room/little.jpg",
		overimage: "images/room/little_rollover.png",
		clickimage: "images/room/little-big-green-room.jpg",
		width: "47px",
		height: "57px",
		left: "361px",
		top: "314px",
		name: "Little Big Green Room",
		sqft: "24'x27'",
		classroom: "20",
		theatre: "50",
		conference: "20",
		rndTable: "32",
		lngTables: "32",
		uTables: "20"
	});
	
	var GrandeTheatre = new Room({
		ID: "theatre",
		upimage: "images/room/grand.jpg",
		overimage: "images/room/theatre_rollover.png",
		clickimage: "images/room/grande-theatre.jpg",
		width: "88px",
		height: "60px",
		left: "17px",
		top: "167px",
		name: "Grande Theatre",
		sqft: "72'x50'",
		classroom: "200",
		theatre: "400",
		conference: "n/a",
		rndTable: "200",
		lngTables: "300",
		uTables: "73"
	});
	
	$("div#room_wrapper").append(Ohio.image);
	$("div#room_wrapper").append(Pennsylvania.image);
	$("div#room_wrapper").append(Maryland.image);
	$("div#room_wrapper").append(Virginia.image);
	$("div#room_wrapper").append(Kentucky.image);
	$("div#room_wrapper").append(Executive.image);
	$("div#room_wrapper").append(CamHenderson.image);
	$("div#room_wrapper").append(LittleBigGreen.image);
	$("div#room_wrapper").append(GrandeTheatre.image);
});

/*
var grandBallroom = new Room({
	ID: "ballroom",
	name: "Grande Ballroom",
	sqft: "44'x151'",
	classroom: "400",
	theatre: "830",
	conference: "n/a",
	rndTable: "400",
	lngTables: "650",
	uTables: "n/a"
});

var mezzanine = new Room({
	imgURL: ".jpg",
	width: "",
	height: "",
	left: "",
	top: "",
	name: "Mezzanine",
	sqft: "50'x63'",
	classroom: "n/a",
	theatre: "n/a",
	conference: "n/a",
	rndTable: "n/a",
	lngTables: "n/a",
	uTables: "n/a"
});

var patio = new Room([
	imgURL: ".jpg",
	width: "",
	height: "",
	left: "",
	top: "",
	name: "Patio Room",
	sqft: "55'x56'",
	classroom: "n/a",
	theatre: "n/a",
	conference: "n/a",
	rndTable: "n/a",
	lngTables: "n/a",
	uTables: "n/a"
]);

var Heritage = new Room({
	ID: "heritage",
	upimage: "images/room/heritage.jpg",
	overimage: "images/room/heritage_rollover.png",
	clickimage: "images/room/sunset.jpg",
	width: "32px",
	height: "29px",
	left: "155px",
	top: "342px",
	name: "Heritage Room",
	sqft: "14'x17'",
	classroom: "9",
	theatre: "15",
	conference: "n/a",
	rndTable: "8",
	lngTables: "10",
	uTables: "n/a"
});

var Huntington = new Room({
	ID: "htown",
	upimage: "images/room/huntington.jpg",
	overimage: "images/room/huntington_rollover.png",
	clickimage: "images/room/click/huntingtonroom.jpg",
	width: "38px",
	height: "58px",
	left: "187px",
	top: "313px",
	name: "Huntington Room",
	sqft: "17'x27'",
	classroom: "20",
	theatre: "40",
	conference: "20",
	rndTable: "32",
	lngTables: "n/a",
	uTables: "20"
});
*/
