jQuery(function($){
  /* Top nav Rounded */
  $(".search").corner("4px #383e55");
  $(".inputbg").corner("4px #383e55");

  /* Input Fields */
  $(".input, select").each(function(){
    $(this)
    .bind("focus", function(event){
      $(event.target).css('background', "#FAF9E5");
    })
    .bind("blur", function(event){
      $(event.target).css('background', "#F6F6F6");
    });
  });

  $("#submit")
    .bind('mouseover', function(event){
      $(event.target).addClass('searchsubmit-buttonover');
    })
    .bind('mouseout', function(event){
      $(event.target).removeClass('searchsubmit-buttonover');
    });

  $(".default_text")
    .focus(function(event){
      if(this.value == this.defaultValue) {
        this.value = "";
      }
    })
    .blur(function(event){
      if(this.value == "") {
        this.value = this.defaultValue;
      }
    });


  /* Index page */
  $("#search_form .input").each(function(){
    $(this)
    .bind("focus", function(event){
      $(event.target).css('background', "#b6e9a4");
      $(event.target).css('font-weight', "bold");
      $(event.target).css('color', "#343a50");

    })
    .bind("blur", function(event){
      $(event.target).css('background', "#515976");
      $(event.target).css('font-weight', "normal");
      $(event.target).css('color', "#cad5ff");
    });
  });
});
