var current = {};

$(window).load(function(){
	var pageId = $(document.body).attr('id');
	
	switch(pageId){
		case 'page-contact':
			current = {
				link: $('.location-info-active'),
				image: $('#admissions')
			};
			$('.location-info').each(function(i,loc){
				$(loc).click(function(ev){
					var that = $(this);
					var im = $($(this).attr('rel'));
					
					if(im){
						current.image.hide();
						current.link.removeClass('location-info-active');
						
						im.show();
						that.addClass('location-info-active');
						
						current.image = im;
						current.link = that;
						
						
					}
					
					ev.preventDefault();
				});
			});
			break;
	}
});
