//IE Hover Capability
var sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


$(document).ready(function(){
	
//misc functions
	//Accessible Popups
	$('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
	//Hide div w/id extra
    $("#anatomy-of-a-tooth, #flash-know-your-teeth").css("display","none");
	//toggles anatomy of a tooth div
	$(".show-anatomy").click(function() {
		$("#anatomy-of-a-tooth").toggle("slow");								
	});
	
	$(".show-teeth").click(function() {
		$("#flash-know-your-teeth").toggle("slow");								
	});


	
//flash embed

	//home page flash
	$('#flash-home').flash(
		{ 
		  src: 'flash/flash-home.swf',
		  width: 344,
		  height: 183,
		  wmode: 'transparent'
		},
		{ version: 8 }
	);

//flash modules

	//know your teeth
	$('#flash-know-your-teeth').flash(
		{ 
		src: 'flash/know-your-teeth.swf',
		width: 500,
		height: 400,
		wmode: 'transparent'
		},
		{ version: 8 }
	);
		
});//end document.ready

