<% if params[:type].to_i == 3 %> $("#statistics_info").html("<%= j(render :partial => "third_tab_statistics") %>") <% elsif params[:type].to_i == 2 %> $("#statistics_info").html("<%= j(render :partial => "secend_tab_statistics") %>") <% else %> $("#statistics_info").html("<%= j(render :partial => "first_tab_statistics") %>") <% end %>