 $(window).load(function() {
        $('#slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        slices:1,
        animSpeed:200, //Slide transition speed
        pauseTime:3000,
        startSlide:0, //Set starting Slide (0 index)
        directionNav:false, //Next & Prev
        directionNavHide:false, //Only show on hover
        controlNav:true, //1,2,3...
        keyboardNav:true, //Use left & right arrows
        pauseOnHover:true, //Stop animation while hovering
        manualAdvance:false, //Force manual transitions
        captionOpacity:0.5, //Universal caption opacity
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){}, //Triggers after all slides have been shown
        lastSlide: function(){}, //Triggers when last slide is shown
        afterLoad: function(){} //Triggers when slider has loaded
    	});
    });

$(document).ready(function(){
	$(".contentMain a").not(".contentMain .cmsLinks a, #euroweb a, a.escape, .vcard, .einbaubeispiele a, .nobg").addClass("linkbullet");
	
	$(".einbaubeispiele a:nth-child(5n)").addClass("nomargin");
	
	$('#example').dataTable( {
		"bJQueryUI": true,
		"bPaginate": true,
		"bLengthChange": true,
		"bFilter": true,
		"bSort": true,
		"bInfo": true,
		"bAutoWidth": true } );
	
	$("a[rel=lightbox],  a[rel=teaser]").fancybox({
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic',
					'overlayColor'		: '#000',
					'titlePosition'		: 'outside',
					'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span>Bild ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
					}


	});
	
	$("a[rel=callback]").fancybox({
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic',
					'overlayColor'		: '#000',
					'titlePosition'		: 'outside',
					'type'			: 'iframe',
					'width'			: 300,
					'height'			: 320
					


	});
	$("a[rel=rechner]").fancybox({
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic',
					'overlayColor'		: '#000',
					'titlePosition'		: 'outside',
					'type'			: 'iframe',
					'width'			: 760,
					'height'			: 520
					


	});
	
	//Tabs
	
	$( "#tabs" ).tabs();
	
	//Callback
	//$(".trigger").click(function(){
//				$("#callback").animate({"left":"+=380"});	
//				$(this).removeClass("trigger").addClass("close");				
//	});
//	$(".close").click(function(){
//				$("#callback").animate({"left":"-=380"});	
//				$(this).removeClass("close").addClass("trigger");				
//	});
	
	$(".trigger").click(function(){
		$(this).toggleClass("close");
			if($(this).hasClass("close")){
				$("#callback").animate({"left":"+=300"});
			}
			else{
				$("#callback").animate({"left":"-=300"});
			}
	});

	


});
