
$(function(){
	$('.catalog-menu .item .icon img').ifixpng();

});

$(function(){
	if ($.fn.prettyPhoto) {
		$("a[rel^='prettyPhoto']").prettyPhoto({
			theme: 'light_rounded'
		});
	}
});

$(document).ready(function() {
	$(".table-product-list .collapse").click(function(){

		$(this).parent().toggleClass("tpl-on");
	});
	$(".client-type span").click(function(){
		$(".client-type .collapse").slideToggle();
	});

	$("#header a.auth").click(function() {
		//$(this).parent().find(".enter").toggle();
		$(".auth-form-wrapper").toggleClass("current");
		//$(this).toggleClass("current");
		return(false);
	});
	
	if($("#ListOfferNotice").length) {
		$.ajax({
			url: "/?widget=ListOfferNotice&nocache=1",
			dataType: "json",
			success: function (data) {
				data.trimmedcontent = data.content.toString().replace(new RegExp('\\r\\n', 'g'), '');
				$("#ListOfferNotice").replaceWith(data.trimmedcontent);
			}
		});
	}

});
/*
$().ready(function(){
	$("#create-order-wrapper form").validate({
		rules : {
			name : "required",
			email :{email: true},
			phone: "required"


		},
		messages : {
			name : "Введите имя",
			email : "Введите правильный email адрес",
			phone: "Введите телефон"
		}
	});
});

$(function(){
	$.validator.messages.required = "Это поле является обязательным для заполнения";
	$.validator.messages.email = "Некорректный формат адреса электронной почты";
	$('form .required input').addClass('required');
	$('form .required textarea').addClass('required');
	$('form .email-wrapper .required input').addClass('email');
	$('form').each(function() { $(this).validate() });
	

});*/
