<% 
	if((typeof newTab !== "undefined") && newTab) var linkAttr = 'target="_blank"';
	else var linkAttr = '';	
%>

<div id="signinPopup" class="fancybox-inline sign-in">
	<h2>Sign In</h2>
	<div class="row-fluid">
		<% if(signInUrlOrcid && !signInUrl) { %>
			<div class="span12">
		<% } else if (signInUrlOrcid){ %>
			<div class="span5">
		<% }	
		   if(signInUrlOrcid) { %>
				<div class="orcid-signin">
					<a href="<%=signInUrlOrcid%>" class="signin CILogonSignin update-orcid-sign-in-url" <%=linkAttr%>>
						<img src="./img/orcid_64x64.png" />
						<span>Sign in with ORCID</span>
					</a>
				</div>
			</div>
		<% } 
		   if(signInUrlOrcid && (signInUrl || signInUrlLdap)) { %> 
			<span class="divider-text">OR</span>
			<div class="span7">
		<% } 
		   else if(signInUrl || signInUrlLdap){ %>
			<div class="span12">
		<% } 
		   if(signInUrl) { %>
				<div class="well scroll-y">
					<a class="btn update-sign-in-url" href="<%=signInUrl%>" <%=linkAttr%>>Sign in with your University or Institution</a>
					<!-- <img src="./img/google_signin.png" class="signin CILogonSignin" />  -->
					<% if(loginOptions){ %>
						<!-- <h3>Sign in with your University or Institution</h3> -->
						<!-- <input type="text" name="search" placeholder="Search..." />-->
							<h3>Some of the 100+ Universities and Institutions to choose from:</h3>
							<div id="login-options"><%=loginOptions%></div>
						<% } %>
				</div>
		<% }
		   if(signInUrlLdap) { %>
				<a href="#" class="btn ldap" data-name="NCEAS - National Center for Ecological Analysis and Synthesis" data-value="o=NCEAS,dc=ecoinformatics,dc=org" <%=linkAttr%>>Sign in with an NCEAS Account</a>
				<a href="#" class="btn ldap" data-name="KNB Data Repository" data-value="o=unaffiliated,dc=ecoinformatics,dc=org" <%=linkAttr%>>Sign in with a KNB Account</a>
		<% }
		   if(signInUrl || signInUrlLdap){ %>
			</div>
		<% } %>
	</div>					
<!-- 
<div class="row-fluid remember">
	<div class="span12 inline">
		<input type="checkbox" />
		<label>Remember my choice</label>
	</div>
</div>-->
</div>
<div id="signupPopup" class="fancybox-inline">
	<h2>Sign Up</h2>
	<div class="row-fluid">
		<div class="span12">
			<h3 class="subtitle subtle">View your data and access your identification code to upload content.</h3>
			<% if(signInUrlOrcid) { %>
				<h4>There's no need to create a new account - just use your <a href="<%=signInUrlOrcid%>">existing <img src="./img/orcid_64x64.png" class="icon-on-left icon" /> ORCID account</a> now or <a href="<%=signInUrlOrcid%>">create a new one</a>.</h4>
				<div class="orcid-signin btn-large center">
					<a href="<%=signInUrlOrcid%>" class="signin CILogonSignin update-orcid-sign-in-url" <%=linkAttr%>>
						<img src="./img/orcid_64x64.png" />
						<span>Sign up with ORCID</span>
					</a>
				</div>
			<% } 
			else if(signInUrl) { %>
				<h4>There's no need to create a new account - just use one of your existing accounts from Google or from a list of 100+ Universities and Institutions:</h4>
					<a class="btn btn-primary btn-large center update-sign-in-url" href="<%=signInUrl%>" <%=linkAttr%>>Sign up now</a>
					<div class="well scroll-y">
						<!-- <img src="./img/google_signin.png" class="signin CILogonSignin" />  -->
						<% if(loginOptions){ %>
							<!-- <h3>Sign in with your University or Institution</h3> -->
							<!-- <input type="text" name="search" placeholder="Search..." />-->
								<h3>The 100+ Universities and Institutions supported by CILogon:</h3>
								<div id="login-options"><%=loginOptions%></div>
							<% } %>
					</div>
				</div>
			<% } %>	
		</div>
	</div>
</div>
