$(document).ready(function() {
	// alert( $(window).height() + ' - ' + $(window).width() );
	// var screenHeight = $(window).height();
	var screenWidth = parseInt( $(window).width() );
	
	if ( screenWidth != '' && screenWidth != null && screenWidth != 'undefined' ) {
		
		if ( screenWidth <= 1024 ) {
			
			if ( $( '#page_sup' ) ) {
				
				$( '#page_sup' ).css( 'padding-top', '0px' );
			}
		}
	}
})

function showVideo( idVideo ) {
	$('object').css('visibility','hidden');
	if ( $('.jcarousel-container').children().length != 0 ) {

		$( '.jcarousel-container' ).css( 'visibility', 'hidden' );
		if ( $('#thumbs_list_lazy_susan').children().length != 0 ) {
			$( '#thumbs_list_lazy_susan' ).css( 'visibility', 'hidden' );
		}
		$( '.jcarousel-container' ).fadeTo( 0, '0', function() {
			$( '#idVideo' + idVideo ).fadeIn();
			$( '#idVideo'+ idVideo+ ' object' ).css( 'visibility', 'visible' );
			$( '#bgVideo' + idVideo ).fadeIn();
			$( '#bgVideo' + idVideo ).fadeTo( 500, '0.5' );
			$( 'body' ).css( 'overflow', 'hidden' );
		});
	} else {
		$( '#idVideo' + idVideo ).fadeIn();
		$( '#idVideo'+ idVideo+ ' object' ).css( 'visibility', 'visible' );
		$( '#bgVideo' + idVideo ).fadeIn();
		$( '#bgVideo' + idVideo ).fadeTo( 500, '0.5' );
		$( 'body' ).css( 'overflow', 'hidden' );
	}
}

function hideVideos() {
	$('object').css('visibility','visible');
	$( '.videoBlock_hidden' ).fadeOut( 500, function() { 
		$( '.videoContent' ).fadeOut( 500, function() { 
			$( '.jcarousel-container' ).css( 'visibility', 'visible' );
			$( '#thumbs_list_lazy_susan' ).css( 'visibility', 'visible' ); 
			$( '.jcarousel-container' ).fadeTo( 0, '1' ); 
			$( 'body' ).css( 'overflow', 'auto' ); 
		} );
	} );
}
