(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.autoUpload={attach:function(context,settings){$(".form-item input.form-submit[value=Upload]",context).hide();$(".form-item input.form-file",context).change(function(){$parent=$(this).closest(".form-item");setTimeout(function(){if(!$(".error",$parent).length)$("input.form-submit[value=Upload]",$parent).mousedown()},100)})}}})(jQuery);;
