function pageScripts(){
var Avenir = {  src: DNN_skinPath + 'Avenir.swf' };
sIFR.activate(Avenir);
sIFR.replace(Avenir, {
  selector: 'h1', 
  wmode: 'transparent', 
  src:  DNN_skinPath +  'Avenir.swf', 
  css: [ '.sIFR-root {font-size:41px;color:#008da9;}'  ]
});
}

//Menu implementation	      
jQuery(document).ready(function($){
	jQuery("#Navigation > ul").superfish({
		hoverClass:"hover",
		pathClass:"overideThisToUse",   
		delay:1200,
		animation:{height:"show"},
		speed:"normal",
		oldJquery:false,
		disableHI:false,
		onInit:function () {},
		onBeforeShow:function () {},
		onShow:function () {},
		onHide:function () {}
	}).find(">li:has(ul)").mouseover(function () {
		jQuery("ul", this).bgIframe({opacity:true});
	}).find("a").focus(function () {
		jQuery("ul", jQuery("#Navigation > ul >li:has(ul)")).bgIframe({opacity:true});
	});
	
    /* remove box from links */
	jQuery("a").focus(function(){
	this.blur();
	});	
	
    jQuery(".LinkIcon").rollover();
	
	jQuery(".Level1").append("<li><img src='/Portals/_default/Skins/siegelanddolt.com/images/subappend.png' align='bottom' class='subbottom' /></li>");
	
	 jQuery("#Navigation69 a").click(function(){
			window.open('http://www.caesyonline.com/nl/?userid=6725','newwindow')			 			
	 });	
	
	///Invislign FAQ
	jQuery('.acc h4').click(function() {
		jQuery(this).toggleClass('active').next().toggle("fast");
		return false;
	}).next().hide();	
	
	/*Preload the menu backgrounds*/
	menuImage1 = new Image(); 
	menuImage1src = DNN_skinPath + "images/home_on.jpg";
	menuImage2 = new Image(); 
	menuImage2.src = DNN_skinPath + "images/misc_on.jpg";	
	menuImage3 = new Image(); 
	menuImage3.src = DNN_skinPath + "images/oinfo_on.jpg";
	menuImage4 = new Image(); 
	menuImage4.src = DNN_skinPath + "images/pinfo_on.jpg";
	menuImage5 = new Image(); 
	menuImage5.src = DNN_skinPath + "images/plogin_on.jpg";
	menuImage6 = new Image(); 
	menuImage6.src = DNN_skinPath + "images/tret_on.jpg";/*over*/
	
	if (jQuery("#dentaldevelopment").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("dentaldevelopment");
	}
	if (jQuery("#gums").length){
  		var sshow = new SWFObject("http://tools.televoxsites.com/features/gums.swf", "slideshow2", "350", "260", "6", "#000000"); 
		sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt"); 
		sshow.addParam("wmode", "transparent"); 
		sshow.write("gums");
	}
	   if (jQuery("#jawsfe").length){
  		var sshow = new SWFObject("http://tools.televoxsites.com/features/jaws.swf ", "slideshow", "190", "206", "6", "#72653a");
        sshow.addVariable("colorslocation", location.host+DNN_skinPath+"colors.txt");
        sshow.addParam("wmode", "transparent"); 
        sshow.write("jawsfe"); 
	}
		if (jQuery("#Implants").length){
  		var so = new SWFObject("http://tools.televoxsites.com/features/implant.swf", "features", "200", "195", "9", "#FF6600");
  		so.addParam("wmode", "transparent");
  		so.addParam("quality", "high");
  		so.write("Implants");
	}
	if (jQuery("#RootCanal").length){
	var so = new SWFObject("http://tools.televoxsites.com/features/rootcanal.swf", "features", "350", "260", "9", "#FF6600");
	so.addParam("wmode", "transparent");
	so.addParam("quality", "high");
	so.write("RootCanal"); 
	}
		if (jQuery("#WisdomTeeth").length){
		var so = new SWFObject("http://tools.televoxsites.com/features/wisdom.swf", "features", "190", "205", "9", "#FF6600");
		so.addParam("wmode", "transparent");
		so.addParam("quality", "high");
		so.write("WisdomTeeth");
	}

	if (jQuery("#Crown").length){
		var so = new SWFObject("http://tools.televoxsites.com/features/crown.swf", "features", "287", "300", "9", "#FF6600");
		so.addParam("wmode", "transparent");
		so.addParam("quality", "high");
		so.write("Crown"); 
	}
	
	if($('#player1').length)
	{
		doVids();	
	}
	
	
	if($("#cerecvideo").length)
	{
		flowplayer("cerecvideo", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: false, autoBuffering: true}});
	} 
			
	if($("#beautymarks").length)
	{
		flowplayer("beautymarks", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: true, autoBuffering: true}});
	} 
	
	if($("#dent_video").length)
	{
		flowplayer("dent_video", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: false, autoBuffering: true}});
	} 
	
	if($("#implant_video").length)
	{
		flowplayer("implant_video", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: false, autoBuffering: true}});
	}
	
		if($("#implant_video_denture").length)
	{
		flowplayer("implant_video_denture", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: false, autoBuffering: true}});
	}
	
	if($("#invis_video").length)
	{
		flowplayer("invis_video", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: false, autoBuffering: true}});
	}
	
	if($("#ven_video").length)
	{
		flowplayer("ven_video", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {clip: {autoPlay: false, autoBuffering: true}});
	}
});

function doVids() {

	/*setup scrolling for the playlist elements
	$("div.clips").scrollable({
		items:'div.scroller',
		vertical:false,
		next:'a.right',
		prev:'a.left'
	});*/
	//setup player normally
	$f("player1", {src: "/portals/0/casey/flowplayer-3.2.4.swf", wmode: 'transparent'}, {
	
		//clip properties common to all playlist entries
		clip: {
			baseUrl: '/Portals/0/casey/'
			/*subTitle: 'put info here',
			time: '100'*/
		},
		//show playlist buttons in controlbar
		plugins: {
			controls: {
				playlist: true
			}
		}
	});
	
	/*
		here comes the magic plugin. It uses first div.clips element as the 
		root for as playlist entries. loop parameter makes clips play
		from the beginning to the end.
	*/
	$f("player1").playlist("div.scroller:first", {loop:true});
}





