
$(function () {
	var speed = 300;
	var inline = 3;
	var count = $('#move img').length;
	var step = $('#move img').outerWidth(true);
	var stopped = false;
	$('#pleft').click(function () {
		if(count > inline && !stopped) {
			if(parseFloat($('#move').css('left')) < 0) {
				stopped = true;
				$('#move').animate({'left': '+='+step+'px'}, speed, function () { stopped = false; });
			}
		}
		return false;						
	});
	$('#pright').click(function () {
		if(count > inline && !stopped) {
			if(parseFloat($('#move').css('left')) > -step*(count-inline)) {
				stopped = true;
				$('#move').animate({'left': '-='+step+'px'}, speed, function () { stopped = false; });
			}
		}
		return false;
	});
});

$(function () {
	var bg_0 = {'background-color' : '#e5ddd0', 'background-image' : 'url(/i/fonts/bg.jpg)'};
	var bg_1 = {'background-color' : '#fefff9', 'background-image' : 'url(/i/design/jbi1.jpg)'};
	var bg_2 = {'background-color' : '#f8f6ea', 'background-image' : 'url(/i/design/jbi2.jpg)'};
	var bg_3 = {'background-color' : '#f1e0d0', 'background-image' : 'url(/i/design/jbi3.jpg)'};
	var bg_4 = {'background-color' : '#eee9e3', 'background-image' : 'url(/i/design/jbi4.jpg)'};
	var bg_5 = {'background-color' : '#f0f3fa', 'background-image' : 'url(/i/design/jbi5.jpg)'};
	var bg_6 = {'background-color' : '#d3ded6', 'background-image' : 'url(/i/design/jbi6.jpg)'};
	var bg_7 = {'background-color' : '#e8edf3', 'background-image' : 'url(/i/design/jbi7.jpg)'};
	var bg_8 = {'background-color' : '#f9f9f9', 'background-image' : 'url(/i/design/jbi8.jpg)'};
	
	var this_url = location.href;
	var this_url = this_url.replace('http://angara-gbi.ru/','');
	var this_url = this_url.replace('http://www.angara-gbi.ru/','');
	
	if (this_url == 'plity_aerodromnye.html'
	 || this_url == 'plity_dorozhnye.html'
	 || this_url == 'pliti_dorozhnie_b_u.html') 
	$('#body').css(bg_0);
	
	if (this_url == 'about.html'
	 || this_url == 'bordur_dorozhniy.html'
	 || this_url == 'bordjur_sadovyi.html'
	 || this_url == 'stolby_i_opory_osveshheniya.html'
	 || this_url == 'beton.html'
	 || this_url == 'zabory_zhelezobetonnye.html') 
	$('#body').css(bg_1);

	if (this_url == 'dnischa_kollektorov.html' 
	|| this_url == 'dnischa_kolodcev.html' 
	|| this_url == 'kollektory_dlja_trub.html' 
	|| this_url == 'kolodcy_unificirovannye.html' 
	|| this_url == 'kolca_kolodeznye.html' 
	|| this_url == 'lotki_vodootvodnye.html' 
	|| this_url == 'lotki_i_pokrytiya_teplotrass.html' 
	|| this_url == 'truby_beznapornye_rastrubnye.html' 
	|| this_url == 'truby_asbocementnye.html'
	|| this_url == 'kryshki_kolodcev.html'
	|| this_url == 'peskouloviteli.html'
	|| this_url == 'dozhdeprijomniki_i_reshotki_chugunnye.html'
	|| this_url == 'lestnicy_kolodeznye.html'
	|| this_url == 'ljuki_chugunnye.html'
	|| this_url == 'plity_perekrytij_kamer.html'
	|| this_url == 'contact.html') 
	$('#body').css(bg_2);

	if (this_url == 'vacancy.html' 
	 || this_url == 'liftovye_shahty.html'
	 || this_url == 'nastily.html'
	 || this_url == 'opornye_plity.html'
	 || this_url == 'plity_balkonov.html'
	 || this_url == 'plity_perekrytija_i_pokrytija_rebristye.html'
	 || this_url == 'plity_perekrytija_kanalov.html'
	 || this_url == 'plity_perekrytiya_pustotnie.html'
	 || this_url == 'fundamentnye_bloki.html'
	 || this_url == 'fundamentnye_podushki.html'
	 || this_url == 'fundamenty_lentochnye.html'
	 || this_url == 'kirpich.html') 
	$('#body').css(bg_3);

	if (this_url == 'order.html'
	|| this_url == 'balki_dobornye.html'
	|| this_url == 'balki_kollektornye.html'
	|| this_url == 'fundamentnye_balki.html'
	|| this_url == 'lestnichnye_marshi.html'
	|| this_url == 'lestnichnye_ploshadki.html'
	|| this_url == 'lestnichnye_stupeni.html'
	|| this_url == 'peremychki.html'
	|| this_url == 'progony_zhelezobetonnye.html'
	|| this_url == 'rigeli_zhelezobetonnye.html'
	|| this_url == 'bloki_stenovye.html') 
	$('#body').css(bg_4);

	if (this_url == 'list_asbocementnyj_shifer.html') 
	$('#body').css(bg_5);
	
	
	if (this_url == 'vzaimozachoty.html' || this_url == 'articles.html') 
	$('#body').css(bg_6);

	if (this_url == 'svai.html' || this_url == 'svai_sulfatostojkie.html') 
	$('#body').css(bg_7);

	if (this_url == 'avtoperevozki.html'
	|| this_url == 'perevozka_negabaritnyh_gruzov.html'
	|| this_url == 'perevozka_tjazhelovesnyh_gruzov.html'
	|| this_url == 'perevozka_produktov_pitanija.html'
	|| this_url == 'perevozka_mebeli.html') 
	$('#body').css(bg_8);
});


$(function () {
	$(".product_tbl tr:nth-child(2+2n)").addClass('odd');
});
$(function () {
	$(".cTable tr:nth-child(2+2n)").addClass('odd');
});

