

jQuery(document).ready(function() { 
			
			// Validate the Mailing LIst Submission
			jQuery("#mailing").validate({
				rules: {email: {required: true,email: true}, name: {required:true}, zipcode: {required:true}}, 
				submitHandler: function(form) {
					jQuery('#mailing').ajaxSubmit(function() { 
					}); 
				}
			});


		/* STORE SHOPPING CART SLIDER */
		jQuery('#sideshoppingcart').scrollFollow({ 
			offset: 20
		});

		/* NAV SLIDE DOWN */
		jQuery('#sliderWrap').mouseenter(function () {
			//jQuery('#sliderButton').fadeIn("slow");
			//jQuery('#openCloseWrap').fadeIn("slow");
			
		});

		jQuery('#sliderWrap').mouseleave(function () {
			//jQuery('#openCloseWrap').fadeOut("fast");
			//jQuery('#sliderButton').fadeIn("slow");
		});

}); 	  


		/* THIS FUNCTION LOADS PAGE CONTENT INTO THE #MAIN DIV WHEN CALLED */
		function load_content (id, content) {
	  		jQuery('#main').fadeOut("fast"); //fades out the div
	  		jQuery('#loading').fadeIn("fast");
	  		//loads the content passed in the variable
	  		jQuery('#main').load(content, "", function() { 
		  		jQuery('#loading').fadeOut("fast");
		  		jQuery('#main').fadeIn("slow", function() {
		  			jQuery("#box-galleries-inner").css('overflow','auto'); 
		  			jQuery('#box-galleries-inner').jScrollPane({dragMaxHeight: 64, dragMinHeight: 64, scrollbarWidth: 12, maintainPosition: false, reinitialiseOnImageLoad: false});
				}); //once content is loaded, fade the div back in
	 		});
	 		window.location.hash = id; //add the #%category% to the url in the browser address bar for permalinking
//			window.location.href = content;
		 }
		/* END AJAX LOAD MUSIC PAGE FUNCTION */


		/* THIS FUNCTION LOADS PAGE CONTENT INTO THE #MUSIC-CONTENT DIV WHEN CALLED */
		function load_music (id, content) {
			jQuery('#music-content').fadeOut("slow"); //fades out the div
	  		jQuery('#loading').fadeIn("fast");
			jQuery('#music-content').load(content, function() { //loads the content passed in the variable
				jQuery('#loading').fadeOut("fast");
				jQuery('#music-content').fadeIn("slow"); //once content is loaded, fade the div back in
			});
			window.location.hash = id; //add the #%category% to the url in the browser address bar for permalinking
			window.scroll(0,0);
		}
		/* END AJAX LOAD MUSIC PAGE FUNCTION */


		/* THIS FUNCTION LOADS PAGE CONTENT INTO THE #PHOTOS-CONTENT DIV WHEN CALLED */
		function load_photos (id, content) {
			jQuery('#photos-content-inner').fadeOut("slow"); //fades out the div
	  	    jQuery('#loading').fadeIn("fast");
			jQuery('#photos-content').load(content, function() { //loads the content passed in the variable
		  		jQuery('#loading').fadeOut("fast");
				jQuery('#photos-content-inner').fadeIn("slow"); //once content is loaded, fade the div back in
			});
			window.location.hash = id; //add the #%category% to the url in the browser address bar for permalinking
		}
		/* END AJAX LOAD PHOTOS PAGE FUNCTION */


		/* THIS FUNCTION LOADS PAGE CONTENT INTO THE #FANS-CONTENT DIV WHEN CALLED */
		function load_fans (id, content) {
			window.location.hash = id; //add the #%category% to the url in the browser address bar for permalinking

			if ( (id.match('stories')) || (id.match('poetry')) ) {
			$('#fan-content').css('width','474px');
			//$('#fan-content-inner').css('width','464px');
			//$('.jScrollPaneContainer').css('width','464px');
			} else {
			$('#fan-content').css('width','640px');
			//$('#fan-content-inner').css('width','630px');						
			//$('.jScrollPaneContainer').css('width','630px');
			}
			
			jQuery('#fan-content').fadeOut("slow"); //fades out the div
	  	    jQuery('#loading').fadeIn("fast");
			jQuery('#fan-content').load(content, function() { //loads the content passed in the variable
		  	jQuery('#loading').fadeOut("fast");
			jQuery('#fan-content').fadeIn("slow"); //once content is loaded, fade the div back in
			});

			if ((id.match('stories')) || (id.match('poetry'))) {
			$('.jScrollPaneContainer').css('width','464px');
			} else {
			$('.jScrollPaneContainer').width('630px');
			}

		}
		/* END AJAX LOAD PHOTOS PAGE FUNCTION */


		/* THIS FUNCTION LOADS PAGE CONTENT INTO THE #SHOWS-CONTENT DIV WHEN CALLED */
		function load_shows (id, content) {
			jQuery('#shows-content').fadeOut("slow"); //fades out the div
			jQuery('#loading').fadeIn("fast");
			jQuery('#shows-content').load(content, function() { //loads the content passed in the variable
		 		jQuery('#loading').fadeOut("fast");
				jQuery('#shows-content').fadeIn("slow", function(){shows_page();}); //once content is loaded, fade the div back in
			});
			window.location.hash = id; //add the #%category% to the url in the browser address bar for permalinking
		}
		/* END AJAX LOAD SHOWS PAGE FUNCTION */
