jQuery.easing['jswing']=jQuery.easing['swing'];
jQuery.extend(jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d){
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d){
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d){
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d){
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d){
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d){
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d){
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d){
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d){
return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d){
return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d){
if(t==0) return b;
if(t==d) return b+c;
if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d){
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d){
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d){
if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d)==1) return b+c;  if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
},
easeOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d)==1) return b+c;  if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b;
},
easeInOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d/2)==2) return b+c;  if(!p) p=d*(.3*1.5);
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d){
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d){
if((t/=d) < (1/2.75)){
return c*(7.5625*t*t) + b;
}else if(t < (2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
}else if(t < (2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}},
easeInOutBounce: function (x, t, b, c, d){
if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}});
;(function($){
$.fn.superfish=function(op){
var sf=$.fn.superfish,
c=sf.c,
$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
over=function(){
var $$=$(this), menu=getMenu($$);
clearTimeout(menu.sfTimer);
$$.showSuperfishUl().siblings().hideSuperfishUl();
},
out=function(){
var $$=$(this), menu=getMenu($$), 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);
},
getMenu=function($menu){
var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
sf.op=sf.o[menu.serial];
return menu;
},
addArrow=function($a){ $a.addClass(c.anchorClass).append($arrow.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) addArrow($('>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 menuClasses=[c.menuClass];
if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version < 7)) menuClasses.push(c.shadowClass);
$(this).addClass(menuClasses.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);
jQuery.noConflict();
jQuery(window).load(function(){
var $featured_content=jQuery('#featured'),
et_disable_toptier=jQuery("meta[name=et_disable_toptier]").attr('content'),
et_featured_slider_pause=jQuery("meta[name=et_featured_slider_pause]").attr('content'),
et_featured_slider_auto=jQuery("meta[name=et_featured_slider_auto]").attr('content'),
et_featured_auto_speed=jQuery("meta[name=et_featured_auto_speed]").attr('content');
jQuery('ul.nav').superfish({
delay:       300,
animation:   {opacity:'show',height:'show'},
speed:       'fast',
autoArrows:  true,
dropShadows: false
});
jQuery('ul.nav > li > a.sf-with-ul').parent('li').addClass('sf-ul');
if($featured_content.length){
var $featured_slides=$featured_content.find('.slide').show(),
slides_pos=[],
slides_zindex=[],
active_slide_width=500,
small_slide_width=250,
slide_margin=16,
featured_animation='easeInOutQuad', //'easeInOutQuad','easeInOutQuint', 'easeInOutQuart'
et_animation_running=false,
last_slide=false,
pause_scroll=false,
top_slide_pos,
left_slide_pos,
slide_opacity;
$featured_content.css('backgroundImage', 'none');
$featured_slides.each(function(index, domEle){
var $this_slide=jQuery(domEle);
top_slide_pos=82;
slide_opacity=0.3;
if(index===0){
top_slide_pos=0;
slide_opacity=1;
left_slide_pos=230;
}
if(index===1) left_slide_pos=620;
if(index===2) left_slide_pos=90;
if(index > 2){
if(index % 2===1) left_slide_pos=slides_pos[index-2].left + small_slide_width + slide_margin;
else left_slide_pos=slides_pos[index-2].left - small_slide_width - slide_margin;
}
if(index!==0){
$this_slide.find('img').attr({
width: '250',
height: '169'
});
}
slides_pos[index]={
width: $this_slide.width(),
top: top_slide_pos,
left: left_slide_pos,
opacity: slide_opacity
};
$this_slide.css('zIndex',$featured_slides.length-index);
slides_zindex[index]=$this_slide.css('zIndex');
$this_slide.animate(slides_pos[index],100,function(){
jQuery(this).css('width', 'auto');
});
jQuery(domEle).data('slide_pos',index);
});
jQuery('a.nextslide').live('click',function(event){
event.preventDefault();
if(!et_animation_running) rotate_slide('next');
if(typeof(et_auto_animation)!=='undefined') clearInterval(et_auto_animation);
});
jQuery('a.prevslide').live('click',function(event){
event.preventDefault();
if(!et_animation_running) rotate_slide('prev');
if(typeof(et_auto_animation)!=='undefined') clearInterval(et_auto_animation);
});
$featured_slides.hover(function(){
if(!et_animation_running){
if(jQuery(this).hasClass('active')){
jQuery(this).find('.additional').stop(true, true).animate({'opacity':'show'},300);
}}
if(et_featured_slider_pause==1) pause_scroll=true;
},function(){
if(!et_animation_running){
jQuery(this).find('.additional').stop(true, true).animate({'opacity':'hide'},300);
}
if(et_featured_slider_pause==1) pause_scroll=false;
});
var et_mousex=0,
et_mousey=0,
featured_activeslide_x=$featured_content.find('.container').offset().left + 230,
featured_activeslide_y=$featured_content.find('.container').offset().top;
jQuery(document).mousemove(function(e){
et_mousex=e.pageX;
et_mousey=e.pageY;
});
function rotate_slide(direction){
$featured_slides.removeClass('active');
$featured_slides.each(function(index, domEle){
var $this_slide=jQuery(domEle),
next_slide_num=$this_slide.data('slide_pos');
et_animation_running=true;
last_slide=false;
$featured_slides.find('.additional').css('display','none');
if(direction==='next'){
if(next_slide_num===0) next_slide_num=2;
else if(next_slide_num===1) next_slide_num=0;
else if($featured_slides.length % 2===0&&next_slide_num===($featured_slides.length - 2)){
next_slide_num=$featured_slides.length - 1;
}else{
if(next_slide_num!==($featured_slides.length - 1)){
if(next_slide_num % 2===0)  next_slide_num=next_slide_num + 2;
else next_slide_num=next_slide_num - 2;
}else{
if($featured_slides.length % 2===0){
if(next_slide_num % 2===0)  next_slide_num=next_slide_num + 2;
else next_slide_num=next_slide_num - 2;
}else{
next_slide_num=$featured_slides.length - 2;
last_slide=true;
}}
}}else{
if(next_slide_num===0) next_slide_num=1;
else if($featured_slides.length % 2===0&&next_slide_num===($featured_slides.length - 1)){
next_slide_num=$featured_slides.length - 2;
}else{
if($featured_slides.length % 2===0){
if(next_slide_num % 2===0) next_slide_num=next_slide_num - 2;
else next_slide_num=next_slide_num + 2;
}else{
if(next_slide_num!==($featured_slides.length - 2)){
if(next_slide_num % 2===0) next_slide_num=next_slide_num - 2;
else next_slide_num=next_slide_num + 2;
}else{
next_slide_num=$featured_slides.length-1;
last_slide=true;
}}
}}
if(last_slide){
$this_slide.css('left',slides_pos[next_slide_num].left);
}
$this_slide.stop(true, true).animate(slides_pos[next_slide_num],600,featured_animation,function(){
if(index===$featured_slides.length - 1) et_animation_running=false;
if(!et_animation_running){
if(et_mousex > featured_activeslide_x&&et_mousex < (featured_activeslide_x + 500)&&et_mousey > featured_activeslide_y&&et_mousey < (featured_activeslide_y + 335)){
if(next_slide_num===0) $featured_content.find('.slide').filter(':eq('+($featured_slides.length - 1)+')').find('.additional').stop(true, true).animate({'opacity':'show'},300);
else $featured_content.find('.active .additional').stop(true, true).animate({'opacity':'show'},300);
if(et_featured_slider_pause==1) pause_scroll=true;
}}
jQuery(this).css('width', 'auto');
});
if(next_slide_num!=0){
$this_slide.find('img').stop(true, true).animate({'width':'250px','height':'169px'},600,featured_animation);
}else{
$this_slide.find('img').stop(true, true).animate({'width':'500px','height':'335px'},600,featured_animation,function(){
$this_slide.addClass('active');
});
}
setTimeout(function(){
$this_slide.css({zIndex: slides_zindex[next_slide_num]});
},300);
$this_slide.data('slide_pos',next_slide_num);
});
}
if(et_featured_slider_auto==1){
et_auto_animation=setInterval(function(){
if(!pause_scroll) rotate_slide('next');
}, et_featured_auto_speed);
}
if($featured_content.find('.slide').length==1){
$featured_content.find('.slide').css({'position':'absolute','top':'0','left':'0'}).show();
jQuery('#featured a.prevslide, #featured a.nextslide').hide();
}}
var $et_blurb_thumb=jQuery('div.project');
$et_blurb_thumb.hover(function(){
jQuery(this).find('img').fadeTo('fast', 0.8);
jQuery(this).find('.more-icon,.zoom-icon').fadeTo('fast', 1);
}, function(){
jQuery(this).find('img').fadeTo('fast', 1);
jQuery(this).find('.more-icon,.zoom-icon').fadeTo('fast', 0);
});
var $footer_widget=jQuery("#footer-widgets .footer-widget");
if($footer_widget.length){
$footer_widget.each(function (index, domEle){
if((index+1)%3==0) jQuery(domEle).addClass("last").after("<div class='clear'></div>");
});
}
if(et_disable_toptier==1) jQuery("ul.nav > li > ul").prev("a").attr("href","#");
});