{if $page_display eq "tpl_signin" or $page_display eq "tpl_signup" or $page_display eq "tpl_recovery" or $page_display eq "tpl_payment"}
	{if $paid_memberships eq "1" and ($page_display eq "tpl_payment" or $page_display eq "tpl_signup")}<script type="text/javascript">$(function() {ldelim}SelectList.init("frontend_membership_type_sel");SelectList.init("pk_period_sel");{rdelim});</script>{/if}
	{if $page_display eq "tpl_signup"}<script type="text/javascript" src="{$javascript_url_be}/jquery.password.js"></script>{if ($fb_auth eq "1" and $smarty.session.fb_user['id'] gt 0) or ($gp_auth eq "1" and $smarty.session.gp_user['id'] gt 0)}<script type="text/javascript">$(document).ready(function() {ldelim}$("a#inline").fancybox({ldelim} minWidth: "80%",  margin: 20 {rdelim});$('#inline').trigger('click');{rdelim});</script>{/if}<script type="text/javascript">{include file="tpl_frontend/tpl_auth/tpl_oauthjs.tpl"}</script>{/if}
	<script type="text/javascript">{literal}(function(){[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el){new CBPFWTabs(el)})})();function oldSafariCSSfix(){if(isOldSafari()){var tabnr=$(".login-page .tabs nav ul li").length;var width=jQuery(".login-page").width()-32;jQuery(".login-page .tabs nav ul li").width(width/tabnr-1).css("float","left");jQuery(".login-page .tabs nav").css("width",width+1)}}$(document).ready(function(){$(document).on("click",".tabs ul:not(.fileThumbs) li",function(){})});jQuery(window).load(function(){oldSafariCSSfix()});jQuery(window).resize(function(){oldSafariCSSfix()});function isOldSafari(){return!!navigator.userAgent.match(" Safari/")&&!navigator.userAgent.match(" Chrome")&&(!!navigator.userAgent.match(" Version/6.0")||!!navigator.userAgent.match(" Version/5."))}{/literal}</script>
	<script type="text/javascript">var full_url = '{$main_url}/';var main_url = '{$main_url}/';{if $page_display eq "tpl_recovery" or $page_display eq "tpl_signup"}$(".login-page .tabs ul li:first").removeClass("tab-current");{/if}</script>
	<script type="text/javascript">$("document").ready(function(){ldelim}$("a.showp").on("click",function(e){ldelim}e.preventDefault();$(this).prev().attr("type", "text");$(this).addClass("no-display");$(this).next().removeClass("no-display"){rdelim});$("a.hidep").on("click",function(e){ldelim}e.preventDefault();$(this).prev().prev().attr("type", "password");$(this).addClass("no-display");$(this).prev().removeClass("no-display"){rdelim});{rdelim});</script>
{/if}