getenv = function(i){
		if (!i.length) { return false; }
		qStr = document.location.href;
		strpos = qStr.indexOf("?"+i+"=");
		if ( strpos ==-1 ) { strpos = qStr.indexOf("&"+i+"="); }
		if ( strpos == qStr.length || strpos ==-1 ) { return false; }
		val = qStr.substring( (strpos+i.length)+2, qStr.length);
		strpos = val.indexOf("&");
		if ( strpos !=-1 ) { val = val.substring(0, strpos ); }
		if ( !val.length ) { return false; } else { return val; }
	}

$(document).ready(function(){

	if ( $.browser.msie )
		{
			if ( $.browser.version > 6){
				$('#sample1').SelectCustomizer();
				$('#sample2').SelectCustomizer();
		}
	}
	else{
		$('#sample1').SelectCustomizer();
		$('#sample2').SelectCustomizer();
	}
	if ($('#sample1').attr('title') == '') $('#sample1').attr('title', 'Все');
	if ($('#sample2').attr('title') == '') $('#sample2').attr('title', 'Все');

	$(".answer span.changed").click(function(){
		if ($(this).hasClass('active') == true) $(this).html('показать');
		else $(this).html('скрыть');
		$(this).parents('.answer').find('span').toggleClass('active');
		$(this).parents('.answer').find('.answer_inner').toggleClass('active');
	});
	$(".show_hide span").click(function(){
		$(this).parents('.show_hide').find('span').toggleClass('active');
		$(this).parents('.show_hide').find('.cover').toggleClass('uncover');
	});
	$(".fake_link").click(function(){
		$(this).parent('li').toggleClass('active');
	});
	$(".sh").click(function(){
		$(this).parents(".supplier").find("div.mh").toggleClass("now_hidden");
		if ($(this).text() == "Подробнее") $(this).text("Скрыть");
		else $(this).text("Подробнее");
		return false;
	});
	$(".tab_bottom span").click(function(){
		$(this).toggleClass("act");
		$(this).parents(".model_inner").find(".model_description").toggleClass("open");
	});
});



