
function getListByCatId(cat_id) {

  //alert(cat_id);  
  $("#layer1").load('/catalogue/list', {'cat_id' : cat_id}, function () {
    $("#layer1").animate({ right: 10 }, "slow");
    $("#arrow_layer").attr({'src' : '/themes/site/images/right-arrow2.gif'});
    $("#arrow_layer").attr({'alt' : 'Спрятать товары'});
    $("#arrow_layer").attr({'title' : 'Спрятать товары'});  
  });
  
  //$("#layer1").animate({ right: 10 }, "slow");  
  //moveLayer();
  

  
  return false;
}


function moveLayer() {
  if ($("#layer1").css("right") == "10px") {
    $("#layer1").animate({ right: -525 }, "slow");   
    $("#arrow_layer").attr({'src' : '/themes/site/images/left-arrow.gif'});
    $("#arrow_layer").attr({'alt' : 'Показать товары'});
    $("#arrow_layer").attr({'title' : 'Показать товары'});
  } else {
    $("#layer1").animate({ right: 10 }, "slow");
    $("#arrow_layer").attr({'src' : '/themes/site/images/right-arrow2.gif'});
    $("#arrow_layer").attr({'alt' : 'Спрятать товары'});
    $("#arrow_layer").attr({'title' : 'Спрятать товары'});
    
  }
}



var move = 0; 
function scrollDown() { 
  
  if (move == 1) return false;
  move = 1;
  
  var max       = parseInt($('#ulscrolling')[0].offsetHeight) - parseInt($('#scrolling')[0].offsetHeight) + 10;   
  var topmargin = parseInt($("#ulscrolling").css('marginTop')); 
   
  if (-max < topmargin) {
    
    var topmargin = parseInt($("#ulscrolling").css('marginTop')); 
    topmargin = topmargin - 50;
    
    $("#ulscrolling").animate({marginTop: topmargin}, "slow", function() { move = 0; });
  }
  move = 0;
}

function scrollUp() {    
  
  if (move == 1) return false;
  move = 1;
  
  var topmargin = parseInt($("#ulscrolling").css('marginTop'));
  
  if (topmargin < 0) {
    topmargin = topmargin + 50;
    
    $("#ulscrolling").animate({marginTop: topmargin}, "slow", function() { move = 0; } );
  } 
  move = 0;
  
}

function openSeo() {
  if ($('.main_page_seo_content').css('top') == '-200px') {
      $('.main_page_seo_content').css('top','0px');
    } else {
      $('.main_page_seo_content').css('top','-200px');
    }
}





