// jFav, JQuery plugin
// v 1.0 
// SAFARI & CHROME not Supported!
// Licensed under GPL licenses.
// Copyright (C) 2008 Nikos "DuMmWiaM" Kontis, info@dummwiam.com
// http://www.DuMmWiaM.com/EffectChain
// ----------------------------------------------------------------------------
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){$.8.9=7(d){g e=$.v({},$.8.9.k,d);g f=e.l;2.w(7(){5(!$(2).3(\'4\')||$(2).3(\'4\')=="#"){$(2).3(\'4\',j.x.4)}5(!$(2).3(\'6\')){$(2).3(\'6\',y.6)}5($.h.z){$(2).3(\'m\',$(2).3(\'4\')).3(\'4\',\'\').3(\'4\',\'A:B(0)\').3(\'C\',\'$.8.9.n(2,"\'+$(2).3(\'6\')+\'","\'+$(2).3(\'m\')+\'")\')}i{$(2).o(p)}});7 p(a){g b=$(2).3(\'4\');g c=$(2).3(\'6\');b=b.E("q:///","F://q/");5($.h.G){j.H.I(b,c)}i 5($.h.J){j.r.K(c,b,\'\')}i 5(L.M.N().O(\'P\')>-1){s(f)}i 5($.h.Q){s(f)}a.R()};t 2};$.8.9.k={l:\'S "T + D" U "V + D" W X, u Y 2 Z u 10 11.\'};$.8.9.n=7(e,a,b){e.12="r";e.6=a;e.4="";e.4=b;e.o();t 13}})(14);',62,67,'||this|attr|href|if|title|function|fn|jFav|||||||var|browser|else|window|defaults|msg|link|OperaBookmark|click|addToFavorites|file|sidebar|alert|return|to|extend|each|location|document|opera|javascript|void|onClick||replace|http|msie|external|AddFavorite|mozilla|addPanel|navigator|userAgent|toLowerCase|indexOf|chrome|safari|preventDefault|Press|Ctrl|or|CMD|for|MAC|add|page|your|bookmarks|rel|false|jQuery'.split('|'),0,{}))

/**
* Set Homepage Link plugin
* Copyright (c) 2009 Bibby Chung
* Blog: http://bibby.be
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* just for ie and firefox
*/
jQuery.extend({
setHomepage: function(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) {
   var strTemp = '';
   strTemp += "您的浏览器禁用了这个功能, 如果您想开启这个功能, 请在地址栏里输入 about:config , ";
   strTemp += "然后把 signed.applets.codebase_principal_support 的值改为 true .";
   alert(strTemp);
  }
 }
 var prefs = Components.classes['@mozilla.org/preferences-service;1']
     .getService(Components.interfaces.nsIPrefBranch);
 prefs.setCharPref('browser.startup.homepage', url);
}
}
});

// set Font Size
// ----------------------------------------------------------------------------
function setFontSize(size){
	try{
		var b = document.getElementsByTagName("body")[0];
		if(b){
			b.style.fontSize = size +"%";
		}
	}catch(e){}
}

//jQuery Simple Drop Down Menu v0.25
//form http://javascript-array.com/scripts/jquery_simple_drop_down_menu/
//------------------------------------------------------------------------------
var timeout			= 200;
var closetimer	= 0;
var ddmenuitem	= 0;

function jsddm_open(){
	jsddm_canceltimer();
	jsddm_close();
	ddmenuitem = $(this).find('ul').eq(0).css('visibility', 'visible');
	ddmenutitle = $(this).find('a').eq(0).addClass('current');
	}

function jsddm_close(){
	if(ddmenuitem){
		ddmenuitem.css('visibility', 'hidden');
		ddmenutitle.removeClass('current');
	}
	}

function jsddm_timer(){
	closetimer = window.setTimeout(jsddm_close, timeout);
	}

function jsddm_canceltimer(){
	if(closetimer){
		window.clearTimeout(closetimer);
		closetimer = null;
		}
	}

$(document).ready(function(){
	$('#dropmenu > li').bind('mouseover', jsddm_open);
	$('#dropmenu > li').bind('mouseout',  jsddm_timer);
	});

document.onclick = jsddm_close;

// Tabs
//------------------------------------------------------------------------------
function tab_Switch(){
    $(".tabs dt a").mouseover(function(){
        if (!$(this).hasClass("current")){
            $(this).parent().parent().children("dt").children("a").removeClass("current");
						$(this).parent().parent().children("dd").hide();

						$(this).addClass("current");
            var dd = this.parentNode.nextSibling;
            do {
                if (dd.tagName){
                    $(dd).show();
                    break;
                }
                dd = dd.nextSibling;
            }while(dd);
        }
        return false;
    });
};
$(document).ready(function(){
	tab_Switch();
});
