jQuery(document).ready(function($){
	//$('#StyledSelect').styledSelect();
	
	//calculte_nav_offset(); // call this before lavaLamp
	
	buttonOverState('#formContacts .inputSubmit', 'inputSubmitOver');
	
	//console.log( $('.leftMenu_2 li').text() );
	//$('.leftMenu_2 ul li a.link').hover(function(){
	$('.menu_products ul li').not('.selected').hover(function(){
		$(this).addClass('selected');
	},
	function(){
		$(this).removeClass('selected');
	});
	
	// Set captcha by JS
	$("input[name='cap_prot']").val('1');
	
	$('.productArticlesList .itemImage a').lightBox(); //a[rel*=lightbox]
	
	//$('.newsletterForm .DivInputText .inputText').each(function(){$(this).watermark($(this).val())})
	
	equalize_row_titles('.productArticlesList .blockRow, .productArticlesList .blockRowLast', '.item .itemTitle'); //equalize_product_articles_titles
});


/*
function calculte_nav_offset()
{
	var max_width = $('#contentLight .wrapper').width();
	var nav_width = $('#nav').width();
	//alert(nav_width);
	if(max_width>nav_width) {
		var margin_offset = (max_width-nav_width) / 2;
		if( margin_offset >0 ) {
			margin_offset = Math.floor(margin_offset);
			//alert(margin_offset);
			//$('#nav').width(nav_width).css('margin-left', margin_offset + 8); // we have 15px left offset of the background image in header. Use half of this width
			$('#nav').css('margin-left', margin_offset + 8);
		}
	}
}
*/

/* OnOver - add class for IE - Should be used on elements different from Links */
function buttonOverState(selector, className)
{
	/* Hover over the login button */
	$(selector).hover(function(){
		$(this).addClass(className);
	},
	function(){
		$(this).removeClass(className);
	});
}

function equalize_row_titles(selector_row, selector_title)
{
	$(selector_row).each(function(){
		// itemTitle
		var highest = 0;
		$(selector_title, this).each(function() {
			//alert( $(this).height() );
			var elem_height = $(this).height();
			if(elem_height>highest) {
				highest = elem_height;
			}
		});
		$(selector_title, this).height(highest); // use min-height except ie6
	});
}




