$(document).ready( function() {
	$("#container").slideDown();
    $('.left').click( function() {
        $('#slider').data('AnythingSlider').goBack();
    });
    
    $('.right').click( function() {
        $('#slider').data('AnythingSlider').goForward();
    });
    
    $(".slidetitle").hover( function() {
        $(this).find('img').stop().animate({left:'-1000px'},300, 'swing');
        $(this).find('h1,h2').css({color:'#ffffff'});
    }, function() {
        $(this).find('img').stop().animate({left:'0px'},300);
        $(this).find('h1').css({color:'#b71616'});
        $(this).find('h2').css({color:'#5c5962'});
    });
    
    $('.pageTop .slidecontainer')
        .animate({'margin-top':'110px'},600,'swing')
        .animate({'margin-top':'127px'},100,'swing');
    
    $('a.leesmeer').click(function(){
        if($(this).parent().find('.leesmeercontent').hasClass('down')){
            $(this).text('Lees meer');
        } else {
            $(this).text('Inklappen');
        }
       $(this).parent().find('.leesmeercontent').slideToggle().toggleClass('down');
    });
    
    $('#menu ul li').not('.active').hover(function(){
        $(this).stop(true,true).animate({backgroundPosition: '0px -170px'},600);
    }, function(){
        $(this).stop(true,true).animate({backgroundPosition: '0px -30px'});
    });
    
    $('.logolink').hover(function(){
    	$(this).find('img').stop(true,true).fadeOut();
    },function(){
    	$(this).find('img').stop(true,true).fadeIn();
    });
        
});

$(function() {
    $('#slider').anythingSlider({
        startStopped : false,
        width : 1920,
        easing: 'swing',
        buildNavigation : false,
        resizeContents : false,
        autoPlayLocked : true,
        infiniteSlides : false,
        delay : 6000,
        animationTime : 1000
    });
});
