/*
 * jquery.totop v1.0
 * jQuery scroller to the top of page
 * http://www.tadaki-sys.jp/
 *
 * Copyright (c) 2010 Toshihide Tadaki
 *
 * Licensed under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Date: 28th June, 2010
 * Version : 1.1
 */ 

(function($){
  $.fn.totop = function(options) {
    //Extend the default options of plugin
    var opt = $.extend({}, $.fn.totop.defaults, options);

    return this.each(function() {
      $(this).click(function() {
        $(this).blur();
        $($.browser.opera ? document.compatMode == 'BackCompat' ? 'body' : 'html' :'html,body').animate({scrollTop: 0 }, opt.speed);
      });
    });
  }

  // default value of options
  $.fn.totop.defaults = {
    speed:'normal'  // scroll speed
  }
})(jQuery);


