$(document).ready(function(){

	// STAY TUNED SHIFTING EFFECT
	$('ul#staytuned li').mouseover(function() {
		$(this).animate( { paddingLeft:"6px" }, { queue:false, duration:300 });
		
	}).mouseout(function() {
		$(this).animate( { paddingLeft:"0" }, { queue:false, duration:300 });
		
	}).click(function() {
		$(this).animate( { }, { queue:false, duration:300 }); // This is useless, take it off
		
	});
	
	// PROCESS INFO BUBBLES
	$("#smallsteps a").hover(function() {
		$(this).next("div").animate({opacity: "show", top: "100"}, "slow");
	}, function() {
		$(this).next("div").animate({opacity: "hide", top: "110"}, "fast");
	});
	
	// SMALLSTEPS BG
	$('input#show2').click(function() {
		if ($('input#show2:checked').length <=0 ) // The <=0 makes the checking on/off work properly with jqtransform (which styles the element)
		{	
        	$("ul#smallsteps").css("background", "url(http://stylozero.com/site/wp-content/themes/stylozero/images/smallsteps-bg.png) no-repeat 5px 34px");
    	}
    	else
    	{
        	$("ul#smallsteps").css("background", "none");
  		}
	});
	
	// FAQ ACCORDION
	$("#faq p:not(:first)").hide();
		
	$("#faq h3").click(function(){
		$(this).next("p").slideToggle("slow")
		.siblings("p:visible").slideUp("slow");
		$(this).toggleClass("active");
	});
	
	// FIELDS: TEXT DISAPPEARING WHEN CLICKED
	/**
	 * Written by Rob Schmitt, The Web Developer's Blog
	 * http://webdeveloper.beforeseven.com/
	 */
	
	/**
	 * The following variables may be adjusted
	 */
	var active_color = '#666'; // Colour of user provided text
	var inactive_color = '#ccc'; // Colour of default text
	
	/**
	* No need to modify anything below this line
	*/
	
	  $("input.default-value, textarea.default-value, input#search-input").css("color", inactive_color);
	  var default_values = new Array();
	  $("input.default-value, textarea.default-value, input#search-input").focus(function() {
	    if (!default_values[this.id]) {
	      default_values[this.id] = this.value;
	    }
	    if (this.value == default_values[this.id]) {
	      this.value = '';
	      this.style.color = active_color;
	    }
	    $(this).blur(function() {
	      if (this.value == '') {
	        this.style.color = inactive_color;
	        this.value = default_values[this.id];
	      }
	    });
	  });
	
});
