/* File: js/themed/grungy/blog_utils.js, Ratio: 22% */

function showLoadingAnimation(jq){jq.html("<div class=\"loading\" />");};function beforeFormSubmit(jFormData,jForm,jOptions){showLoadingAnimation($(jOptions.target));return true;};function onAjaxFormSubmit(linkForm){if(typeof $(linkForm).ajaxSubmit!="function"){alert("You need to include jquery.form.js to submit a form via ajax");}else{$(linkForm).ajaxSubmit({target:$(linkForm).parent(),beforeSubmit:beforeFormSubmit});}
return false;};function remoteLoad(el,url){var jel;if(typeof el=="string"){jel=$(el);}else{jel=el;}
if(typeof jel.load=="function"){showLoadingAnimation(jel);jel.load(url);}else{alert("The element "+el+" doesn't seem to have a load method.\nEither jquery has not loaded up or your element "+el+" is invalid");}};function extLinkCallback(responseText,textStatus,request){window.location=$(this).attr("href");};function makeScrollable(navigationDiv,slidesDiv,width,height,controller,slideWrapper,selectedWrapper,prevClass,nextClass){navigationDiv=$(navigationDiv);if(typeof navigationDiv.jFlow=="function"){navigationDiv.jFlow({slides:slidesDiv,controller:controller==null?".jFlowControl":controller,slideWrapper:slideWrapper==null?"#jFlowSlide":slideWrapper,selectedWrapper:selectedWrapper==null?"jFlowSelected":selectedWrapper,width:width,height:height,duration:400,prev:prevClass==null?".jFlowPrev":prevClass,next:nextClass==null?".jFlowNext":nextClass});}};function activateFlowEmbed(){if(typeof $("a.flowplayer").flowplayer=="function"){$("a.flowplayer").flowplayer("/flowplayers/flowplayer-3.1.4.swf");}};function embedFlowPlayer(elementId,flvPath,w,h,playerSwf){if(typeof flashembed=="function"){var playerConfig={videoFile:flvPath,autoPlay:false,autoBuffering:false,protected:true,controlBarBackgroundColor:0,showMuteVolumeButton:false,showMenu:false,controlBarGloss:'medium'};if(playerSwf==null)playerSwf="/flowplayers/flowplayer-3.1.4.swf";flashembed(elementId,{src:playerSwf,width:w,height:h},{config:playerConfig});}};function embedPodcast(embedDiv,audioFile){if(typeof flashembed=="function"){var podcastConfig={playerID:"podcast"+Math.round(Math.random()*100),bg:"0xf8f8f8",leftbg:"0xeeeeee",lefticon:"0x666666",rightbg:"0xcccccc",rightbghover:"0x999999",righticon:"0x666666",righticonhover:"0xFFFFFF",text:"0x666666",slider:"0x666666",track:"0xFFFFFF",border:"0x666666",loader:"0x9FFFB8",soundFile:escape(audioFile)};var flashvars="";for(var s in podcastConfig)flashvars+=s+"="+podcastConfig[s]+"&";var params={src:"/flowplayers/onePixelPodcast.swf",width:290,height:24,version:[8,0],expressInstall:"/expressInstall.swf",seamlesstabbing:"true",wmode:"transparent",allowfullscreen:"false",allowscriptaccess:"always",allownetworking:"all",flashvars:flashvars};$("#"+embedDiv).flashembed(params);}else{alert("flashembed is not defined. Unable to embed podcast in "+embedDiv);}};function disableElement(el,onDocReady){if(onDocReady){$(document).ready(function(){$(el).attr("disabled",true);});}else{$(el).attr("disabled",true);}
return false;}
$(document).ready(function(){activateFlowEmbed();});