
jQuery(document).ready(function() {


	/*
	jQuery('#buehne .slider1').anythingSlider({
		// Appearance
		width               : 800,      // Override the default CSS width
		height              : 300,      // Override the default CSS width
		resizeContents      : true,      // If true, solitary images/objects in the panel will expand to fit the viewport
		
		animationTime       : 500,       // How long the slideshow transition takes (in milliseconds)
		easing				: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin

		buildArrows         : false,      // If true, builds the forwards and backwards buttons
		buildNavigation     : false,      // If true, buildsa list of anchor links to link to each panel
		navigationFormatter : null,      // Details at the top of the file on this use (advanced use)
		autoPlay            : true,      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
		delay               : 3000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
		pauseOnHover        : true,      // If true & the slideshow is active, the slideshow will pause on hover
		startStopped        : false     // If autoPlay is on, this can force it to start stopped
	});


	jQuery('.slider1').anythingSlider({
		// Appearance
		width               : 198,      // Override the default CSS width
		height              : 115,      // Override the default CSS width
		resizeContents      : true,      // If true, solitary images/objects in the panel will expand to fit the viewport
		
		animationTime       : 500,       // How long the slideshow transition takes (in milliseconds)
		easing				: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin

		buildArrows         : false,      // If true, builds the forwards and backwards buttons
		buildNavigation     : false,      // If true, buildsa list of anchor links to link to each panel
		navigationFormatter : null,      // Details at the top of the file on this use (advanced use)
		autoPlay            : true,      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
		delay               : 3000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
		pauseOnHover        : true,      // If true & the slideshow is active, the slideshow will pause on hover
		startStopped        : false     // If autoPlay is on, this can force it to start stopped
	});
	*/




	
    // page is now ready, initialize the calendar...
    // Wird jetzt im Template showTeaserVeranstaltungskalender.html aufgerufen
   	jQuery('#calendarOLD').fullCalendar({
		header: {
			left: 'prev,next',
			center: 'title',
			right: ''
		},
		buttonText: {
        	prev: '&#160;',
        	next: '&#160;'
	    },
		events: [
			{
				title  : '',
				start  : '2011-03-20',
				url: 'http://www.google.de/'
			},
			{
				title  : '',
				start  : '2011-05-27',
				url: 'http://www.heise.de/'
			},
			{
				title  : '',
				start  : '2011-05-27',
				url: 'http://www.google.de/'
			},
			{
				title  : '',
				start  : '2011-03-14',
				end    : '2011-03-16',
				url: 'http://www.yahoo.de/'
			},
			{
				title  : '',
				start  : '2011-03-30',
				end    : '2011-04-02',
				url: 'http://www.yahoo.de/'
			}
 	   	],

        // put your options and callbacks here
		firstDay : 1,
		monthNames : ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
		dayNamesShort : ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa']

    })

	
	/*
	jQuery('#calendar .fc-event a span').each(function() {
		thisval = jQuery(this).html();
		jQuery(this).parent().attr("title",thisval);	
	});
	//alert(jQuery('#calendar .fc-event a').length);
	*/


	//dropdown stylen
    jQuery('#my-dropdown').sSelect({
		//ddMaxHeight: '150px'
		defaultText: 'Bitte auswählen'
	}).change(function(){
		location.href = '/' + jQuery('#my-dropdown').getSetSSValue();
		//alert(jQuery('#my-dropdown').getSetSSValue());
		//return true;
	});
	
	
	
	jQuery(".searchDiv").find('input.volltextsuche').DefaultValue("VOLLTEXTSUCHE");
	jQuery(".searchDiv").find('input.veranstaltungssuche').DefaultValue("VERANSTALTUNGSSUCHE");
	jQuery(".searchDiv").find('input.vereinsfinder').DefaultValue("PLZ SUCHE");
	jQuery(".searchDiv").find('input.vereinsfinder2').DefaultValue("ORT SUCHE");
	jQuery(".searchDiv").find('input.plz').DefaultValue("PLZ");
	jQuery(".searchDiv").find('input.ort').DefaultValue("ORT");

	
	


	//Slide Mainnavi
	/*
	jQuery("#mainnavi .li_main").hover(function() {
		//jQuery(this).children('ul.mainsubnavi').stop(true, false).animate({ height: "234px" });
		//jQuery(this).children('a').addClass('active');
		jQuery(this).children('ul.mainsubnavi').addClass('active');
	}, function() {
		//jQuery(this).children('ul.mainsubnavi').stop(true, false).animate({ height: "0" });
		//jQuery(this).children('a').removeClass('active');
		jQuery(this).children('ul.mainsubnavi').removeClass('active');
	});
	*/
	jQuery("#mainnavi .li_main").mouseover(function() {
		jQuery(this).children('ul.mainsubnavi').addClass('active');
	});
	jQuery("#mainnavi .li_main").mouseout(function() {
		jQuery(this).children('ul.mainsubnavi').removeClass('active');
	});
		

	
	//Mainnavi Klick auf li
	jQuery("#mainnavi .li_main").click(function() {
		url = jQuery(this).find('a').attr('href');
		location.href = url;
	});
	
	
	/*
	// linkBox rechte Spalte linksbündiger Text
	var act_itemWidth = 0;
	var newWidth = 0;
	jQuery('.linkBox').each(function() {
		jQuery('.linkBox .f_right').each(function() {
			itemWidth = jQuery(this).width();
			if(itemWidth > act_itemWidth) {
				newWidth = itemWidth;
				act_itemWidth = itemWidth;
			}
		});
		jQuery(this).find('.f_right').width(newWidth+'px');
		act_itemWidth = 0;
	});
	*/

	
	jQuery('.f3-widget-paginator .next a').html('&Auml;ltere News &raquo;')
	jQuery('.f3-widget-paginator .previous a').html('&laquo; Neuere News')



   	jQuery('.slideshow2').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});


	//breadcrumbmenu beim kackpagebrowser ;-) 
	if( jQuery('.cag_pagebrowser').length != 0 ) {
		bread = jQuery('#breadcrumbDiv').html();
		bread = bread.split('&nbsp;|&nbsp;')
		bread.pop();
		bread = bread.join('&nbsp;|&nbsp;')
		jQuery('#breadcrumbDiv').html(bread);
	}


	jQuery('.Tabelle-Formulare tr').each(function() {
		jQuery(this+':first-child').addClass('td-1');
		jQuery(this+':last-child').addClass('td-3');
	});


	jQuery('.Tabelle-Regelwerke tr').each(function() {
		jQuery(this+':last-child').addClass('td-2');
	});


	


});



