// Efekt FadeInOut Toggle

jQuery.fn.fadeToggle = function(speed, easing, callback) {
    return this.animate({opacity: 'toggle'}, speed, easing, callback);
};

$(document).ready(function() {

// Usuwanie marginesu

    $(".ngg-gallery-thumbnail:eq(2)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(5)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(8)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(11)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(14)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(7)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(20)").css("margin-right", "0");
    $(".ngg-gallery-thumbnail:eq(23)").css("margin-right", "0");

// Wywolanie Lightbox'a

    $('a.lightbox').lightBox({
        imageLoading: 'http://royalweb.pl/projekty/radpod/wp-content/themes/RoyalWeb-Flairtender/images/images/lightbox-ico-loading.gif',
        imageBtnClose: 'http://royalweb.pl/projekty/radpod/wp-content/themes/RoyalWeb-Flairtender/images/images/lightbox-btn-close.gif',
        imageBtnPrev: 'http://royalweb.pl/projekty/radpod/wp-content/themes/RoyalWeb-Flairtender/images/images/lightbox-btn-prev.gif',
        imageBtnNext: 'http://royalweb.pl/projekty/radpod/wp-content/themes/RoyalWeb-Flairtender/images/images/lightbox-btn-next.gif',
        imageBlank: 'http://royalweb.pl/projekty/radpod/wp-content/themes/RoyalWeb-Flairtender/images/images/lightbox-blank.gif'
    })

// Mechanizm pokazywania/chowania odpowiedzi w FAQ


    $('#faq h3').click(
        function() {
            $(this).next().fadeToggle()
            return false;
        }).next().hide();


    //Ochrona przed spamem

		$('a.email').each(function(){
			e = this.rel.replace('/','@');
			this.href = 'mailto:' + e;
			$(this).text(e);
		});


});



