/*фотоотчет*/
	//delete A 
	$(document).ready(function(){
	 $('.postCont .photoPreviewGallery .foto a').each(function() {
	  $(this).wrap("<span></span>");
	 });
	});

	//delete A shortstory-club.* 
	$(document).ready(function(){
	 $('.postCont .photoPreview .foto a').each(function() {
	  $(this).wrap("<span></span>");
	 });
	});
	
$(window).load(function() {
	//удаляем лишнее 
	//фоторепорт предосмотр 
	$('.postCont .photoPreviewGallery .foto').find('p').contents().unwrap();
	$('.postCont .photoPreviewGallery .foto span').find('a').contents().unwrap();
	$('.postCont .photoPreviewGallery .foto br').remove();
	//фотопросмотр shortstory-club.* 
	$('.postCont .photoPreview .foto').find('p').contents().unwrap();
	$('.postCont .photoPreview .foto span').find('a').contents().unwrap();
	$('.postCont .photoPreview .foto br').remove();
	//фотоотчет 
	$('.postCont .photoReport .foto').find('p').contents().unwrap();
	$('.postCont .photoReport .foto').find('a').contents().unwrap();
	$('.postCont .photoReport .foto br').remove();
	//фотоотчет полная новость 
	$('.fullCont .photoGalleryFull .foto').find('p').contents().unwrap();
	$('.fullCont .photoGalleryFull .foto br').remove();
	//постеры на главной 
	$('.index-poster .pn1 .postmain').find('p').contents().unwrap();
	$('.index-poster .pn1 .postmain').find('a').contents().unwrap();
	$('.index-poster .pn1 .postmain br').remove();
	//div scroll gallery
	$('.postHotel #makeMeScrollable').find('p').contents().unwrap();
	$('.postHotel #makeMeScrollable br').remove();
		
});



/*restoran MENU */
$(document).ready(function(){
		$('.menuRestBody').hover(
		function() {
			$(this).find('.title, .tags').stop(true, true);
			$(this).find('.title').animate({left: -310}).delay(1000);
			$(this).find('.tags').animate({right: 0}).delay(1000);
        },
		function() {
			$(this).find('.title').animate({left: 0}/*, 5*/);
			$(this).find('.tags').animate({right: -310}/*, 5*/);
        });
});

/*logo menu hover*/
$(document).ready(function(){
		$('.head').hover(
		function() {
			$(this).find('a.logohover').stop(true, true);
			$(this).find('a.logohover').animate({left: -350}).delay(2000);
        },
		function() {
			$(this).find('a.logohover').animate({left: 0}/*, 5*/);
        });
});

$(document).ready(function(){
	$('.head').hover(
		function() {
			$(this).addClass("topMenuSelected");
			$(this).find('div.topMenu').stop(true, true);
			$(this).find('div.topMenu').show('fast').delay(2000);
		},
		function() {
			$(this).find('div.topMenu').hide('fast');
			$(this).removeClass("topMenuSelected");
		}
	);
});


//фотоотчет полная новость анимация 
$(function(){
	$('.fullCont .photoGalleryFull .foto a img').hover(function(){
			$(this).stop().animate({width:"150px",height:"auto",left:"-13px",top:"-13px"}, 400);
		},
		function(){
			$(this).stop().animate({width:"133px",height:"auto",left:"0",top:"0"}, 400);
		});
});



/*index  poster hover*/
$(document).ready(function(){
		$('.index-poster .pn1').hover(
		function() {
			$(this).find('.postFonHover, .date, .title').stop(true, true);
			$(this).find('.postFonHover').slideToggle("fast");
        },
		function() {
			$(this).find('.postFonHover').slideToggle("slow");

        });
});




/*---------------------------------------*/

var logopened=false;
$(document).ready(function(){
    $('#logbtn').click(function(){
        if(logopened)
        {
            $('#logform').hide('fast');
            $('#logbtn').removeClass('selected');
        }    
        else
        {
            $('#logform').show('fast');
            $('#logbtn').addClass('selected');
        }
        logopened=!logopened;
        return false;
    });
}).click(function(e){
    if(!logopened)
        return;
    e=e||window.event;
    var target=e.target||e.srcElement;
    while(target)
    {
        if(target==$('#logform').get(0))
            return;
        target=target.parentNode;
    }
    $('#logform').hide('fast');
    $('#logbtn').removeClass('selected');
    logopened=false;    
});

$(document).ready(function(){
		$('#topmenu li.sublnk').hover(
		function() {
			$(this).addClass("selected");
			$(this).find('ul').stop(true, true);
			$(this).find('ul').show('fast');
		},
		function() {
			$(this).find('ul').hide('fast');
			$(this).removeClass("selected");
		}
	);
});

$(document).ready(function(){
	var tabContainers = $('#news-arch .tabcont');
		tabContainers.hide().filter(':first').show();
								
		$('#news-arch .tabmenu a').click(function () {
			tabContainers.hide();
			tabContainers.filter(this.hash).show();
			$('#news-arch .tabmenu a').removeClass('selected');
			$(this).addClass('selected');
			return false;
		}).filter(':first').click();
});




