jQuery.fn.loadthumb=function(c){c=$.extend({src:"",fun:function(){}},c);var a=this;a.hide();var b=new Image();$(b).load(function(){a.attr("src",c.src);c.fun(a)}).attr("src",c.src);return a};var common={addBookmark:function(){var a=parent.location.href;if(window.sidebar){window.sidebar.addPanel(document.title,a,"")}else{if(document.all){window.external.AddFavorite(a,document.title)}else{if(window.opera&&window.print){return true}}}},setHome:function(c,d){try{c.style.behavior="url(#default#homepage)";c.setHomePage(d)}catch(b){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(b){alert('"\u93b6\u8fa8\u74d1\u951b\u4f79\u504d\u9428\u52ec\u797b\u7459\u581d\u6ad2\u6d93\u5d86\u656e\u93b8\u4f7a\u6d3f\u93ba\u30e8\ue195\u6d93\u6d2a\ue6fb\u6924\u70b9\ufffd\u509d\ue1ec\u9366\u3126\u797b\u7459\u581d\u6ad2\u9366\u677f\u6f43\u93cd\u5fda\u7ded\u934f\ufffd"about:config"\u9a9e\u8dfa\u6d16\u675e\ufe3e\u52a7\u935a\u5ea1\u76a2[signed.applets.codebase_principal_support]\u7481\u5267\u7586\u6d93\ufffd"true"\u951b\u5c80\u5063\u9351\ufffd"\u9354\u72b2\u53c6\u93c0\u60f0\u68cc"\u935a\u5ea1\u62f7\u9423\u30e5\u7568\u934f\u3126\u5f41\u7ec0\u7334\u7d1d\u9357\u51b2\u5f72\u7481\u5267\u7586\u93b4\u612c\u59db\u9286\ufffd"')}var a=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);a.setCharPref("browser.startup.homepage",d)}}},lightbox:function(){$.getScript(webpath+"js/jquery.include.js",function(){var a=[webpath+"css/jquery.lightbox-0.5.css",webpath+"js/jquery.lightbox-0.5.pack.js"];$.include(a,function(){if($(".lightbox img").size()>0){var b=$(".lightbox").attr("maxwidth");$(".lightbox img").width()>b?$(".lightbox img").width(b):$(".lightbox img").width($(".lightbox img").width());$(".lightbox img").css("cursor","pointer").lightBox()}})})},resize:function(){if($(".h-v-resize").size()>0){$(".h-v-resize").each(function(){var d=$(this).attr("maxwidth");var b=$(this).attr("maxheight");var a=$(this).attr("mtop");var c=$(this).attr("mleft");$("img.resize",this).each(function(){$(this).loadthumb({src:$(this).attr("rel"),fun:function(e){if(e.width()>d||e.height()>b){e.width()>e.height()?e.width(d):e.height(b)}if(e.height()<b){e.css("margin",((b-e.height())/2+parseInt(a))+"px "+c+"px").fadeIn("slow")}else{e.css("margin",a+"px "+c+"px").fadeIn("slow")}}})})})}},cycle:function(){if($(".banner").size()>0){$(".banner").cycle({fx:"fade"})}}};common.resize();$(function(){common.resize();common.cycle();$(".items img").each(function(){$(this).click(function(){$(".gallery-vertical-output img").attr("src",$(this).attr("src"));$(".gallery-vertical-output a").attr("href",$(this).attr("src"));if($(".gallery-vertical-output img").width()>390||$(".gallery-vertical-output img").height()>390){$(".gallery-vertical-output img").width()>$(".gallery-vertical-output img").height()?$(".gallery-vertical-output img").width(390):$(".gallery-vertical-output img").height(390)}if($(".gallery-vertical-output img").height()<390){$(".gallery-vertical-output img").css("margin",(390-$(".gallery-vertical-output img").height())/2+5+"px auto")}})})});

