﻿$(document).ready(function() {

	$(".karriereThumb img").each(function (i) {
	
		if($(this).attr("alt") != null) {
	
			var text = $(this).attr("alt");
			
			if(text != '') {
				var name = text.substring(0, text.indexOf(" - "));
				var description = text.substring(text.indexOf(" - ")+3, text.length);
				
				if(name != null && description != null) {
				
					$(this).hover(
						function() {
							var position = $(this).offset();					
							$("#karriereMouseover").show();
							$("#karriereMouseover").html("<span>"+ name +"</span><p>"+ description +"</p><div id=\"karriere_ecke\"></div>");
							$("#karriereMouseover").css("top", position.top - $("#karriereMouseover").height());
							$("#karriereMouseover").css("left", position.left + 5);
						},
						
						function () {
							$("#karriereMouseover").hide();
							$("#karriereMouseover").html("");
						}
					);
				}
			}
		}
	});	
});

$(document).ready(function() {
	$('.appMap_text').toggle("fast");
	$('.appMap_text').toggle("fast");

					
	$(".appMap_title").click(function () {	
		if($(this).parent().find(".appMap_text").css("display") == 'none') {
			$(this).addClass("appMap_active");
			$(this).parent().find(".appMap_text").toggle("fast");
		} else {					
			$(this).removeClass("appMap_active");
			$(this).parent().find(".appMap_text").toggle("fast");
		}
	});
});

