$(function(){newCaptcha(1);if($('#s5')){$('#s5').cycle({fx:'fade',delay:-4000});};$('#captcha-input').before('<label>&nbsp;</label>');$('.new_form img').after('<a href="#" class="req">Nu pot citii codul.Vreau altul!</a>');function newCaptcha(type)
{if(type===1){$('.req').live('click',function(){$('.zend_form').remove();$('.new_form dt,dd').remove();$.ajax({url:'/inscrierecluburi/requestcaptcha',cache:false,success:function(html){$('.new_form div:last').before('<div>'+html+'</div>');$('#captcha-input').before('<label>&nbsp;</label>');$('.new_form dd img').after('<a href="#" class="req">Nu pot citii codul.Vreau altul!</a>');}});return false;});}else{$('.zend_form').remove();$('.new_form dt,dd').remove();$.ajax({url:'/inscrierecluburi/requestcaptcha',cache:false,success:function(html){$('.new_form div:last').before('<div>'+html+'</div>');$('#captcha-input').before('<label>&nbsp;</label>');$('.new_form dd img').after('<a href="#" class="req">Nu pot citii codul.Vreau altul!</a>');}});}}
$('#inscriereC').submit(function(){$(this).ajaxSubmit(function(data){$ans=$('.answer');$ans.css('display','block').html(data);newCaptcha(2);newCaptcha(1);$ans.after('<br />');$('html, body').animate({scrollTop:0},'slow');});return false;});$('#inscriereA').submit(function(){$(this).ajaxSubmit(function(data){$ans=$('.answer');$ans.css('display','block').html(data);newCaptcha(2);newCaptcha(1);$ans.after('<br />');$('html, body').animate({scrollTop:0},'slow');});return false;});$('#InscriereAG').submit(function(){$(this).ajaxSubmit(function(data){$ans=$('.answer');$ans.css('display','block').html(data);$ans.after('<br />');$('html, body').animate({scrollTop:0},'slow');});return false;});$('a.lightbox').lightBox();});
