$(function(){$("div.ajax-plugin").each(function(){var e=$(this);var url=e.attr("src");$('<div class="spinner"></div>').hide().appendTo(e).delay(250).fadeIn();$.get(url,function(data){e.replaceWith(data)}).error(function(){e.replaceWith("<!-- cannot load url: "+url+" -->")})})});$(function(){$("#emailUrl").attr("href","mailto:?subject="+document.title+"&body="+encodeURIComponent(window.location))});$(function(){var iframeHeight=new Object();$("a.plugin.iframe").each(function(){var id=$(this).attr("id");var containerUrl=document.location.href.replace(/(^.*?)(?:(#.*)?$)/,"$1");var src=$(this).attr("href")+"&containerUrl="+encodeURIComponent(containerUrl);$(this).replaceWith('<iframe id="'+id+'" class="plugin" src="'+src+'" style="overflow: hidden; width: 100%; margin: 0; border: 0; padding: 0;" frameborder="0" seamless="seamless"></iframe>');iframeHeight[id]=0});$.receiveMessage(function(e){var id=String(e.data.replace(/.*id=(\w+)(?:(&.*)?$)/,"$1"));var height=Number(e.data.replace(/.*height=(\d+)(?:(&.*)?$)/,"$1"));if(!isNaN(height)&&height>0&&height!==iframeHeight[id]){$("#"+id).css("height",height+"px");iframeHeight[id]=height}})});var acct=$("body").attr("ga");if(acct!=""){window._gaq=[["_setAccount",acct],["_trackPageview"],["_trackPageLoadTime"]];Modernizr.load({load:("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js"})};
