$(document).ready(function(){	
	
	/**
	 * FORM
	 */   	
	
	$(".radio").click(function () {
    $(".radio").removeClass("on").removeClass("on");
    $(this).addClass("on");
    var text = $(this).attr("alt");
    $("#input_subject").val(text);
  });
  
  $(".radio").mouseover(function() {
    $(this).not(".on").addClass("active");
  });
  
  $(".radio").mouseout(function() {
    $(this).removeClass("active");
  });
  

  /**
   * HOSTING
   */     
  
  $('.div_title').click(function(event) {
    event.preventDefault();
    $( '#func_' + $(this).attr('id') ).slideToggle();
  });
  
  /**
   * SLIDESHOW
   */     
	
	$('#div_slideshow') .cycle({
     // fade, scrollUp, shuffle ...
	  fx: 'fade',
	  timeout: 5000,
	  pager:  '#div_controls'
	});
	
  $("#div_newsletter .email").bind("focus",function() {
    if(this.value=="newsletter@escolhadigital.com")
      this.value="";
  });
  
  $("#div_newsletter .email").bind("blur",function() {
    if(this.value=="")
      this.value="newsletter@escolhadigital.com";
  });
  
	//Caption Sliding (Partially Hidden to Visible)
	$('.client').hover(function(){
		$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'110px'},{queue:false,duration:160});
	});
	
	/*$('.auto-submit-star').rating({
    callback: function(value, link){
      alert(value);
    }
  });*/

	
});	