(function(){var c=getTemplateMode()!="mixed"?Flavors.Global.namespace("Flavors.TemplateGroup"):Flavors.Global.namespace("Flavors.TemplateGroupLarge"),e=Flavors.Logger.getLogger(c.__name__);c.init=function(){g()};var g=function(){for(var a in accounts)if($("#userpage-layout-service-"+a).hasClass("panel-horizontal")){c.registerPanel(a);c.preparePanel(a)}};c.registerPanel=function(a){e("large register() serviceAnchor="+a);c.services[a]={initialized:false};c.services[a]=new Flavors.Panel(a)};c.preparePanel=
function(a){e("preparePanel() serviceAnchor="+a);if(a in c.services){var d=c.services[a];if(d.initialized)return d;var f=d.element;$(f).sectionSwitcher();$(f).find("DIV.section.audio, DIV.section.music-player").each(function(){$(this).is(":visible")&&$(this).find("DIV.progress-meter").remove();$(this).find("DIV.playback-status").remove();$(this).musicPlayer(".track")}).end().find("DIV.section.dynamic-music-player").each(function(){$(this).find("DIV.progress-meter").remove();$(this).find("DIV.playback-status").remove();
$(this).dynamicMusicPlayer(".track")}).end().find("DIV.section.gallery").each(function(){var b=$(this).find(".items .item:first .img-pending").length;if(b==0)b=$(this).find(".items .item:first img").length;e("minPageSize for service "+a+": "+b);if($(this).is(":visible")){$(this).deferredImageLoad({batchSize:b,loadNow:1});$(this).slidePanel()}else $(this).deferredImageLoad({batchSize:b});$(this).find("A.video-thumbnail").clickToSwitchEmbed()}).end().find("DIV.section.status, DIV.section.links, DIV.section.list").each(function(){if($(this).is(":visible")){$(this).deferredImageLoad({batchSize:1,
loadNow:1});$(this).slidePanel({loadNow:true})}else $(this).deferredImageLoad({batchSize:1})}).end().find("DIV.section.video").each(function(){$(this).is(":visible")&&$(this).clickToEmbed()}).end().find("DIV.section.blog, DIV.section.panel-split").each(function(){if($(this).is(":visible")){$(this).deferredImageLoad({batchSize:5,loadNow:1});var b=$(this).find(".items .item:first object").length;$(this).deferredEmbedLoad({batchSize:1,loadNow:b,embedSize:"large"})}else{$(this).deferredImageLoad({batchSize:5});
$(this).deferredEmbedLoad({batchSize:1,embedSize:"large"})}$(this).blogNav();$(this).embedResize("large")}).end().find(".panel-custom-plain-body").each(function(){$(this).is(":visible")&&$(this).deferredImageLoad({loadNow:1,loadAll:true})}).end().find(".panel-custom-bio-photo, .panel-custom-bio-body").each(function(){$(this).is(":visible")&&$(this).parent().deferredImageLoad({loadNow:1,loadAll:true})}).end().find(".panel-map-embed").each(function(){$(this).googleMap($(this).attr("rel"))}).end().find(".panel-custom-map-embed").each(function(){$(this).googleMapCustom()}).end();
if($(f).is(".formspring")){$("#formspring-submit").css({"text-decoration":"none"}).hover(function(){$(this).css("background-color",primary_font_color_holder)},function(){$(this).css("background-color",link_font_color_holder)});$("#formspring-form").ajaxForm({url:get_formspring_url(),dataType:"json",success:function(b){b&&b.success?$("#formspring-message").html('Your question has been sent. <a id="formspring-close" href="#">Ask another.</a>'):$("#formspring-message").html('An error occured sending your question. <a id="formspring-close" href="#">Try again.</a>')},
beforeSubmit:function(){if($.trim($("#formspring-form textarea").val())==""){$("#formspring-message").html("Please enter a question.");$("#formspring-message").show();return false}$("#formspring-form").fadeOut(100,function(){$("#formspring-message").html("Sending your question to Formspring...");$("#formspring-message").show()})}});$("#formspring-close").live("click",function(b){b.preventDefault();$("#formspring-message").html("");$("#formspring-message").hide(0,function(){$("#formspring-form textarea").val("");
$("#formspring-form").show()})})}d.initialized=true;return d}};c.services={}})();

