$(document).ready(function () {
    $('#nav-list-example li div.back').hide().css('left', 0);
    
    function mySideChange(front) {
        if (front) {
            $(this).parent().find('div.front').show();
            $(this).parent().find('div.back').hide();
            
        } else {
            $(this).parent().find('div.front').hide();
            $(this).parent().find('div.back').show();
        }
    }
    
    $('#nav-list-example li').hover(
        function () {
            $(this).find('div').stop().rotate3Di('flip', 130, {direction: 'clockwise', sideChange: mySideChange});
        },
        function () {
            $(this).find('div').stop().rotate3Di('unflip', 400, {sideChange: mySideChange});
        }
    );
});



$(document).ready(function() {
	 
	$('#header-cont ul li').last().css("border", "none");
	
	$('.content a').mouseenter(function() {
		top: 0
	});
	
	$('#main').fadeIn(600, function(){
		$('#header').animate({
			top: 0
		}, 550, 'easeOutBounce');
		
		$('#footer').animate({
			bottom: 0
		}, 550, 'easeOutBounce');
		/*
		$('#header').animate(
			{top: 0}, {duration: 550, easing: "easeOutCubic", complete: function()
			{
				letsLoadTheContent();
			}
		});
		$('#footer').animate({bottom: 0}, {duration: 550, easing: "easeOutCubic"});*/
		$('#map').delay(380).animate({
			height: 300
		}, 650, 'easeOutBack');
		
		$('.img-home').delay(300).animate({
			left: '-3%'
		}, 1100, 'easeOutElastic');
		
		$('.img-contact').delay(1000).animate({
			left: '-15%'
		}, 1350, 'easeOutElastic');
	});
		
	/*
	$('.dd-srv').mouseenter(function () {
		$('#srv-nav').fadeIn(50);
	});
	$('#srv-nav').mouseleave(function () {
		$(this).fadeOut(80);
	});	*/
	
	
	$('.more-txd').click(function(){
		$('.desc-txd').toggle(250);
		$('.slide-serv').delay(200).animate({
			height: '350px'
		}, 400, 'easeOutBack');
	});
	
	$('.btn-close').click(function(){
		$('.slide-serv').animate({
			height: '0'
		}, 400, 'easeOutBack');
		$('.desc-txd').delay(200).toggle(250);
	});

	
	
	$('#slider, #slider2, #slider3, #slider4, #slider5, #slider6').nivoSlider();
	
	
	$("#various1, #various2").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'width'				: '70%'
	});

});




