(function($){
$.ajaxHistory=new function(){
var _2="historyReset";
var _3=location.hash;
var _4=null;
var _5;
this.update=function(){
};
var _6=function(){
$(".remote-output").empty();
};
$(document).bind(_2,_6);
if($.browser.msie){
var _7,_8=false;
$(function(){
_7=$("<iframe style=\"display: none;\"></iframe>").appendTo(document.body).get(0);
var _9=_7.contentWindow.document;
_9.open();
_9.close();
if(_3&&_3!="#"){
_9.location.hash=_3.replace("#","");
}
});
this.update=function(_a){
_3=_a;
var _b=_7.contentWindow.document;
_b.open();
_b.close();
_b.location.hash=_a.replace("#","");
};
_5=function(){
var _c=_7.contentWindow.document;
var _d=_c.location.hash;
if(_d!=_3){
_3=_d;
if(_d&&_d!="#"){
$("a[@href$=\""+_d+"\"]").click();
location.hash=_d;
}else{
if(_8){
location.hash="";
$(document).trigger(_2);
}
}
}
_8=true;
};
}else{
if($.browser.mozilla||$.browser.opera){
this.update=function(_e){
_3=_e;
};
_5=function(){
if(location.hash){
if(_3!=location.hash){
_3=location.hash;
$("a[@href$=\""+_3+"\"]").click();
}
}else{
if(_3){
_3="";
$(document).trigger(_2);
}
}
};
}else{
if($.browser.safari){
var _f,_10,_11;
$(function(){
_f=[];
_f.length=history.length;
_10=[];
});
var _12=false,_8=false;
_11=function(_13){
_f.push(_13);
_10.length=0;
_12=false;
};
this.update=function(_14){
_3=_14;
_11(_3);
};
_5=function(){
var _15=history.length-_f.length;
if(_15){
_12=false;
if(_15<0){
for(var i=0;i<Math.abs(_15);i++){
_10.unshift(_f.pop());
}
}else{
for(var i=0;i<_15;i++){
_f.push(_10.shift());
}
}
var _17=_f[_f.length-1];
$("a[@href$=\""+_17+"\"]").click();
_3=location.hash;
}else{
if(_f[_f.length-1]==undefined&&!_12){
if(document.URL.indexOf("#")>=0){
$("a[@href$=\""+"#"+document.URL.split("#")[1]+"\"]").click();
}else{
if(_8){
$(document).trigger(_2);
}
}
_12=true;
}
}
_8=true;
};
}
}
}
this.initialize=function(_18){
if(typeof _18=="function"){
$(document).unbind(_2,_6).bind(_2,_18);
}
if(location.hash&&typeof _11=="undefined"){
$("a[@href$=\""+location.hash+"\"]").trigger("click");
}
if(_5&&_4==null){
_4=setInterval(_5,200);
}
};
};
$.fn.remote=function(_19,_1a,_1b){
_1b=_1b||function(){
};
if(typeof _1a=="function"){
_1b=_1a;
}
_1a=$.extend({hashPrefix:"remote-"},_1a||{});
var _1c=$(_19).size()&&$(_19)||$("<div></div>").appendTo("body");
_1c.addClass("remote-output");
return this.each(function(i){
var _1e=this.href;
var _1f="#"+(this.title&&this.title.replace(/\s/g,"_")||_1a.hashPrefix+(i+1));
this.href=_1f;
$(this).click(function(e){
if(!_1c["locked"]){
if(e.clientX){
$.ajaxHistory.update(_1f);
}
_1c.load(_1e,function(){
_1c["locked"]=null;
_1b();
});
}
});
});
};
$.fn.history=function(_21){
return this.click(function(e){
if(e.clientX){
$.ajaxHistory.update(this.hash);
}
typeof _21=="function"&&_21();
});
};
})(jQuery);


(function($){
$.extend({tabs:{remoteCount:0}});
$.fn.tabs=function(_2,_3){
if(typeof _2=="object"){
_3=_2;
}
_3=$.extend({initial:(_2&&typeof _2=="number"&&_2>0)?--_2:0,disabled:null,bookmarkable:$.ajaxHistory?true:false,remote:false,spinner:"Loading&#8230;",hashPrefix:"remote-tab-",fxFade:null,fxSlide:null,fxShow:null,fxHide:null,fxSpeed:"normal",fxShowSpeed:null,fxHideSpeed:null,fxAutoHeight:false,onClick:null,onHide:null,onShow:null,navClass:"tabs-nav",selectedClass:"tabs-selected",disabledClass:"tabs-disabled",containerClass:"tabs-container",hideClass:"tabs-hide",loadingClass:"tabs-loading",tabStruct:"div"},_3||{});
$.browser.msie6=$.browser.msie6||$.browser.msie&&typeof XMLHttpRequest=="function";
function unFocus(){
scrollTo(0,0);
}
return this.each(function(){
var _4=this;
var _5=$("ul."+_3.navClass,_4);
_5=_5.size()&&_5||$(">ul:eq(0)",_4);
var _6=$("a",_5);
if(_3.remote){
_6.each(function(){
var id=_3.hashPrefix+(++$.tabs.remoteCount),_8="#"+id,_9=this.href;
this.href=_8;
$("<div id=\""+id+"\" class=\""+_3.containerClass+"\"></div>").appendTo(_4);
$(this).bind("loadRemoteTab",function(e,_b){
var $$=$(this).addClass(_3.loadingClass),_d=$("span",this)[0],_e=_d.innerHTML;
if(_3.spinner){
_d.innerHTML="<em>"+_3.spinner+"</em>";
}
setTimeout(function(){
$(_8).load(_9,function(){
if(_3.spinner){
_d.innerHTML=_e;
}
$$.removeClass(_3.loadingClass);
_b&&_b();
});
},0);
});
});
}
var _f=$("div."+_3.containerClass,_4);
_f=_f.size()&&_f||$(">"+_3.tabStruct,_4);
_5.is("."+_3.navClass)||_5.addClass(_3.navClass);
_f.each(function(){
var $$=$(this);
$$.is("."+_3.containerClass)||$$.addClass(_3.containerClass);
});
var _11=$("li",_5).index($("li."+_3.selectedClass,_5)[0]);
if(_11>=0){
_3.initial=_11;
}
if(location.hash){
_6.each(function(i){
if(this.hash==location.hash){
_3.initial=i;
if(($.browser.msie||$.browser.opera)&&!_3.remote){
var _13=$(location.hash);
var _14=_13.attr("id");
_13.attr("id","");
setTimeout(function(){
_13.attr("id",_14);
},500);
}
unFocus();
return false;
}
});
}
if($.browser.msie){
unFocus();
}
_f.filter(":eq("+_3.initial+")").show().end().not(":eq("+_3.initial+")").addClass(_3.hideClass);
$("li",_5).removeClass(_3.selectedClass).eq(_3.initial).addClass(_3.selectedClass);
_6.eq(_3.initial).trigger("loadRemoteTab").end();
if(_3.fxAutoHeight){
var _15=function(_16){
var _17=$.map(_f.get(),function(el){
var h,jq=$(el);
if(_16){
if($.browser.msie6){
el.style.removeExpression("behaviour");
el.style.height="";
el.minHeight=null;
}
h=jq.css({"min-height":""}).height();
}else{
h=jq.height();
}
return h;
}).sort(function(a,b){
return b-a;
});
if($.browser.msie6){
_f.each(function(){
this.minHeight=_17[0]+"px";
this.style.setExpression("behaviour","this.style.height = this.minHeight ? this.minHeight : \"1px\"");
});
}else{
_f.css({"min-height":_17[0]+"px"});
}
};
_15();
var _1d=_4.offsetWidth;
var _1e=_4.offsetHeight;
var _1f=$("#tabs-watch-font-size").get(0)||$("<span id=\"tabs-watch-font-size\">M</span>").css({display:"block",position:"absolute",visibility:"hidden"}).appendTo(document.body).get(0);
var _20=_1f.offsetHeight;
setInterval(function(){
var _21=_4.offsetWidth;
var _22=_4.offsetHeight;
var _23=_1f.offsetHeight;
if(_22>_1e||_21!=_1d||_23!=_20){
_15((_21>_1d||_23<_20));
_1d=_21;
_1e=_22;
_20=_23;
}
},50);
}
var _24={},_25={},_26=_3.fxShowSpeed||_3.fxSpeed,_27=_3.fxHideSpeed||_3.fxSpeed;
if(_3.fxSlide||_3.fxFade){
if(_3.fxSlide){
_24["height"]="show";
_25["height"]="hide";
}
if(_3.fxFade){
_24["opacity"]="show";
_25["opacity"]="hide";
}
}else{
if(_3.fxShow){
_24=_3.fxShow;
}else{
_24["min-width"]=0;
_26=_3.bookmarkable?50:1;
}
if(_3.fxHide){
_25=_3.fxHide;
}else{
_25["min-width"]=0;
_27=_3.bookmarkable?50:1;
}
}
var _28=_3.onClick,_29=_3.onHide,_2a=_3.onShow;
_6.bind("triggerTab",function(){
var li=$(this).parents("li:eq(0)");
if(_4.locked||li.is("."+_3.selectedClass)||li.is("."+_3.disabledClass)){
return false;
}
var _2c=this.hash;
if($.browser.msie){
$(this).trigger("click");
if(_3.bookmarkable){
$.ajaxHistory.update(_2c);
location.hash=_2c.replace("#","");
}
}else{
if($.browser.safari){
var _2d=$("<form action=\""+_2c+"\"><div><input type=\"submit\" value=\"h\" /></div></form>").get(0);
_2d.submit();
$(this).trigger("click");
if(_3.bookmarkable){
$.ajaxHistory.update(_2c);
}
}else{
if(_3.bookmarkable){
location.hash=_2c.replace("#","");
}else{
$(this).trigger("click");
}
}
}
});
_6.bind("disableTab",function(){
var li=$(this).parents("li:eq(0)");
if($.browser.safari){
li.animate({opacity:0},1,function(){
li.css({opacity:""});
});
}
li.addClass(_3.disabledClass);
});
if(_3.disabled&&_3.disabled.length){
for(var i=0,k=_3.disabled.length;i<k;i++){
_6.eq(--_3.disabled[i]).trigger("disableTab").end();
}
}
_6.bind("enableTab",function(){
var li=$(this).parents("li:eq(0)");
li.removeClass(_3.disabledClass);
if($.browser.safari){
li.animate({opacity:1},1,function(){
li.css({opacity:""});
});
}
});
_6.bind("click",function(e){
var _33=e.clientX;
var _34=this,li=$(this).parents("li:eq(0)"),_36=$(this.hash),_37=_f.filter(":visible");
if(_4["locked"]||li.is("."+_3.selectedClass)||li.is("."+_3.disabledClass)||typeof _28=="function"&&_28(this,_36[0],_37[0])===false){
this.blur();
return false;
}
_4["locked"]=true;
if(_36.size()){
if($.browser.msie&&_3.bookmarkable){
var _38=this.hash.replace("#","");
_36.attr("id","");
setTimeout(function(){
_36.attr("id",_38);
},0);
}
function switchTab(){
if(_3.bookmarkable&&_33){
$.ajaxHistory.update(_34.hash);
}
_37.animate(_25,_27,function(){
$(_34).parents("li:eq(0)").addClass(_3.selectedClass).siblings().removeClass(_3.selectedClass);
if(typeof _29=="function"){
_29(_34,_36[0],_37[0]);
}
_37.addClass(_3.hideClass).css({display:"",overflow:"",height:"",opacity:""});
_36.removeClass(_3.hideClass).animate(_24,_26,function(){
_36.css({overflow:"",height:"",opacity:""});
if($.browser.msie){
_37[0].style.filter="";
_36[0].style.filter="";
}
if(typeof _2a=="function"){
_2a(_34,_36[0],_37[0]);
}
_4["locked"]=null;
});
});
}
if(!_3.remote){
switchTab();
}else{
$(_34).trigger("loadRemoteTab",[switchTab]);
}
}else{
alert("There is no such container.");
}
var _39=window.pageXOffset||document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft||0;
var _3a=window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop||0;
setTimeout(function(){
window.scrollTo(_39,_3a);
},0);
this.blur();
return _3.bookmarkable&&!!_33;
});
if(_3.bookmarkable){
$.ajaxHistory.initialize(function(){
_6.eq(_3.initial).trigger("click").end();
});
}
});
};
var _3b=["triggerTab","disableTab","enableTab"];
for(var i=0;i<_3b.length;i++){
$.fn[_3b[i]]=(function(_3d){
return function(tab){
return this.each(function(){
var nav=$("ul.tabs-nav",this);
nav=nav.size()&&nav||$(">ul:eq(0)",this);
var a;
if(!tab||typeof tab=="number"){
a=$("li a",nav).eq((tab&&tab>0&&tab-1||0));
}else{
if(typeof tab=="string"){
a=$("li a[@href$=\"#"+tab+"\"]",nav);
}
}
a.trigger(_3d);
});
};
})(_3b[i]);
}
$.fn.activeTab=function(){
var _41=[];
this.each(function(){
var nav=$("ul.tabs-nav",this);
nav=nav.size()&&nav||$(">ul:eq(0)",this);
var lis=$("li",nav);
_41.push(lis.index(lis.filter(".tabs-selected")[0])+1);
});
return _41[0];
};
})(jQuery);

jQuery.fn.jmp3=function(_1){
var _2="swf/";
var _3={"filepath":"","backcolor":"","forecolor":"ffffff","width":"25","repeat":"no","volume":"50","autoplay":"false","showdownload":"true","showfilename":"true"};
if(_1){
jQuery.extend(_3,_1);
}
return this.each(function(){
var _4=_3.filepath+jQuery(this).html();
var _5=_4.indexOf(".mp3");
if(_5==-1){
return false;
}
var _6="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
_6+="width=\""+_3.width+"\" height=\"20\" ";
_6+="codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\">";
_6+="<param name=\"movie\" value=\""+_2+"singlemp3player.swf?";
_6+="showDownload="+_3.showdownload+"&file="+_4+"&autoStart="+_3.autoplay;
_6+="&backColor="+_3.backcolor+"&frontColor="+_3.forecolor;
_6+="&repeatPlay="+_3.repeat+"&songVolume="+_3.volume+"\" />";
_6+="<param name=\"wmode\" value=\"transparent\" />";
_6+="<embed wmode=\"transparent\" width=\""+_3.width+"\" height=\"20\" ";
_6+="src=\""+_2+"singlemp3player.swf?";
_6+="showDownload="+_3.showdownload+"&file="+_4+"&autoStart="+_3.autoplay;
_6+="&backColor="+_3.backcolor+"&frontColor="+_3.forecolor;
_6+="&repeatPlay="+_3.repeat+"&songVolume="+_3.volume+"\" ";
_6+="type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
_6+="</object>";
if(_3.showfilename=="false"){
jQuery(this).html("");
}
jQuery(this).prepend(_6+"&nbsp;");
if(jQuery.browser.msie){
this.outerHTML=this.outerHTML;
}
});
};

(function($){
$.fn.jqm=function(o){
var _o={zIndex:3000,overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:false,target:false,modal:false,toTop:false,onShow:false,onHide:false,onLoad:false};
return this.each(function(){
if(this._jqm){
return;
}
s++;
this._jqm=s;
H[s]={c:$.extend(_o,o),a:false,w:$(this).addClass("jqmID"+s),s:s};
if(_o.trigger){
$(this).jqmAddTrigger(_o.trigger);
}
});
};
$.fn.jqmAddClose=function(e){
hs(this,e,"jqmHide");
return this;
};
$.fn.jqmAddTrigger=function(e){
hs(this,e,"jqmShow");
return this;
};
$.fn.jqmShow=function(t){
return this.each(function(){
if(!H[this._jqm].a){
$.jqm.open(this._jqm,t);
}
});
};
$.fn.jqmHide=function(t){
return this.each(function(){
if(H[this._jqm].a){
$.jqm.close(this._jqm,t);
}
});
};
$.jqm={hash:{},open:function(s,t){
var h=H[s],c=h.c,cc="."+c.closeClass,z=(/^\d+$/.test(h.w.css("z-index")))?h.w.css("z-index"):c.zIndex,o=$("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":z-1,opacity:c.overlay/100});
h.t=t;
h.a=true;
h.w.css("z-index",z);
if(c.modal){
if(!A[0]){
F("bind");
}
A.push(s);
o.css("cursor","wait");
}else{
if(c.overlay>0){
h.w.jqmAddClose(o);
}else{
o=false;
}
}
h.o=(o)?o.addClass(c.overlayClass).prependTo("body"):false;
if(ie6){
$("html,body").css({height:"100%",width:"100%"});
if(o){
o=o.css({position:"absolute"})[0];
for(var y in {Top:1,Left:1}){
o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");
}
}
}
if(c.ajax){
var r=c.target||h.w,u=c.ajax,r=(typeof r=="string")?$(r,h.w):$(r),u=(u.substr(0,1)=="@")?$(t).attr(u.substring(1)):u;
r.load(u,function(){
if(c.onLoad){
c.onLoad.call(this,h);
}
if(cc){
h.w.jqmAddClose($(cc,h.w));
}
e(h);
});
}else{
if(cc){
h.w.jqmAddClose($(cc,h.w));
}
}
if(c.toTop&&h.o){
h.w.before("<span id=\"jqmP"+h.w[0]._jqm+"\"></span>").insertAfter(h.o);
}
(c.onShow)?c.onShow(h):h.w.show();
e(h);
return false;
},close:function(s){
var h=H[s];
h.a=false;
if(A[0]){
A.pop();
if(!A[0]){
F("unbind");
}
}
if(h.c.toTop&&h.o){
$("#jqmP"+h.w[0]._jqm).after(h.w).remove();
}
if(h.c.onHide){
h.c.onHide(h);
}else{
h.w.hide();
if(h.o){
h.o.remove();
}
}
return false;
}};
var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),i=$("<iframe src=\"javascript:false;document.write('');\" class=\"jqm\"></iframe>").css({opacity:0}),e=function(h){
if(ie6){
if(h.o){
h.o.html("<p style=\"width:100%;height:100%\"/>").prepend(i);
}else{
if(!$("iframe.jqm",h.w)[0]){
h.w.prepend(i);
}
}
}
f(h);
},f=function(h){
try{
$(":input:visible",h.w)[0].focus();
}
catch(e){
}
},F=function(t){
$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);
},m=function(e){
var h=H[A[A.length-1]],r=(!$(e.target).parents(".jqmID"+h.s)[0]);
if(r){
f(h);
}
return !r;
},hs=function(w,e,y){
var s=[];
w.each(function(){
s.push(this._jqm);
});
$(e).each(function(){
if(this[y]){
$.extend(this[y],s);
}else{
this[y]=s;
$(this).click(function(){
for(var i in {jqmShow:1,jqmHide:1}){
for(var s in this[i]){
if(H[this[i][s]]){
H[this[i][s]].w[i](this);
}
}
}
return false;
});
}
});
};
})(jQuery);
