$(document).ready(function() {
	try
    {
    	$('.carusel').jcarousel({scroll:1,start: 2});   
    }
    catch(e) {;}

	$('.carusel').css('overflow','visible');	
	$('.jcarousel-next').hover(function(){
		if ($(this).hasClass('jcarousel-next-disabled')) {
		}
		else {
			$(this).addClass('active')
		}
	},function(){
		$(this).removeClass('active');
	});
	
	$('.jcarousel-prev').hover(function(){
		if ($(this).hasClass('jcarousel-prev-disabled')) {
		}
		else {
			$(this).addClass('active')
		}
	},function(){
		$(this).removeClass('active');
	});

});

function lm_open(a,b)
{
	try
	{
		var o=a.nextSibling;
		(o.style.display=='none')?(o.style.display=''):(o.style.display='none');
		return false;
	}
	catch(err)
	{
		return true;
	}
}

function lm_filter(a,b,c)
{
	b=b.replace(/catalog\/\//,'catalog/0/')+'';
	a.href=b+'?min='+document.getElementById('price_min').value+'&max='+document.getElementById('price_max').value+'&brand='+document.getElementById('price_brand').value+(c?('&order='+c):'');
	return true;
}

function lm_upward()
{
	document.getElementById('price_min').value=document.getElementById('price_min2').value;
	document.getElementById('price_max').value=document.getElementById('price_max2').value;
	document.getElementById('price_brand').value=document.getElementById('price_brand2').value;
}

function lm_contact()
{
	if (document.getElementById('cmp_city').value=='' || document.getElementById('cmp_phone').value=='' || document.getElementById('cmp_face').value==''
	|| document.getElementById('cmp_other').value=='') {alert('Не все поля заполнены!'); return;}
	var b='\r\nЗаявка для получения прайс-листа\r\n';
	b+='Город: '+document.getElementById('cmp_city').value+'\r\n';
	b+='Конт. телефон: '+document.getElementById('cmp_phone').value+'\r\n';
	b+='Конт. лицо: '+document.getElementById('cmp_face').value+'\r\n';
	b+='Коментарий: '+'\r\n'+document.getElementById('cmp_other').value+'\r\n';
	document.getElementById('feedback_message').value=document.getElementById('old_feedback_message').value=b;
	document.forms['feedback'].onsubmit();
}