// Sliding Portfolio Items
$(document).ready(function(){

  $("#colLeft").css("min-height", ($("#colRight").innerHeight()+80)+"px");


    var $preferences = {
        duration: 800,
   easing: 'easeInOutQuad',
//        easing:"swing"

    };

    var $list = $('#my_realisations');
    var $data = $list.clone();


    $("#filters li").bind('click', function(e) {

        $("#filters li").removeClass("active");
        var $button = $(this);
        $button.addClass("active");
        var sorting_kind = $button.attr("data-id");
        if (sorting_kind == 'all') {

             $filtered_data = $data.find('div.a_realisation');
        } else {
             $filtered_data = $data.find("div.a_realisation[data-id="+sorting_kind+"]");
        }
        $list.quicksand($filtered_data, $preferences, function() {
            $('.realisation_box').hover(function(){
                $(".realisation_image", this).stop().animate({top:'-125px'},{queue:false,duration:300, easing: 'easeInOutQuad'});
            }, function() {
                $(".realisation_image", this).stop().animate({top:'3px'},{queue:false,duration:300, easing: 'easeInOutQuad'});
            });
        });

        e.preventDefault();

    });


    $('.realisation_box').hover(function(){
        $(".realisation_image", this).stop().animate({top:'-125px'},{queue:false,duration:300, easing: 'easeInOutQuad'});
    }, function() {
        $(".realisation_image", this).stop().animate({top:'3px'},{queue:false,duration:300, easing: 'easeInOutQuad'});
    });


});

