/*
 * jQuery Cursor Plugin v 0.1.1
 * http://tsdme.nl/jQuery.html#cursor
 * 
 * Author: Ezra Pool (ezra@tsdme.nl)
 */
 
 /*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <ezra@tsdme.nl> wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return Ezra Pool
 * ----------------------------------------------------------------------------
 */


(function($){  
  $.fn.cursor = function(options) {
    
    var defaults = {  
      over: "pointer",
      out: "default"
    };  
    var options = $.extend(defaults, options);  

    return this.each(function(){  
      $(this).hover(function(){
        switch(options.over){
          case "pointer": 
          case "hand":            
            if(jQuery.browser.msie && jQuery.browser.version < 5.5){
              $(this).css("cursor", "hand");
            }else{
              $(this).css("cursor", "pointer");
            }
            break;
          default:
            $(this).css("cursor", options.over);
            break;
        }
      }, function(){
        switch(options.out){
          case "pointer":
          case "hand":
            if(jQuery.browser.msie && jQuery.browser.version < 5.5){
              $(this).css("cursor", "hand");
            }else{
              $(this).css("cursor", "pointer");
            }
            break;
          default:
            $(this).css("cursor", options.out);
            break;
        }
      });
    });
  };  
})(jQuery);