function on(a){
  o = document.getElementById(a);
  o.className = "select";
 }
 
 function off(a){
  o = document.getElementById(a);
  o.className -= "select";
 }
 
 
 $(document).ready(function(){

	$(".menu_nav ul").hide(); 

	$(".menu_nav span").click(function(){
		$(this).next("ul").slideToggle("slow")  
		.siblings("ul:visible").slideUp("slow");  
		$(this).toggleClass("active"); 
		$(this).siblings("span").removeClass("active"); 
	});	
	
        $("a[rel^='prettyPhoto']").prettyPhoto({
            animationSpeed: 'normal',
            opacity: 0.35,
            showTitle: true,
            allowresize: true,
            counter_separator_label: '/',          
            theme: 'facebook' 
        });	
	var a=0;
	//for (var i=0; i<$(".menu_nav span").get())
	$(".menu_nav span").each(
		function()
			{
				a++;
					if (this.className == "active") {$(this).click(); $(this).toggleClass("active"); }

			}
	);
/*	$(".menu_nav span").hover(
		function(){$(this).find("a").css("color", "#fff")},
		function(){$(this).find("a").css("color", "#000")}
	) */

	
  $(function(){
  
  /* 
      $('.frame').hover(function(){
      $(this).children('a').stop(true,true)
			.animate({width:"250px",height:"222px",left:"-20px",top:"-20px"}, 500);
			
    },		
		
		function(){
			$(this).children('a').stop()
		.animate({width:"145px",height:"127px",left:"0px",top:"0px"}, 1);
		});	
  

		
    $('.frame').hover(function(){
      $(this).children('a').children('img').stop(true,true)
			.animate({width:"250px",height:"222px",left:"0px",top:"0px"}, 500);
			
    },		
		
		function(){
			$(this).children('a').children('img').stop()
		.animate({width:"145px",height:"127px",left:"0px",top:"0px"}, 1);
		});		
		 */
  });	
	$(".title, .photo_count").hover(
		function(){$(this).css("text-decoration","underline")},
		function(){$(this).css("text-decoration","none")}
	)
	
});

//Простое увеличение картинки от http://webostrovok.ru/ блок не растягивается

