/* READY */

$(window).ready(function() {

	// Remove Skype	
	window.setTimeout(function() {
			$('.skype_pnh_container').html('');
			$('.skype_pnh_print_container').removeClass('skype_pnh_print_container');
		}, 800);
	
		//$('body').css({opacity : 0 });
		
		//$('header.top').css({opacity : 0 });
		
		//$('nav#menu').css({opacity : 0 });
	
	/* Scroll top */
	
	$('.scroll_top').click( function(){
		$('html, body').animate({scrollTop: 0}, 900);
	});
	
	$('footer .instant_call').mouseover( function(){
		$(this).addClass('over');
	});
	
	$('footer .instant_call').mouseleave( function(){
		$(this).removeClass('over');
	});
	
});

/* ----------------------------------------------------------------------------------- */
/* LOAD */
$(window).load(function() {

	$('#slide').find('figcaption, div.box, div.controls a').css({opacity: 0.9});

	/* Menu */
		
	$("#menu > ul > li").mouseover(function(e){

		$(this).find(".submenu").stop(true, true).slideDown('slow');
	});
	
	$("#menu > ul > li").mouseleave(function(){			
				
		$(this).find(".submenu").stop(true, true).slideUp('slow');
	});
	
	
	/* slide */
	$('#slide').mouseover(function(e){
		$(".submenu").stop(true, true).slideUp('slow');
		
		$(this).find(".move").stop(false,true);
		
		$(this).find('div.box, div.controls a').stop().animate({			
			opacity: 0.9
			
		},1000);	
	});
	
	$('#slide').mouseout(function(e){
		$('#slide .move').dequeue();
	
		$(this).find('div.box, div.controls a').stop().delay(2000).animate({
			opacity: 0			
		},1000);			
	});
	
	
	
	
	
	/* ----------------------------------------------------------------------------------- */
	/**/
	
	/* VIDEO */
	if ($('.video_box')) {
	
		/* SHOW VIDEO*/
		$('.video_box, .video_icon').click(function(){
			$(this).parent().find('.video').addClass('show');			
		});
		
		
		$('.video .close').click(function(){
			$(this).parent().removeClass('show');			
		});		
		
		$('.grid article').mouseover(function(){
			if( $('.video ').css('display') == 'none')
				$(this).addClass('show_description');
		});
		
		$('.grid article').mouseout(function(){
			$(this).removeClass('show_description');
		});
		
	}

});



