function krpano() {
	return document.getElementById('krpanoPlayer');
}
function texter(panoName) {
	var sideText = '';
	switch (panoName) {
		case 'pgrn_01':
			sideText = '<b>Welcome to our virtual tour!</b><p>Here you will meet Renee and Barb! Photos of the entire staff are to your right!</p><p>You can move about each room by holding your left mouse button, and moving the mouse right or left. Take a look all around, you will be amazed!</p><p>Click on the \'hand\' on the doorways behind Renee or Barb to move to another room.</p><b>Enjoy your Tour!!</b>';
			break;
		case 'pgrn_02':
			sideText = '<b>Laser Treatment</b><br /><p>This treatment room shows the Diode Laser... it enables us to offer you better options for treating periodontal disease, aphthous ulcers and even cold sores!</p>';
			break;
		case 'pgrn_03':
			sideText = '<b>CEREC</b><br /><p>This room is where \'behind the scenes\' lab work is done and our CEREC milling unit prepares crowns, onlays, and veneers. The free standing computer in this room is the CEREC- This is amazing CAD CAM advanced technology utilized by our doctors that allow us to complete your crown, onlay, or veneer in a single appointment!</p>';
			break;
		case 'pgrn_04':
			sideText = '<b>Digital Radiology</b><br /><p>In this room we show digital dental x-rays on a computer screen. We use Digital Radiology (X-ray) so we can view images instantly. Digital Radiology requires LESS radiation than standard x-rays. This technology allows us to quickly diagnose and care for your dental needs.</p>';
			break;
		case 'pgrn_05':
			sideText = '<b>Boost!</b><br /><p>How about a brighter new smile!! We offer Boost! Here you can relax while knowing your teeth will be several shades whiter in just an hour!!</p>';
			break;
		case 'pgrn_06':
			sideText = '<b>Panoramic Radiology</b><br /><p>Panoramic Radiology takes a digital film that allows us to check for any abnormalities of the jaw and to check if wisdom teeth are present.These digital films can be e-mailed to specialists and evaluated rapidly.</p>';
			break;
		case 'pgrn_07':
			sideText = '<b>NO2 / Curing</b><br /><p>In this treatment room we have the KCP Prep Jet displayed next to the patient chair. We use this for non invasive procedures to thoroughly clean the area of the tooth that will then be sealed.</p><p>You may also notice some tubing under the back cabinets: this is the Nitrous oxide delivery system. We use this as a way to help ease an appointment if anxiety is an issue.</p><p>On the counter is a white box with a corded attachment that appears to look similar to a hair dryer. This is an ultraviolet curing light used to rapidly set dental materials (resin & sealants) to enamel.</p>';
			break;
		case 'pgrn_08':
			sideText = '<b>Entry Hallway</b>';
			break;
		case 'pgrn_09':
			sideText = '<b>Back Hallway</b>';
			break;
		case 'pgrn_11':
			sideText = '<b>Lab</b><br />';
			break;
		case 'pgrn_12':
			sideText = '<b>Sterilization</b><br /><p>Our sterilization room is a carefully organized area where all instruments are sterilized and OSHA standards are followed. We utilize up to date sterilization equipment for you safety.</p>';
			break;
		case 'pgrn_13':
			sideText = '<b>Consultation</b><br /><p>This is our conference room where doctors Chris and Claire can discuss your treatment plan with you and answer all your questions. The computer will help you see what is involved in your restorations.</p>';
			break;
	}
	$('#panoText').html(sideText);
}
function hotswitch() {
	texter(krpano().get('image.left.url').replace('panos/','').replace('/_l.jpg',''));
}
function swap(panoName) {
	texter(panoName);
	krpano().call('loadpano(' + panoName + '.xml);');
}
$(function() {
	$('#nodeNav li').hover(function() {
		$(this).addClass('current');
	},function() {
		$(this).removeClass('current');
	});
	$('#nodeNav li').click(function() {
		swap($(this).attr('class').split(' ')[0]);
	});
	if ((location.search != '?f=j') && (location.search != '?f=q')) {
		$(window).load(function() {
			swfobject.embedSWF('swfs/krpano.swf','panoCont','600', '491', '9.0.28',false,{pano:'xml/pgrn_01.xml'},{allowfullscreen:true, bgcolor:'#000000'},{id:'krpanoPlayer', name:'krpanoPlayer'});
		});
	}
});
