/*
  Auto-Fill function accepts id of input and fills it with the given value.
  Written by Joe Sak http://www.joesak.com/2008/11/19/a-jquery-function-to-auto-fill-input-fields-and-clear-them-on-click/
  JP 17/03/2009 changed $ references to jQuery
*/
function autoFill(id, v){
    jQuery(id).css({ color: "#999" }).attr({ value: v }).focus(function(){
        if(jQuery(this).val()==v){
            jQuery(this).val("").css({ color: "black" });
        }
    }).blur(function(){
        if(jQuery(this).val()==""){
            jQuery(this).css({ color: "#999" }).val(v);
        }
    });
}

/*
  Set up behaviours
*/
jQuery(document).ready(function($){
  // input prompts
  autoFill("#username", "Login");
  autoFill("#password", "Password");
});

