
jQuery(document).ready(function() {
	
	// allen Links der galerie ein rel="superbox" hinzufuegen
	jQuery(".gallery-icon a").attr("rel","superbox[gallery][thePostGallery]")
	
	// alternating rowcolors
	jQuery("tr:even").addClass('even') 
	jQuery("tr:odd").addClass('odd')

	// applied to first <td> in row
	jQuery("td:even").addClass('tdlabel')
	
	jQuery("#firstPost p:first").addClass('intro') // applied to first <p> on homepage post
	jQuery("#single p:first").addClass('intro') // applied to first <p> on detail post
	
	// open links with rel=external in a new window
	jQuery('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});

	// show/hides the #theTagCloud div and toggles class
	jQuery("#showTags").click(function() {
		jQuery("#theTagCloud").slideToggle(600);
		jQuery("#showTags").toggleClass("closeIT"); 
	});
	
	// smooth scrolling
	jQuery("a.scrollPage").click(function() {
		var elementClicked = jQuery(this).attr("href");
		var destination = jQuery(elementClicked).offset().top;
		jQuery("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 1000 );
		return false;
	});
	
	
	// superbox settings and activation
	jQuery.superbox.settings = {
		boxId: "superbox", // Id attribute of the "superbox" element
		boxClasses: "", // Class of the "superbox" element
		overlayOpacity: .6, // Background opaqueness
		boxWidth: "600", // Default width of the box
		boxHeight: "400", // Default height of the box
		loadTxt: "Loading...", // Loading text
		closeTxt: "schliessen", // "Close" button text
		prevTxt: "Previous", // "Previous" button text
		nextTxt: "Next" // "Next" button text
	};
	jQuery.superbox();


//jQuery("tr:odd").css("background-color", "#fff");


});