﻿$(document).ready(function(){
  $("#respond").addClass("collapsed");
  $("#comment").click(function(){
    $(this).animate({height: "100"},"fast");
    $(".cf-remaining").fadeIn("slow");
    $(".cf-remaining").removeClass("cf-remaining")
    return false;
  });
  
  // Subnav menus
	$("ul.children").parent().addClass("has-subnav");
	$("li.has-subnav").hover(function() {
		$(this).find("ul.children").fadeIn('fast');
	}, function() {
    $(this).find("ul.children").fadeOut('fast');
	});
	
	
	// Select text in textarea
  $("#fdbuttoncode").focus(function() {
      $this = $(this);
      $this.select();

      // Work around Chrome's little problem
      $this.mouseup(function() {
          // Prevent further mouseup intervention
          $this.unbind("mouseup");
          return false;
      });
  });
  
});

