(function($) {
$(document).ready(function() {;
    $("#inhoud").animate({opacity: "0"}, {queue:false, duration:0, complete:function() {
    $("#container").animate({width: '0px'},{queue:false,duration:0, complete:function() {
    $("#container").animate({height: '0px'},{queue:false,duration:0, complete:function() {
    $("#inhoud").animate({opacity: '1'},{queue:false,duration:0, complete:function() {
    $("#container").animate({height: '505px'},{queue:false,duration:800, complete:function() {
    $("#container").animate({width: "970px"},{queue:false,duration:1000});}});}});}});}});}});
});  
}(jQuery));



(function($) {
$(document).ready(function() {
jQuery(".jcarousel-next, .jcarousel-prev").stop().animate({opacity: '0'}, {queue:false,duration:1});
  });
}(jQuery));


(function($) {
Drupal.behaviors.view = {
attach: function (context, settings) {
  $(".jcarousel-container").hover(function()
  {
    $(".jcarousel-next, .jcarousel-prev").stop().animate({opacity: '0.5'},{queue:false,duration:200});
  },
  function()
  {
    $(".jcarousel-next, .jcarousel-prev").stop().animate({opacity: '0'},{queue:false,duration:200});
  });
  $(".view-clone-of-produkten .views-field-field-image img").hover(function()
  {
    $(this).stop().animate({marginTop: "-12px", marginBottom: "12px" },{queue:false,duration:200});
  },
  function()
  {
    $(this).stop().animate({marginTop: "0px", marginBottom: "0px"},{queue:false,duration:200});
  });
  }
  };
}(jQuery));



function disableCustomButtons(carousel){
    
    var prev_class = '.jcarousel-prev-disabled .jcarousel-prev-disabled-horizontal';
    if (carousel.first == 1) {
    $('#mycarousel-prev').attr('disabled', 'true').addClass(prev_class);
    } else {
    $('#mycarousel-prev').attr('disabled', 'false').removeClass(prev_class);
    }
  
    var next_class = 'jcarousel-next-disabled jcarousel-next-disabled-horizontal';
    if (carousel.last == carousel.size()) {
    $('#mycarousel-next').attr('disabled', 'true').addClass(next_class);
    } else {
    $('#mycarousel-next').attr('disabled', 'false').removeClass(next_class);
    }

};



jQuery(document).ready(function() {
    jQuery("#mycarousel").jcarousel({
        scroll: 1,
        initCallback: mycarousel_initCallback,
        buttonNextHTML: null,
        buttonPrevHTML: null,
        itemLastOutCallback: {
           onAfterAnimation: disableCustomButtons
        },
        itemLastInCallback: {
           onAfterAnimation: disableCustomButtons
        }
    });
});

;

