	$(function() {

		// set class to "on" for all li ancestors of anchors pointing to the current page
		var page = location.href;
	    page = page.replace(/http:\/\/[^\/]+/i,""); 
	    $("a[href=" + page + "]").parents().filter('li').each(function() {$(this).addClass("on");});

		// onclick remove "on" class for all li elements
		// var lis = $("li");
		// $(function() {
		// 	$("li").click(function(){$(lis).removeClass("on")});
		// });

	});                                    
	
	
	$(function(){
	    $("#mainnav ul#nav li.off ul").hover(
	      function () {$(this).parent("li").addClass("on");}, 
	      function () {$(this).parent("li").removeClass("on");}
	    );
	});



$(document).ready(function(){$('.nninput').val(1);});

	$(function()
	{
		$.extend($.fn.jScrollPane.defaults, {showArrows:true});
		$('#text_content').jScrollPane();

	});









$(document).ready(function(){$("a[href$=pdf]").attr('target','_blank');});
$(function(){
    $('a.pageedit').click(function(){
        window.open(this.href);
        return false;
    });
});








         $(document).ready(function() {			
         $('.adults_children').replaceWith('<label class="adults_children">People:</label>');

        });



		$(function() {
			$("ul.youtube").ytplaylist({addThumbs:true, autoPlay: false, holderId: 'ytvideo2', playerHeight: 410, playerWidth: 500, showRelated: false});

		});


  $(document).ready(function() {
    $("#tabs").tabs({ fxFade: true, fxSpeed: 'slow' });
  });






			jQuery(document).ready(function($) {
				// We only want these styles applied when javascript is enabled
				$('div.navigation').css({'width' : '500px', 'float' : 'left'});
				$('div.content').css('display', 'block');

				// Initially set opacity on thumbs and add
				// additional styling for hover effect on thumbs
				var onMouseOutOpacity = 0.9;
				$('#thumbs ul.thumbs li').opacityrollover({
					mouseOutOpacity:   onMouseOutOpacity,
					mouseOverOpacity:  1.0,
					fadeSpeed:         'fast',
					exemptionSelector: '.selected'
				});
				
				// Initialize Advanced Galleriffic Gallery
				var gallery = $('#thumbs').galleriffic({
					delay:                     5000,
					numThumbs:                 15,
					preloadAhead:              10,
					maxPagesToShow:            7,
					imageContainerSel:         '#large_image',
					enableHistory:             false,
					autoStart:                 true,
					syncTransitions:           true,
					defaultTransitionDuration: 1500,
					onSlideChange:             function(prevIndex, nextIndex) {
						// 'this' refers to the gallery, which is an extension of $('#thumbs')
						this.find('ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onPageTransitionOut:       function(callback) {
						this.fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:        function() {
						this.fadeTo('fast', 1.0);
					}
				});
			});




