/*-----------------------
* jQuery Plugin: Scroll to Top
* by Craig Wilson, Ph.Creative http://www.ph-creative.com
* 
* Copyright (c) 2009 Ph.Creative Ltd.
* Licensed under the MIT License http://www.opensource.org/licenses/mit-license.php
*
* 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-v3.aspx
* 
* Version: 3.0, 29/10/2009
-----------------------*/
var JT = jQuery.noConflict();
JT(document).ready(function(){ //instead of JT(function() {
	if(JT(this).scrollTop()!="0"){ JT("#toTop").fadeIn("slow"); }
	JT("#toTop").hide().removeAttr("href");
    if (JT(window).scrollTop()!="0"){ JT("#toTop").fadeIn("slow"); }    
    JT(window).scroll(function(){
        if (JT(window).scrollTop()=="0"){ 
            JT("#toTop").fadeOut("slow");
        } else {
            JT("#toTop").fadeIn("slow");
        }
    });
    JT("#toTop").click(function(){ JT("html, body").animate({ scrollTop: 0 }, "slow"); });
});
