$(document).ready(function() {
			//Activate FancyBox
			$("p#fb1 a").fancybox({
				'overlayShow':	true,
				'hideOnContentClick': true
			});
			
			$("p#fb2 a").fancybox({
				'overlayShow':	true,
				'hideOnContentClick': true
			});
			
			$("p#test2 a").fancybox({
				'zoomSpeedIn':	0, 
				'zoomSpeedOut':	0, 
				'overlayShow':	true
			});
			
			
			 $("a.fancy_video").fancybox({
			 'overlayShow':	true,
      // avoid closing fancybox with clickable content
      'hideOnContentClick': false,
      // set the fancybox size
      'frameWidth':580,
      'frameHeight':360,
      // avoid video keep playing after
      // fancybox is closed in IE
      'callbackOnClose': function() {
         $("#fancy_content").empty();}
      }); 
			
			
			
			
			$("a#custom_1").fancybox({
				'itemLoadCallback': getGroupItems
			});
			
			$("a#custom_2, a#custom_3").fancybox({
				'zoomSpeedIn':	0, 
				'zoomSpeedOut':	0
			});
			
			//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);
		    });
		}
