% content_for :head do %>
<%= javascript_include_tag 'checkout', '/states' %>
<% end %>
<%= t("checkout")%>
<%= checkout_progress %>
<%= render "shared/error_messages", :target => @order %>
<%= hook :checkout_summary_box do %>
<%= render 'summary', :order => @order %>
<% end %>
<% if(@order.state == "payment") %>
<%= render('checkout/paypal_checkout') if @order.payable_via_paypal? %>
<% else %>
<%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
<%= render @order.state, :form => form %>
<% end %>
<% end %>