$(function() {
			$('a.lightbox').lightBox(); // Select all links with lightbox class
			
			// feature article (force on home page...)
			$('.add-featured').click(function() {
				if(confirm('Feature this article?')) {
					
					var id_article =  $(this).attr('href');
					
					$.ajax({
							url: paths['base_url'] + "articles/ajax_add_featured/" + id_article
					});
					
					$(this).ajaxStop(function() {
						$("div#hide-featured-" + id_article).fadeOut('slow');
					});  
				}
				
				return false; 
			});
			
		var captcha_first_prep = true;
			$("#article_submit_antispam").hide();
			
			// prep captcha
			$('#comment_body, #fnc_comment_captcha_field').focus(function() {
				
				// prep captcha only once!
				if (captcha_first_prep) {
					
					$.ajax({
						url: paths['base_url'] + "article/prep_captcha/",
						success: function(result) { 
							$("#article_submit_antispam").append(result);
							$("#article_submit_antispam").show();
						} 
					});
				}
				
				captcha_first_prep = false;
				
			});
			
		});
