if(typeof(Flavors.Layout)=="undefined"){Flavors.Layout={}}Flavors.Layout.Simple={};(function(){var c=Flavors.Layout.Simple;c.__name__="Flavors.Layout.Simple";var d=Flavors.Logger.getLogger(c.__name__);var f=null;c.gallerySettings={thumbsPerRow:5,thumbRowCount:3};c.selectors={service_link:"#profile_navigation",description:"#profile_description"};c.switchToPanel=function(h){d("switchToPanel() serviceAnchor="+h);var g=Flavors.Page.preparePanel(h);if(g){b(g)}};c.hideAllPanels=function(g){if(g){g.preventDefault()}if(f){$(f.element).fadeOut();f=null}};var b=function(g){d("transitionToPanel() panel.serviceAnchor="+g.serviceAnchor);if(f){$(f.element).fadeOut();setTimeout(function(){$(g.element).fadeIn(Flavors.Page.PhotoGallery.centerVertically);$.address.value(g.serviceAnchor)},500)}else{$(g.element).fadeIn(Flavors.Page.PhotoGallery.centerVertically);$.address.value(g.serviceAnchor)}f=g};var a=$(window).height();var e=function(){if(($("#profile").height()+100)>a){$("#profile").css({position:"absolute"})}else{$("#profile").css({position:"fixed"})}};c.init=function(){$("#profile_navigation a").click(function(g){d("nav click handler");g.preventDefault();$(this).closest("li").each(function(){var i=this.id.replace("navigation_service_","");if(i){d("serviceAnchor="+i);var h=Flavors.Page.preparePanel(i);if(h){b(h)}}})});a=$(window).height();$(window).resize(function(){a=$(window).height();e()});e();setTimeout(e,1000);$(window).scroll(function(){if($("#profile").height()>a){var g=50;if($(window).scrollTop()+a>$("#profile").height()+100){g=$(window).scrollTop()+a-$("#profile").height()-50}$("#profile").css({top:g+"px"})}});c.hideAllPanels();Flavors.Page.Fonts.updateHeader({align:"left",max_width:450});Flavors.Page.Fonts.renderHeader("<a href='Javascript:void(Flavors.Layout.Simple.hideAllPanels())'>"+display_name+"</a>")}})();Flavors.Page.Layout=Flavors.Layout.Simple;
