	// CUFON
	Cufon.replace('h1', { fontFamily: 'NeoSansBook' });
	Cufon.replace('h2', { fontFamily: 'NeoSansBook' });
	Cufon.replace('h3', { fontFamily: 'NeoSansBook' });
	Cufon.replace('.sf-menu li ul li a', { fontFamily: 'NeoSansBold' });
	
	$(document).ready(function() {		
	
		// JSCROLLPANE
		$('.scroll').jScrollPane({
			showArrows: true,
			hijackInternalLinks: true
		});					
		
		// UNIT PNG FIX
		if ($.browser.msie && $.browser.version.substr(0,1)<7) {
			fixPng();
		}
		
		// SUPERFISH
		$('ul.sf-menu').superfish({
			dropShadows: false, 
			autoArrows: false,
			disableHI: true,  
			speed: 0
		});
		
		// FANCYBOX
		$("a.iframe").fancybox({
			transitionIn: "elastic",
			transitionOut: "elastic",
			speedIn: 400,
			overlayColor: "#000",
			overlayOpacity: 0.8,
			width: 900,
			height: 550,
			titleShow: false,
			padding: 0,
			scrolling: "no"
		});
		$("a.iframe-appt").fancybox({
			transitionIn: "elastic",
			transitionOut: "elastic",
			speedIn: 400,
			overlayColor: "#000",
			overlayOpacity: 0.8,
			width: 400,
			height: 420,
			titleShow: false,
			padding: 0,
			scrolling: "no",
			type: "iframe"
		});				
		$("a.gallery").fancybox({
			transitionIn: "elastic",
			transitionOut: "elastic",
			speedIn: 400,
			overlayColor: "#000",
			overlayOpacity: 0.8,
			titleShow: false,
			padding: 0,
			scrolling: "no"
		});
		
		// CYCLE
		$('#cycle').cycle({
			fx: 		'scrollDown', 
			easing: 	'easeOutBack',
			timeout:	6000,
			speed:		1250
		});
		
		// EMAIL CLOAKING
		$(".emailCloak").each(function(){
			var ats, dots, address, i;
			ats = [ ' at ', ' (at) ', ' [at] ' ];
			dots = [ ' dot ', ' (dot) ', ' [dot] ' ];
			address = $(this).html();
			for ( i = 0; i < ats.length; i++ ) {
				address = address.replace(ats[i], '@');
			}
			for ( i = 0; i < dots.length; i++ ) {
				address = address.replace(dots[i], '.');
			}
			$(this).html('<a href="mailto:' + address + '">' + address + '</a>');
		});
		
		// PRELOAD IMAGES		
		(function($) {
		  var cache = [];
		  // Arguments are image paths relative to the current page.
		  $.preLoadImages = function() {
			var args_len = arguments.length;
			for (var i = args_len; i--;) {
			  var cacheImage = document.createElement('img');
			  cacheImage.src = arguments[i];
			  cache.push(cacheImage);
			}
		  }
		})(jQuery)
		
		jQuery.preLoadImages("head-nav-01-optometrists-active.png", "head-nav-02-about-active.png", "head-nav-03-products-active.png", "head-nav-04-locations-active.png", "head-nav-05-eyecare-active.png");
		
	});

	function showConsentForm() {
		var clickOk = alert("Please fill out the following forms and then print & bring both completed sheets with you to your first appointment");
		window.open('/resources/pdf/Patient-Info-Consent-Form.pdf', "_blank");
	}
