function isFunction(a){return"function"==typeof a
}function isObject(a){return(a&&"object"==typeof a)||isFunction(a)
}function addEngine(a){if(window.external&&("AddSearchProvider" in window.external)){window.external.AddSearchProvider(a);
return false
}else{alert("Sorry, your browser doesn't support OpenSearch search plug-ins");
return true
}}function removeSelectItem(a){if(isObject(a)&&a.options&&a.options.length>1){if(a.selectedIndex>0&&a.options[0].text=="Select.."){a.remove(a.options[0])
}}}function noSpaces(a){if(a.keyCode==32){a.returnValue=false;
return false
}}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")
};
if(!Array.prototype.forEach){Array.prototype.forEach=function(b){var a=this.length;
if(typeof b!="function"){throw new TypeError()
}var d=arguments[1];
for(var c=0;
c<a;
c++){if(c in this){b.call(d,this[c],c,this)
}}}
}function isArray(a){return a&&!(a.propertyIsEnumerable("length"))&&typeof a==="object"&&typeof a.length==="number"
}function initImageBox(){$("body").append('<div id="overlay"></div><img id="ibpic" src="/img/loadingAnimation.gif" alt="" title="" /><div id="ibloading"><img src="/img/loadingAnimation.gif" /></div>');
var a=10;
$("a.imagebox").click(function(){$("#ibloading").fadeIn(300);
$("body").addClass("noscroll");
$("html").addClass("noscroll");
$("#overlay").show();
var b=getPageSize();
preload_image=new Image();
preload_image.src=$(this).attr("href");
preload_image.onload=function(){$("#ibpic").attr({src:preload_image.src});
var e=preload_image.width;
var h=preload_image.height;
var d=0;
var g=0;
function f(){if(e>b[0]){d=b[0]-140;
g=(h*d)/e;
e=d;
h=g
}else{if(h>b[1]){g=b[1]-140;
d=(e*g)/h;
e=d;
h=g
}}$("#ibpic").attr({width:e,height:h})
}f();
var i=(e+2*a)/2;
var c=(h+2*a)/2;
$("#ibloading").fadeOut(100,function(){$("#ibpic").css({padding:a+"px",marginLeft:-i+"px",marginTop:-c+"px"});
$("#ibpic").fadeIn(300)
})
};
return false
});
$("#overlay").click(function(){ibclose()
});
$("#ibpic").click(function(){ibclose()
})
}function ibclose(){$("#ibloading").hide();
$("#ibpic").fadeOut(200);
$("#overlay").hide();
$("body").removeClass("noscroll");
$("html").removeClass("noscroll")
}function getPageSize(){var c=document.documentElement;
var a=window.innerWidth||self.innerWidth||(c&&c.clientWidth)||document.body.clientWidth;
var b=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;
arrayPageSize=new Array(a,b);
return arrayPageSize
}$(document).ready(function(){initImageBox()
});
var hovertipMouseX;
var hovertipMouseY;
function hovertipMouseUpdate(b){var a=hovertipMouseXY(b);
hovertipMouseX=a[0];
hovertipMouseY=a[1]
}function hovertipMouseXY(d){if(!d){if(window.event){d=window.event
}else{return
}}if(typeof(d.pageX)=="number"){var c=d.pageX;
var a=d.pageY
}else{if(typeof(d.clientX)=="number"){var c=d.clientX;
var a=d.clientY;
var b=(window.navigator.userAgent.indexOf("Opera")+1)||(window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1)||(navigator.vendor=="KDE");
if(!b){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){c+=document.body.scrollLeft;
a+=document.body.scrollTop
}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){c+=document.documentElement.scrollLeft;
a+=document.documentElement.scrollTop
}}}}else{return
}}return[c,a]
}targetSelectById=function(c,b){var d;
var a;
if(d=c.getAttribute("id")){a="*[@"+b.attribute+"='"+d+"']";
return $(a)
}};
targetSelectByTargetAttribute=function(c,b){target_list=c.getAttribute("target");
if(target_list){target_ids=target_list.split(" ");
var a="#"+target_ids.join(",#");
return $(a)
}};
targetSelectByPrevious=function(b,a){return $(b.previousSibling)
};
targetSelectBySiblings=function(b,a){return $(b).siblings()
};
clicktipPrepareWithCloseLink=function(b,a){return b.append("<a class='clicktip_close'><span>close</span></a>").find("a.clicktip_close").click(function(c){b.hide();
return false
}).end()
};
hovertipPrepare=function(b,a){return b.hover(function(){hovertipHideCancel(this)
},function(){hovertipHideLater(this)
}).css("position","absolute").each(hovertipPosition)
};
hovertipPrepareNoOp=function(b,a){return b
};
hovertipPosition=function(a){document.body.appendChild(this)
};
hovertipIsVisible=function(a){return(jQuery.css(a,"display")!="none")
};
hovertipShowUnderMouse=function(a){hovertipHideCancel(a);
if(!hovertipIsVisible(a)){a.ht.showing=window.setTimeout(function(){a.ht.tip.css({position:"absolute",top:hovertipMouseY+"px",left:hovertipMouseX+"px"}).show()
},a.ht.config.showDelay)
}};
hovertipHideCancel=function(a){if(a.ht.hiding){window.clearTimeout(a.ht.hiding);
a.ht.hiding=null
}};
hovertipHideLater=function(a){if(a.ht.showing){window.clearTimeout(a.ht.showing);
a.ht.showing=null
}if(a.ht.hiding){window.clearTimeout(a.ht.hiding);
a.ht.hiding=null
}a.ht.hiding=window.setTimeout(function(){if(a.ht.hiding){a.ht.tip.hide()
}},a.ht.config.hideDelay)
};
clicktipTargetPrepare=function(c,b,a){return c.addClass(a.attribute+"_target").click(function(){b.ht.tip.toggle();
return false
})
};
hovertipTargetPrepare=function(c,b,a){return c.addClass(a.attribute+"_target").hover(function(){hovertipShowUnderMouse(b)
},function(){hovertipHideLater(b)
})
};
jQuery.fn.hovertipActivate=function(c,a,d,b){return this.css("display","block").hide().each(function(){if(!this.ht){this.ht=new Object()
}this.ht.config=c;
var e=a(this,c);
if(e&&e.size()){if(!this.ht.targets){this.ht.targets=b(e,this,c)
}else{this.ht.targets.add(b(e,this,c))
}e.mousemove(hovertipMouseUpdate);
if(!this.ht.tip){this.ht.tip=d($(this),c)
}}})
};
function hovertipInit(){var a={attribute:"clicktip"};
window.setTimeout(function(){$(".clicktip").hovertipActivate(a,targetSelectById,clicktipPrepareWithCloseLink,clicktipTargetPrepare)
},0);
window.setTimeout(function(){$(".clicktip").hovertipActivate(a,targetSelectByTargetAttribute,clicktipPrepareWithCloseLink,clicktipTargetPrepare)
},0);
var c={attribute:"hovertip",showDelay:300,hideDelay:700};
var b="div.hovertip";
$(b).css("display","block").addClass("hovertip_wrap3").wrap("<div class='hovertip_wrap0'><div class='hovertip_wrap1'><div class='hovertip_wrap2'></div></div></div>").each(function(){var e=this.parentNode.parentNode.parentNode;
if(this.getAttribute("target")){e.setAttribute("target",this.getAttribute("target"))
}if(this.getAttribute("id")){var f=this.getAttribute("id");
this.removeAttribute("id");
e.setAttribute("id",f)
}});
b="div.hovertip_wrap0";
window.setTimeout(function(){$(b).hovertipActivate(c,targetSelectById,hovertipPrepare,hovertipTargetPrepare)
},0);
window.setTimeout(function(){$(b).hovertipActivate(c,targetSelectByTargetAttribute,hovertipPrepare,hovertipTargetPrepare)
},0);
var d="span.hovertip";
$(d).css("display","block").addClass("hovertip_wrap3").wrap("<span class='hovertip_wrap0'><span class='hovertip_wrap1'><span class='hovertip_wrap2'></span></span></span>").each(function(){var e=this.parentNode.parentNode.parentNode;
if(this.getAttribute("target")){e.setAttribute("target",this.getAttribute("target"))
}if(this.getAttribute("id")){var f=this.getAttribute("id");
this.removeAttribute("id");
e.setAttribute("id",f)
}});
d="span.hovertip_wrap0";
window.setTimeout(function(){$(d).hovertipActivate(c,targetSelectByPrevious,hovertipPrepare,hovertipTargetPrepare)
},0)
}$(document).ready(function(){window.setTimeout(hovertipInit,1)
});
jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};
if(j===null){j="";
m.expires=-1
}var e="";
if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;
if(typeof m.expires=="number"){f=new Date();
f.setTime(f.getTime()+(m.expires*24*60*60*1000))
}else{f=m.expires
}e="; expires="+f.toUTCString()
}var l=m.path?"; path="+(m.path):"";
var g=m.domain?"; domain="+(m.domain):"";
var a=m.secure?"; secure":"";
document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")
}else{var d=null;
if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");
for(var h=0;
h<k.length;
h++){var c=jQuery.trim(k[h]);
if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));
break
}}}return d
}};
jQuery.fn.boxy=function(a){a=jQuery.extend({single:true},a||{});
return this.each(function(){var c=this.nodeName.toLowerCase(),b=this;
if(c=="a"){jQuery(this).click(function(){var e=this,d=this.getAttribute("href"),f=jQuery.extend({title:this.title},a);
var h=function(i){if(Boxy.cache[d]){i(Boxy.cache[d].clone())
}else{if(d.indexOf("#")>=0){d=d.substr(d.indexOf("#"));
Boxy.cache[d]=jQuery(d).remove();
i(Boxy.cache[d].clone())
}else{jQuery.ajax({url:e.href,method:a.method||"GET",dataType:"html",data:{__math__:Math.random()},success:function(j){j=jQuery(j);
if(a.cache){Boxy.cache[d]=j;
j=j.clone()
}i(j)
}})
}}};
var g;
if(a.single&&(g=jQuery.data(this,"active.boxy"))){h(function(i){g.setContent(i).show();
g._setupBehaviours();
if(a.center){g.center()
}})
}else{h(function(i){jQuery.data(e,"active.boxy",new Boxy(i,f))
})
}return false
})
}else{if(c=="form"){jQuery(this).bind("submit.boxy",function(){Boxy.ask(a.message||"Please confirm:",["OK","Cancel"],function(d){if(d=="OK"){jQuery(b).unbind("submit.boxy").submit()
}},{modal:true,closeable:false});
return false
})
}}})
};
function Boxy(b,a){this.boxy=jQuery(this.WRAPPER);
jQuery.data(this.boxy[0],"boxy",this);
this.visible=false;
this.options=jQuery.extend({title:null,closeable:true,draggable:true,clone:false,center:true,show:true,modal:false,fixed:true,closeText:"[close]"},a||{});
if(this.options.modal){this.options=jQuery.extend(this.options,{center:true,draggable:false})
}this.setContent(b||"<div></div>");
this._setupTitleBar();
this._setupBehaviours();
this.boxy.css("display","none").appendTo(document.body);
this.toTop();
if(this.options.fixed){if(jQuery.browser.msie&&jQuery.browser.version<7){this.options.fixed=false
}else{this.boxy.addClass("fixed")
}}if(this.options.center&&typeof this.options.x=="undefined"&&typeof this.options.y=="undefined"){this.center()
}else{this.moveTo(typeof this.options.x!="undefined"?this.options.x:Boxy.DEFAULT_X,typeof this.options.y!="undefined"?this.options.y:Boxy.DEFAULT_Y)
}if(this.options.show){this.show()
}}jQuery.extend(Boxy,{DEFAULT_X:50,DEFAULT_Y:50,cache:{},zIndex:1337,dragConfigured:false,dragging:null,get:function(a){var b=jQuery(a).parents(".boxy-wrapper");
return b.length?jQuery.data(b[0],"boxy"):null
},ask:function(c,f,j,l){l=jQuery.extend({modal:true,closeable:false},l,{show:true});
var e=jQuery("<div></div>").append(jQuery('<div class="question"></div>').html(c));
var a={},h=[];
if(f instanceof Array){for(var d=0;
d<f.length;
d++){a[f[d]]=f[d];
h.push(f[d])
}}else{for(var b in f){a[f[b]]=b;
h.push(f[b])
}}var g=jQuery('<form class="answers"></form>');
g.html(jQuery.map(h,function(i){return"<input type='button' value='"+i+"' />"
}).join(" "));
jQuery("input[type=button]",g).click(function(){var i=this;
Boxy.get(this).hide(function(){if(j){j(a[i.value])
}})
});
e.append(g);
new Boxy(e,l)
},_handleDrag:function(a){var b;
if(b=Boxy.dragging){b[0].boxy.css({left:a.pageX-b[1],top:a.pageY-b[2]})
}},_nextZ:function(){return Boxy.zIndex++
}});
Boxy.prototype={WRAPPER:"<table cellspacing='0' cellpadding='0' border='0' class='boxy-wrapper'><tr><td class='top-left'></td><td class='top'></td><td class='top-right'></td></tr><tr><td class='left'></td><td class='boxy-inner'></td><td class='right'></td></tr><tr><td class='bottom-left'></td><td class='bottom'></td><td class='bottom-right'></td></tr></table>",estimateSize:function(){this.boxy.css({visibility:"hidden",display:"block"});
var a=this.getSize();
this.boxy.css("display","none").css("visibility","visible");
return a
},getSize:function(){return[this.boxy.width(),this.boxy.height()]
},getContentSize:function(){var a=this.getContent();
return[a.width(),a.height()]
},getPosition:function(){var a=this.boxy[0];
return[a.offsetLeft,a.offsetTop]
},getCenter:function(){var b=this.getPosition();
var a=this.getSize();
return[Math.floor(b[0]+a[0]/2),Math.floor(b[1]+a[1]/2)]
},getInner:function(){return jQuery(".boxy-inner",this.boxy)
},getContent:function(){return jQuery(".boxy-content",this.boxy)
},setContent:function(a){a=jQuery(a).css({display:"block"}).addClass("boxy-content");
if(this.options.clone){a=a.clone()
}var b=this.getContent();
if(b.length){b.replaceWith(a)
}else{this.getInner().append(a)
}return this
},moveTo:function(a,b){this.moveToX(a).moveToY(b);
return this
},moveToX:function(a){if(typeof a=="number"){this.boxy.css({left:a})
}else{this.centerX()
}return this
},moveToY:function(a){if(typeof a=="number"){this.boxy.css({top:a})
}else{this.centerY()
}return this
},centerAt:function(a,c){var b=this[this.visible?"getSize":"estimateSize"]();
if(typeof a=="number"){this.moveToX(a-b[0]/2)
}if(typeof c=="number"){this.moveToY(c-b[1]/2)
}return this
},centerAtX:function(a){return this.centerAt(a,null)
},centerAtY:function(a){return this.centerAt(null,a)
},center:function(b){if(this.options.fixed){var c=[0,0]
}else{var c=jQuery.browser.msie?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[window.pageXOffset,window.pageYOffset]
}var a=[jQuery(window).width(),jQuery(window).height()];
if(!b||b=="x"){this.centerAt(c[0]+a[0]/2,null)
}if(!b||b=="y"){this.centerAt(null,c[1]+a[1]/2)
}return this
},centerX:function(){return this.center("x")
},centerY:function(){return this.center("y")
},resize:function(b,a,d){if(!this.visible){return
}var c=this._getBoundsForResize(b,a);
this.boxy.css({left:c[0],top:c[1]});
this.getContent().css({width:c[2],height:c[3]});
if(d){d(this)
}return this
},tween:function(c,a,e){if(!this.visible){return
}var d=this._getBoundsForResize(c,a);
var b=this;
this.boxy.stop().animate({left:d[0],top:d[1]});
this.getContent().stop().animate({width:d[2],height:d[3]},function(){if(e){e(b)
}});
return this
},isVisible:function(){return this.visible
},show:function(){if(this.visible){return
}if(this.options.modal){var a=this;
jQuery('<div class="boxy-modal-blackout"></div>').css({zIndex:Boxy._nextZ(),width:jQuery(document).width(),height:jQuery(document).height()}).appendTo(document.body);
this.toTop();
if(this.options.closeable){$(document.body).bind("keypress.boxy",function(b){var c=b.which||b.keyCode;
if(c==27){a.hide();
$(document.body).unbind("keypress.boxy")
}})
}}this.boxy.stop().css({opacity:1}).show();
this.visible=true;
return this
},hide:function(b){if(!this.visible){return
}var a=this;
if(this.options.modal){$(document.body).unbind("keypress.boxy");
jQuery(".boxy-modal-blackout").animate({opacity:0},function(){jQuery(this).remove()
})
}this.boxy.stop().animate({opacity:0},300,function(){a.boxy.css({display:"none"});
a.visible=false;
if(b){b(a)
}});
return this
},toTop:function(){this.boxy.css({zIndex:Boxy._nextZ()});
return this
},getTitle:function(){return $("> .title-bar h2",this.getInner()).html()
},setTitle:function(a){$("> .title-bar h2",this.getInner()).html(a);
return this
},_getBoundsForResize:function(c,a){var b=this.getContentSize();
var e=[c-b[0],a-b[1]];
var d=this.getPosition();
return[Math.max(d[0]-e[0]/2,0),Math.max(d[1]-e[1]/2,0),c,a]
},_setupTitleBar:function(){if(this.options.title){var b=this;
var a=jQuery("<div class='title-bar'></div>").html("<h2>"+this.options.title+"</h2>");
if(this.options.closeable){a.append(jQuery("<a href='#' class='close'></a>").html(this.options.closeText))
}if(this.options.draggable){a[0].onselectstart=function(){return false
};
a[0].unselectable="on";
a[0].style.MozUserSelect="none";
if(!Boxy.dragConfigured){jQuery(document).mousemove(Boxy._handleDrag);
Boxy.dragConfigured=true
}a.mousedown(function(c){b.toTop();
Boxy.dragging=[b,c.pageX-b.boxy[0].offsetLeft,c.pageY-b.boxy[0].offsetTop];
jQuery(this).addClass("dragging")
});
a.mouseup(function(){jQuery(this).removeClass("dragging");
Boxy.dragging=null
})
}this.getInner().prepend(a)
}},_setupBehaviours:function(){var a=this;
jQuery(".close",this.boxy).click(function(){a.hide();
return false
}).mousedown(function(b){b.stopPropagation()
})
}};
jQuery.fn.supersleight=function(a){a=jQuery.extend({imgs:true,backgrounds:true,shim:"x.gif",apply_positioning:true},a);
return this.each(function(){if(jQuery.browser.msie&&parseInt(jQuery.browser.version)<7&&parseInt(jQuery.browser.version)>4){jQuery(this).find("*").each(function(d,f){var b=jQuery(f);
if(a.backgrounds&&b.css("background-image").match(/\.png/i)!==null){var c=b.css("background-image");
var h=c.substring(5,c.length-2);
var g=(b.css("background-repeat")=="no-repeat"?"crop":"scale");
var e={filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+h+"', sizingMethod='"+g+"')","background-image":"url("+a.shim+")"};
b.css(e)
}if(a.imgs&&b.is("img[src$=png]")){var e={width:b.width()+"px",height:b.height()+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b.attr("src")+"', sizingMethod='scale')"};
b.css(e).attr("src",a.shim)
}if(a.applyPositioning&&b.is("a, input")&&b.css("position")===""){b.css("position","relative")
}})
}})
};