var errorfields = {};

var ww = {
	
	closeErrors: function(){
        $('.errors').hide();
    },
	changeTab : function(tabid)
	{
		
		$('.tabcontent').hide();
		$('#t'+tabid).show();
		$('.tbutton').removeClass('active');
		$('#t_'+tabid).addClass('active');
	}
	
	
}

$(document).ready(function(){

    jQuery.each(errorfields, function(i, val){
        $('#' + errorfields[i].field).addClass('error');
        $('#' + errorfields[i].field + '-error').html('<a class="south" href="#" title="' + errorfields[i].message + '"></a>').show();
    });
    
    $('.south').tipsy({
        gravity: 's'
    });
	
	//meret
	var finalh = 0;
	var tab1 = ($('#t1').height())+137;
	var tab2 = ($('#t2').height())+137;
	var mleft = ($('.main-left').height())+57;
	
	if(tab1 < tab2)
	{
		finalh = tab2;
	}
	else
	{
		finalh = tab1;
	}
	
	if(mleft < finalh)
	{
		$('.main-left').css('min-height',finalh);
		$('.main-left').css('_height',finalh);
		$('.main-left').css('background-color','#ffffff');
		$('.main-right').css('background-color','#ffffff');
		$('.main-right').css('min-height',finalh+20);
		$('.main-right').css('_height',finalh+20);
	}
	
	$('.product-index table tr:even').addClass('even');
	$('.product-index table tr:odd').addClass('odd');
	
	
	
});
