$(window).load(function() {
		$('#slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:1,
		animSpeed:2500,
		pauseTime:7000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});

$(document).ready(function() {

	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).show(); //Fade in the active ID content
		return false;
	});

});

$(document).ready(function() {
	$('.menu_h ul li a:first').addClass('no-border-left');
	$('.menu_h ul li a:eq(5)').addClass('no-border-right');
	$('.content_normal .listencontainer:first').addClass('no-border-top');
	$('.content_normal .listencontainer:last').addClass('no-border-bottom');
	$('.content_normal .listencontainer:first').addClass('no-padding-top');
	$('.content_normal .listencontainer:last').addClass('no-padding-bottom');
	$('.languages ul').addClass('language');
	$('.language li:first').addClass('no-border-left');
	$('.language li:eq(4)').addClass('no-border-right');
	$('.weitere div').addClass('other_bg');
	$('.weitere div table').each(function(){
		$(this).find('tr:even').addClass('other_bg');
	});
	$('#tracking table tbody tr:first').addClass('first');
	$('#tracking table tbody tr:even').addClass('ya_other_bg');
	$('#tracking table tbody tr td:eq(4)').addClass('bemerkung');
	
	$("a[href='startseite_43.xhtml']").attr('href', 'startseite.xhtml');	
	$("a[href='startseite_45.xhtml']").attr('href', 'startseite.xhtml');
	$("a[href='startseite_46.xhtml']").attr('href', 'startseite.xhtml');
	$("a[href='startseite_47.xhtml']").attr('href', 'startseite.xhtml');
	$("a[href='startseite_48.xhtml']").attr('href', 'startseite.xhtml');
	$("a[href='startseite_49.xhtml']").attr('href', 'startseite.xhtml');
	
	$('div.tabs').each(function()
	{
		if ($.trim($(this).html()) == '')
		{
			var id = $(this).attr('id');
			
			$('a[href="#'+id+'"]').parent().remove();
		}
	});
});

/*
$(document).ready(function(){
$('#tabs > div').hide(); // Hide all divs
$('#tabs div:first').show(); // Show the first div
$('#tabs ul li:first').addClass('active'); // Set the class for active state
$('#tabs ul li a').click(function(){ // When link is clicked
$('#tabs ul li').removeClass('active'); // Remove active class from links
$(this).parent().addClass('active'); //Set parent of clicked link class to active
var currentTab = $(this).attr('href'); // Set currentTab to value of href attribute
$('#tabs > div').hide(); // Hide all divs
$(currentTab).show(); // Show div with id equal to variable currentTab
return false;
});
});


$(document).ready(function () {
$('.besichtigung-tab').each(function()
{
if ($.trim($("#tab-5").children('.besichtigung_container').html()) == '')
{
$(this).css('display', 'none');
}
});
});

$(document).ready(function () {
$("a[href='objekttracking.xhtml?tm=logout']").attr('href', 'service.xhtml?tm=logout')
});



/* $(document).ready(function() {

	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).show(); //Fade in the active ID content
		return false;
	});

});




	$(document).ready(function(){
		$(".ui-tabs").tabs();
	});

*/
