/**
 *
 * @copyright 2011 StudCom GmbH
 * @version 2011-06-20
 * @since 1.2
 */
$(document).ready(function() {
	$(".slide").hover(
	  function () {
      if($("p", this).is(':animated')) {
        $("p", this).stop();
        $("p", this).css('opacity', 0.9);
      }
      $("p", this).fadeIn();
    },
	  function () {
      if($("p", this).is(':animated')) {
        $("p", this).stop();
        $("p", this).css('opacity', 0.9);
      }	  
      $("p", this).fadeOut();
	  }
	);
  
  $('#content').autoPrettyphoto();
  
  $('#content').animRolloverFade();
	
	$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'facebook', overlay_gallery: false });
	$("a[rel^='lightbox']").prettyPhoto({theme: 'facebook', overlay_gallery: false });
	//$('#content').generateCaption();
});

/* Slider Initializer */

$(document).ready(function() {	
	$('#headimg').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		random: true,
		timeout: 5000
	});					
});	

if(typeof String.prototype.trim !== 'function') {
  String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, '');
  }
}
