jQuery(document).ready(function($){
    
	/*Menu Implementation*/
	$("#menu-parent").click(function(){
		$('#navigation').toggleClass('open');
		return false;
	});
	
	$('ul.Level0').addClass('clearfix');	
	$('#navigation65 > a').html('About<br/>Orthodontics');
	$('#navigation a[href="#"]').click(function() { return false; });
	
	$("#dnn_dnnSEARCH_txtSearch").val("Search...").focus( function() {$(this).val(""); }).blur( function() {if($(this).val()==""){$(this).val("Search...");} });
	
	/* remove box from links */
	$('a').focus(function(){ this.blur(); });
	
	$('#rpeClick').click(function() {
		var sshow = new SWFObject("http://tools.televoxsites.com/features/rpa2.swf", "slideshow", "450", "350", "6", "#000000");
		sshow.addParam("wmode", "transparent");
		sshow.addParam("quality", "high");
		sshow.write("RPEflash");                             
	});
	
	if ($("#featureorthognathic").length){
		var sshow = new SWFObject("http://tools.televoxsites.com/features/orthognathic.swf", "slideshow", "190", "205", "6", "#000000");
		sshow.addParam("wmode", "transparent"); 
		sshow.write("featureorthognathic");
	}
	
	$('.acc h4').click(function() {
		$(this).toggleClass('active').next().toggle("fast");
		return false;
	});
 
 	if ($("#orthodontist").length){
		var sshow = new SWFObject("http://tools.televoxsites.com/features/beOrtho.swf", "slideshow", "500", "373", "6", "#000000");    	
      sshow.addParam("wmode", "transparent"); 
      sshow.write("orthodontist");
	}
	
	$('.past-events').cycle({
		speed:1200,
		timeout:5500,
		prev: '.prev',
		next: '.next'
	});
	
	$('.community-events').cycle({
		speed:1200,
		timeout:5500,
		prev: '.prev',
		next: '.next'
	});
	
	$('#office-tour').cycle({
		speed:1200,
		timeout:5500,
		prev: '#prev',
		next: '#next',
		before: setCaption
	});
	
	function setCaption() {
		$('#caption').html(this.alt);	
	}

});

//sIFR implementation
function pageScripts(){
	var BaskervilleRegular = {  src: DNN_skinPath + 'BaskervilleRegular.swf' };
	sIFR.activate(BaskervilleRegular);
	sIFR.replace(BaskervilleRegular, {
	  selector: 'h1', 
	  wmode: 'transparent', 
	  src:  DNN_skinPath +  'BaskervilleRegular.swf', 
	  css: [ '.sIFR-root {color:#073352;font-size:30px;}'  ] 
	});
}

//sIFR implementation
function Homeheader(){
	var AvantGrade = {  src: DNN_skinPath + 'AvantGrade.swf' };
	sIFR.activate(AvantGrade);
	sIFR.replace(AvantGrade, {
	  selector: 'h6', 
	  wmode: 'transparent', 
	  src:  DNN_skinPath +  'AvantGrade.swf', 
	  css: [ '.sIFR-root {color:#073352;font-size:30px;}'  ] 
	});
}
