
/*-- Index page Top js Code--*/
    $(document).ready(function () {
        setOver();
        $(window).resize(function(){
            setOver() ;
        });
    });
    function setOver() {
        var _height=0;
        var _length = ($(document).width() - 1004) / 2 - $("#top_left").width()-50;
        var _bottom=(screen.height-100)/2;
        $("#top_up").css({ "right": _length + "px", "bottom": _bottom + "px"});
        $("#top_down").css({ "right": _length + "px","bottom": _bottom-39 + "px" });
        $(window).scroll(function () {
            if ($(window).scrollTop() > 0) {
                $("#top_up").show();
                $("#top_down").show();
            } else {
                $("#top_up").hide();
                $("#top_down").hide();
            }
            _height=$(document).height()-window.screen.height-800;
        });
        $("#top_up").click(function(){
	        $("html").animate({"scrollTop": "0px"},{queue:false, duration:1,easing:"quintEaseIn"}); //IE,FF
	        $("body").animate({"scrollTop": "0px"},{queue:false, duration:1,easing:"quintEaseIn"}); //Webkit
        });
        $("#top_down").click(function(){
      	    $("html").animate({"scrollTop": _height},{queue:false, duration:1,easing:"quintEaseIn"}); //IE,FF
	        $("body").animate({"scrollTop": _height},{queue:false, duration:1,easing:"quintEaseIn"}); //Webkit
        });
    }		
/*FREE DOWNLOAD HOVER */	
$(document).ready(function(){
	$(".boxbutton").hover(function(){
		$(this).text("下载");
	},function(){
		$(this).text("免费");
	});
	var _text=$(".detaipage_bt").text();
	$(".detaipage_bt").hover(function(){
		$(this).text("下载");
	},function(){
		$(this).text(_text);
	});
	
	$(".hot_freebt").hover(function(){
		$(this).text("下载");
	},function(){
		$(this).text("免费");
	});
	var _text=$(".detaipage_bt").text();
	$(".detaipage_bt").hover(function(){
		$(this).text("下载");
	},function(){
		$(this).text(_text);
	});
	var newdetail_text="";
	$(".newdetail_freebt").hover(function(){
		newdetail_text=$(this).text();
		$(this).text("下载");
	},function(){
		$(this).text(newdetail_text);
	});
});	
$(document).ready(function(){
	/*LOGIN AND REGISTERITION TIPS*/
	$(".update_loginarea div a").click(function(){
		alert("抱歉！能助手官方网站注册和登录功能暂未开通，请下载能助手客户端进行注册和登录。更多、更好玩的应用和游戏等着你哦！");
	});
	/*ONCLICK SEARCHFIELD*/
	$("#textfield").click(function(){
		$(this).attr("value","");
	});
})
			
