function UpdatePagefunction(a){a.length>0&&a.bind("ajax:success",function(b,c,d,e){var f=$(this);f.find("div.validation-error").empty();var g=$(a).closest(".replaceSection");g.length==0&&(g=$(".replaceSection"));var h=$(e.responseText).filter("div.replaceSection");g.html(h)}).bind("ajax:error",function(a,b,c,d){var e=$(this),f,g;try{f=$.parseJSON(b.responseText)}catch(h){f={message:"Please reload the page and try again"}}g="There were errors with the submission: \n<ul>";for(d in f)g+="<li>"+d+": "+f[d]+"</li> ";g+="</ul>",e.find("div.validation-error").html(g)})}function ReadMoreContent(){$("#readDiv").html($(this).parent().prev().children().last().html()),$("#readDiv").prepend("<a href='javascript:void(0)' onclick='BackToMain.call()'>Back to front...</a>"),$("#articleTop").fadeOut(100,function(){$("#readDiv").fadeIn()})}function BackToMain(){$("#readDiv").fadeOut(100,function(){$("#articleTop").fadeIn()})}function showMyVideos(a){var b=$("#videoDiv");if(b.length>0){var c=a.feed,d=c.entry||[],e=["<h2>The latest videos from TBF Racing!</h2>"];for(var f=0;f<d.length;f++){var g=d[f],h=g.title.$t.substr(0,25),i=d[f].media$group.media$thumbnail[0].url,j=d[f].media$group.media$content[0].url;e.push("<div onclick=\"loadVideo('",j,'\', true)" class="videoItem">','<span class="titlec">',h,'...</span><br /><img src="',i,'" width="170" height="128"/>',"</span></div>")}b.html(e.join(""))}}function loadVideo(a,b){$("#playerContainer").dialog({width:510,modal:!0,position:"top",resizable:!1}),swfobject.embedSWF(a+"&rel=1&border=0&fs=1&autoplay="+(b?1:0),"player","480","360","9.0.0",!1,!1,{allowfullscreen:"true"})}$(document).ready(function(){$(".uiButton").button()})
