if(!window.GymFu_widget){function GymFu_$(b){return document.getElementById(b)}function GymFu_inArray(c,b){for(var d=0;d<b.length;d++){if(b[d]==c){return true}}return false}function GymFu_loadStylesheet(b){var a;if(b.stylesheet){a=b.stylesheet}else{a=GymFu_stylesheet}if(a){if(!GymFu_inArray(a,GymFu_stylesheets)){GymFu_stylesheets.push(a);var c=document.createElement("link");c.href=a;c.rel="stylesheet";c.type="text/css";c.media="all";document.lastChild.firstChild.appendChild(c)}}}function GymFuWidget(c,d,f){if(!window.GymFu_URL){window.GymFu_URL="http://myaccount.gymfu.com/stats/"}if(!window.GymFu_stylesheet){window.GymFu_stylesheet="http://gymfu.s3.amazonaws.com/css/widget.css"}if(!window.GymFu_counter){window.GymFu_counter=0;window.GymFu_used=[];window.GymFu_stylesheets=[]}if(!d){d="GymFuWidget"}var h="GymFuO_"+(++GymFu_counter);if(!f){f={}}GymFu_loadStylesheet(f);window[h]=f;while(GymFu_inArray(d,GymFu_used)){d=d+""+GymFu_counter}GymFu_used.push(d);var g=GymFu_$(d);if(!g){document.write("<div id='"+d+"'></div>")}var e=GymFu_URL+c+"?class=GymFu_widget&el="+escape(d)+"&options_var="+h;document.write("<script type='text/javascript' src=\""+e+'"><\/script>')}function GymFu_application(b){switch(parseInt(b)){case 1:return"PushupFu";case 2:return"SquatFu";case 3:return"PullupFu";case 5:return"CrunchFu"}return false}function GymFu_widget(d,c,k){var h=GymFu_$(d);if(!c||c.error){h.innerHTML="GymFu: An error occurred: "+c.error;return}if(!h.className){h.className="GymFuWidget"}var e=window[k];if(!e){e={}}if(!h){return}var g="";if(!e.hideName){g=g+"<p class='gymfu_fullname'>"+c.firstname+" "+c.surname+" aka:</p>"}g=g+"<p class='gymfu_nickname'>&quot;"+c.nickname+"&quot;</p>";if(c.profiles){for(var f=0;f<c.profiles.length;f++){var j=c.profiles[f];if(GymFu_application(j.application)!==false){g=g+"<div class='gymfu_"+GymFu_application(j.application).toLowerCase()+"'>";g=g+"<p class='gymfu_appname'>My "+GymFu_application(j.application)+":</p>";if(!e.hideScore){g=g+"<p class='gymfu_score'><span>Score:</span> "+j.points+"</p>"}if(!e.hideScore){g=g+"<p class='gymfu_level'><span>Level:</span> "+j.level+"</p>"}if(!e.hideScore){g=g+"<p class='gymfu_totalreps'><span>Total reps:</span> "+j.pushups_count+"</p>"}if(!e.hideScore){g=g+"<p class='gymfu_maxreps'><span>Max reps:</span> "+j.max_reps+"</p>"}g=g+"</div>"}}g=g+"<p><a style='color: #bf0000; text-decoration: none; font-size: 10pt; border-bottom: 1px dashed #bf0000' href='http://www.gymfu.com/' target='_blank' title='Get the PushupFu iPhone app from GymFu.com'>Increase <em>your</em> Gym Fu</a></p>"}h.innerHTML=g;return this}};
