{% extends 'base.html' %}

{% block html_declare %}
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
{% endblock %}

{% block extra_head %}
  <!-- Simple OpenID Selector -->
  <link rel="stylesheet" href="{{ MEDIA_URL }}css/openid.css" />
  <!--<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>-->
  <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.2.6.min.js"></script>
  <script type="text/javascript" src="{{ MEDIA_URL }}js/openid-jquery.js"></script>
  <script type="text/javascript">
	$(document).ready(function() {
	  openid.init('openid_identifier');
	});
	//function facebook_onlogin(){
    //  window.location = "{% url socialauth_facebook_login_done %}"
	//}
  </script>
  <!-- /Simple OpenID Selector -->
{% endblock %}

{% block extra_body %}
{{ block.super }}

{% endblock %}

{% block main_content %}
{% if user.is_authenticated %}
  <p>You are already logged in. <a href="{% url socialauth_social_logout %}">Logout</a>?</p>
{% else %}
<div id="login">

<form action="{% url socialauth_openid_login %}" method="get" id="openid_form">
  <input type="hidden" name="action" value="verify" />
  
  <fieldset>
	<legend>Sign-in (or Create New Account) via these openid providers</legend>
	
	<div id="openid_choice">
	  <p>Please click your account provider:</p>
	
	  <div id="openid_btns">
	    {% if FACEBOOK_APP_ID %}
		  <div id="facebook">
			<p><fb:login-button perms="{{ login_button_perms }}"></fb:login-button></p>
		  </div>	  
		{% endif %}
		
		<div id="linkedin">
		  <a href="{% url socialauth_linkedin_login %}?next={{ next }}" id="linkedin_login_link" class="openid_large_btn linkedin"></a>
		</div>
	  
		<div id="twitter">
		  <a href="{% url socialauth_twitter_login %}?next={{ next }}" id="twitter_login_link" class="openid_large_btn twitter"></a>
		</div>
	  
		<!--<div id="yahoo">
		  <a href="{% url socialauth_yahoo_login %}" id="yahoo_login_link" class="openid_large_btn yahoo"></a>
		</div>-->
	  </div>

      <input type="hidden" name="openid_next" value="{{ next }}">
	
	  <div id="openid_input_area">
		<input id="openid_identifier" name="openid_identifier" type="text" value="http://" />
		<input id="openid_submit" type="submit" value="Sign-In"/>
	  </div>
	</div>
	
	<noscript>
	  <p>
		OpenID is service that allows you to log-on to many different websites using a single indentity. Find out 
		<a href="http://openid.net/what/">more about OpenID</a> and 
		<a href="http://openid.net/get/">how to get an OpenID enabled account</a>.
	  </p>
	</noscript>
	
  </fieldset>
  
</form>



    
    
    <br />
    <br />
    <br />
    
</div>
{% endif %}
{% endblock %}
