(function(){var b=getTemplateMode()!="mixed"?Flavors.Global.namespace("Flavors.TemplateGroup"):Flavors.Global.namespace("Flavors.TemplateGroupSmall"),f=Flavors.Logger.getLogger(b.__name__),e={};b.init=function(){for(var a in accounts)if($("#service_"+a).hasClass("panel-box-small")){b.registerPanel(a);b.preparePanel(a)}if(Flavors.Controller)for(var c in e)if(Flavors.Controller.CSS_RULES[c])for(var d in e[c])Flavors.Controller.CSS_RULES[c].push(e[c][d])};b.preparePanel=function(a){f("preparePanel() serviceAnchor="+
a);if(a in b.services){a=b.services[a];if(a.initialized)return a;var c=a.element;$(c).find("DIV.section.audio").each(function(){$(this).musicPlayer(".track")}).end().find("DIV.section.gallery").each(function(){if($(this).is(":visible"))$(this).hasClass("foursquare")?$(this).deferredImageLoad({loadNow:12,loadAll:true}):$(this).deferredImageLoad({loadNow:1,loadAll:false})}).end().find("DIV.section.video").each(function(){$(this).clickToEmbed()}).end().find("DIV.section.blog").each(function(){$(this).embedResize("small")}).end().find(".google-map").each(function(){$(this).googleMap($(this).attr("rel"))}).end();
if($(c).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()})})}a.initialized=true;return a}};b.services={};b.registerPanel=function(a){f("small register() serviceAnchor="+a);b.services[a]={initialized:false};b.services[a]=new Flavors.Panel(a)}})();

