/*-----------------------
* jQuery Plugin: Scroll to Top
* by Craig Wilson, Ph.Creative (http://www.ph-creative.com)
* 
* Copyright (c) 2009 Ph.Creative Ltd.
* Description: Adds an unobtrusive "Scroll to Top" link to your page with smooth scrolling.
* For usage instructions and version updates to go http://blog.ph-creative.com/post/jquery-plugin-scroll-to-top-v2.aspx
* 
* Version: 2.0, 22/06/2009
-----------------------*/
jQuery(function(){jQuery.fn.scrollToTop=function(options){if(options){var speed=options.speed;var ease=options.ease;}else{var speed="slow";var ease="jswing";}var scrollDiv=jQuery(this);jQuery(this).hide().removeAttr("href");if(jQuery(window).scrollTop()!="0"){jQuery(this).fadeIn("slow");}jQuery(window).scroll(function(){if(jQuery(window).scrollTop()=="0"){jQuery(scrollDiv).fadeOut("slow");}else{jQuery(scrollDiv).fadeIn("slow");}});jQuery(this).click(function(event){jQuery("html, body").animate({scrollTop:"0px"},speed,ease);});}});
