$(document).ready(function(){
	$('#menu-navigation li').mouseenter(function(){
		$(this).stop().animate({'paddingRight':'40px'});
	}).mouseleave(function(){
		$(this).stop().animate({'paddingRight':'20px'});
	});
	
	$('#social-icons a').mouseenter(function(){
		$(this).children('.left').stop().animate({'marginLeft':'3px'}, 'fast');
		$(this).children('.right').stop().animate({'marginRight':'3px'}, 'fast');
	}).mouseleave(function(){
		$(this).children('.left').stop().animate({'marginLeft':'0px'}, 'fast');
		$(this).children('.right').stop().animate({'marginRight':'0px'}, 'fast');
	});

	$('#image-rotation img:not(":first")').hide();
	var count=0;
    var countImages = $('#image-rotation img').size();

	if(countImages>1){
    	setInterval(nextImage,4000);
	}
    function nextImage() {
        $('#image-rotation img:eq('+count+')').fadeOut(1500);
        if(count<countImages-1){
            count++;
        } else {
            count=0;
        }
       $('#image-rotation img:eq('+count+')').fadeIn(1500);
    }

});