jQuery(document).ready(function(){
	
	jQuery('#menu').accordion({
		active: false,
		header: '.menuTitle',
		animation:{height:"show"},
		event: 'click',
		autoheight:false,
		navigation:true,
		showSpeed: 1200,
		hideSpeed: 1400
	});

/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
	});
jQuery("#dnn_ctr427_FormMaster_New_Form td[align='left']").attr('width','280px');
jQuery("#dnn_ctr428_FormMaster_New_Form td[align='left']").attr('width','280px');

});




function runJS() {
	var angelina = {  src: DNN_skinPath + 'angelina.swf' };
	sIFR.activate(angelina);
	sIFR.replace(angelina, {
  		selector: 'h1', 
  		wmode: 'transparent', 
  		src:  DNN_skinPath +  'angelina.swf', 
  		css: [ '.sIFR-root {color:#c5d7a3; font-size:40px;}'  ]
});
}

jQuery(document).ready(function(){
	jQuery('.accordion h2').click(function() {
	jQuery(this).toggleClass('active').next().slideToggle('slow');
		return false;
	}).next().hide();

// flash features
	if (jQuery("#featuredev").length){	
	var sshow = new SWFObject("http://tools.televoxsites.com/features/dentaldevelopment.swf", "slideshow", "450", "400", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featuredev");
	}
		
		
	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("#featurecommon").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "problems"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featurecommon");
	}

	if (jQuery("#featureemergency").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "emergencies"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureemergency");
	}

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("#featureband").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("featureband");
}


if (jQuery("#featureba").length){
var so = new SWFObject("/features/loader.swf", "features", "500", "273", "9", "#FF6600"); so.addVariable("config", "/features/config.xml"); so.addVariable("feature", "beforeafter"); so.addParam("wmode", "transparent"); so.addParam("quality", "high"); so.write("featureba");
}


if (jQuery("#featuretmj").length){
       var sshow = new SWFObject("http://tools.televoxsites.com/features/jaws.swf", "slideshow", "200", "208", "6", "#000000");
       sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
       sshow.addParam("wmode", "transparent");
       sshow.write("featuretmj");
}

if (jQuery("#featuresurgery").length){
       var sshow = new SWFObject("http://tools.televoxsites.com/features/orthognathic.swf", "slideshow", "190", "205", "6", "#000000");
       sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
       sshow.addParam("wmode", "transparent");
       sshow.write("featuresurgery");
}

if (jQuery("#featurerpe").length){
	var sshow = new SWFObject("../Portals/0/expanderanim.swf", "slideshow", "450", "350", "6", "#000000");
	sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
	sshow.addParam("wmode", "transparent");
	sshow.write("featurerpe");
}


if (jQuery("#invisalign-video").length){
	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' }
	});
}

});


jQuery(document).ready(function($){

	// this part goes in site.js inside the DOCUMENT READY - DO NOT PUT IT IN TWICE
	$('.accordion-faq h3').click(function() {
		$(this).toggleClass('active').next().toggle('normal');
		return false;
	});
	
});
