;(function($){ $.fn.banners = function(options){ return $(this).each(function(){ var i=0, n=0, count=0, isHover=false, timer; var opt = $.extend({'sec':5000}, options); var $obj = $(this); function replay(){ if(isHover) return; if(n>=count-1) n=0; else n++; $obj.children('a').fadeOut(3000).eq(n).fadeIn(2000); if(count>1) timer=setTimeout(replay, opt.sec+2000); } $obj.css({'position':'relative','overflow':'hidden'}).children('a').css({'position':'absolute','left':'0','top':'0'}); count = $obj.children('a').children('img').size(); $obj.children('a:gt(0)').hide(); if(count>1) timer=setTimeout(replay, opt.sec); $obj.hover(function(){ isHover=true; clearTimeout(timer);}, function(){ isHover=false; if(count>1) timer=setTimeout(replay, opt.sec);}); }); }; $.fn.neonlight = function(options){ return $(this).each(function(){ var opt = $.extend({'sec':500, 'color1':'#FFF', 'color2':'#FFF100', 'state':1}, options); var obj = $(this); function replay(){ opt.state = (opt.state==0)? 1:0; if(opt.state==0) obj.css({'color':opt.color1}); else obj.css({'color':opt.color2}); setTimeout(replay, opt.sec); } $(function(){ replay(); }); }); }; $.fn.defaulttext = function(options){ return $(this).each(function(){ var $opt = $.extend({'text':'', 'color1':'#CCC', 'color2':'#000'}, options); var $obj = $(this); $obj.val($opt.text).css({'color':$opt.color1}); $obj.focus(function(){ if($obj.val()==$opt.text) $obj.val('').css({'color':$opt.color2}); }).blur(function(){ if($obj.val()=='') $obj.css({'color':$opt.color1}).val($opt.text); }); }); }; })(jQuery); function set_homepage(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 add_favorite(sURL, sTitle){ if(document.all){ window.external.addFavorite(sURL, sTitle); }else{ window.sidebar.addPanel(sTitle, sURL, ""); } } function QueryString(name){ var AllVars = window.location.search.substring(1); var Vars = AllVars.split("&"); for(i = 0; i < Vars.length; i++){ var Var = Vars[i].split("="); if (Var[0] == name) return Var[1]; } return ''; } function textbox_chcontains(obj, def){ $(obj).css({'color':'#CCC'}).val(def); $(obj).focus(function(){$(this).css({'color':'#666'}); if($(this).val()==def) $(this).val('');}).blur(function(){$(this).css({'color':'#CCC'}); if($(this).val()=='') $(this).val(def);}); } function fullscreen(url){ window.open(url,'_self','toolbar=no,menubar=no,location=no,status=no,fullscreen=yes'); } function dump(arr,level){ var dumped_text = ""; if(!level) level = 0; var level_padding = ""; for(var j=0;j \"" + value + "\"\n"; } } }else{ dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; } return dumped_text; } function reset_ck(obj){ $('#'+obj).attr('src','kcaptcha/?PHPSESSID=1e264bd8de1ecc0d6c2191d088a65438&ckn='+obj+'&rnd='+Math.random()); } function resetbg(){ $('#body').height($(window).height()-90); if(QueryString('i')=='6'){ $('#body #main').css({'width':$(window).width()-300,'height':$(window).height()-160}); if($(window).width()<900) $('#media iframe').css({'width':'100%'}); else $('#media iframe').css({'width':'640px'}); }else if(QueryString('i')=='7'){ $('#body #main').css({'width':$(window).width()-300,'height':$(window).height()-160}); $('#gmap').attr('height',$(window).height()-400); }else{ $('#body #main').css({'width':$(window).width()-450,'height':$(window).height()-160}); $('#members_box').css({'height':$(window).height()-180}); } } $(function(){ $.ajaxSetup({ cache: false }); $('body').prepend(''); $('a,input[type="button"],input[type="submit"]').bind('focus',function(){if(this.blur){this.blur();};}); $('.img_hover').hover(function(){$(this).attr('src',$(this).attr('src').replace('out','over'));}, function(){$(this).attr('src',$(this).attr('src').replace('over','out'));}); $('#share_box li, #menu li').hover(function(){ $(this).css({'border-bottom':'2px #FFF solid'}).children('a').stop(true,true).hide().text($(this).children('a').attr('title')).fadeIn(500); }, function(){ $(this).css({'border-bottom':'2px #CCC solid'}).children('a').stop().hide().text($(this).children('a').attr('alt')).fadeIn(500); }); if(QueryString('i')!='4') $('#menu_sub li').hover(function(){ $(this).css({'border':'1px #FFF solid'}).children('a').stop(true,true).hide().text($(this).children('a').attr('title')).stop(true,true).fadeIn(500); }, function(){ $(this).css({'border':'1px #CCC solid'}).children('a').stop().hide().text($(this).children('a').attr('alt')).stop().fadeIn(500); }); $(".fancybox_iframe").fancybox({width:'90%', height:'90%', autoSize: false, type:'iframe'}); $('#share_box li:eq(1)').hover(function(){ $(this).children('div').stop(true,true).slideDown(); }, function(){ $(this).children('div').delay(1000).slideUp(); }); $(window).resize(function(){ resetbg(); }); $(window).load(function(){ $('#nowloadding, #nowloadding_notice').fadeOut(500); }); });