(function($){
$.fn.bizOrangeSeedMediaStandardLock=false;
$.fn.bizOrangeSeedMediaStandardMaxHeight=($(window).height()-135);
$.fn.orsdgallery=function(_2){
var _3={url:"",defaultImage:"",exposeOpacity:1,exposeColor:"#fff",portId:"orsdgallery-container",sensitivity:7,interval:100,timeout:0};
_3=$.extend(_3,_2);
portLock=$(this).bizOrangeSeedMediaStandardLock;
portHeight=$(this).bizOrangeSeedMediaStandardMaxHeight;
var _4=function(e){
$.getJSON(_3.url,{id:$(this).attr("album-id")},function(_6){
port=$("#"+_3.portId);
if(!port.length){
port=$("<div/>").attr("id",_3.portId).addClass("orsdgallery-container ui-helper-hidden").html("<div class=\"orsdgallery-inner-container\"><div class=\"orsdgallery-scroller\"><a class=\"prev browse left\">Next</a><div class=\"orsdgallery-thumbnails ui-widget-content\"><div class=\"items\"></div></div><a class=\"next browse right\">Pref</a><br style=\"clear: both;\" /></div><div class=\"orsdgallery-port\"><img src=\""+_3.defaultImage+"\" /></div><div class=\"orsdgallery-port-caption\"></div><div class=\"orsdgallery-port-c\"></div><div class=\"orsdgallery-menu\"><button class=\"orsdgallery-menu-prev\">Previous</button><button class=\"orsdgallery-menu-next\">Next</button><button class=\"orsdgallery-menu-lock-caption\">Captions</button><button class=\"orsdgallery-menu-shade\">Shade Thumbnails</button><div class=\"orsdgallery-menu-status\"></div></div><div class=\"orsdgallery-menu-2\"><button class=\"orsdgallery-menu-close\">Close</button></div></div>");
$("body").append(port);
$("a.prev.browse",port).button({text:false,icons:{primary:"ui-icon-circle-triangle-w"}}).removeClass("ui-corner-all").addClass("ui-corner-bl");
$("a.next.browse",port).button({text:false,icons:{primary:"ui-icon-circle-triangle-e"}}).removeClass("ui-corner-all").addClass("ui-corner-br");
$(".orsdgallery-menu-close",port).button({icons:{secondary:"ui-icon-close"}}).removeClass("ui-corner-all").addClass("ui-corner-bottom").click(function(){
var m=$(".orsdgallery-inner-container",port).css("margin-top");
if(m!="0px"){
$(".orsdgallery-menu-shade",port).click();
}
$(".orsdgallery-thumbnails .items",port).empty();
port.hide();
$.mask.close();
});
$(".orsdgallery-menu-prev",port).button({text:false,icons:{primary:"ui-icon-seek-prev"}}).removeClass("ui-corner-all").addClass("ui-corner-bl").click(function(){
var p=$(".items .thumb.active",port).prev(".thumb");
if(p.hasClass("thumb")){
p.click();
}else{
var _9=$(".orsdgallery-thumbnails",port).data("scrollable");
if(_9.getIndex()<=0){
return;
}
var _a=_9.prev().getIndex();
var _b=_9.getItems();
var _c=$(_b[_a]).children(".thumb:last").click();
}
});
$(".orsdgallery-menu-lock-caption",port).button({icons:{primary:"ui-icon-locked"}}).removeClass("ui-corner-all").click(function(){
if(!portLock){
portLock=true;
$(this).button("option","icons",{primary:"ui-icon-unlocked"});
$(".orsdgallery-port-caption",port).fadeTo("fast",0.6);
}else{
portLock=false;
$(this).button("option","icons",{primary:"ui-icon-locked"});
$(".orsdgallery-port-caption",port).fadeTo("fast",0);
}
});
$(".orsdgallery-menu-shade",port).button({text:false,icons:{primary:"ui-icon-triangle-1-n"}}).removeClass("ui-corner-all").addClass("ui-corner-br").toggle(function(){
$(this).button("option","icons",{primary:"ui-icon-triangle-1-s"});
$(".orsdgallery-inner-container",port).css("margin-top","-93px");
portHeight=portHeight+93;
$(".items .thumb.active",port).addClass("resize-img").click();
},function(){
$(this).button("option","icons",{primary:"ui-icon-triangle-1-n"});
$(".orsdgallery-inner-container",port).css("margin-top","0px");
portHeight=portHeight-93;
$(".items .thumb.active",port).addClass("resize-img").click();
});
$(".orsdgallery-menu-next",port).button({text:false,icons:{primary:"ui-icon-seek-next"}}).removeClass("ui-corner-all").click(function(){
var n=$(".items .thumb.active",port).next(".thumb");
if(n.hasClass("thumb")){
n.click();
}else{
var _e=$(".orsdgallery-thumbnails",port).data("scrollable");
if(_e.getIndex()>=(_e.getSize()-1)){
return;
}
var _f=_e.next().getIndex();
var _10=_e.getItems();
var _11=$(_10[_f]).children(".thumb:first").click();
}
});
$(".orsdgallery-port-c",port).hover(function(){
if(!portLock){
$(".orsdgallery-port-caption",port).fadeTo("fast",0.6);
}
},function(){
if(!portLock){
$(".orsdgallery-port-caption").fadeTo("slow",0);
}
});
}
$(".orsdgallery-thumbnails .items",port).empty();
var _12=_6.thumbnails;
for(i in _12){
if((i%7)==0){
$(".orsdgallery-thumbnails .items",port).append("<div class=\"item\"></div>");
}
var _13=_12[i];
$(".orsdgallery-thumbnails .items .item:last").append("<div title=\""+_13.display_name+"\" orsd-media-url=\""+_13.large_url+"\" class=\"thumb ui-widget-content\" style=\"position: relative; background: transparent url("+_13.url+") top center no-repeat;\"><span class=\"caption ui-helper-hidden\">"+_13.caption+"</span></div>");
}
port.expose({opacity:_3.exposeOpacity,color:_3.exposeColor,closeOnEsc:false,closeOnClick:false}).show();
$(".orsdgallery-thumbnails",port).scrollable();
$(".orsdgallery-menu",port).position({of:$(".orsdgallery-scroller",port),my:"left top",at:"left bottom",});
$(".orsdgallery-menu-2",port).position({of:$(".orsdgallery-scroller",port),my:"right top",at:"right bottom",});
$(".orsdgallery-thumbnails .thumb",port).hover(function(){
$(this).addClass("ui-widget-header");
},function(){
if(!$(this).hasClass("active")){
$(this).removeClass("ui-widget-header");
}
}).click(function(){
if($(this).hasClass("active")&&!$(this).hasClass("resize-img")){
return;
}else{
if($(this).hasClass("active")){
$(this).removeClass("active");
}
}
var url=$(this).attr("orsd-media-url");
var _15=$(this).attr("title");
var _16=$(".caption",this).html();
var _17=$(".orsdgallery-port",port);
var _18=new Image();
_18.onload=function(){
height=_18.height;
width=_18.width;
img=_17.find("img");
img.attr("src",url);
if(height>portLock){
ratio=portHeight/height;
width=width*ratio;
height=portHeight;
}
if(width>950){
ratio=950/width;
height=height*ratio;
width=950;
}
img.css("height",height);
img.css("width",width);
_17.height(height).width(width);
if(_16){
$(".orsdgallery-port-caption",port).width(width+2).html("<div style=\"padding:18px;\"><p>"+_16+"</p></div>").position({of:_17,my:"left top",at:"left top",});
}else{
$(".orsdgallery-port-caption",port).empty();
}
$(".orsdgallery-port-c",port).width(width).height(height).position({of:_17,my:"left top",at:"left top",});
if(_16){
$(".orsdgallery-menu-status",port).html(_15+" <div class=\"ui-icon ui-icon-comment\" style=\"display: inline-block\"></div>");
}else{
$(".orsdgallery-menu-status",port).html(_15);
}
};
_18.src=url;
$(".items .thumb",port).removeClass("active ui-widget-header");
$(this).addClass("active ui-widget-header");
});
var _19=$(".orsdgallery-port",port);
img=_19.find("img");
img.attr("src",_3.defaultImage);
$(".thumb:first",port).click();
$(".orsdgallery-thumbnails",port).data("scrollable").begin();
});
};
return this.click(_4);
};
})(jQuery);
jQuery(document).ready(function(){
jQuery(".orsd-ui-button").button();
window.setTimeout(clearMessages,10000);
});
function clearMessages(){
jQuery(".form-message").fadeOut();
}
(function(e){
function n(f,c){
var a=e(c);
return a.length<2?a:f.parent().find(c);
}
function t(f,c){
var a=this,l=f.add(a),g=f.children(),k=0,m=c.vertical;
j||(j=a);
if(g.length>1){
g=e(c.items,f);
}
e.extend(a,{getConf:function(){
return c;
},getIndex:function(){
return k;
},getSize:function(){
return a.getItems().size();
},getNaviButtons:function(){
return o.add(p);
},getRoot:function(){
return f;
},getItemWrap:function(){
return g;
},getItems:function(){
return g.children(c.item).not("."+c.clonedClass);
},move:function(b,d){
return a.seekTo(k+b,d);
},next:function(b){
return a.move(1,b);
},prev:function(b){
return a.move(-1,b);
},begin:function(b){
return a.seekTo(0,b);
},end:function(b){
return a.seekTo(a.getSize()-1,b);
},focus:function(){
return j=a;
},addItem:function(b){
b=e(b);
if(c.circular){
e(".cloned:last").before(b);
e(".cloned:first").replaceWith(b.clone().addClass(c.clonedClass));
}else{
g.append(b);
}
l.trigger("onAddItem",[b]);
return a;
},seekTo:function(b,d,h){
if(c.circular&&b===0&&k==-1&&d!==0){
return a;
}
if(!c.circular&&b<0||b>a.getSize()||b<-1){
return a;
}
var i=b;
if(b.jquery){
b=a.getItems().index(b);
}else{
i=a.getItems().eq(b);
}
var q=e.Event("onBeforeSeek");
if(!h){
l.trigger(q,[b,d]);
if(q.isDefaultPrevented()||!i.length){
return a;
}
}
i=m?{top:-i.position().top}:{left:-i.position().left};
k=b;
j=a;
if(d===undefined){
d=c.speed;
}
g.animate(i,d,c.easing,h||function(){
l.trigger("onSeek",[b]);
});
return a;
}});
e.each(["onBeforeSeek","onSeek","onAddItem"],function(b,d){
e.isFunction(c[d])&&e(a).bind(d,c[d]);
a[d]=function(h){
e(a).bind(d,h);
return a;
};
});
if(c.circular){
var r=a.getItems().slice(-1).clone().prependTo(g),s=a.getItems().eq(1).clone().appendTo(g);
r.add(s).addClass(c.clonedClass);
a.onBeforeSeek(function(b,d,h){
if(!b.isDefaultPrevented()){
if(d==-1){
a.seekTo(r,h,function(){
a.end(0);
});
return b.preventDefault();
}else{
d==a.getSize()&&a.seekTo(s,h,function(){
a.begin(0);
});
}
}
});
a.seekTo(0,0);
}
var o=n(f,c.prev).click(function(){
a.prev();
}),p=n(f,c.next).click(function(){
a.next();
});
!c.circular&&a.getSize()>1&&a.onBeforeSeek(function(b,d){
o.toggleClass(c.disabledClass,d<=0);
p.toggleClass(c.disabledClass,d>=a.getSize()-1);
});
c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(b,d){
if(c.mousewheel){
a.move(d<0?1:-1,c.wheelSpeed||50);
return false;
}
});
c.keyboard&&e(document).bind("keydown.scrollable",function(b){
if(!(!c.keyboard||b.altKey||b.ctrlKey||e(b.target).is(":input"))){
if(!(c.keyboard!="static"&&j!=a)){
var d=b.keyCode;
if(m&&(d==38||d==40)){
a.move(d==38?-1:1);
return b.preventDefault();
}
if(!m&&(d==37||d==39)){
a.move(d==37?-1:1);
return b.preventDefault();
}
}
}
});
e(a).trigger("onBeforeSeek",[c.initialIndex]);
}
e.tools=e.tools||{version:"1.2.2"};
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,wheelSpeed:0}};
var j;
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 t(e(this),f);
e(this).data("scrollable",c);
});
return f.api?c:this;
};
})(jQuery);
(function(c){
var g=c.tools.scrollable;
g.autoscroll={conf:{autoplay:true,interval:3000,autopause:true}};
c.fn.autoscroll=function(d){
if(typeof d=="number"){
d={interval:d};
}
var b=c.extend({},g.autoscroll.conf,d),h;
this.each(function(){
var a=c(this).data("scrollable");
if(a){
h=a;
}
var e,i,f=true;
a.play=function(){
if(!e){
f=false;
e=setInterval(function(){
a.next();
},b.interval);
a.next();
}
};
a.pause=function(){
e=clearInterval(e);
};
a.stop=function(){
a.pause();
f=true;
};
b.autopause&&a.getRoot().add(a.getNaviButtons()).hover(function(){
a.pause();
clearInterval(i);
},function(){
f||(i=setTimeout(a.play,b.interval));
});
b.autoplay&&setTimeout(a.play,b.interval);
});
return b.api?h:this;
};
})(jQuery);
(function(d){
function p(c,g){
var h=d(g);
return h.length<2?h:c.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(c){
if(typeof c=="string"){
c={navi:c};
}
c=d.extend({},m.navigator.conf,c);
var g;
this.each(function(){
function h(a,b,i){
e.seekTo(b);
if(j){
if(location.hash){
location.hash=a.attr("href").replace("#","");
}
}else{
return i.preventDefault();
}
}
function f(){
return k.find(c.naviItem||"> *");
}
function n(a){
var b=d("<"+(c.naviItem||"a")+"/>").click(function(i){
h(d(this),a,i);
}).attr("href","#"+a);
a===0&&b.addClass(l);
c.indexed&&b.text(a+1);
c.idPrefix&&b.attr("id",c.idPrefix+a);
return b.appendTo(k);
}
function o(a,b){
a=f().eq(b.replace("#",""));
a.length||(a=f().filter("[href="+b+"]"));
a.click();
}
var e=d(this).data("scrollable"),k=p(e.getRoot(),c.navi),q=e.getNaviButtons(),l=c.activeClass,j=c.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(b){
h(d(this),a,b);
});
}):d.each(e.getItems(),function(a){
n(a);
});
e.onBeforeSeek(function(a,b){
var i=f().eq(b);
!a.isDefaultPrevented()&&i.length&&f().removeClass(l).eq(b).addClass(l);
});
e.onAddItem(function(a,b){
b=n(e.getItems().index(b));
j&&b.history(o);
});
j&&f().history(o);
});
return c.api?g:this;
};
})(jQuery);
(function(e){
function v(a,b,c){
var j=a.offset().top,g=a.offset().left,l=c.position.split(/,?\s+/),f=l[0];
l=l[1];
j-=b.outerHeight()-c.offset[0];
g+=a.outerWidth()+c.offset[1];
c=b.outerHeight()+a.outerHeight();
if(f=="center"){
j+=c/2;
}
if(f=="bottom"){
j+=c;
}
a=a.outerWidth();
if(l=="center"){
g-=(a+b.outerWidth())/2;
}
if(l=="left"){
g-=a;
}
return {top:j,left:g};
}
function w(a){
function b(){
return this.getAttribute("type")==a;
}
b.key="[type="+a+"]";
return b;
}
function s(a,b,c){
function j(f,d,k){
if(!(!c.grouped&&f.length)){
var h;
if(k===false||e.isArray(k)){
h=i.messages[d.key||d]||i.messages["*"];
h=h[c.lang]||i.messages["*"].en;
(d=h.match(/\$\d/g))&&e.isArray(k)&&e.each(d,function(n){
h=h.replace(this,k[n]);
});
}else{
h=k[c.lang]||k;
}
f.push(h);
}
}
var g=this,l=b.add(g);
a=a.not(":button, :image, :reset, :submit");
e.extend(g,{getConf:function(){
return c;
},getForm:function(){
return b;
},getInputs:function(){
return a;
},invalidate:function(f,d){
if(!d){
var k=[];
e.each(f,function(h,n){
h=a.filter("[name="+h+"]");
if(h.length){
h.trigger("OI",[n]);
k.push({input:h,messages:[n]});
}
});
f=k;
d=e.Event();
}
d.type="onFail";
l.trigger(d,[f]);
d.isDefaultPrevented()||q[c.effect][0].call(g,f,d);
return g;
},reset:function(f){
f=f||a;
f.removeClass(c.errorClass).each(function(){
var d=e(this).data("msg.el");
if(d){
d.remove();
e(this).data("msg.el",null);
}
});
},checkValidity:function(f,d){
f=f||a;
f=f.not(":disabled");
if(!f.length){
return true;
}
d=d||e.Event();
d.type="onBeforeValidate";
l.trigger(d,[f]);
if(d.isDefaultPrevented()){
return d.result;
}
var k=[],h=c.errorInputEvent+".v";
f.each(function(){
var p=[],m=e(this).unbind(h).data("messages",p);
e.each(t,function(){
var o=this,r=o[0];
if(m.filter(r).length){
o=o[1].call(g,m,m.val());
if(o!==true){
d.type="onBeforeFail";
l.trigger(d,[m,r]);
if(d.isDefaultPrevented()){
return false;
}
var u=m.attr(c.messageAttr);
if(u){
p=[u];
return false;
}else{
j(p,r,o);
}
}
}
});
if(p.length){
k.push({input:m,messages:p});
m.trigger("OI",[p]);
c.errorInputEvent&&m.bind(h,function(o){
g.checkValidity(m,o);
});
}
if(c.singleError&&k.length){
return false;
}
});
var n=q[c.effect];
if(!n){
throw "Validator: cannot find effect \""+c.effect+"\"";
}
if(k.length){
g.invalidate(k,d);
return false;
}else{
n[1].call(g,f,d);
d.type="onSuccess";
l.trigger(d,[f]);
f.unbind(h);
}
return true;
}});
e.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(f,d){
e.isFunction(c[d])&&e(g).bind(d,c[d]);
g[d]=function(k){
e(g).bind(d,k);
return g;
};
});
c.formEvent&&b.bind(c.formEvent,function(f){
if(!g.checkValidity(null,f)){
return f.preventDefault();
}
});
b.bind("reset",function(){
g.reset();
});
a[0]&&a[0].validity&&a.each(function(){
this.oninvalid=function(){
return false;
};
});
if(b[0]){
b[0].checkValidity=g.checkValidity;
}
c.inputEvent&&a.bind(c.inputEvent,function(f){
g.checkValidity(e(this),f);
});
a.filter(":checkbox, select").filter("[required]").change(function(f){
var d=e(this);
if(this.checked||d.is("select")&&e(this).val()){
q[c.effect][1].call(g,d,f);
}
});
}
e.tools=e.tools||{version:"1.2.2"};
var x=/\[type=([a-z]+)\]/,y=/^-?[0-9]*(\.[0-9]+)?$/,z=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,A=/^(https?:\/\/)?([\da-z\.\-]+)\.([a-z\.]{2,6})([\/\w \.\-]*)*\/?$/i,i;
i=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,j){
i.messages[c]=i.messages[c]||{};
i.messages[c][a]=j;
});
},localizeFn:function(a,b){
i.messages[a]=i.messages[a]||{};
e.extend(i.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=x.exec(a)){
a=w(b[1]);
}
t.push([a,c]);
},addEffect:function(a,b,c){
q[a]=[b,c];
}};
var t=[],q={"default":[function(a){
var b=this.getConf();
e.each(a,function(c,j){
c=j.input;
c.addClass(b.errorClass);
var g=c.data("msg.el");
if(!g){
g=e(b.message).addClass(b.messageClass).appendTo(document.body);
c.data("msg.el",g);
}
g.css({visibility:"hidden"}).find("span").remove();
e.each(j.messages,function(l,f){
e("<span/>").html(f).appendTo(g);
});
g.outerWidth()==g.parent().width()&&g.add(g.find("p")).css({display:"inline"});
j=v(c,g,b);
g.css({visibility:"visible",position:"absolute",top:j.top,left:j.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);
};
i.fn(":email","Please enter a valid email address",function(a,b){
return !b||z.test(b);
});
i.fn(":url","Please enter a valid URL",function(a,b){
return !b||A.test(b);
});
i.fn(":number","Please enter a numeric value.",function(a,b){
return y.test(b);
});
i.fn("[max]","Please enter a value smaller than $1",function(a,b){
a=a.attr("max");
return parseFloat(b)<=parseFloat(a)?true:[a];
});
i.fn("[min]","Please enter a value larger than $1",function(a,b){
a=a.attr("min");
return parseFloat(b)>=parseFloat(a)?true:[a];
});
i.fn("[required]","Please complete this mandatory field.",function(a,b){
if(a.is(":checkbox")){
return a.is(":checked");
}
return !!b;
});
i.fn("[pattern]",function(a){
var b=new RegExp("^"+a.attr("pattern")+"$");
return b.test(a.val());
});
e.fn.validator=function(a){
if(this.data("validator")){
return this;
}
a=e.extend(true,{},i.conf,a);
if(this.is("form")){
return this.each(function(){
var c=e(this),j=new s(c.find(":input"),c,a);
c.data("validator",j);
});
}else{
var b=new s(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(window).width(),b(document).height()];
}
function h(a){
if(a){
return a.call(b.mask);
}
}
b.tools=b.tools||{version:"1.2.2"};
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,f,g,j;
b.mask={load:function(a,d){
if(f){
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(e){
e.keyCode==27&&b.mask.close(e);
});
a.closeOnClick&&c.bind("click.mask",function(e){
b.mask.close(e);
});
b(window).bind("resize.mask",function(){
b.mask.fit();
});
if(d&&d.length){
j=d.eq(0).css("zIndex");
b.each(d,function(){
var e=b(this);
/relative|absolute|fixed/i.test(e.css("position"))||e.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);
});
f=true;
return this;
},close:function(){
if(f){
if(h(g.onBeforeClose)===false){
return this;
}
c.fadeOut(g.closeSpeed,function(){
h(g.onClose);
i&&i.css({zIndex:j});
});
b(document).unbind("keydown.mask");
c.unbind("click.mask");
b(window).unbind("resize.mask");
f=false;
}
return this;
},fit:function(){
if(f){
var a=k();
c.css({width:a[0],height:a[1]});
}
},getMask:function(){
return c;
},isLoaded:function(){
return f;
},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);
(function($){
$.fn.superfish=function(op){
var sf=$.fn.superfish,c=sf.c,_e3=$(["<span class=\"",c.arrowClass,"\"> &#187;</span>"].join("")),_e4=function(){
var $$=$(this),_e6=_e7($$);
clearTimeout(_e6.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},out=function(){
var $$=$(this),_ea=_e7($$),o=sf.op;
clearTimeout(_ea.sfTimer);
_ea.sfTimer=setTimeout(function(){
o.retainPath=($.inArray($$[0],o.$path)>-1);
$$.hideSuperfishUl();
if(o.$path.length&&$$.parents(["li.",o.hoverClass].join("")).length<1){
_e4.call(o.$path);
}
},o.delay);
},_e7=function(_ec){
var _ed=_ec.parents(["ul.",c.menuClass,":first"].join(""))[0];
sf.op=sf.o[_ed.serial];
return _ed;
},_ee=function($a){
$a.addClass(c.anchorClass).append(_e3.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"](_e4,out).each(function(){
if(o.autoArrows){
_ee($(">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(){
_e4.call($li);
}).blur(function(){
out.call($li);
});
});
o.onInit.call(this);
}).each(function(){
var _f5=[c.menuClass];
if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){
_f5.push(c.shadowClass);
}
$(this).addClass(_f5.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 _106=function(ev){
cX=ev.pageX;
cY=ev.pageY;
};
var _108=function(ev,ob){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){
$(ob).unbind("mousemove",_106);
ob.hoverIntent_s=1;
return cfg.over.apply(ob,[ev]);
}else{
pX=cX;
pY=cY;
ob.hoverIntent_t=setTimeout(function(){
_108(ev,ob);
},cfg.interval);
}
};
var _10b=function(ev,ob){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
ob.hoverIntent_s=0;
return cfg.out.apply(ob,[ev]);
};
var _10e=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",_106);
if(ob.hoverIntent_s!=1){
ob.hoverIntent_t=setTimeout(function(){
_108(ev,ob);
},cfg.interval);
}
}else{
$(ob).unbind("mousemove",_106);
if(ob.hoverIntent_s==1){
ob.hoverIntent_t=setTimeout(function(){
_10b(ev,ob);
},cfg.timeout);
}
}
};
return this.mouseover(_10e).mouseout(_10e);
};
})(jQuery);

