// JavaScript Document


//Wenn Website eingebette, dann Frame loswerden
//if (top.frames.length!==0) { top.location=self.document.location }

/*
$(function() { 
    $("a[rel]").overlay({expose: '#6096D4'}); 
});*/
$(function() {

	// if the function argument is given to overlay, it is assumed to be the onBeforeLoad event listener
	$("a[rel]").overlay(function() {

		// grab wrapper element inside content
		var wrap = this.getContent().find("div.wrap");

		// load only for the first time it is opened
		if (wrap.is(":empty")) {
			wrap.load(this.getTrigger().attr("href"));
		}
	});
});



jQuery(document).ready(function($) {
	// Vollbildmodus für Galerie-Fotos
	$("img").fullsize();
	
	// Alternierende Zeielnfarben für Tabellen
	$("table.zebra tr:nth-child(odd)").addClass("zebraRow");
	
	// Klick-Tracking Info-Button
	$("#infoInternatButton").click(function(){
		pageTracker._trackPageview("/info-internat.html");
	});
	
	// PDF-Downloads in GA zählen
	$("a[href$='pdf']").click(function(){
		pageTracker._trackEvent('Downloads', 'PDF', $(this).attr('href'));  
	});
})

