$(document).ready(function() {
	jQuery('.b-main-menu li').hover(
		function() {
			jQuery(this).children('a').addClass("hover");
			jQuery(this).find('div').stop(true, true);
			jQuery(this).find('div').show();
		},
		function() {
			jQuery(this).children('a').removeClass("hover");
			jQuery(this).find('div').hide();
		}
	);
	jQuery(function(){
		jQuery('dl.b-product-descr-list dt').click(function(){
			jQuery(this)
				.siblings().removeClass('b-active-tab').end()
				.next('dt').andSelf().addClass('b-active-tab')
				.siblings().removeClass('b-active-body').end()
				.next('dd').andSelf().addClass('b-active-body');
		});
	});
	$speed = 250;
	i = 1;
	bool = false;
	jQuery('.b-vert-link').click(function(){
		if(bool == false){
			submenuOpen(this);
		}
		else{
			submenuClose(this);
			submenuOpen(this);
		}
	});
	activeSubmenuShow();
	jQuery(".b-add-address-tbl input").bind("keypress keyup mouseup", function(){
		value1 = jQuery('.b-add-address-tbl tr:nth-child(1) td:nth-child(2) input').attr('value');
		value2 = jQuery('.b-add-address-tbl tr:nth-child(2) td:nth-child(2) input').attr('value');
		value3 = jQuery('.b-add-address-tbl tr:nth-child(3) td:nth-child(2) input').attr('value');
		if(value1 != '' && value2 != '' && value3 != '')
			{jQuery("#address-submit").removeAttr("disabled");}
	});
}); 

function activeSubmenuShow() {
	act = ".b-vert-menu .active";
	jQuery(act).find('ul').show();
	if(act)
		bool = true;
}
function submenuClose(obj) {
	jQuery('.b-vert-menu').find('ul').hide($speed);
	jQuery(obj).removeClass('on');
	bool = false;
}

function submenuOpen(obj){
	jQuery(obj).siblings('ul').slideDown($speed);
	jQuery(obj).addClass('on');
	bool = true;
}



