//animate van
$(window).bind("load", function() {
$('#van').animate({
        left: '130%'
      }, 18000, function() {
    });
});

//accordian lanuch
$().ready(function() {
	$('#site_container .accordion').kwicks({
	min : 46,
	spacing : 0,
	duration: 800,
	sticky : true
	});					
});

//slider launch
function formatText(index, panel) {
return index + "";
}
$(function () {       
$('.slider').slider({
	easing: "swing",       			// Anything other than "linear" or "swing" requires the easing plugin
	autoPlay: true,                // This turns off the entire FUNCTIONALY, not just if it starts running or not.
	delay: 4000,                    // How long between slide transitions in AutoPlay mode
	startStopped: false,            // If autoPlay is on, this can force it to start stopped
	animationTime: 700,             // How long the slide transition takes
	hashTags: false,                // Should links change the hashtag in the URL?
	buildNavigation: true,         // If true, builds and list of anchor links to link to each slide
	pauseOnHover: false,             // If true, and autoPlay is enabled, the show will pause on hover
	startText: "Go",             	// Start text
	stopText: "Stop",               // Stop text
	navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
	});
            
$("#slide-jump").click(function(){
$('.slider').slider(6);
});     
});

$(document).ready(function(){
	
	//MAILING LIST BACKGROUND RESTORES
	$("#namefield_mailing_list").focus(
			function() {
			$(this).css({backgroundImage:"none"});
		}
	);
	$("#namefield_mailing_list").blur(
		function() {
			if (this.value == '') {
			$(this).css("background-image", "url(images/namefield.png)");  
			}
		}
	);
	
	//restore the background image if left empty - Email
	$("#emailfield_mailing_list").focus(
			function() {
			$(this).css({backgroundImage:"none"});
		}
	);
	$("#emailfield_mailing_list").blur(
		function() {
			if (this.value == '') {
			$(this).css("background-image", "url(images/emailfield.png)");  
			}
		}
	);
	
	//BUTTON ANIMATIONS
	//home
	$("#home_text").mouseover(function() {
	  $('#home_text').css("backgroundPosition", "10px -17px");
	  $(this).stop().animate(
			{backgroundPosition:"(10px 7px)"}, 
			{easing:'easeOutBounce', duration:400})
		}
	)
	
	//shows
	$("#shows_text").mouseover(function() {
	  $('#shows_text').css("backgroundPosition", "10px -17px");
	  $(this).stop().animate(
			{backgroundPosition:"(10px 7px)"}, 
			{easing:'easeOutBounce', duration:400})
		}
	)
	
	//about
	$("#about_text").mouseover(function() {
	  $('#about_text').css("backgroundPosition", "10px -17px");
	  $(this).stop().animate(
			{backgroundPosition:"(10px 7px)"}, 
			{easing:'easeOutBounce', duration:400})
		}
	)
	
	//contact
	$("#contact_text").mouseover(function() {
	  $('#contact_text').css("backgroundPosition", "10px -17px");
	  $(this).stop().animate(
			{backgroundPosition:"(10px 7px)"}, 
			{easing:'easeOutBounce', duration:400})
		}
	)
	
	//tickets
	$("#tickets_text").mouseover(function() {
	  $('#tickets_text').css("backgroundPosition", "10px -17px");
	  $(this).stop().animate(
			{backgroundPosition:"(10px 7px)"}, 
			{easing:'easeOutBounce', duration:400})
		}
	)     
});
