.overlay-inner.signin-common
  = link_to image_tag("content/button_facebook_signin.png", {:width => 249, :height => 46}), '/auth/facebook', class: "signin-facebook"

  %br
  %br
  %br
  %strong.white Or sign in with JamKazam Account
  %br
  %br

  = form_for(:session, url: signin_path + (request.query_string.blank? ? '' : '?' + request.query_string), html: {class:"signin-form #{'login-error' if @login_error}"}) do |f|
    %input{type:'hidden', name: 'sso', value: @sso}
    %input{type:'hidden', name: 'send_back_to', value: @send_back_to}

    .field.email
      = f.label :email, "Email Address:"
      = f.text_field :email, autofocus: true

    .field.password
      = f.label :password, "Password:"
      = f.password_field :password, autofocus: true

    :javascript
      if(window.jamClient === undefined) {
        document.write('<input name="user[remember_me]" type="hidden" value="0">');
        document.write('<small><input type="checkbox" name="remember_me" class="keep-logged-in" value="1" name="user[remember_me]" id="user_remember_me" checked> Keep me logged in</small>');
      } else {
       document.write('<input name="user[remember_me]" type="hidden" value="1">');
      }

    .login-error-msg Invalid login

    %br{clear:'all'}

    .actions{align: 'center'}
      %a.button-grey.signin-cancel{href:'#' } CANCEL
      = f.submit "SIGN IN",class: 'button-orange signin-submit'
      %br
      %br
      %small
        %a.forgot-password{href:'/request_reset_password'} Forgot Password?

  %br

  .center
    %small
      Don't have an account?
      %a.show-signup-dialog{href: '#'} Sign Up