jQuery(document).ready(function() {

	/*
	*   Examples - images
	*/
	
	$("a#example1").fancybox({
		'titleShow'     : false
	});
		
	
    
    $("#manual2").click(function() {
		$.fancybox([
			'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
			'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
			{
				'href'	: 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
				'title'	: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
	
    $("#pokaz_1").click(function() {
		$.fancybox([
			{
				'href'	: 'img/projektowanie/p1/p1.jpg',
				//'title'	: 'Opis projektu 1'
			},
			{
				'href'	: 'img/projektowanie/p1/p2.jpg',
				//'title'	: 'Opis projektu 1'
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
	
    $("#pokaz_2").click(function() {
		$.fancybox([
			{
				'href'	: 'img/projektowanie/p2/p1.jpg',
			},
			{
				'href'	: 'img/projektowanie/p2/p2.jpg',
			},
			{
				'href'	: 'img/projektowanie/p3/p3.jpg',
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
	
    $("#pokaz_3").click(function() {
		$.fancybox([
			{
				'href'	: 'img/projektowanie/p3/p1.jpg',
			},
			{
				'href'	: 'img/projektowanie/p3/p2.jpg',
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
			
			
    $("#pokaz_4").click(function() {
		$.fancybox([
			{
				'href'	: 'img/projektowanie/p4/p1.jpg',
			},
			{
				'href'	: 'img/projektowanie/p4/p2.jpg',
			},
			{
				'href'	: 'img/projektowanie/p4/p3.jpg',
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
	
	
	/* REFERENCJE */
	
    $("#ref_1").click(function() {
		$.fancybox([
			{
				'href'	: 'img/referencje/refer_pl.jpg',
				//'title'	: 'Opis projektu 1'
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
			
    $("#ref_2").click(function() {
		$.fancybox([
			{
				'href'	: 'img/referencje/refer_en.jpg',
				//'title'	: 'Opis projektu 1'
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});

    $("#ref_3").click(function() {
		$.fancybox([
			{
				'href'	: 'img/referencje/refer_de.jpg',
				//'title'	: 'Opis projektu 1'
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
			
			

	function formatTitle(title, currentArray, currentIndex, currentOpts) {
	    return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/data/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
	}


	// Next JS snippets are only for fancybox.net
	
	/*
	*   Donate link
	*/
	$("a#donate").bind("click", function() {
		$("#donate_form").submit();
		return false;
	});

	/*
	*   Zebra-stripping table
	*/
	
	$("table.options tr:even").addClass('even');

});
