
	
$(document).ready(function(){
	
	//$('#left_col, #sidebar_right').css('margin-top','0px');	
	
	//de pus codul doar pe index.php
	//$('.addtoany_share_save_container').hide();
	
	$('.homelist .hentry:odd').not(':last').after("<div class='clear'></div><div class='sep'></div>");
	//$('.homelist .hentry:odd').not(':last,:first');
	$('.homelist .hentry:even').css('border-right','1px dashed #a7a5a6');
	
	
	
	$("div.scrollable").scrollable({size: 4	});
	$('.homelist object, .homelist embed').each(function(){
		var $obj = $(this);
		
		var objw = $obj.width();
		var objh = $obj.height();
		
		$obj.width(280+'px');
		$obj.height(210+'px');
	});
	
	$('.homelist img').each(function(){
		var ratio = $(this).width()/$(this).height();
		
		
		if (parseFloat($(this).width()) > 120) {
			$(this).width(120+'px');
			$(this).height(120/ratio + 'px');
		}
	});
	
	//$('.gallery').hide();
	
	$('.custom_eshop').remove();
	$(window).load(function(){
		$('.topimg').each(function(){
			
			//alert($(this).height());
			var ratio = $(this).height()/161;
			//alert(ratio);
			var awidth = $(this).width();
			$(this).height('161px');
			$(this).width((awidth/ratio)+'px');
			
			var maxwidth = 210;
			if ($(this).width()>maxwidth) {
				var imgratio = $(this).width()/210;
				var imgheight = $(this).height();
				$(this).width('210px');
				$(this).height((imgheight/imgratio)+'px');
				aheight = $(this).height();
				var margin = (161-aheight)/2;
				$(this).css({
					'margin-top': margin + 'px',
					'margin-bottom': margin + 'px'
				});
				
			}
			$(this).css('visibility','visible')
		});
	});
	
	
});



