").parent();o.data("height",o.height()),i.hasClass("active")||e==a.display?o.show():o.hide().css("height",0),i.bind("click",function(){n(e)})});var n=function(e){var n=t(i.get(e)),o=t([]);switch(n.hasClass("active")&&(o=n,n=t([])),a.collapseall&&(o=i.filter(".active")),a.mode){case"slide":n.next().stop().show().animate({height:n.next().data("height")},400),o.next().stop().animate({height:0},400,function(){o.next().hide()}),setTimeout(function(){a.onaction.apply(this,[n,o])},401);break;default:n.next().show().css("height",n.next().data("height")),o.next().hide().css("height",0),a.onaction.apply(this,[n,o])}n.addClass("active").parent().addClass("active"),o.removeClass("active").parent().removeClass("active")}}}),t.fn[e.prototype.name]=function(){var a=arguments,i=a[0]?a[0]:null;return this.each(function(){var n=t(this);if(e.prototype[i]&&n.data(e.prototype.name)&&"initialize"!=i)n.data(e.prototype.name)[i].apply(n.data(e.prototype.name),Array.prototype.slice.call(a,1));else if(!i||t.isPlainObject(i)){var o=new e;e.prototype.initialize&&o.initialize.apply(o,t.merge([n],a)),n.data(e.prototype.name,o)}else t.error("Method "+i+" does not exist on jQuery."+e.name)})}}(jQuery);
!function(t){var i=function(){};t.extend(i.prototype,{name:"dropdownMenu",options:{mode:"default",itemSelector:"li",firstLevelSelector:"li.level1",dropdownSelector:"ul",duration:600,remainTime:800,remainClass:"remain",matchHeight:!0,transition:"easeOutExpo",withopacity:!0,centerDropdown:!1,reverseAnimation:!1,fixWidth:!1,fancy:null,boundary:t(window),boundarySelector:null},initialize:function(i,n){this.options=t.extend({},this.options,n);var o=this,e=null,a=!1;if(this.menu=i,this.dropdowns=[],this.options.withopacity=t.support.opacity?this.options.withopacity:!1,this.options.fixWidth){var s=5;this.menu.children().each(function(){s+=t(this).width()}),this.menu.css("width",s)}if(this.options.matchHeight&&this.matchHeight(),this.menu.find(this.options.firstLevelSelector).each(function(i){var n=t(this),s=n.find(o.options.dropdownSelector).css({overflow:"hidden"});if(s.length){s.css("overflow","hidden").show(),s.data("init-width",parseFloat(s.css("width"))),s.data("columns",s.find(".column").length),s.data("single-width",s.data("columns")>1?s.data("init-width")/s.data("columns"):s.data("init-width"));var d=t("
").css({overflow:"hidden"}).append("
"),r=d.find("div:first");s.children().appendTo(r),d.appendTo(s),o.dropdowns.push({dropdown:s,div:d,innerdiv:r}),s.hide()}n.bind({mouseenter:function(h){if(a=!0,o.menu.trigger("menu:enter",[n,i]),e){if(e.index==i)return;e.item.removeClass(o.options.remainClass),e.div.hide().parent().hide()}if(!s.length)return active=null,void(e=null);s.parent().find("div").css({width:"",height:"","min-width":"","min-height":""}),s.removeClass("flip").removeClass("stack"),n.addClass(o.options.remainClass),d.stop().show(),s.show(),o.options.centerDropdown&&s.css("margin-left",-1*(parseFloat(s.data("init-width"))/2-n.width()/2));var p=s.css("width",s.data("init-width")).data("init-width");dpitem=o.options.boundarySelector?t(o.options.boundarySelector,d):d,boundary={top:0,left:0,width:o.options.boundary.width()},r.css({"min-width":p});try{t.extend(boundary,o.options.boundary.offset())}catch(c){}(dpitem.offset().left
boundary.width)&&(s.addClass("flip"),dpitem.offset().left').find(".fancy:first").hide(),h=this.menu.find(".active:first"),p=null,c=function(t,i,n){i&&p&&t.get(0)==p.get(0)||(r.stop().show().css("visibility","visible"),"move"==d.mode?h.length||i?r.animate({left:t.position().left+"px",width:t.width()+"px"},d.duration,d.transition):r.hide():i?r.css({opacity:h?0:1,left:t.position().left+"px",width:t.width()+"px"}).animate({opacity:1},d.duration):r.animate({opacity:0},d.duration),p=i?t:null)};this.menu.bind({"menu:enter":function(t,i,n){c(i,!0),d.onEnter&&d.onEnter(i,n,r)},"menu:leave":function(t,i,n){c(h,!1),d.onLeave&&d.onLeave(i,n,r)},"menu:fixfancy":function(t){p&&r.stop().show().css({left:p.position().left+"px",width:p.width()+"px"})}}),h.length&&"move"==d.mode&&c(h,!0)}},matchHeight:function(){this.menu.find("li.level1.parent").each(function(){var i=0;t(this).find("ul.level2").each(function(){var n=t(this),o=n.parents(".dropdown:first").show();i=Math.max(n.height(),i),o.hide()}).css("min-height",i)})}}),t.fn[i.prototype.name]=function(){var n=arguments,o=n[0]?n[0]:null;return this.each(function(){var e=t(this);if(i.prototype[o]&&e.data(i.prototype.name)&&"initialize"!=o)e.data(i.prototype.name)[o].apply(e.data(i.prototype.name),Array.prototype.slice.call(n,1));else if(!o||t.isPlainObject(o)){var a=new i;i.prototype.initialize&&a.initialize.apply(a,t.merge([e],n)),e.data(i.prototype.name,a)}else t.error("Method "+o+" does not exist on jQuery."+i.name)})}}(jQuery);
(function($){$(document).ready(function(){var config=$('body').data('config')||{};$('.menu-sidebar').accordionMenu({mode:'slide'});$('#menu').dropdownMenu({mode:'slide',dropdownSelector:'div.dropdown'});$('a[href="#page"]').smoothScroller({duration:500});$('article[data-permalink]').socialButtons(config);});$.onMediaQuery('(min-width: 960px)',{init:function(){if(!this.supported)this.matches=true;},valid:function(){$.matchWidth('grid-block','.grid-block','.grid-h').match();$.matchHeight('main','#maininner, #sidebar-a, #sidebar-b').match();$.matchHeight('top-a','#top-a .grid-h','.deepest').match();$.matchHeight('top-b','#top-b .grid-h','.deepest').match();$.matchHeight('bottom-a','#bottom-a .grid-h','.deepest').match();$.matchHeight('bottom-b','#bottom-b .grid-h','.deepest').match();$.matchHeight('innertop','#innertop .grid-h','.deepest').match();$.matchHeight('innerbottom','#innerbottom .grid-h','.deepest').match();},invalid:function(){$.matchWidth('grid-block').remove();$.matchHeight('main').remove();$.matchHeight('top-a').remove();$.matchHeight('top-b').remove();$.matchHeight('bottom-a').remove();$.matchHeight('bottom-b').remove();$.matchHeight('innertop').remove();$.matchHeight('innerbottom').remove();}});var pairs=[];$.onMediaQuery('(min-width: 480px) and (max-width: 959px)',{valid:function(){$.matchHeight('sidebars','.sidebars-2 #sidebar-a, .sidebars-2 #sidebar-b').match();pairs=[];$.each(['.sidebars-1 #sidebar-a > .grid-box','.sidebars-1 #sidebar-b > .grid-box','#top-a .grid-h','#top-b .grid-h','#bottom-a .grid-h','#bottom-b .grid-h','#innertop .grid-h','#innerbottom .grid-h'],function(i,selector){for(var i=0,elms=$(selector),len=parseInt(elms.length/2);i
').prependTo('#header');$('#logo').clone().removeAttr('id').addClass('logo').appendTo(header);$('.searchbox').first().clone().removeAttr('id').appendTo(header);$('#menu').responsiveMenu().next().addClass('menu-responsive').appendTo(header);}}});})(jQuery);