(function($){jQuery.extend({debug:function(){window.debug=window.debug||[];args=jQuery.makeArray(arguments);if(typeof this=='object'){var name=(args.length?args[0]:window.debug.length);var data=this;}
else{var name=(args.length>1?args.pop():window.debug.length);var data=args[0];}
window.debug[name]=data;if(typeof console!='undefined'){console.log(name,data);}
return this;}});jQuery.fn.debug=jQuery.debug;})(jQuery);;(function($){Drupal.behaviors.mollomPrivacy={attach:function(context){$('.mollom-privacy a',context).click(function(){this.target='_blank';});}};Drupal.behaviors.mollomCaptcha={attach:function(context,settings){$('a.mollom-switch-captcha',context).click(getMollomCaptcha);}};function getMollomCaptcha(){var newCaptchaType=$(this).hasClass('mollom-audio-captcha')?'audio':'image';var context=$(this).parents('form');var mollomSessionId=$('input.mollom-session-id',context).val();var formBuildId=$('input[name="form_build_id"]',context).val();$.getJSON(Drupal.settings.basePath+'mollom/captcha/'+ newCaptchaType+'/'+ formBuildId+'/'+ mollomSessionId,function(data){if(!(data&&data.content)){return;}
$('.mollom-captcha-content',context).parent().html(data.content);$('input.mollom-session-id',context).val(data.session_id);Drupal.attachBehaviors(context);$('input[name="mollom[captcha]"]',context).focus();});return false;}})(jQuery);;
