(function(){var b=getTemplateMode()!="mixed"?Flavors.Global.namespace("Flavors.TemplateGroup"):Flavors.Global.namespace("Flavors.TemplateGroupMedium"),f=Flavors.Logger.getLogger(b.__name__),g={};b.init=function(){for(var a in accounts)if($("#service_"+a).hasClass("panel-box-medium")){b.registerPanel(a);b.preparePanel(a)}if(Flavors.Controller)for(var c in g)if(Flavors.Controller.CSS_RULES[c])for(var e in g[c])Flavors.Controller.CSS_RULES[c].push(g[c][e])};b.preparePanel=function(a){f("preparePanel() serviceAnchor="+
a);if(a in b.services){var c=b.services[a];if(c.initialized)return c;var e=c.element;$(e).sectionSwitcher();$(e).find("DIV.section.audio").each(function(){$(this).is(":visible")&&$(this).musicPlayer(".track")}).end().find("DIV.section.audio-set").each(function(){$(this).is(":visible")&&$(this).slidePanel()}).end().find("DIV.section.gallery").each(function(){var d=$(this).find(".items .item:first .img-pending").length;if(d==0)d=$(this).find(".items .item:first img").length;f("minPageSize for service "+
a+": "+d);if($(this).is(":visible")){$(this).deferredImageLoad({batchSize:d,loadNow:1});$(this).slidePanel()}else $(this).deferredImageLoad({batchSize:d})}).end().find("DIV.section.status").each(function(){$(this).is(":visible")&&$(this).slidePanel()}).end().find("DIV.section.video").each(function(){$(this).is(":visible")&&$(this).clickToEmbed()}).end().find("DIV.section.blog").each(function(){if($(this).is(":visible")){$(this).slidePanel();$(this).deferredImageLoad({batchSize:3,loadNow:1});var d=
$(this).find(".items .item:first object").length;$(this).deferredEmbedLoad({batchSize:1,loadNow:d,embedSize:"medium"})}else{$(this).deferredImageLoad({batchSize:3});$(this).deferredEmbedLoad({batchSize:1,embedSize:"medium"})}$(this).embedResize("medium")}).end().find(".google-map").each(function(){$(this).googleMap($(this).attr("rel"))}).end();$(e).find("DIV.section:first").find("DIV.mask:first").createScrollPane();if($(e).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(d){d&&d.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(d){d.preventDefault();$("#formspring-message").html("");$("#formspring-message").hide(0,function(){$("#formspring-form textarea").val("");$("#formspring-form").show()})})}c.initialized=true;return c}};
b.prepareSection=function(a,c){f("prepareSection() ... serviceAnchor="+c)};b.services={};b.registerPanel=function(a){f("medium register() serviceAnchor="+a);b.services[a]={initialized:false};b.services[a]=new Flavors.Panel(a)}})();

