$(document).ready(function(){
	
     // INITIALIZE FONT RESIZER
     var options = { min: 0, max: 2};
     $.FontSizer.Init(options);
	   
     // RUN HOME QUOTES
	 $('#homequotes').cycle({
          fx:  'fade',
			cleartype: 1,
          speed: 1000,
			timeout: 7000
     });
	 
	// SET LINKS WITH CLASS=LIGHTBOX TO RUN AS LIGHTBOX
	$('a.lightbox').lightbox({
          fileLoadingImage: '/wp-content/themes/qh_original/i/lightbox/loading.gif',
          fileBottomNavCloseImage: '/wp-content/themes/qh_original/i/lightbox/closelabel.gif',
			overlayBgColor: '#59e',
			overlayOpacity: .8,
			resizeSpeed: 375
	});
	 
     // SET DROP DOWN NAV MENU STUFF
     $("#nav li").hover(
	 		function(){ $("ul", this).hide().fadeIn(220);},
     		function(){}
	 );
	 
     if (document.all) {
     	$("#nav li").hoverClass ("sfHover");
     }
	 
	// SET UP ROTATING IMAGES ON HOME PAGE
	$('#monoslideshow').flash(
        { src: '/wp-content/themes/qh_original/f/monoslideshow.swf',
          width: 978,
          height: 250,
			flashvars: {showLogo: 'false', dataFile: '/wp-content/themes/qh_original/f/monoslideshow.xml'}
		 },
		 {
		 	expressInstall: true,
			version: '8'
		 }
    );
	
     // SET UP SHOW/HIDE AREAS ON PAGES	
     var showText="Show";
     var hideText="Hide";
     $(".toggle").prev().append(' (<a href="#" class="toggleLink">'+showText+'</a>)');
     $('.toggle').hide();
     $('a.toggleLink').click(function() {
     
          if ($(this).text()==showText) {
          	$(this).text(hideText);
          }
          else {
          	$(this).text(showText);
          }
          $(this).parent().next('.toggle').slideToggle('slow');
          return false;
     });	  
}); 	

// MORE HOVER STUFF AFTER PAGE LOAD DONE
$.fn.hoverClass = function(c) {
     return this.each(function(){
          $(this).hover(
               function() { $(this).addClass(c);  },
               function() { $(this).removeClass(c); }
          );
     });
};

// PRELOAD INNER PAGE HEADER FILES AFTER PAGE LOAD DONE
$.preload([ 'header_anderson_inn', 'header_belted_galloways', 'header_camden_harbor', 'header_cottage_duplex', 'header_curtis_light', 'header_mt_batty', 'header_mt_batty_couple', 'header_the_arch' ], {
    base:'/wp-content/themes/qh_original/i/header_pics/',
    ext:'.jpg'
});