jQuery(document).ready(function(){
jQuery(".orsd-ui-button").button();
window.setTimeout(clearMessages,10000);
jQuery(".popupwindow").popupwindow();
});
function clearMessages(){
jQuery(".form-message").fadeOut();
}
(function(e){
function p(f,c){
var b=e(c);
return b.length<2?b:f.parent().find(c);
}
function u(f,c){
var b=this,n=f.add(b),g=f.children(),l=0,j=c.vertical;
k||(k=b);
if(g.length>1){
g=e(c.items,f);
}
e.extend(b,{getConf:function(){
return c;
},getIndex:function(){
return l;
},getSize:function(){
return b.getItems().size();
},getNaviButtons:function(){
return o.add(q);
},getRoot:function(){
return f;
},getItemWrap:function(){
return g;
},getItems:function(){
return g.children(c.item).not("."+c.clonedClass);
},move:function(a,d){
return b.seekTo(l+a,d);
},next:function(a){
return b.move(1,a);
},prev:function(a){
return b.move(-1,a);
},begin:function(a){
return b.seekTo(0,a);
},end:function(a){
return b.seekTo(b.getSize()-1,a);
},focus:function(){
return k=b;
},addItem:function(a){
a=e(a);
if(c.circular){
g.children("."+c.clonedClass+":last").before(a);
g.children("."+c.clonedClass+":first").replaceWith(a.clone().addClass(c.clonedClass));
}else{
g.append(a);
}
n.trigger("onAddItem",[a]);
return b;
},seekTo:function(a,d,h){
a.jquery||(a*=1);
if(c.circular&&a===0&&l==-1&&d!==0){
return b;
}
if(!c.circular&&a<0||a>b.getSize()||a<-1){
return b;
}
var i=a;
if(a.jquery){
a=b.getItems().index(a);
}else{
i=b.getItems().eq(a);
}
var r=e.Event("onBeforeSeek");
if(!h){
n.trigger(r,[a,d]);
if(r.isDefaultPrevented()||!i.length){
return b;
}
}
i=j?{top:-i.position().top}:{left:-i.position().left};
l=a;
k=b;
if(d===undefined){
d=c.speed;
}
g.animate(i,d,c.easing,h||function(){
n.trigger("onSeek",[a]);
});
return b;
}});
e.each(["onBeforeSeek","onSeek","onAddItem"],function(a,d){
e.isFunction(c[d])&&e(b).bind(d,c[d]);
b[d]=function(h){
h&&e(b).bind(d,h);
return b;
};
});
if(c.circular){
var s=b.getItems().slice(-1).clone().prependTo(g),t=b.getItems().eq(1).clone().appendTo(g);
s.add(t).addClass(c.clonedClass);
b.onBeforeSeek(function(a,d,h){
if(!a.isDefaultPrevented()){
if(d==-1){
b.seekTo(s,h,function(){
b.end(0);
});
return a.preventDefault();
}else{
d==b.getSize()&&b.seekTo(t,h,function(){
b.begin(0);
});
}
}
});
b.seekTo(0,0,function(){
});
}
var o=p(f,c.prev).click(function(){
b.prev();
}),q=p(f,c.next).click(function(){
b.next();
});
if(!c.circular&&b.getSize()>1){
b.onBeforeSeek(function(a,d){
setTimeout(function(){
if(!a.isDefaultPrevented()){
o.toggleClass(c.disabledClass,d<=0);
q.toggleClass(c.disabledClass,d>=b.getSize()-1);
}
},1);
});
c.initialIndex||o.addClass(c.disabledClass);
}
c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(a,d){
if(c.mousewheel){
b.move(d<0?1:-1,c.wheelSpeed||50);
return false;
}
});
if(c.touch){
var m={};
g[0].ontouchstart=function(a){
a=a.touches[0];
m.x=a.clientX;
m.y=a.clientY;
};
g[0].ontouchmove=function(a){
if(a.touches.length==1&&!g.is(":animated")){
var d=a.touches[0],h=m.x-d.clientX;
d=m.y-d.clientY;
b[j&&d>0||!j&&h>0?"next":"prev"]();
a.preventDefault();
}
};
}
c.keyboard&&e(document).bind("keydown.scrollable",function(a){
if(!(!c.keyboard||a.altKey||a.ctrlKey||e(a.target).is(":input"))){
if(!(c.keyboard!="static"&&k!=b)){
var d=a.keyCode;
if(j&&(d==38||d==40)){
b.move(d==38?-1:1);
return a.preventDefault();
}
if(!j&&(d==37||d==39)){
b.move(d==37?-1:1);
return a.preventDefault();
}
}
}
});
c.initialIndex&&b.seekTo(c.initialIndex,0,function(){
});
}
e.tools=e.tools||{version:"1.2.5"};
e.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};
var k;
e.fn.scrollable=function(f){
var c=this.data("scrollable");
if(c){
return c;
}
f=e.extend({},e.tools.scrollable.conf,f);
this.each(function(){
c=new u(e(this),f);
e(this).data("scrollable",c);
});
return f.api?c:this;
};
})(jQuery);
(function(b){
var f=b.tools.scrollable;
f.autoscroll={conf:{autoplay:true,interval:3000,autopause:true}};
b.fn.autoscroll=function(c){
if(typeof c=="number"){
c={interval:c};
}
var d=b.extend({},f.autoscroll.conf,c),g;
this.each(function(){
var a=b(this).data("scrollable");
if(a){
g=a;
}
var e,h=true;
a.play=function(){
if(!e){
h=false;
e=setInterval(function(){
a.next();
},d.interval);
}
};
a.pause=function(){
e=clearInterval(e);
};
a.stop=function(){
a.pause();
h=true;
};
d.autopause&&a.getRoot().add(a.getNaviButtons()).hover(a.pause,a.play);
d.autoplay&&a.play();
});
return d.api?g:this;
};
})(jQuery);
(function(d){
function p(b,g){
var h=d(g);
return h.length<2?h:b.parent().find(g);
}
var m=d.tools.scrollable;
m.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};
d.fn.navigator=function(b){
if(typeof b=="string"){
b={navi:b};
}
b=d.extend({},m.navigator.conf,b);
var g;
this.each(function(){
function h(a,c,i){
e.seekTo(c);
if(j){
if(location.hash){
location.hash=a.attr("href").replace("#","");
}
}else{
return i.preventDefault();
}
}
function f(){
return k.find(b.naviItem||"> *");
}
function n(a){
var c=d("<"+(b.naviItem||"a")+"/>").click(function(i){
h(d(this),a,i);
}).attr("href","#"+a);
a===0&&c.addClass(l);
b.indexed&&c.text(a+1);
b.idPrefix&&c.attr("id",b.idPrefix+a);
return c.appendTo(k);
}
function o(a,c){
a=f().eq(c.replace("#",""));
a.length||(a=f().filter("[href="+c+"]"));
a.click();
}
var e=d(this).data("scrollable"),k=b.navi.jquery?b.navi:p(e.getRoot(),b.navi),q=e.getNaviButtons(),l=b.activeClass,j=b.history&&d.fn.history;
if(e){
g=e;
}
e.getNaviButtons=function(){
return q.add(k);
};
f().length?f().each(function(a){
d(this).click(function(c){
h(d(this),a,c);
});
}):d.each(e.getItems(),function(a){
n(a);
});
e.onBeforeSeek(function(a,c){
setTimeout(function(){
if(!a.isDefaultPrevented()){
var i=f().eq(c);
!a.isDefaultPrevented()&&i.length&&f().removeClass(l).eq(c).addClass(l);
}
},1);
});
e.onAddItem(function(a,c){
c=n(e.getItems().index(c));
j&&c.history(o);
});
j&&f().history(o);
});
return b.api?g:this;
};
})(jQuery);
(function(a){
function t(d,b){
var c=this,j=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);
if(g){
if(typeof g=="string"){
g={color:g};
}
g.closeOnClick=g.closeOnEsc=false;
}
var p=b.target||d.attr("rel");
f=p?a(p):d;
if(!f.length){
throw "Could not find Overlay: "+p;
}
d&&d.index(f)==-1&&d.click(function(e){
c.load(e);
return e.preventDefault();
});
a.extend(c,{load:function(e){
if(c.isOpened()){
return c;
}
var h=q[b.effect];
if(!h){
throw "Overlay: cannot find effect : \""+b.effect+"\"";
}
b.oneInstance&&a.each(s,function(){
this.close(e);
});
e=e||a.Event();
e.type="onBeforeLoad";
j.trigger(e);
if(e.isDefaultPrevented()){
return c;
}
m=true;
g&&a(f).expose(g);
var i=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});
if(typeof i=="string"){
i=i=="center"?Math.max((o.height()-v)/2,0):parseInt(i,10)/100*o.height();
}
if(r=="center"){
r=Math.max((o.width()-u)/2,0);
}
h[0].call(c,{top:i,left:r},function(){
if(m){
e.type="onLoad";
j.trigger(e);
}
});
g&&b.closeOnClick&&a.mask.getMask().one("click",c.close);
b.closeOnClick&&a(document).bind("click."+n,function(l){
a(l.target).parents(f).length||c.close(l);
});
b.closeOnEsc&&a(document).bind("keydown."+n,function(l){
l.keyCode==27&&c.close(l);
});
return c;
},close:function(e){
if(!c.isOpened()){
return c;
}
e=e||a.Event();
e.type="onBeforeClose";
j.trigger(e);
if(!e.isDefaultPrevented()){
m=false;
q[b.effect][1].call(c,function(){
e.type="onClose";
j.trigger(e);
});
a(document).unbind("click."+n).unbind("keydown."+n);
g&&a.mask.close();
return c;
}
},getOverlay:function(){
return f;
},getTrigger:function(){
return d;
},getClosers:function(){
return k;
},isOpened:function(){
return m;
},getConf:function(){
return b;
}});
a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){
a.isFunction(b[h])&&a(c).bind(h,b[h]);
c[h]=function(i){
i&&a(c).bind(h,i);
return c;
};
});
k=f.find(b.close||".close");
if(!k.length&&!b.close){
k=a("<a class=\"close\"></a>");
f.prepend(k);
}
k.click(function(e){
c.close(e);
});
b.load&&c.load();
}
a.tools=a.tools||{version:"1.2.5"};
a.tools.overlay={addEffect:function(d,b,c){
q[d]=[b,c];
},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};
var s=[],q={};
a.tools.overlay.addEffect("default",function(d,b){
var c=this.getConf(),j=a(window);
if(!c.fixed){
d.top+=j.scrollTop();
d.left+=j.scrollLeft();
}
d.position=c.fixed?"fixed":"absolute";
this.getOverlay().css(d).fadeIn(c.speed,b);
},function(d){
this.getOverlay().fadeOut(this.getConf().closeSpeed,d);
});
a.fn.overlay=function(d){
var b=this.data("overlay");
if(b){
return b;
}
if(a.isFunction(d)){
d={onBeforeLoad:d};
}
d=a.extend(true,{},a.tools.overlay.conf,d);
this.each(function(){
b=new t(a(this),d);
s.push(b);
a(this).data("overlay",b);
});
return d.api?b:this;
};
})(jQuery);
(function(h){
function k(d){
var e=d.offset();
return {top:e.top+d.height()/2,left:e.left+d.width()/2};
}
var l=h.tools.overlay,f=h(window);
h.extend(l.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});
function o(d,e){
var a=this.getOverlay(),c=this.getConf(),g=this.getTrigger(),p=this,m=a.outerWidth({margin:true}),b=a.data("img"),n=c.fixed?"fixed":"absolute";
if(!b){
b=a.css("backgroundImage");
if(!b){
throw "background-image CSS property not set for overlay";
}
b=b.slice(b.indexOf("(")+1,b.indexOf(")")).replace(/\"/g,"");
a.css("backgroundImage","none");
b=h("<img src=\""+b+"\"/>");
b.css({border:0,display:"none"}).width(m);
h("body").append(b);
a.data("img",b);
}
var i=c.start.top||Math.round(f.height()/2),j=c.start.left||Math.round(f.width()/2);
if(g){
g=k(g);
i=g.top;
j=g.left;
}
if(c.fixed){
i-=f.scrollTop();
j-=f.scrollLeft();
}else{
d.top+=f.scrollTop();
d.left+=f.scrollLeft();
}
b.css({position:"absolute",top:i,left:j,width:0,zIndex:c.zIndex}).show();
d.position=n;
a.css(d);
b.animate({top:a.css("top"),left:a.css("left"),width:m},c.speed,function(){
a.css("zIndex",c.zIndex+1).fadeIn(c.fadeInSpeed,function(){
p.isOpened()&&!h(this).index(a)?e.call():a.hide();
});
}).css("position",n);
}
function q(d){
var e=this.getOverlay().hide(),a=this.getConf(),c=this.getTrigger();
e=e.data("img");
var g={top:a.start.top,left:a.start.left,width:0};
c&&h.extend(g,k(c));
a.fixed&&e.css({position:"absolute"}).animate({top:"+="+f.scrollTop(),left:"+="+f.scrollLeft()},0);
e.animate(g,a.closeSpeed,d);
}
l.addEffect("apple",o,q);
})(jQuery);
(function(e){
function t(a,b,c){
var k=a.offset().top,f=a.offset().left,l=c.position.split(/,?\s+/),p=l[0];
l=l[1];
k-=b.outerHeight()-c.offset[0];
f+=a.outerWidth()+c.offset[1];
if(/iPad/i.test(navigator.userAgent)){
k-=e(window).scrollTop();
}
c=b.outerHeight()+a.outerHeight();
if(p=="center"){
k+=c/2;
}
if(p=="bottom"){
k+=c;
}
a=a.outerWidth();
if(l=="center"){
f-=(a+b.outerWidth())/2;
}
if(l=="left"){
f-=a;
}
return {top:k,left:f};
}
function y(a){
function b(){
return this.getAttribute("type")==a;
}
b.key="[type="+a+"]";
return b;
}
function u(a,b,c){
function k(g,d,i){
if(!(!c.grouped&&g.length)){
var j;
if(i===false||e.isArray(i)){
j=h.messages[d.key||d]||h.messages["*"];
j=j[c.lang]||h.messages["*"].en;
(d=j.match(/\$\d/g))&&e.isArray(i)&&e.each(d,function(m){
j=j.replace(this,i[m]);
});
}else{
j=i[c.lang]||i;
}
g.push(j);
}
}
var f=this,l=b.add(f);
a=a.not(":button, :image, :reset, :submit");
e.extend(f,{getConf:function(){
return c;
},getForm:function(){
return b;
},getInputs:function(){
return a;
},reflow:function(){
a.each(function(){
var g=e(this),d=g.data("msg.el");
if(d){
g=t(g,d,c);
d.css({top:g.top,left:g.left});
}
});
return f;
},invalidate:function(g,d){
if(!d){
var i=[];
e.each(g,function(j,m){
j=a.filter("[name='"+j+"']");
if(j.length){
j.trigger("OI",[m]);
i.push({input:j,messages:[m]});
}
});
g=i;
d=e.Event();
}
d.type="onFail";
l.trigger(d,[g]);
d.isDefaultPrevented()||q[c.effect][0].call(f,g,d);
return f;
},reset:function(g){
g=g||a;
g.removeClass(c.errorClass).each(function(){
var d=e(this).data("msg.el");
if(d){
d.remove();
e(this).data("msg.el",null);
}
}).unbind(c.errorInputEvent||"");
return f;
},destroy:function(){
b.unbind(c.formEvent+".V").unbind("reset.V");
a.unbind(c.inputEvent+".V").unbind("change.V");
return f.reset();
},checkValidity:function(g,d){
g=g||a;
g=g.not(":disabled");
if(!g.length){
return true;
}
d=d||e.Event();
d.type="onBeforeValidate";
l.trigger(d,[g]);
if(d.isDefaultPrevented()){
return d.result;
}
var i=[];
g.not(":radio:not(:checked)").each(function(){
var m=[],n=e(this).data("messages",m),v=r&&n.is(":date")?"onHide.v":c.errorInputEvent+".v";
n.unbind(v);
e.each(w,function(){
var o=this,s=o[0];
if(n.filter(s).length){
o=o[1].call(f,n,n.val());
if(o!==true){
d.type="onBeforeFail";
l.trigger(d,[n,s]);
if(d.isDefaultPrevented()){
return false;
}
var x=n.attr(c.messageAttr);
if(x){
m=[x];
return false;
}else{
k(m,s,o);
}
}
}
});
if(m.length){
i.push({input:n,messages:m});
n.trigger("OI",[m]);
c.errorInputEvent&&n.bind(v,function(o){
f.checkValidity(n,o);
});
}
if(c.singleError&&i.length){
return false;
}
});
var j=q[c.effect];
if(!j){
throw "Validator: cannot find effect \""+c.effect+"\"";
}
if(i.length){
f.invalidate(i,d);
return false;
}else{
j[1].call(f,g,d);
d.type="onSuccess";
l.trigger(d,[g]);
g.unbind(c.errorInputEvent+".v");
}
return true;
}});
e.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(g,d){
e.isFunction(c[d])&&e(f).bind(d,c[d]);
f[d]=function(i){
i&&e(f).bind(d,i);
return f;
};
});
c.formEvent&&b.bind(c.formEvent+".V",function(g){
if(!f.checkValidity(null,g)){
return g.preventDefault();
}
});
b.bind("reset.V",function(){
f.reset();
});
a[0]&&a[0].validity&&a.each(function(){
this.oninvalid=function(){
return false;
};
});
if(b[0]){
b[0].checkValidity=f.checkValidity;
}
c.inputEvent&&a.bind(c.inputEvent+".V",function(g){
f.checkValidity(e(this),g);
});
a.filter(":checkbox, select").filter("[required]").bind("change.V",function(g){
var d=e(this);
if(this.checked||d.is("select")&&e(this).val()){
q[c.effect][1].call(f,d,g);
}
});
var p=a.filter(":radio").change(function(g){
f.checkValidity(p,g);
});
e(window).resize(function(){
f.reflow();
});
}
e.tools=e.tools||{version:"1.2.5"};
var z=/\[type=([a-z]+)\]/,A=/^-?[0-9]*(\.[0-9]+)?$/,r=e.tools.dateinput,B=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,C=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,h;
h=e.tools.validator={conf:{grouped:false,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:false,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(a,b){
e.each(b,function(c,k){
h.messages[c]=h.messages[c]||{};
h.messages[c][a]=k;
});
},localizeFn:function(a,b){
h.messages[a]=h.messages[a]||{};
e.extend(h.messages[a],b);
},fn:function(a,b,c){
if(e.isFunction(b)){
c=b;
}else{
if(typeof b=="string"){
b={en:b};
}
this.messages[a.key||a]=b;
}
if(b=z.exec(a)){
a=y(b[1]);
}
w.push([a,c]);
},addEffect:function(a,b,c){
q[a]=[b,c];
}};
var w=[],q={"default":[function(a){
var b=this.getConf();
e.each(a,function(c,k){
c=k.input;
c.addClass(b.errorClass);
var f=c.data("msg.el");
if(!f){
f=e(b.message).addClass(b.messageClass).appendTo(document.body);
c.data("msg.el",f);
}
f.css({visibility:"hidden"}).find("p").remove();
e.each(k.messages,function(l,p){
e("<p/>").html(p).appendTo(f);
});
f.outerWidth()==f.parent().width()&&f.add(f.find("p")).css({display:"inline"});
k=t(c,f,b);
f.css({visibility:"visible",position:"absolute",top:k.top,left:k.left}).fadeIn(b.speed);
});
},function(a){
var b=this.getConf();
a.removeClass(b.errorClass).each(function(){
var c=e(this).data("msg.el");
c&&c.css({visibility:"hidden"});
});
}]};
e.each("email,url,number".split(","),function(a,b){
e.expr[":"][b]=function(c){
return c.getAttribute("type")===b;
};
});
e.fn.oninvalid=function(a){
return this[a?"bind":"trigger"]("OI",a);
};
h.fn(":email","Please enter a valid email address",function(a,b){
return !b||B.test(b);
});
h.fn(":url","Please enter a valid URL",function(a,b){
return !b||C.test(b);
});
h.fn(":number","Please enter a numeric value.",function(a,b){
return A.test(b);
});
h.fn("[max]","Please enter a value smaller than $1",function(a,b){
if(b===""||r&&a.is(":date")){
return true;
}
a=a.attr("max");
return parseFloat(b)<=parseFloat(a)?true:[a];
});
h.fn("[min]","Please enter a value larger than $1",function(a,b){
if(b===""||r&&a.is(":date")){
return true;
}
a=a.attr("min");
return parseFloat(b)>=parseFloat(a)?true:[a];
});
h.fn("[required]","Please complete this mandatory field.",function(a,b){
if(a.is(":checkbox")){
return a.is(":checked");
}
return !!b;
});
h.fn("[pattern]",function(a){
var b=new RegExp("^"+a.attr("pattern")+"$");
return b.test(a.val());
});
e.fn.validator=function(a){
var b=this.data("validator");
if(b){
b.destroy();
this.removeData("validator");
}
a=e.extend(true,{},h.conf,a);
if(this.is("form")){
return this.each(function(){
var c=e(this);
b=new u(c.find(":input"),c,a);
c.data("validator",b);
});
}else{
b=new u(this,this.eq(0).closest("form"),a);
return this.data("validator",b);
}
};
})(jQuery);
(function(b){
function k(){
if(b.browser.msie){
var a=b(document).height(),d=b(window).height();
return [window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a];
}
return [b(document).width(),b(document).height()];
}
function h(a){
if(a){
return a.call(b.mask);
}
}
b.tools=b.tools||{version:"1.2.5"};
var l;
l=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};
var c,i,e,g,j;
b.mask={load:function(a,d){
if(e){
return this;
}
if(typeof a=="string"){
a={color:a};
}
a=a||g;
g=a=b.extend(b.extend({},l.conf),a);
c=b("#"+a.maskId);
if(!c.length){
c=b("<div/>").attr("id",a.maskId);
b("body").append(c);
}
var m=k();
c.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});
a.color&&c.css("backgroundColor",a.color);
if(h(a.onBeforeLoad)===false){
return this;
}
a.closeOnEsc&&b(document).bind("keydown.mask",function(f){
f.keyCode==27&&b.mask.close(f);
});
a.closeOnClick&&c.bind("click.mask",function(f){
b.mask.close(f);
});
b(window).bind("resize.mask",function(){
b.mask.fit();
});
if(d&&d.length){
j=d.eq(0).css("zIndex");
b.each(d,function(){
var f=b(this);
/relative|absolute|fixed/i.test(f.css("position"))||f.css("position","relative");
});
i=d.css({zIndex:Math.max(a.zIndex+1,j=="auto"?0:j)});
}
c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){
b.mask.fit();
h(a.onLoad);
e="full";
});
e=true;
return this;
},close:function(){
if(e){
if(h(g.onBeforeClose)===false){
return this;
}
c.fadeOut(g.closeSpeed,function(){
h(g.onClose);
i&&i.css({zIndex:j});
e=false;
});
b(document).unbind("keydown.mask");
c.unbind("click.mask");
b(window).unbind("resize.mask");
}
return this;
},fit:function(){
if(e){
var a=k();
c.css({width:a[0],height:a[1]});
}
},getMask:function(){
return c;
},isLoaded:function(a){
return a?e=="full":e;
},getConf:function(){
return g;
},getExposed:function(){
return i;
}};
b.fn.mask=function(a){
b.mask.load(a);
return this;
};
b.fn.expose=function(a){
b.mask.load(a,this);
return this;
};
})(jQuery);
(function(b){
function c(a){
switch(a.type){
case "mousemove":
return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});
case "DOMMouseScroll":
b.extend(a,a.data);
a.delta=-a.detail/3;
break;
case "mousewheel":
a.delta=a.wheelDelta/120;
break;
}
a.type="wheel";
return b.event.handle.call(this,a,a.delta);
}
b.fn.mousewheel=function(a){
return this[a?"bind":"trigger"]("wheel",a);
};
b.event.special.wheel={setup:function(){
b.event.add(this,d,c,{});
},teardown:function(){
b.event.remove(this,d,c);
}};
var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"");
})(jQuery);
jQuery.fn.popupwindow=function(p){
var _10b=p||{};
return this.each(function(_10c){
var _10d,_10e,_10f,b,a;
_10f=(jQuery(this).attr("rel")||"").split(",");
_10d={height:600,width:600,toolbar:0,scrollbars:0,status:0,resizable:1,left:0,top:0,center:0,createnew:1,location:0,menubar:0,fullscreen:0};
if(_10f.length==1&&_10f[0].split(":").length==1){
a=_10f[0];
if(typeof _10b[a]!="undefined"){
_10d=jQuery.extend(_10d,_10b[a]);
}
}else{
for(var i=0;i<_10f.length;i++){
b=_10f[i].split(":");
if(typeof _10d[b[0]]!="undefined"&&b.length==2){
_10d[b[0]]=b[1];
}
}
}
if(_10d.center==1){
_10d.top=(screen.height-(_10d.height+110))/2;
_10d.left=(screen.width-_10d.width)/2;
}
if(_10d.fullscreen==1){
_10d.height=screen.height;
_10d.width=screen.width;
}
_10e="location="+_10d.location+",menubar="+_10d.menubar+",height="+_10d.height+",width="+_10d.width+",toolbar="+_10d.toolbar+",scrollbars="+_10d.scrollbars+",status="+_10d.status+",resizable="+_10d.resizable+",left="+_10d.left+",screenX="+_10d.left+",top="+_10d.top+",screenY="+_10d.top;
jQuery(this).bind("click",function(){
var name=_10d.createnew?"PopUpWindow"+_10c:"PopUpWindow";
window.open(this.href,name,_10e).focus();
return false;
});
});
};
(function($){
$.mb_videoEmbedder={name:"jquery.mb.videoEmbedder",version:1,author:"Matteo Bicocchi",defaults:{width:450,youtube:{showTitle:false}},regEx:/\[(.*?)\]/g,mb_setMovie:function(_115,_116,_117){
function findMovieAndEmbed(node,_119,_11a){
var skip=0;
if(_119.indexOf("&AMP;")!=-1){
_119=_119.replace(/&AMP;/g,"&");
}
if(node.nodeType==3){
var pos=node.data.toUpperCase().indexOf(_119);
if(pos>=0){
var _11d=$("<span/>").addClass("mb_video");
var _11e=node.splitText(pos);
_11e.splitText(_119.length);
_11d.append(_11a);
_11e.parentNode.replaceChild(_11d.get(0),_11e);
skip=1;
}
}else{
if(node.nodeType==1&&node.childNodes&&!/(script|style)/i.test(node.tagName)){
for(var i=0;i<node.childNodes.length;++i){
i+=findMovieAndEmbed(node.childNodes[i],_119.toUpperCase(),_11a);
}
}
}
return skip;
}
return _115.each(function(){
findMovieAndEmbed(this,_116.toUpperCase(),_117);
});
},mb_embedMovies:function(opt){
var _121=$(this);
this.options={};
$.extend(this.options,$.mb_videoEmbedder.defaults,opt);
var _122=$(this).html().match($.mb_videoEmbedder.regEx);
if(!_122){
return;
}
$(_122).each(function(i){
var _124=_122[i];
var _125=_124.indexOf("youtube=http://")!=-1;
var _126=_124.indexOf("vimeo=http://")!=-1;
var _127=_124.indexOf("ustream=http://")!=-1;
var _128=_124.indexOf("livestream=http://")!=-1;
var _129=_124.indexOf("flickr=http://")!=-1;
var _12a=_125||_126||_127||_128||_129;
if(!_12a){
return;
}
var _12b=_124.replace(/\[/g,"").replace(/\]/g,"");
var _12c=!$.mb_videoEmbedder.defaults.youtube.showTitle?0:1;
var _12d=_125?(_12b.match(/[\\?&]v=([^&#]*)/))[1]:_126?(_12b.match(/\d+/))[0]:_127?(_12b.match(/\d+/))[0]:_129?(_12b.match(/\d+/))[0]:_128?(_12b.replace("livestream=http://www.livestream.com/","").toLowerCase()):null;
var _12e=_125?(_12c==1?80.5:68):_126?57.5:65;
var _12f=$.mb_videoEmbedder.defaults.width;
var _130=Math.ceil((_12f*_12e)/100);
var path=_125?"http://www.youtube.com/v/":_126?"http://vimeo.com/moogaloop.swf?clip_id=":_127?"http://www.ustream.tv/flash/video/":_128?"http://cdn.livestream.com/grid/LSPlayer.swf?channel=":_129?"http://www.flickr.com/apps/video/stewart.swf?photo_id=":null;
var _132=_125?"&fs=1&rel=0&hd=1&showsearch=0&showinfo="+_12c:_126?"&amp;server=vimeo.com&amp;show_title="+_12c+"&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1":_127?"?disabledComment=true&amp;autoplay=false":_128?"&amp;color=0xe8e8e8&amp;autoPlay=false&amp;mute=false":"";
var _133="<object width=\""+_12f+"\" height=\""+_130+"\">"+"<param name=\"movie\" value=\""+path+_12d+_132+"\">"+"<param name=\"allowFullScreen\" value=\"true\">"+"<param name=\"wmode\" value=\"transparent\">"+"<param name=\"allowscriptaccess\" value=\"always\">"+"<param name=\"flashvars\" value=\"autoplay=false\">"+"<embed src=\""+path+_12d+_132+"\""+" type=\"application/x-shockwave-flash\" "+"wmode=\"transparent\" allowscriptaccess=\"always\" "+"flashvars=\"autoplay=false\""+"allowfullscreen=\"true\" width=\""+_12f+"\" height=\""+_130+"\">"+"</embed>"+"</object>";
if(_12a){
$.mb_videoEmbedder.mb_setMovie(_121,_124,_133);
}
});
}};
$.mb_audioEmbedder={name:"jquery.mb.videoEmbedder",version:1,author:"Matteo Bicocchi",playerPath:"media/player.swf",defaults:{width:300},regEx:/\[audio=(.*?)\]/g,mb_setAudio:function(_134,pat,_136){
function findAudioAndEmbed(node,pat,_139){
var skip=0;
if(pat.indexOf("&AMP;")!=-1){
pat=pat.replace(/&AMP;/g,"&");
}
if(node.nodeType==3){
var pos=node.data.toUpperCase().indexOf(pat);
if(pos>=0){
var _13c=$("<span/>").addClass("mb_audio");
var _13d=node.splitText(pos);
_13d.splitText(pat.length);
_13c.append(_139);
_13d.parentNode.replaceChild(_13c.get(0),_13d);
skip=1;
}
}else{
if(node.nodeType==1&&node.childNodes&&!/(script|style)/i.test(node.tagName)){
for(var i=0;i<node.childNodes.length;++i){
i+=findAudioAndEmbed(node.childNodes[i],pat.toUpperCase(),_139);
}
}
}
return skip;
}
return _134.each(function(){
findAudioAndEmbed(this,pat.toUpperCase(),_136);
});
},mb_embedAudio:function(opt){
var _140=$(this);
this.options={};
$.extend(this.options,$.mb_audioEmbedder.defaults,opt);
var _141=$(this).html().match($.mb_audioEmbedder.regEx);
if(!_141){
return;
}
$(_141).each(function(i){
var pat=_141[i];
var _144=pat.indexOf("audio=http://")!=-1;
var _145=pat.replace(/\[audio=/g,"").replace(/\]/g,"");
var _146=$.mb_audioEmbedder.defaults.width;
var _147="<object width=\""+_146+"\" height=\"24\" type=\"application/x-shockwave-flash\""+"style=\"outline: medium none; visibility: visible;\" "+"data=\""+$.mb_audioEmbedder.playerPath+"\" >"+"<param name=\"menu\" value=\"false\">"+"<param name=\"flashvars\" value=\"soundFile="+_145+"\">"+"<param name=\"wmode\" value=\"transparent\">"+"<param name=\"allowscriptaccess\" value=\"always\">"+"<embed src=\""+$.mb_audioEmbedder.playerPath+"\" type=\"application/x-shockwave-flash\" "+"wmode=\"transparent\" allowscriptaccess=\"always\" "+"width=\""+_146+"\" height=\"24\""+"flashvars=\"soundFile="+_145+"\">"+"</embed>"+"</object>";
if(_144){
$.mb_audioEmbedder.mb_setAudio(_140,pat,_147);
}
});
}};
$.fn.mb_embedMovies=$.mb_videoEmbedder.mb_embedMovies;
$.fn.mb_embedAudio=$.mb_audioEmbedder.mb_embedAudio;
})(jQuery);
(function($){
$.fn.superfish=function(op){
var sf=$.fn.superfish,c=sf.c,_14c=$(["<span class=\"",c.arrowClass,"\"> &#187;</span>"].join("")),over=function(){
var $$=$(this),menu=_150($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},out=function(){
var $$=$(this),menu=_150($$),o=sf.op;
clearTimeout(menu.sfTimer);
menu.sfTimer=setTimeout(function(){
o.retainPath=($.inArray($$[0],o.$path)>-1);
$$.hideSuperfishUl();
if(o.$path.length&&$$.parents(["li.",o.hoverClass].join("")).length<1){
over.call(o.$path);
}
},o.delay);
},_150=function(_155){
var menu=_155.parents(["ul.",c.menuClass,":first"].join(""))[0];
sf.op=sf.o[menu.serial];
return menu;
},_157=function($a){
$a.addClass(c.anchorClass).append(_14c.clone());
};
return this.each(function(){
var s=this.serial=sf.o.length;
var o=$.extend({},sf.defaults,op);
o.$path=$("li."+o.pathClass,this).slice(0,o.pathLevels).each(function(){
$(this).addClass([o.hoverClass,c.bcClass].join(" ")).filter("li:has(ul)").removeClass(o.pathClass);
});
sf.o[s]=sf.op=o;
$("li:has(ul)",this)[($.fn.hoverIntent&&!o.disableHI)?"hoverIntent":"hover"](over,out).each(function(){
if(o.autoArrows){
_157($(">a:first-child",this));
}
}).not("."+c.bcClass).hideSuperfishUl();
var $a=$("a",this);
$a.each(function(i){
var $li=$a.eq(i).parents("li");
$a.eq(i).focus(function(){
over.call($li);
}).blur(function(){
out.call($li);
});
});
o.onInit.call(this);
}).each(function(){
var _15e=[c.menuClass];
if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){
_15e.push(c.shadowClass);
}
$(this).addClass(_15e.join(" "));
});
};
var sf=$.fn.superfish;
sf.o=[];
sf.op={};
sf.IE7fix=function(){
var o=sf.op;
if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined){
this.toggleClass(sf.c.shadowClass+"-off");
}
};
sf.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};
sf.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){
},onBeforeShow:function(){
},onShow:function(){
},onHide:function(){
}};
$.fn.extend({hideSuperfishUl:function(){
var o=sf.op,not=(o.retainPath===true)?o.$path:"";
o.retainPath=false;
var $ul=$(["li.",o.hoverClass].join(""),this).add(this).not(not).removeClass(o.hoverClass).find(">ul").hide().css("visibility","hidden");
o.onHide.call($ul);
return this;
},showSuperfishUl:function(){
var o=sf.op,sh=sf.c.shadowClass+"-off",$ul=this.addClass(o.hoverClass).find(">ul:hidden").css("visibility","visible");
sf.IE7fix.call($ul);
o.onBeforeShow.call($ul);
$ul.animate(o.animation,o.speed,function(){
sf.IE7fix.call($ul);
o.onShow.call($ul);
});
return this;
}});
})(jQuery);
(function($){
$.fn.hoverIntent=function(f,g){
var cfg={sensitivity:7,interval:100,timeout:0};
cfg=$.extend(cfg,g?{over:f,out:g}:f);
var cX,cY,pX,pY;
var _16f=function(ev){
cX=ev.pageX;
cY=ev.pageY;
};
var _171=function(ev,ob){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){
$(ob).unbind("mousemove",_16f);
ob.hoverIntent_s=1;
return cfg.over.apply(ob,[ev]);
}else{
pX=cX;
pY=cY;
ob.hoverIntent_t=setTimeout(function(){
_171(ev,ob);
},cfg.interval);
}
};
var _174=function(ev,ob){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
ob.hoverIntent_s=0;
return cfg.out.apply(ob,[ev]);
};
var _177=function(e){
var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;
while(p&&p!=this){
try{
p=p.parentNode;
}
catch(e){
p=this;
}
}
if(p==this){
return false;
}
var ev=jQuery.extend({},e);
var ob=this;
if(ob.hoverIntent_t){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
}
if(e.type=="mouseover"){
pX=ev.pageX;
pY=ev.pageY;
$(ob).bind("mousemove",_16f);
if(ob.hoverIntent_s!=1){
ob.hoverIntent_t=setTimeout(function(){
_171(ev,ob);
},cfg.interval);
}
}else{
$(ob).unbind("mousemove",_16f);
if(ob.hoverIntent_s==1){
ob.hoverIntent_t=setTimeout(function(){
_174(ev,ob);
},cfg.timeout);
}
}
};
return this.mouseover(_177).mouseout(_177);
};
})(jQuery);


