//JQuery Setup
$(document).ready(function(){

  //IE6 duct tape
  if (jQuery.browser.msie) {
    $('#nav li').hover(
      function() {
        $(this).addClass("sfhover");
      },
      function() {
        $(this).removeClass("sfhover");
      }
    );
  }
  
  //sifr
  $.sifr({ 
    font: 'flash/myriadpro-blackcond.swf', 
    color: '#08548e',
    textAlign: 'left'});
  $('#content h1').sifr();
	
	//clear form fields
	$('.clearme').one("focus", function() {
  		$(this).val("");
	});

  //home page flash
  $('#flash_home').flash(
  { 
	  src: 'flash/homepage.swf',
	  width: 770,
	  height: 380,
	  wmode: 'transparent'
	},
	{ version: 8 }
	);
  
  //header slides
  $('#flash-headerSlides').flash(
  { 
	  src: 'flash/headerSlides.swf',
	  width: 430,
	  height: 173,
	  wmode: 'transparent'
	},
	{ version: 8 }
	);

  //braces diagram
  $('#flash-braces-diagram').flash(
  { 
	  src: 'flash/braces-diagram.swf',
	  width: 500,
	  height: 375,
	  wmode: 'transparent',
    flashvars: {thisColor: '0x' + '639CCE'}
	},
	{ version: 8 }
	);

  
  	//brushing-flossing
	$('#flash-brushing-and-flossing').flash(
		{ 
		src: 'flash/brushing-and-flossing.swf',
		width: 500,
		height: 300,
		wmode: 'transparent',
		  flashvars: { 
			//change value to false to pause on start
			autoPlay: 'false',
			//change hex color (default=639CCE)
			thisColor: '0x' + '265891',
			//change item value to false to omit
			brushing: 'true',
			flossing: 'true'
		  }
		},
		{ version: 8 }
	);

	
	//common treatments
	$('#flash-common-treatments').flash(
		{ 
		  src: 'flash/common-treatments.swf',
		  width: 500,
		  height: 300,
		  wmode: 'transparent',
		  flashvars: { 
			//change value to false to pause on start
			autoPlay: 'false',
			//change hex color (default=639CCE)
			thisColor: '0x' + '265891',
			//change item value to false to omit
			crowding: 'true',
			openbite: 'true',
			deepOverbite: 'true',
			missing: 'true',
			underbite: 'true',
			spacing: 'true',
			overbite: 'true',
			nonBraces: 'true',
			phaseI: 'true'
		  }
		},
		{ version: 8 }
	);
	

	//office tour
	$('#flash-office-tour').flash(
		{ 
		  src: 'flash/office-tour.swf',
		  width: 500,
		  height: 375,
		  wmode: 'transparent',
		  flashvars: { 
			//change value to false to pause on start
			autoPlay: 'false',
			//set captions for each slide or leave blank if none
      caption01: "Lambertville Office",
      caption02: "Lambertville Office",
      caption03: "Lambertville Office",
      caption04: "Lambertville Office",
      caption05: "Lambertville Office",
      caption06: "Lambertville Office",
      caption07: "Lambertville Office",
      caption08: "Lambertville Office",
      caption09: "Lambertville Office",
      caption10: "Lambertville Office",
      caption11: "Sylvania Office",
      caption12: "Sylvania Office",
      caption13: "Sylvania Office",
      caption14: "Sylvania Office",
      caption15: "Sylvania Office",
      caption16: "Sylvania Office",
      caption17: "Sylvania Office",
      caption18: "Sylvania Office",
      caption19: "Sylvania Office",
      caption20: "Sylvania Office"
		  }
		},
		{ version: 8 }
	);

//Style for the Community > Professional Continuing Education sub-nav
	$('#nav').find('a[href^="professional-continuing-education.php"]').addClass('high-nav').css('height','40px');
	
});//end document.ready
