
if (top.location !== self.location) {
top.location=self.location;
}
;(function($){
$.fn.extend({
   Scroll:function(opt,callback){
    //参数初始化
    if(!opt) var opt={};
    var _this=this.eq(0).find("ul:first");
    var lineH=_this.find("li:first").height(), //获取行高
     line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数，默认为一屏，即父容器高度
     speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度，数值越大，速度越慢（毫秒）
     timer=opt.timer?parseInt(opt.timer,10):5000; //滚动的时间间隔（毫秒）
     if(line==0) line=1;
     var upHeight=0-line*lineH;
     //滚动函数
     scrollUp=function(){
      _this.animate({
       marginTop:upHeight
      },speed,function(){
       for(i=1;i<=line;i++){
        _this.find("li:first").appendTo(_this);
       }
       _this.css({marginTop:0});
      });
     }
     //鼠标事件绑定
     var timerID;
     timerID=setInterval("scrollUp()",timer);
     _this.mouseover(function(){
      clearInterval(timerID);    
     }).mouseout(function(){
      timerID=setInterval("scrollUp()",timer);
     });
   }
})
})(jQuery);

;(function($){
$.fn.extend({
   zjScroll:function(opt,callback){
    //参数初始化
    if(!opt) var opt={};
    var _this=this.eq(0).find("ul:first");
    var lineH=_this.find("li:first").height(), //获取行高
     line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数，默认为一屏，即父容器高度
     speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度，数值越大，速度越慢（毫秒）
     timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔（毫秒）
     if(line==0) line=1;
     var upHeight=0-line*lineH;
     //滚动函数
     zjscrollUp=function(){
      _this.animate({
       marginTop:upHeight
      },speed,function(){
       for(i=1;i<=line;i++){
        _this.find("li:first").appendTo(_this);
       }
       _this.css({marginTop:0});
      });
     }
     //鼠标事件绑定
     var timerID;
     timerID=setInterval("zjscrollUp()",timer);
     _this.mouseover(function(){
      clearInterval(timerID);    
     }).mouseout(function(){
      timerID=setInterval("zjscrollUp()",timer);
     });
   }
})
})(jQuery);

;(function($){
$.fn.extend({
   moneyScroll:function(opt,callback){
    //参数初始化
    if(!opt) var opt={};
    var _this=this.eq(0).find("ul:first");
    var lineH=_this.find("li:first").height(), //获取行高
     line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数，默认为一屏，即父容器高度
     speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度，数值越大，速度越慢（毫秒）
     timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔（毫秒）
     if(line==0) line=1;
     var upHeight=0-line*lineH;
     //滚动函数
     moneyscrollUp=function(){
      _this.animate({
       marginTop:upHeight
      },speed,function(){
       for(i=1;i<=line;i++){
        _this.find("li:first").appendTo(_this);
       }
       _this.css({marginTop:0});
      });
     }
     //鼠标事件绑定
     var timerID;
     timerID=setInterval("moneyscrollUp()",timer);
     _this.mouseover(function(){
      clearInterval(timerID);    
     }).mouseout(function(){
      timerID=setInterval("moneyscrollUp()",timer);
     });
   }
})
})(jQuery);

function bookmark(){
var title=document.title
var url=document.location.href
if (window.sidebar) window.sidebar.addPanel(title, url,"");
else if( window.opera && window.print ){
var mbm = document.createElement('a');
mbm.setAttribute('rel','sidebar');
mbm.setAttribute('href',url);
mbm.setAttribute('title',title);
mbm.click();}
else if( document.all ) window.external.AddFavorite( url, title);
}


function setHomepage(url)
{
    if (document.all){
        document.body.style.behavior='url(#default#homepage)';
        document.body.setHomePage(url);
    }else if (window.sidebar){
        if(window.netscape){
            try{
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            }catch (e){
                alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );
            }
        }
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
        prefs.setCharPref('browser.startup.homepage',url);
    }
}

  
function mywindowopen(owurl){ 
var tmp=window.open("about:blank","","fullscreen=1") 
tmp.moveTo(0,0) 
tmp.resizeTo(screen.width+20,screen.height) 
tmp.focus() 
tmp.location=owurl 
} 
function getfize(n)
{
$('.wtext').css("font-size", n+"px");	
}
function getcolor(v)
{
$('.wtext').css("color", v);
}
function sendtourl(n)
{
if(n==1)
{
	mywindowopen("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+window.escape(document.location.href));
	return false;
}
if(n==2)
{
mywindowopen("http://v.t.sina.com.cn/share/share.php?title="+encodeURI(document.title)+"&url="+window.escape(document.location.href)+"&appkey=462660712&source=bookmark");
	return false;
}
if(n==3)
{
	
	mywindowopen("http://v.t.qq.com/share/share.php?title="+encodeURI(document.title)+"&url="+window.escape(document.location.href)+"&appkey=&site="+window.escape('http://www.ltxjob.com')+"&pic=");
	return false;
}
if(n==4)
{
	mywindowopen("http://share.renren.com/share/buttonshare.do?link="+window.escape(document.location.href)+"&title="+encodeURI(document.title)+"")
	return false;
}
if(n==5)
{
	mywindowopen("http://t.163.com/article/user/checkLogin.do?&info="+encodeURI(document.title)+"+"+window.escape(document.location.href)+"");
	return false;
}
if(n==6)
{
	mywindowopen("http://t.sohu.com/third/post.jsp?url="+window.escape('http://www.ltxjob.com/')+"&title="+document.title+"+"+window.escape(document.location.href)+"");
	return false;
	
}
if(n==7)
{
	mywindowopen("http://apps.hi.baidu.com/share/?url="+window.escape(document.location.href)+"&title="+encodeURI(document.title)+"");
	return false;
}
if(n==8)
{
	mywindowopen("http://www.jiathis.com/smail/?url="+window.escape(document.location.href)+"&title="+encodeURI(document.title)+"");
	return false;
}
}
var ee;
function clogin_div(str)
{
	ee=$('<p class="loginfdtext"><img src="/Images/ajax-loader.gif" /><br>'+str+'</p>')
	$(ee).css({"top":($(window).height()/2),"left":($(document).width()/2-150)})
	$('body').append($(ee));
}
