// JavaScript Document
$(document).ready(function() {
			//Activate FancyBox
			$("span#test1 a").fancybox({
				'hideOnContentClick': true, 
				'overlayShow':	true
			});
			
			$("div#test2 a").fancybox({
				'hideOnContentClick': true,					  
				'zoomSpeedIn':	true, 
				'zoomSpeedOut':	true, 
				'overlayShow':	true
			});
			
			$("a#custom_1").fancybox({
				'itemLoadCallback': getGroupItems
			});
			
			$("a#custom_2, a#custom_3").fancybox({
				'zoomSpeedIn':	0, 
				'zoomSpeedOut':	0, 
				'overlayShow':	true
				
			});
			
			//Some lines for this page
			$("div#donate").bind("click", function() {
				$("#donate_form").submit()
			});
			
			$("#comment_form").attr("action", "/fancy/add_comment"); $("#age").val('fancy'); //die spamers, die...
		});

		//List can contain mixed media too
		//Parameter "o" ir optional and used to override settings, example: {url: "http://www.google.com", title: false,  o: {'frameWidth': 200} }
		var imageList = [
			{url: "/img/examples/6_b.jpg", title: "First image"},
			{url: "/img/examples/7_b.jpg", title: "Second image"},
			{url: "/img/examples/8_b.jpg", title: "Third image"}
		];
		
		function getGroupItems(opts) {
			jQuery.each(imageList, function(i, val) {
		        opts.itemArray.push(val);
		    });
		}
