addLoadEvent(function()
{		
	if( $('.item-thumb-image').length )
		itemThumbHandler($('.item-thumb-image'));
	if( $('.related-item-anchor').length )
		itemThumbHandler($('.related-item-anchor'));
	if( $('.share-collection-item').length )
		itemThumbHandler($('.share-collection-item'));
	
	function itemThumbHandler(item)
	{
		item
		.each(function()
		{
			var animation_image = $(this).find('img[id*=thumb]');
			var animation_image_position = animation_image.position();
			var animation_image_width = animation_image.width();
			var animation_image_height = animation_image.height();

			$(this)
			.find('.animation-duration')
			.css({
				left: animation_image_position.left +'px',
				top: (animation_image_position.top + animation_image_height - ($(this).hasClass('item-thumb-image') ? ($.browser.msie ? 9 : 13) : (($.browser.msie && $.browser.version < 8.0) ? 12 : 16))) +'px',
				width: (($.browser.msie && $.browser.version >= 8.0) || !$.browser.msie ? animation_image_width :  ($.browser.msie && $.browser.version < 7.0 ) ? animation_image_width : animation_image_width + 4) +'px',
				height: '16px',
				color: '#fff',
				background: '#000',
				opacity: 0.5,
				position: 'absolute',
				zIndex: 50,
				fontSize: '10px',
				display: 'block'
			})
			.find('.animation-duration-inner')
			.css({
				margin: '0.1em',
				width: '99%'
			});
		});
	}
});
