$(document).ready(function() { 
	var galName = '';
	$("#footer").css('display', 'none');
	
	// Слайдшоу на страницах (маленькие картиночки)
    // значение timeout
    if (typeof pageSlideTimeout == 'undefined') pageSlideTimeout = 15000;
    $('.slide_img').cycle({
        height: 'auto',
        fx: 'none',
        //speed: 1,
        speed:  400,
        prev:   '.prev', 
        next:   '.next',
        timeout:  pageSlideTimeout,
		containerResize: false,
		slideResize: 0,
		before:  (function () {
			$(".slide_img img").css('position', 'absolute');
			//if(this.height == 0) iHeight = 300;
			//else iHeight = this.height;
			//$(".slide_img").css('height', iHeight);
			
			$(".slideshow em").html(this.alt); 
		}),
		after: (function () {	
				$(".slide_img img").css('position', 'static');
		})
    });

    // Ховер картинки галерери фототура
    $("#mGallery a").hover(
    	function () {
    		galName = $("#mGallery em").text();
    		$("#mGallery em").html( $(this).children("img").attr('alt') );
    	},
    	function () {
    		$("#mGallery em").html(galName);
    	}
    );
    
    // Menu
	$("#TopMenu li.active").hover(
		function () {
			$(this).removeClass('active');
		}, 
		function () {
			$(this).addClass('active');
		}
		
	);
	
	$("#TopMenu li.one").hover(
		function () {
			$(this).addClass('select');
			$(this).removeClass('one');
			$(this).find('ul').addClass('active');
		
		}, 
		function () {
			$(this).removeClass('select');
			$(this).addClass('one');
			$(this).find('ul').removeClass('active');
		}
		
	);

});

Cufon.replace("ul#TopMenu li.subm a.active", {
	hover: true
});


