
/*Menu implementation*/
jQuery(document).ready(function(){
	jQuery("#nav>ul, #utility-nav").superfish({
		hoverClass:"hover",
		pathClass:"overideThisToUse",
		delay:500,
		animation:{opacity:'show', height:'show'},
		disableHI:true,
		onInit:function () {},
		onBeforeShow:function () {},
		onShow:function () {},
		onHide:function () {}
	});
	
jQuery('li:last', 'ul.Level1').addClass('last');
			

/* get rid of flash of unstyled content on load of @font face */
function lazyload() {
	var sRule1 =
		"@font-face {" +
		"  font-family: 'Futura';" +
		"  src: url('/bin/resource.cgi?type=font&sleep=6');" +
		"  src: local('Futura'), " +
                "url('/bin/resource.cgi?type=font&sleep=6') " +
                "format('truetype');" +
		"}";

	var style1 = document.styleSheets[0];
	if ( "function" === typeof(style1.insertRule) ) {
		// Firefox, Safari, Chrome
		style1.insertRule(sRule1, 0);
	}
	else if ( "string" === typeof(style1.cssText) ) {
		// IE
		style1.cssText = sRule1;
	}
}

/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
});


/* jQuery Cycle Slideshow Home */    
	jQuery('.slideshow-home').cycle({
		fx: 'fade',
		speed:1000 
});


// jQuery Cycle Office Tours Before and After Expanders //
jQuery('ul.slideshow').cycle({
	pause: true,
	wmode: 'transparent'
});
				
// Duplicate the following block of code to add extra office tours
jQuery('#cycle-office-tour') // Give this ID a unique name if more than one office tour is needed on a page
	.before('<div class="office-tour-nav" id="office-1">') // Ditto for this ID
	.cycle({
		cleartype: true, // true if clearType corrections should be applied (for IE)
		cleartypeNoBg: true, // Set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
		speed: 500, // This controls speed of transition
		timeout: 5000, // This controls delay between slides. Set to 0 if more than one office tour on a page, so they don't auto-play
		pager:  '#office-1',
		before: function() {
jQuery('#caption span').fadeOut(); // Give this ID a unique name if more than one office tour is needed on a page
},
after: function(curr, next, opts) {
var alt = jQuery(next).find('img').attr('alt'); // This grabs the image alt text
jQuery('#caption span').html(alt).fadeIn(); // This puts alt text into the caption span
}
});



/* Flash Features and FlowPlayer*/

if (jQuery("#featurejaws").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/jaws.swf", "slideshow1", "260", "250", "6", "#ffffff");
	sshow.addParam("wmode", "transparent");
	sshow.write("featurejaws");
}	


if (jQuery("#featuresurgery").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/orthognathic.swf", "slideshow2", "190", "205", "6", "#ffffff");
	sshow.addParam("wmode", "transparent");
	sshow.write("featuresurgery");
}	

if (jQuery("#featuretypes").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("xmlfile", "/features/types.xml"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featuretypes");
}


if (jQuery("#featurepartsof").length){
var so = new SWFObject("/features/loader.swf", "features", "490", "320", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "parts"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featurepartsof"); 
}


if (jQuery("#featureoral").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "325", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "hygiene"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureoral"); 
}


if (jQuery("#featureexpander").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/rpa2.swf", "slideshow3", "400", "350", "6", "#000000"); 
sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt"); 
sshow.addParam("wmode", "transparent"); sshow.write("featureexpander");
}

if (jQuery("#featurecrowns").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/crown.swf", "slideshow", "287", "300", "6", "#ffffff"); 
	sshow.addParam("wmode", "transparent"); 
	sshow.write("featurecrowns"); 
}
		
if (jQuery("#featureimplant").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/implant.swf", "slideshow", "200", "195", "6", "#ffffff");
	sshow.addParam("wmode", "transparent");
	sshow.write("featureimplant");
}	
	
if (jQuery("#featurecolor").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "325", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "planner"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featurecolor");
}

if (jQuery("#featureretention").length){
var sshow = new SWFObject("http://tools.televoxsites.com/features/retainer.swf", "slideshow", "450", "265", "6", "#ffffff");
sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
sshow.addParam("wmode", "transparent");
sshow.write("featureretention");
}


flowplayer("invisalign-video", {
src: "http://tools.televoxsites.com/vendor/flash/flowplayer-3.2.6.swf",
wmode: "transparent"
}, {
plugins: { controls: { url: 'flowplayer.controls-tube-3.2.4.swf' } },
clip: { autoPlay: false, autoBuffering: true, url: 'http://tools.televoxsites.com/vendor/flash/invisalign.flv' }
});

					
});//end document ready
