if (typeof(jQuery) == 'function') { jQuery(document).ready(function($){ if ($.fn.cdcaptcha) { $.fn.cdcaptcha.globalDefaults = ({ headerText : 'Captcha', infoText : 'Potwierdź, że jesteś człowiekiem, przesuń aby odblokować.', lockedText : 'Zamknięte', unlockedText : 'Otwarte', uitheme : 'humanity', autoFormSubmit : true, slideCaptchaUp : 0 }); $('form[name="cdlogin_form_login"]').cdcaptcha({ prependElement : 'fieldset.input', position : 'after', random : 'ypALr7yd73GjD259uMPoIywUd', scope : 'mod_cdlogin' }); $('form#comments-form').cdcaptcha({ prependElement : '#comments-form-send', submitElement : '#comments-form-send a', scriptDeclaration: function(form, container) { var holder = $('#comments-form-send a', form), onclick = holder.attr('onclick'); holder.before(''); holder.addClass('jcomment_a_hovered').css('opacity', '.5').removeAttr('onclick').click(function(e){ e.preventDefault(); $(this).closest('form').submit(); }); }, sliderStop: function(form, ui) { var holder = $('#comments-form-send a', form); if ( $(ui).slider('option', 'value') === 1 ) { holder.removeClass('jcomment_a_hovered').css('opacity', 1); } else { holder.addClass('jcomment_a_hovered').css('opacity', '.5'); } }, random : 'zprahTCIO2huWHfvRCnagnU', scope : 'plg_content_jcomments' }); } }); }