var tempbck="";
var tempfont="";
$.fn.image = function(src, f, e){
	var i = new Image();
	var t = $(this);
	$(i).load(function(){

		t.append($(this));
		f();
	}).error(e).attr('src', src);


 }
 $(document).ready(function() {
function show(t){
$("div#loader").show();
   $("#teambild").fadeOut("fast", function(){
$("#teambild").html("");
      $("#teambild").image(""+t.attr("href"),function(){
$("div#loader").hide();
         $("#teambild").fadeIn("slow").attr(""+t.attr("href"));
         $("#contentteam p a").css("background-color","RGB(208,214,198)");
         $("#contentteam p a").css("color","#414141");
         t.css("background-color","#ae5018");
         t.css("color","#fff");
		});
   });
}
var r=$("#contentteam p strong a");
var i= Math.floor(Math.random() * r.length);
show($("#contentteam p strong:eq("+i+") a"));

    $("#contentteam strong a").click(
      function () {
          if($(this).attr("rel")!="nofollow"){
              show($(this));
         tempbck=$(this).css("background-color");
         tempfont=$(this).css("color");
              return false;
          }
  });
  });
    $("#contentteam strong a").hover(
      function () {
         tempbck=$(this).css("background-color");
         tempfont=$(this).css("color");
         $(this).css("background-color","#ae5018");
         $(this).css("color","#FFFFFF");
},function(){
         $(this).css("background-color",tempbck);
         $(this).css("color",tempfont);

});
    $("#contentteam a").hover(
      function () {
if($(this).attr("rel")=="nofollow"){
         tempbck=$(this).css("background-color");
         tempfont=$(this).css("color");
         $(this).css("background-color","#ae5018");
         $(this).css("color","#FFFFFF");
}
},function(){
if($(this).attr("rel")=="nofollow"){
         $(this).css("background-color",tempbck);
         $(this).css("color",tempfont);

}
});