// Create Tooltips from the Title-Tag of each LI-Element

CreateTooltips = function() {
	$('.single-brand').each(function(){
		$(this).attr('savedtitle', $(this).attr('title'));
		$(this).find('a').attr('savedtitle', $(this).attr('title'));
		$(this).attr('title', '');
		$(this).find('img').attr('title', '');
		$(this).find('img').attr('alt', '');
		$(this).find('a').attr('title', '');
	})
	$('.show-tooltip').hover(
		function(){
			$(this).parent(".single-brand")
				.append($('<span/>')
					.addClass('brandname')
					.append($('<span/>')
						.html($(this).attr('savedtitle'))
					)
				)
				.css({'z-index' : '2000'});
			$('.brandname').css({'display' : 'block', 'bottom' : '50px'});
		},
		function(){
			$(this).parent(".single-brand")
				.css({'z-index' : '1'})
				.find("span.brandname").remove();
		}
	)
};

$(document).ready(function() {
	CreateTooltips();
});

