$(function(){

	$('ul.gallery a').lightbox({

		fileBottomNavCloseImage: '/media/img/close.gif'

	});

	

	if ($.browser.msie && parseInt($.browser.version) < 7)

	{

		//iehovers

		initIEHovers();

	}

});



function initIEHovers()
{
	$('#menu li').hover(
		function(){
			if ($(this).hasClass('parent'))
			{
				$(this).addClass('parent_hover');
			}
			else if ($(this).hasClass('first'))
			{
				$(this).addClass('first_hover');
			}
			else if ($(this).hasClass('last'))
			{
				$(this).addClass('last_hover');
			}
			else
			{
				$(this).addClass('hover');
			}
		},
		function(){
			$(this).removeClass('parent_hover');
			$(this).removeClass('first_hover');
			$(this).removeClass('last_hover');
			$(this).removeClass('hover');
		}
	);
}



function initSlideshow()

{

	$('#slideshow').slideshow({

		timeout: 5000,

		type: 'sequence'

	});

}



function prepareContactsPage()

{

	jQuery('#map').jmap('init', {

		'mapType': 'map',

		'mapCenter': [56.893297, 24.08390],

		'mapZoom': 14,

		'mapShowjMapsIcon': false

	});

	jQuery('#map').jmap('AddMarker', {

		'pointLatLng': [56.893297, 24.08390],

		'pointHTML': 'SIA «3L», Rīga, Rītausmas iela 23'

	});

}
