$(document).ready(function() { 

	$('a[rel*=lightbox], a[href$=.jpg], a[href$=.jpeg], a[href$=.gif], a[href$=.png]').lightBox({
		overlayBgColor: '#043B64',
		overlayOpacity: 0.7,
		imageLoading: 'http://tausendfuessler-kaki.de/wp-content/themes/taufue_v2/images/lightbox-ico-loading.gif',
		imageBtnClose: 'http://tausendfuessler-kaki.de/wp-content/themes/taufue_v2/images/lightbox-btn-close.gif',
		imageBtnPrev: 'http://tausendfuessler-kaki.de/wp-content/themes/taufue_v2/images/lightbox-btn-prev.gif',
		imageBtnNext: 'http://tausendfuessler-kaki.de/wp-content/themes/taufue_v2/images/lightbox-btn-next.gif',
		keyToClose: 'x',
		containerResizeSpeed: 350,
		txtImage: 'Bild',
		txtOf: 'von'
	});
	
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body').animate({scrollTop: targetOffset}, 800);
      	return false;
      }
    }
  });
  
  $("#commenthints_heading a").click(function() {
  	$('#commenthints_list').animate({
  		"height": "toggle", "opacity": "toggle"
  	}, { duration: 1000, queue: false });
  	$('#commenthints_heading').toggleClass("alternative");
  });

  $(".sidebar_banner img, .fade").css( "opacity", "0.7" );
  $(".sidebar_banner img, .fade").hover(
  	function() {
  		$(this).animate( {
  			"opacity": "1.0"
  		}, { duration: 300, queue: false });
  	},
  	function() {
  		$(this).animate( {
  			"opacity": "0.7"
  		}, { duration: 500, queue: false });
  	}
  );

  $(".ngg-widget img, .ngg-thumbnail img").css( "opacity", "0.5" );
  $(".ngg-widget img, .ngg-thumbnail img").hover(
  	function() {
  		$(this).animate( {
  			"opacity": "1.0"
  		}, { duration: 300, queue: false });
  	},
  	function() {
  		$(this).animate( {
  			"opacity": "0.5"
  		}, { duration: 500, queue: false });
  	}
  );
  
	$("#mycarousel").jcarousel({
    vertical: true,
    itemVisible: 3,
    itemScroll: 3,
    easing: 'swing',
		buttonNextHTML: '<a></a>',
		buttonPrevHTML: '<a></a>',
    scrollAnimation: "slow"
//    itemWidth: 280,
//    itemHeight: 39
	});

});