/* by heavensn qq��45325970 */ //��վ����ư��ч�� lastscrolly = 0; function floatscroll() { var diffy; if (document.documentelement && document.documentelement.scrolltop){ diffy = document.documentelement.scrolltop; } else if (document.body){ diffy = document.body.scrolltop; } else {} percent = .1 * (diffy - lastscrolly); if (percent > 0){ percent = math.ceil(percent); } else{ percent = math.floor(percent); } document.getelementbyid("divqqbox1").style.top = parseint(document.getelementbyid("divqqbox1").style.top) + percent + "px"; lastscrolly = lastscrolly + percent; } $(function(){ //��վ����չ��ч�� $("#divqqbox1").hover( function(){ $(this).stop(true,false); $(this).animate({left:0},300); $("#onlinebtn1").addclass ("noshow"); }, function(){$("#onlinebtn1").removeclass ("noshow"); $(this).animate({left:-180},300); } ) //�������� $("#select_info_typeid").live('click', function(){ $("#options_typeid").stop(true,true); $("#options_typeid").slidedown(200); } ) $("#options_typeid li").live('click', function(){ $("#options_typeid").slideup(300); } ) //���ٵ��� $("#navs").hover( function(){ $("#allnav").stop(true,true); $("#allnav").fadein("300"); $(".noset").addclass("ishow"); }, function(){ $("#allnav").fadeout("300"); $(".noset").removeclass("ishow"); } ) }) $(function(){ $(".ihover").live('mouseover',function(){$(this).addclass("ishow")}); $(".ihover").live('mouseout',function(){$(this).removeclass("ishow")}); }); //�����ղ�&������ҳ function addcookie(url, name) {�� if (document.all) { window.external.addfavorite(url, name) } else if (window.sidebar) {��window.sidebar.addpanel(name, url, "") } } 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) } } //������� jquery.fn.listshow = function(showtime,animatetime,last,obj){ //�����ֱ�ϊ����ʾ�ٶȡ����䶯���ٶȡ�ÿ������Ԫ������������Ԫ�� var list = jquery(this); var lilength = list.find(obj).length; var lipage = 0; if(last>0){ list.find(obj+':nth-child('+last+'n+'+last+')').addclass('last'); } list.find(obj).css({ visibility:'hidden' }); interval = setinterval(ishow,showtime); function ishow(){ var n = lipage-1; if(lipage>lilength){ clearinterval(interval); } lipageclickold(list.find(obj+':eq('+(n)+')'),1); lipage++; } function lipageclickold(obj,diaphaneity){ obj.css({ visibility:'visible', opacity: "0" }); obj.animate({ opacity: diaphaneity },animatetime); } } //title��ϣ��ʾ�� jquery.fn.titleinfobox = function(sitename,siteinfo,obj,opacity,textlast){ //�����ֱ�ϊ����������ʱ��վ���ʊ�ʶ����������ʱ��վ����ʶ��Ԫ�ض��󡢱���͸���ȡ���������ʱ���������ƿ���� var linklist = jquery(this); var info; var imgalt; if(textlast){ linklist.find(obj+'.textlink').appendto(linklist); } linklist.find(obj).each(function(){ $(this).find('a').mouseover(function(e){ info = $(this).attr("title"); if(info!=null ){ imgalt = $(this).find('img:first').attr("alt"); $('body').append('
'); if(sitename === "" && siteinfo ==="" ) { $(this).attr("title",""); $(this).find('img').attr("alt",""); $('#infobox').html(info); }else { var infoarr = new array(); infoarr = info.split("|"); $(this).attr("title",""); $(this).find('img').attr("alt",""); $('#infobox').html(''+sitename+'��'+infoarr[0]+'
'+siteinfo+'��'+infoarr[1]); } $('#infobox').css({ display: 'block', top: (e.pagey+20), left: (e.pagex+10), opacity: '0' }).animate({ opacity: opacity },500); } }).mousemove(function(e){ $('#infobox').css({ top: (e.pagey+20), left: (e.pagex+10) }); }).mouseout(function(e){ $('#infobox').remove(); if(info!=null){ $(this).attr("title",info); } if(imgalt!=null){ $(this).attr("alt",imgalt); } }); }); } //����ͼƭ���ߴ� jquery.fn.maximagessize = function(maxwidth){ var img = jquery(this); //�ж���������ͼ�ҳ���ƿ�������� var appname = navigator.appname.tolowercase(); if (appname.indexof("netscape") == -1) { //ie��opera document.onreadystatechange = function() { if (document.readystate == "complete") { resize(); } } } else { //firefox��chrome window.onload = function() { resize(); } } function resize(){ var oldwidth = img.width(); var oldheight = img.height(); if(oldwidth > maxwidth){ img.animate({ width: maxwidth, height:(maxwidth / oldwidth)*oldheight }); } } } jquery.fn.imgrewidht = function(maxwidth){ var _imgs = jquery(this); var imagewidth = _imgs.width(); if( imagewidth > maxwidth){ _imgs.animate({ width:maxwidth },500); } } //ad8�л� $(function(){ $("a.workshow").hover( function(){ $(this).find("img:eq(1)").stop(true,true); $(this).find("img:eq(1)").fadeout('show'); },function(){ $(this).find("img:eq(1)").fadein('show'); } ) }) //homenavicon $(function(){ $(".navicon li").hover( function(){ $(this).find("span.icon").stop(true,true); $(this).find("span.icon").fadeout(300); },function(){ $(this).find("span.icon").fadein(200); } ) })