$(document).ready(function() {

     $("#top-menu ul li#2").css("marginTop", "85px");
     $("#top-menu ul li#16").css("marginTop", "87px");
     $("#top-menu ul li#17").css("marginTop", "78px");
     $("#top-menu ul li#18").css("marginTop", "73px");
     $("#top-menu ul li#19").css("marginTop", "73px");
     $("#top-menu ul li#9").css("marginTop", "80px");
     $("#top-menu ul li#21").css("marginTop", "95px");
     $("#top-menu ul li#20").css("marginTop", "75px");
     $("#top-menu ul li#22").css("marginTop", "100px");
     $("#top-menu ul li#23").css("marginTop", "75px");
     
$("h3.name").each(function () {
    $(this).click(function () {
	  if ($(this).next("img").next("div#text").attr("class") == 'hide'){
		$(this).next("img").next("div#text").slideDown('normal');  
		$(this).next("img").next("div#text").attr("class", "show");
		return false;
		  }
	  if ($(this).next("img").next("div#text").attr("class") == 'show'){
		$(this).next("img").next("div#text").slideUp('normal');  
		$(this).next("img").next("div#text").attr("class", "hide");
		return false;
		  }	  
	 });
  });	 
	 
$("h3.name").each(function () {
    $(this).click(function () {
	  if ($(this).next("div#text").attr("class") == 'hide'){
		$(this).next("div#text").slideDown('normal');  
		$(this).next("div#text").attr("class", "show");
		return false;
		  }
	  if ($(this).next("div#text").attr("class") == 'show'){
		$(this).next("div#text").slideUp('normal');  
		$(this).next("div#text").attr("class", "hide");
		return false;
		  }	  
	 });
  });
	 // отцентровка блока
  // $(".in_cart").css("top",($(window).height()-$(".in_cart").height())/2+$(window).scrollTop() + "px");
  // $(".in_cart").css("left",($(window).width()-$(".in_cart").width())/2+$(window).scrollLeft() + "px");	 
/*
 function pageWidth(){
   return document.body.scrollWidth;	 
 }
function pageHeight(){
   return document.body.scrollHeight;	 
 }

 $("img").each(function() {
	$(this).click(function() {
	 if( $(this).attr("rel") == 'lytebox' ){
        $("#overlay").css({
		 width: pageWidth() + 'px',
		 height: pageHeight() + 'px'
		 });
		$("#overlay").fadeIn('normal');
        $(this).clone(false).prependTo("#container-img").attr("id", "cloned");

        $("#container-img").css({
        top: ($(window).height()-$("#container-img").height())/2+$(window).scrollTop() + "px",
        left: ($(window).width()-$("#container-img").width())/2+$(window).scrollLeft() + "px"
        });
        $("#container-img").fadeIn('normal');

	  }

		});
	 });

$("#overlay, #container-img, #container-img img#cloned, #container-img img#closes").click(function() {
	$("#overlay, #container-img, #container-img img#cloned, #container-img img#closes").fadeOut('normal');
	$("img#cloned").remove();
	}); */
});

