$(document).ready(function(){
    $("#bottom_galery .left_arr").animate({opacity: 0.7},500);
    $("#bottom_galery .right_arr").animate({opacity: 0.7},500);
    $("#bottom_galery ul li a img").animate({opacity: 0.9},500);
    
    $("#bottom_galery .left_arr").hover(function(){
	    $("#bottom_galery .left_arr").animate({opacity: 1},500);  
	},function(){
	    $("#bottom_galery .left_arr").animate({opacity: 0.7},500);
	    });
    
    $("#bottom_galery .right_arr").hover(function(){
	    $("#bottom_galery .right_arr").animate({opacity: 1},500);  
	},function(){
	    $("#bottom_galery .right_arr").animate({opacity: 0.7},500);
	    });
    
    $("#bottom_galery ul li a").hover(function(){
	    $(this).children("img").stop().animate({opacity: 1},500);  
	},function(){
	    $(this).children("img").stop().animate({opacity: 0.9},500);
	    });
    
    c_eq = 0;
    //c_eq_count = ($("#bottom_galery ul li img").length-1);
    c_eq_width = $("#bottom_galery ul li img").length * 161;
    $("#bottom_galery ul").width(c_eq_width);
    
    
    //carusel (c_eq, );
    $("#bottom_galery .left_arr").click(function(){
	    c_eq--;
	    if((c_eq * 159)<0){
		c_eq = $("#bottom_galery ul li img").length-4;
		};
	    $("#bottom_galery ul").animate({marginLeft: -(c_eq * 159)},300);
	    return false;
	});
    
    $("#bottom_galery .right_arr").click(function(){
	    c_eq++;
	    if((c_eq * 159)>(c_eq_width-(159*4))){
		c_eq = 0;
		};
	    $("#bottom_galery ul").animate({marginLeft: -(c_eq * 159)},300);
	    return false;
	});
    });