jQuery(document).ready(function() {
	
	if ($('#goodsList.pricelist2').get(0)) {
		var i = 0;
	} else {		
		$('#goodsList tr').click(function() {
			var link = $(this).find('div.moreLink a');
			if (link.hasClass('toBasket')) return true;
			else {
				var href = link.attr('href');
				location.href = href;
			}
		});
	}
	
	$.viewportHeight = function() {
     return self.innerHeight ||
        jQuery.boxModel && document.documentElement.clientHeight ||
        document.body.clientHeight;
	};
	
	$.viewportWidth = function() {
     return self.innerWidth ||
        jQuery.boxModel && document.documentElement.clientWidth ||
        document.body.clientWidth;
	};

	var gH = $.viewportHeight();	
	
	var margin = gH - $('#footer').height()  - $('#head').height();

	if (margin > 0) {		
		$('#footer td').css('paddingTop', (margin + 10) + 'px');
	}
	
	$('#producer').change(function () {
      var str = "";
      var producer = $("#producer option:selected").val();   
      $('#producerForm').submit();   
    });

    
    $('#goodCard td.photo a.thumber').lightBox({fixedNavigation:false});

	
})
