/*
 * Twitaddict.com MASTER .js
 *
 * @file		twitaddict.js
 * @link		http://www.twitaddict.com/
 * @copyright	2009 Twitaddict.com. All Rights Reserved.
 *
 */

$(document).ready(function() {
	//Activate FancyBox
	$("a#download_pop,a#download_pop2").fancybox({
		'hideOnContentClick': true
	});
	
	$("p#screenshot a").fancybox({
		'zoomSpeedIn':	0, 
		'zoomSpeedOut':	0, 
		'overlayShow':	true
	});
	
	$("a#custom_1").fancybox({
		'itemLoadCallback': getGroupItems
	});
	
	$("a#download_pop3, a#statscap, a#statscap2, a#statscap3, a#statscap4, a#video, a#wholesale_pop").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);
	});
}
		
