
// Punkt vor Navigations-Text bei mouseover setzen
$('#mainnavi a')
.mouseenter(function() {
	if (!$(this).hasClass("selected")) { $(this).prepend('<span class="navidot">.</span>'); }
})

.mouseout(function() {
	if (!$(this).hasClass("selected")) { $(this).text($(this).text().substring(1)); }
});


// Erfolgsstimme aufklappen
/*$('#erfolgsstimmen .readmore').click(function() {
	$(this).hide('slow');
	$(this).prev().fadeOut(200);
	textHeight = (2* parseInt($(this).height())) + parseInt($(this).next(".text").height()) + parseInt($(this).prevAll(".title").height()) + parseInt($(this).prevAll(".teaser").height()) +75;
	$(this).parent().animate({ height: textHeight+"px" }, 500, function() { $(this).find(".text").fadeIn(500); $(this).find(".close").fadeIn(200);});
});

$('#erfolgsstimmen .close').click(function() {
	$(this).hide('slow');
	$(this).prev().fadeOut(200);
	textHeight = (2* parseInt($(this).height())) + parseInt($(this).prevAll(".teaser").height()) + parseInt($(this).prevAll(".title").height())+5;
	$(this).parent().animate({ height: textHeight+"px" }, 500, function() { $(this).find(".teaser").fadeIn(500); $(this).find(".readmore").fadeIn(200);});
});
*/
$('#erfolgsstimmen .readmore').click(function() {
	$(this).css("display","none");
	$(this).prev().fadeOut(50, function() { $(this).next().next().fadeIn(500);  })
});


//auto extern-intern linking
$(document).ready(function (){

	$('a').each(function(index) {
	    var link = $(this).attr("href");
	    
	    if ( $(this).attr("target") == null || $(this).attr("target") == '' ){
	    
		    if ((link.search(/www\.lighthouse-coaching\.at/) != -1) || (link.search(/^www\.lighthouse-coaching\.at/) == -1)){
		    	$(this).attr("target","_self");
		    } else {
		    	$(this).attr("target","_blank");
		    }
		    
		    if (link.search(/\.pdf$/) != -1){
		    	$(this).attr("target","_blank");
		    }
	    }
	      

	  });

});

