/* Author: 

*/

var cycleParams;

$( function() {
	
	$( ".chosen-language a" ).click( function(e) {
		e.preventDefault();
		return false;
	});

	$( '.banner .graphical' ).css( { "visibility": "visible" } );
	// Set up the banner
	$( '.banner .belt' ).cycle({
		 /*fx:    	'scrollLeft',*/
		 next:		'#banner-right',
		 prev:		'#banner-left',
		 pause: 	1,
		 timeout:	5000,
		 pager:		'#banner-pager'
	});

	
	
	// Set up the galleries. Only do this if there are >3 images
	if( $( '.gallery .image' ).length > 3 ) {
		
		cycleParams = {
				 fx:    	'scrollLeft',
				 next:		$( this ).find( '.gallery-next' ).eq(0),
				 prev:		$( this ).find( '.gallery-prev' ).eq(0),
				 pause: 	1,
				 timeout:	5000,
				 pager:		$( this ).find( '.gallery-pager' ).eq(0)
			};
		
		startGallery();
		
	} else {
		$( '.pager-shell' ).hide();
	}
	
	  	$( function() {
	  		$( '.lightbox' ).lightBox({
	  	  		maxHeight: screen.height * 0.9,
	  	  		maxWidth: screen.width * 0.9 
	  		});
	  	});

});

function stopGallery() {
	$( '.gallery .images' ).cycle( 'stop' );
}

function startGallery() {
	$( cycleParams[ 'pager' ] ).html( '' );
	$( '.gallery .images' ).cycle( cycleParams );
}

// v18-08-2011-12:36






















