﻿$(document).ready(function () {
    $("#thumbHolder :nth-child(3n)").css({ 'margin-right': '0' });
    $("#thumbHolder .btnHolder .btn").hover(function () {

        $(this).find(".infoBar")
			.animate({
			    bottom: '-8px',
			    easing: 'easeIn'
			}, 100);

    }, function () {

        $(this).find(".infoBar")
			.animate({
			    bottom: '-40px',
			    easing: 'easeOut'

			}, 250);
			$(this).find(".infoBar")
			.animate({
			    bottom: '-35px',
			    easing: 'easeOut'

			}, 50);
			$(this).find(".infoBar")
			.animate({
			    bottom: '-40px',
			    easing: 'easeOut'

			}, 50);
			$(this).find(".infoBar")
			.animate({
			    bottom: '-38px',
			    easing: 'easeOut'

			}, 20);
			$(this).find(".infoBar")
			.animate({
			    bottom: '-40px',
			    easing: 'easeOut'

			}, 20);
    });

    $("#browsable").scrollable().navigator();

});



// Meer foto's laden  
function lastPostFunc() {
    $.post("Default_additional.aspx?action=getLastPosts&addpage=" + $(".btnHolder:last").attr("title"),

		    function (data) {
		        if (data != "") {
		            $(".btnHolder:last").after(data);
		           
		            $('.newcontent:last').fadeIn('slow', function () {
		                var new_position = $('.btnHolder:last').offset();
		                new_position = new_position;

		                $('html, body').animate({
		                    scrollTop: new_position.top - 475
		                }, 500);
		            });

		            $("#thumbHolder :nth-child(3n)").css({ 'margin-right': '0' });

		            $("#thumbHolder .newcontent:last  .btnHolder .btn").hover(function () {

		                $(this).find(".infoBar")
			.animate({
			    bottom: '-8px',
			    easing: 'easeIn'
			}, 100);

		            }, function () {

		                $(this).find(".infoBar")
			.animate({
			    bottom: '-40px',
			    easing: 'easeOut'

			}, 250);
		                $(this).find(".infoBar")
			.animate({
			    bottom: '-35px',
			    easing: 'easeOut'

			}, 50);
		                $(this).find(".infoBar")
			.animate({
			    bottom: '-40px',
			    easing: 'easeOut'

			}, 50);
		                $(this).find(".infoBar")
			.animate({
			    bottom: '-38px',
			    easing: 'easeOut'

			}, 20);
		                $(this).find(".infoBar")
			.animate({
			    bottom: '-40px',
			    easing: 'easeOut'

			}, 20);
		            });
		        }
		    });
};
