// JavaScript Document
var map;
//alert('jquery');
$(document).ready(function() {
	initbramaccontents();
});


function initbramaccontents()
{
	$(".mouseoverslider").each(function(){

		// Bedingungen: .mouseovercaption bef�llt, img.mouseoverimage muss alt haben, Bild muss link haben mit href
		if(($(this).find(".mouseovercaption").html()==""&&$(this).find("img.mouseoverimage").attr("alt")=="")||$(this).find("a").attr('href')==undefined||$(this).find("a").attr('href')=="")
			return false;
		var headline=$(document.createElement('h2')).attr("class","mouseoverheader");
		headline.append($(this).find(".mouseovercaption").html());
		var link=$(document.createElement('a')).attr("href",$(this).find("a").attr('href')).attr("class","mouseoverlink");
		link.append(bramaccontent_txt_more);
		var innerdiv= $(document.createElement('div'));

		innerdiv.append(headline);
		innerdiv.append($(this).find("img.mouseoverimage").attr("alt"));
		innerdiv.append(link);


		var slidercontent=innerdiv.wrap("<div>").parent().html(); //headline+'<h2 >'++'</h2>'+append('<a class="mouseoverlink" href="'++'">mehr</a>').html().wrap("<div></div>");
		$(this).find("a img").parent().simpletip({
			content:slidercontent,
			fixed: true,
			position: [0, 0],
		//	position: ["0", String((-1)*$(this).height()+10)],
			showEffect:'fade',
			hideEffect:'fade'
		});
		$(this).find("a .tooltip").width($(this).find("img.mouseoverimage").width());
		$(this).find("a .tooltip").height($(this).find("img.mouseoverimage").height());
	});
}


