jQuery.noConflict();
// jQuery onLoad
jQuery(document).ready(function() {
  // Externe Links setzen
  jQuery("a[rel=external]").attr("target", "blank");
  
  /**
  * Most jQuery.localScroll's settings, actually belong to jQuery.ScrollTo, check it's demo for an example of each option.
  * @see http://flesler.demos.com/jquery/scrollTo/
  * You can use EVERY single setting of jQuery.ScrollTo, in the settings hash you send to jQuery.LocalScroll.
  */		
  // Scroll initially if there's a hash (#something) in the url 
  jQuery.localScroll.hash({
    //target: '.column_seven', // Could be a selector or a jQuery object too.
	queue:true,
	duration:800
  });
  
  // Scroll all the links given special classes
  if (jQuery('ul.linkliste').length > 0) {
  jQuery('ul.linkliste').localScroll({
		//target: '#content', // could be a selector or a jQuery object too.
		queue:true,
		duration:800,
		hash:true,
		onBefore:function( e, anchor, $target ){
			// The 'this' is the settings object, can be modified
		},
		onAfter:function( anchor, settings ){
			// The 'this' contains the scrolled element (#content)
		}
  });
  }

	
  if (jQuery('a#button-start').length > 0) {
    // Button auf der Startseite Mouseover/out animieren
	jQuery('a#button-start').mouseover(function(){ 
		jQuery(this).animate({backgroundPosition: '0px 0px'}) ; 
	});
	jQuery('a#button-start').mouseout(function(){ 
		jQuery(this).animate({backgroundPosition: '0px -33px'}) ; 
	});
  }
	
	/*if ($('#mycarousel').length > 0) {
		jQuery('#mycarousel').jcarousel({
				auto: 4,
				scroll: 1,
				wrap: 'circular',
				initCallback: mycarousel_initCallback,

				animation: 'slow'
		});
	}*/
  if (jQuery('#slideshow-placeholder').length > 0) {
	jQuery('#slideshow-placeholder').crossSlide({
		sleep: 3,
		fade: 2
	}, [
		{ src: 'img/bild-paramentik-slide-1.jpg' },
		{ src: 'img/bild-paramentik-slide-2.jpg'   },
		{ src: 'img/bild-paramentik-slide-3.jpg'  },
		{ src: 'img/bild-paramentik-slide-4.jpg' }
	]);

  }
});

/*function mycarousel_initCallback(carousel) {
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};*/
