$(document).ready(function(){$("#r_col").flash({src:"./flash/fundo.swf",width:400,height:850,wmode:"opaque",expressInstall:true});$("#l_col").append("<div/>").children("div").css({position:"absolute",right:"-1px",height:"450px",width:0,backgroundColor:"white"});$("#contest form, #suggestions form, #presign form, #sign form").submit(function(){var a=$(this).find("button:last");a.attr("disabled","disabled");var b=$(this);$.ajax({complete:function(c,d){a.removeAttr("disabled")},data:$(this).serialize(),dataType:"json",error:function(c,e,d){alert("Ocorreu um erro temporário ao enviar os seus dados.\nPor favor volte a tentar mais tarde.")},success:function(c,d){if(c.ok){b.replaceWith("<p>"+c.msg+"</p>")}else{alert(c.msg)}},timeout:"30000",type:"POST",url:$(this).attr("action")});return false});$("#sign :radio").click(function(){if($(this).val()=="individual"){$("#sign .group").hide("fast");var a=$(".participant:first").html();$(".participant").remove();$("#sign form .field:last").after("<div class='participant'/>");$(".participant:last").html(a)}else{$("#sign .group").show("fast")}}).click();$("#add button").click(function(){$(".participant:last").after("<div class='participant'/>");$(".participant:last").html($(".participant:first").html()).find("input").val("")});$("#index > a").click(function(){var a=new String($(this).attr("href"));a=a.substr(a.lastIndexOf("#"));$("#r_col li:first").animate({width:"83px"},500);$("#m_col").children("div").not(a).hide();$(a).fadeIn(500);$("#l_col > div").stop().animate({width:"185px"},1000);pageTracker._trackPageview("/corridadalinha/"+a);return false});$("#r_col a").click(function(){var a=new String($(this).attr("href"));a=a.substr(a.lastIndexOf("#"));$(this).parent().animate({width:"93px"},500).siblings().animate({width:"100px"},500);$("#m_col").children("div").not(a).hide();$(a).fadeIn(500);$("#l_col > div").stop().animate({width:"185px"},1000);pageTracker._trackPageview("/corridadalinha/"+a);return false});$("#m_col > a").click(function(){$("#m_col").children("div").not("#index").hide();$("#r_col li").animate({width:"100px"},500);$("#index").fadeIn(500);$("#l_col > div").stop().animate({width:0},1000);return false}).click();$("#photos a").slimbox();$("#previous a.ignore").click(function(a){a.preventDefault();window.open($(this).attr("href"))})});