<!--
$(function(){

			var search_friend  		= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.search_friend.php';
			var calculate_adv  		= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.calculate.php';
			var invite_friends 		= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.invite_friends.php';
			var teilnahme_comment 	= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.comment.php';
			var search_organizer	= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.search_organizer.php';
			var get_categories		= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.get_categories.php';
			var bannerstats			= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.banner_stats.php';
			var md5_file			= 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.md5.php';

			$('#rating_success').hide();
			$('#rating_error').hide();

			$('.banner_stats').click(function(){
				var idb = $(this).attr('id');
				var temp = '';
				$('#temp_b').load(bannerstats,'idb='+idb);
			});

			var top_article = $('#top_article').val();
			if(top_article){
				$('#'+top_article).hide();
			}
			
			$('#submit_form_upload').hide();
				
			// Facbook effect for Textarea
			$("textarea").autogrow();

			$('#datepicker').datepicker({
						dateFormat:'dd.mm.yy',
						yearRange: 'c-100:c',
						disabled: true,
						monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
						dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
						changeYear: true,
			});

			$('#go_frm400').datetimepicker({
						closeText: 'Übernehmen',
						currentText: 'jetzt',
						monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
						dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
						timeText: 'beginnt um ',
						hourText: 'Stunde',
						minuteText: 'Minute',
						dateFormat: 'dd.mm.yy',
						timeFormat: 'hh:mm',
						stepMinute: 10,
						separator: ' - ',
						minuteMin: 00
			});

			$('#go_frm420').datetimepicker({
						closeText: 'Übernehmen',
						currentText: 'jetzt',
						monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
						dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
						timeText: 'endet um ',
						hourText: 'Stunde',
						minuteText: 'Minute',
						dateFormat: 'dd.mm.yy',
						timeFormat: 'hh:mm',
						stepMinute: 10,
						separator: ' - ',
						minuteMin: 00
			});

			var now = new Date();
			$('#von').val(now.getDate()+'.'+(now.getMonth()+1)+'.'+now.getFullYear());
			$('#bis').val((now.getDate()+1) +'.'+(now.getMonth()+2)+'.'+now.getFullYear());

			$('#von').datepicker({
						dateFormat:'d.m.yy',
						yearRange: 'c:c+1',
						disabled: true,
						monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
						dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
						changeYear: true,
						firstDay: 1,
						minDate: now,
						defaultDate: now,
						nextText: 'vor',
						prevText: 'zurück',
						onClose: function(dateText) { 
							if (dateText > $('#bis').val()) {
								$('#bis').val(dateText);
							}
						}
			});

			$('#bis').datepicker({
						dateFormat:'d.m.yy',
						yearRange: 'c:c+1',
						disabled: true,
						monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
						dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
						changeYear: true,
						minDate: now,
						firstDay: 1,
						defaultDate: now,
						nextText: 'vor',
						prevText: 'zurück',
						onClose: function(dateText){
							if (dateText < $('#von').val()){
								$('#von').val(dateText);
							}
						}
			});

			$('#user_data').click(function(){
				$('#data').hide();
				$('#form').show();
			});

			$('#user_data_submit').click(function(){
				$('#registerform').submit();
			});

			$('#string').keyup(function(){
				var myData = $("#search_friend").serialize();
				$('#friendsearch').load(search_friend, myData);	
			});

			$('#interessen').click(function(){
				var myData = $("#search_friend").serialize();
				$('#friendsearch').load(search_friend, myData);	
			});

			if($("#search_friend")){
				var myData = $("#search_friend").serialize();
				$('#friendsearch').load(search_friend, myData);	
			}

			// Veranstaltung melden
			$('#feedback_out').hide();
			$('#send_termin #go_frm440').attr('autocomplete', 'off');
			$('#send_termin #go_frm440').keyup(function(){
				var myData = $("#send_termin").serialize();
				$('#feedback_out').load(search_organizer, myData);
			});

			// Veranstaltung melden
			$('#send_termin #go_frm440').change(function(){
				$('#go_frm120').val('');
				/*
				$('#go_frm440').val('');
				*/
				$('#go_frm480').val('');
				$('#go_frm460').val('');
				$('#go_frm500').val('');
				$('#go_frm540').val('');
			});
	
			rechnen();
				
			// Berechnung f�r Kalenderbestellung
			$('#kalender #go_frm380').keyup(function(){
				rechnen();
			});

			// Berechnung f�r Kalenderbestellung
			$('#kalender #go_frm440').click(function(){
				rechnen();
			});
			
			// Datepicker f�r Gewinnspiel
			$('#gewinnspiel #go_frm260').datepicker({
				dateFormat:'d.m.yy',
				yearRange: 'c-120:c',
				disabled: false,
				monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
				dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
				changeYear: true,
				maxDate: '-18y',
				firstDay: 1,
				defaultDate: '-18y',
				nextText: 'vor',
				prevText: 'zur�ck'
			});
			
			$("#tabs").tabs();

			$('#next_tab').click(function(){
				$("#tabs").tabs({ selected:1});
			});

			$("#order_form").change( function() {
				var myDataCalc = $("#order_form").serialize();
//				if($("#azb_zahlungsart").val()==2){
//					$("#bank").hide();
//					$("#azb_zahlungsweise").attr("selectedIndex",1);
//				}else{
//					$("#bank").show();
//					$("#azb_zahlungsweise").attr("selectedIndex",0);
//				}
				$("#azb_rechnung").load(calculate_adv,myDataCalc);
			});

			$("#order_form").validationEngine();

			$("#dialog-form").dialog({
				autoOpen: false,
				height: 300,
				width: 400,
				modal: false,
				buttons: {
						"Jetzt einladen": function(){
								var array = $('#dialog-form > form').serialize();
								$('#temp').load(invite_friends+'?action=add',array);
								$("#dialog-form").dialog("close");
						}
					}
			});

			$(".einladen").click(function(){
				var id = $(this).attr('id');
				$("#dialog-form").find('#vname').html($('#title'+id).html());
				$("#dialog-form").find('#idevent').val(id);
				$("#friends").load(invite_friends,'idevent='+id);
				$("#dialog-form").dialog("open");
			});

			$(".comment_body").hide();

			$(".comment").click(function(){
				var id = $(this).attr("id");
				var uid = $("#uid").val();
				$("#comment_"+id).load(teilnahme_comment,"idevent="+id+"&uid="+uid).delay(500);
				$("#comment_"+id).slideDown("slow");
			});

			$(".comment_close").click(function(){
				var id = $(this).attr("id");
				$("#comment_"+id).slideUp("slow");
			});

			if ($('#send_termin')) {
				var data = $('#send_termin').serialize();
				$('#go_frm340').load(get_categories, data);
			}

//			$('#cap_order').change(function(){
//				
//				var hidden = $('#cap_order_cses').val();
//				var input  = $('#cap_order').val();
//				var string = $('#temp_cap').load(md5_file, 'string='+input);
//			
//				string = $('#temp_cap').val();
//
//				if(string == hidden){
//					return true;
//				}else{
//					return false;
//				}
//
//			});

			$('#lightbox').lightBox();

			$('.basic').jRating({
				length: 5,
				rateMax : 5,
				rateInfosX : -45, // relative position in X axis of the info box when mouseover
				rateInfosY : 10,
				decimalLength:0,
				onSuccess : function(){
			    	$('#rating_success').dialog({ 
							title: 'Bewertungsstatus',
							resizable: false,
							buttons: { "Ok": function() { 
												$(this).dialog("close"); 
											}
									 }
					});
			  	},
			  	onError : function(){
					$('#rating_error').dialog({ 
						title: 'Bewertungsstatus',
						resizable: false,
						step:true,
						buttons: { "Ok": function() { 
											$(this).dialog("close"); 
										 } 
								 } 
					});
				}
			});


			$('.slideshow').show();

			$('#banner_top').cycle({

					fx              			: 'fade', 	// choose your transition type, ex: fade, scrollUp, shuffle, etc...
		    		timeout						: 10000,  	// milliseconds between slide transitions (0 to disable auto advance) 
		   			timeoutFn					: null,  	// callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		continuous					: null,       // true to start next transition immediately after current one completes 
		    		speed						: 5000,  	// speed of the transition (any valid fx speed value) 
		    		speedIn						: null,  	// speed of the 'in' transition 
		   			speedOut					: null,  	// speed of the 'out' transition 
		    		next						: null,	// selector for element to use as click trigger for next slide 
		    		prev						: null,  	// selector for element to use as click trigger for previous slide 
		    		prevNextClick				: null,  	// callback fn for prev/next clicks:    function(isNext, zeroBasedSlideIndex, slideElement) 
		    		prevNextEvent				: 'click.cycle',  	// event which drives the manual transition to the previous or next slide 
		    		pager						: null,  	// selector for element to use as pager container 
		    		pagerClick					: null,  	// callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement) 
		   	 		pagerEvent					: 'click.cycle',  	// name of event which drives the pager navigation 
		    		allowPagerClickBubble		: false,  	// allows or prevents click event on pager anchors from bubbling 
		    		pagerAnchorBuilder			: null,  	// callback fn for building anchor links:  function(index, DOMelement) 
		    		before						: null,  	// transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		after						: null,  	// transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		end							: null,  	// callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) 
		    		easing						: null,  	// easing method for both in and out transitions 
		    		easeIn						: null,  	// easing for "in" transition 
		    		easeOut						: null,  	// easing for "out" transition 
		    		shuffle						: null,  	// coords for shuffle animation, ex: { top:15, left: 200 } 
		    		animIn						: null,  	// properties that define how the slide animates in 
		    		animOut						: null,  	// properties that define how the slide animates out 
		    		cssBefore					: null,  	// properties that define the initial state of the slide before transitioning in 
		    		cssAfter					: null,  	// properties that defined the state of the slide after transitioning out 
		    		fxFn						: null,  	// function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) 
		    		height						: 'auto',  	// container height 
		    		startingSlide				: 0,  	// zero-based index of the first slide to be displayed 
		    		sync						: 1,  	// true if in/out transitions should occur simultaneously 
		    		random						: true,  	// true for random, false for sequence (not applicable to shuffle fx) 
		    		fit							: 0,  	// force slides to fit container 
		    		containerResize				: 0,  	// resize container to fit largest slide 
		    		pause						: 0,  	// true to enable "pause on hover" 
		    		pauseOnPagerHover			: 0,  	// true to pause when hovering over pager link 
		    		autostop					: 0,  	// true to end slideshow after X transitions (where X == slide count) 
		    		autostopCount				: 0,  	// number of transitions (optionally used with autostop to define X) 
		    		delay						: 10000,    // additional delay (in ms) for first transition (hint: can be negative) 
		    		slideExpr					: null,  	// expression for selecting slides (if something other than all children is required) 
		    		cleartyp					: !$.support.opacity,  	// true if clearType corrections should be applied (for IE) 
		    		cleartypeNoBg				: false,  	// set to true to disable extra cleartype fixing (leave false to force background color setting on slides) 
		    		nowrap						: 0,  	// true to prevent slideshow from wrapping 
		    		fastOnEvent					: 0,  	// force fast transitions when triggered manually (via pager or prev/next); value == time in ms 
		    		randomizeEffects			: 1,  	// valid when multiple effects are used; true to make the effect sequence random 
		    		rev							: 0,  	// causes animations to transition in reverse 
		    		manualTrump					: true,  	// causes manual transition to stop an active transition instead of being ignored 
		    		requeueOnImageNotLoaded		: true,  	// requeue the slideshow if any image slides are not yet loaded 
		    		requeueTimeout				: 250,  	// ms delay for requeue 
		    		activePagerClass			: 'activeSlide',  	// class name used for the active pager link 
		    		updateActivePagerLink		: null,  	// callback fn invoked to update the active pager link (adds/removes activePagerClass style) 	});
			});

			$('#banner_center').cycle({

					fx              			: 'fade', 	// choose your transition type, ex: fade, scrollUp, shuffle, etc...
		    		timeout						: 10000,  	// milliseconds between slide transitions (0 to disable auto advance) 
		   			timeoutFn					: null,  	// callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		continuous					: null,       // true to start next transition immediately after current one completes 
		    		speed						: 5000,  	// speed of the transition (any valid fx speed value) 
		    		speedIn						: null,  	// speed of the 'in' transition 
		   			speedOut					: null,  	// speed of the 'out' transition 
		    		next						: null,	// selector for element to use as click trigger for next slide 
		    		prev						: null,  	// selector for element to use as click trigger for previous slide 
		    		prevNextClick				: null,  	// callback fn for prev/next clicks:    function(isNext, zeroBasedSlideIndex, slideElement) 
		    		prevNextEvent				: 'click.cycle',  	// event which drives the manual transition to the previous or next slide 
		    		pager						: null,  	// selector for element to use as pager container 
		    		pagerClick					: null,  	// callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement) 
		   	 		pagerEvent					: 'click.cycle',  	// name of event which drives the pager navigation 
		    		allowPagerClickBubble		: false,  	// allows or prevents click event on pager anchors from bubbling 
		    		pagerAnchorBuilder			: null,  	// callback fn for building anchor links:  function(index, DOMelement) 
		    		before						: null,  	// transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		after						: null,  	// transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		end							: null,  	// callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) 
		    		easing						: null,  	// easing method for both in and out transitions 
		    		easeIn						: null,  	// easing for "in" transition 
		    		easeOut						: null,  	// easing for "out" transition 
		    		shuffle						: null,  	// coords for shuffle animation, ex: { top:15, left: 200 } 
		    		animIn						: null,  	// properties that define how the slide animates in 
		    		animOut						: null,  	// properties that define how the slide animates out 
		    		cssBefore					: null,  	// properties that define the initial state of the slide before transitioning in 
		    		cssAfter					: null,  	// properties that defined the state of the slide after transitioning out 
		    		fxFn						: null,  	// function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) 
		    		height						: 'auto',  	// container height 
		    		startingSlide				: 0,  	// zero-based index of the first slide to be displayed 
		    		sync						: 1,  	// true if in/out transitions should occur simultaneously 
		    		random						: true,  	// true for random, false for sequence (not applicable to shuffle fx) 
		    		fit							: 0,  	// force slides to fit container 
		    		containerResize				: 0,  	// resize container to fit largest slide 
		    		pause						: 0,  	// true to enable "pause on hover" 
		    		pauseOnPagerHover			: 0,  	// true to pause when hovering over pager link 
		    		autostop					: 0,  	// true to end slideshow after X transitions (where X == slide count) 
		    		autostopCount				: 0,  	// number of transitions (optionally used with autostop to define X) 
		    		delay						: 10000,    // additional delay (in ms) for first transition (hint: can be negative) 
		    		slideExpr					: null,  	// expression for selecting slides (if something other than all children is required) 
		    		cleartyp					: !$.support.opacity,  	// true if clearType corrections should be applied (for IE) 
		    		cleartypeNoBg				: false,  	// set to true to disable extra cleartype fixing (leave false to force background color setting on slides) 
		    		nowrap						: 0,  	// true to prevent slideshow from wrapping 
		    		fastOnEvent					: 0,  	// force fast transitions when triggered manually (via pager or prev/next); value == time in ms 
		    		randomizeEffects			: 1,  	// valid when multiple effects are used; true to make the effect sequence random 
		    		rev							: 0,  	// causes animations to transition in reverse 
		    		manualTrump					: true,  	// causes manual transition to stop an active transition instead of being ignored 
		    		requeueOnImageNotLoaded		: true,  	// requeue the slideshow if any image slides are not yet loaded 
		    		requeueTimeout				: 250,  	// ms delay for requeue 
		    		activePagerClass			: 'activeSlide',  	// class name used for the active pager link 
		    		updateActivePagerLink		: null,  	// callback fn invoked to update the active pager link (adds/removes activePagerClass style) 	});
			});

			$('#banner_right').cycle({

					fx              			: 'fade', 	// choose your transition type, ex: fade, scrollUp, shuffle, etc...
		    		timeout						: 10000,  	// milliseconds between slide transitions (0 to disable auto advance) 
		   			timeoutFn					: null,  	// callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		continuous					: null,       // true to start next transition immediately after current one completes 
		    		speed						: 5000,  	// speed of the transition (any valid fx speed value) 
		    		speedIn						: null,  	// speed of the 'in' transition 
		   			speedOut					: null,  	// speed of the 'out' transition 
		    		next						: null,	// selector for element to use as click trigger for next slide 
		    		prev						: null,  	// selector for element to use as click trigger for previous slide 
		    		prevNextClick				: null,  	// callback fn for prev/next clicks:    function(isNext, zeroBasedSlideIndex, slideElement) 
		    		prevNextEvent				: 'click.cycle',  	// event which drives the manual transition to the previous or next slide 
		    		pager						: null,  	// selector for element to use as pager container 
		    		pagerClick					: null,  	// callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement) 
		   	 		pagerEvent					: 'click.cycle',  	// name of event which drives the pager navigation 
		    		allowPagerClickBubble		: false,  	// allows or prevents click event on pager anchors from bubbling 
		    		pagerAnchorBuilder			: null,  	// callback fn for building anchor links:  function(index, DOMelement) 
		    		before						: null,  	// transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		after						: null,  	// transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		end							: null,  	// callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) 
		    		easing						: null,  	// easing method for both in and out transitions 
		    		easeIn						: null,  	// easing for "in" transition 
		    		easeOut						: null,  	// easing for "out" transition 
		    		shuffle						: null,  	// coords for shuffle animation, ex: { top:15, left: 200 } 
		    		animIn						: null,  	// properties that define how the slide animates in 
		    		animOut						: null,  	// properties that define how the slide animates out 
		    		cssBefore					: null,  	// properties that define the initial state of the slide before transitioning in 
		    		cssAfter					: null,  	// properties that defined the state of the slide after transitioning out 
		    		fxFn						: null,  	// function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) 
		    		height						: 'auto',  	// container height 
		    		startingSlide				: 0,  	// zero-based index of the first slide to be displayed 
		    		sync						: 1,  	// true if in/out transitions should occur simultaneously 
		    		random						: true,  	// true for random, false for sequence (not applicable to shuffle fx) 
		    		fit							: 0,  	// force slides to fit container 
		    		containerResize				: 0,  	// resize container to fit largest slide 
		    		pause						: 0,  	// true to enable "pause on hover" 
		    		pauseOnPagerHover			: 0,  	// true to pause when hovering over pager link 
		    		autostop					: 0,  	// true to end slideshow after X transitions (where X == slide count) 
		    		autostopCount				: 0,  	// number of transitions (optionally used with autostop to define X) 
		    		delay						: 10000,    // additional delay (in ms) for first transition (hint: can be negative) 
		    		slideExpr					: null,  	// expression for selecting slides (if something other than all children is required) 
		    		cleartyp					: !$.support.opacity,  	// true if clearType corrections should be applied (for IE) 
		    		cleartypeNoBg				: false,  	// set to true to disable extra cleartype fixing (leave false to force background color setting on slides) 
		    		nowrap						: 0,  	// true to prevent slideshow from wrapping 
		    		fastOnEvent					: 0,  	// force fast transitions when triggered manually (via pager or prev/next); value == time in ms 
		    		randomizeEffects			: 1,  	// valid when multiple effects are used; true to make the effect sequence random 
		    		rev							: 0,  	// causes animations to transition in reverse 
		    		manualTrump					: true,  	// causes manual transition to stop an active transition instead of being ignored 
		    		requeueOnImageNotLoaded		: true,  	// requeue the slideshow if any image slides are not yet loaded 
		    		requeueTimeout				: 250,  	// ms delay for requeue 
		    		activePagerClass			: 'activeSlide',  	// class name used for the active pager link 
		    		updateActivePagerLink		: null,  	// callback fn invoked to update the active pager link (adds/removes activePagerClass style) 	});
			});

			$('#top_event').cycle({

					fx              			: 'fade', 	// choose your transition type, ex: fade, scrollUp, shuffle, etc...
		    		timeout						: 10000,  	// milliseconds between slide transitions (0 to disable auto advance) 
		   			timeoutFn					: null,  	// callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		continuous					: null,       // true to start next transition immediately after current one completes 
		    		speed						: 5000,  	// speed of the transition (any valid fx speed value) 
		    		speedIn						: null,  	// speed of the 'in' transition 
		   			speedOut					: null,  	// speed of the 'out' transition 
		    		next						: null,	// selector for element to use as click trigger for next slide 
		    		prev						: null,  	// selector for element to use as click trigger for previous slide 
		    		prevNextClick				: null,  	// callback fn for prev/next clicks:    function(isNext, zeroBasedSlideIndex, slideElement) 
		    		prevNextEvent				: 'click.cycle',  	// event which drives the manual transition to the previous or next slide 
		    		pager						: null,  	// selector for element to use as pager container 
		    		pagerClick					: null,  	// callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement) 
		   	 		pagerEvent					: 'click.cycle',  	// name of event which drives the pager navigation 
		    		allowPagerClickBubble		: false,  	// allows or prevents click event on pager anchors from bubbling 
		    		pagerAnchorBuilder			: null,  	// callback fn for building anchor links:  function(index, DOMelement) 
		    		before						: null,  	// transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		after						: null,  	// transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag) 
		    		end							: null,  	// callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) 
		    		easing						: null,  	// easing method for both in and out transitions 
		    		easeIn						: null,  	// easing for "in" transition 
		    		easeOut						: null,  	// easing for "out" transition 
		    		shuffle						: null,  	// coords for shuffle animation, ex: { top:15, left: 200 } 
		    		animIn						: null,  	// properties that define how the slide animates in 
		    		animOut						: null,  	// properties that define how the slide animates out 
		    		cssBefore					: null,  	// properties that define the initial state of the slide before transitioning in 
		    		cssAfter					: null,  	// properties that defined the state of the slide after transitioning out 
		    		fxFn						: null,  	// function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) 
		    		height						: 'auto',  	// container height 
		    		startingSlide				: 0,  	// zero-based index of the first slide to be displayed 
		    		sync						: 1,  	// true if in/out transitions should occur simultaneously 
		    		random						: true,  	// true for random, false for sequence (not applicable to shuffle fx) 
		    		fit							: 0,  	// force slides to fit container 
		    		containerResize				: 0,  	// resize container to fit largest slide 
		    		pause						: 0,  	// true to enable "pause on hover" 
		    		pauseOnPagerHover			: 0,  	// true to pause when hovering over pager link 
		    		autostop					: 0,  	// true to end slideshow after X transitions (where X == slide count) 
		    		autostopCount				: 0,  	// number of transitions (optionally used with autostop to define X) 
		    		delay						: 10000,    // additional delay (in ms) for first transition (hint: can be negative) 
		    		slideExpr					: null,  	// expression for selecting slides (if something other than all children is required) 
		    		cleartyp					: !$.support.opacity,  	// true if clearType corrections should be applied (for IE) 
		    		cleartypeNoBg				: false,  	// set to true to disable extra cleartype fixing (leave false to force background color setting on slides) 
		    		nowrap						: 0,  	// true to prevent slideshow from wrapping 
		    		fastOnEvent					: 0,  	// force fast transitions when triggered manually (via pager or prev/next); value == time in ms 
		    		randomizeEffects			: 1,  	// valid when multiple effects are used; true to make the effect sequence random 
		    		rev							: 0,  	// causes animations to transition in reverse 
		    		manualTrump					: true,  	// causes manual transition to stop an active transition instead of being ignored 
		    		requeueOnImageNotLoaded		: true,  	// requeue the slideshow if any image slides are not yet loaded 
		    		requeueTimeout				: 250,  	// ms delay for requeue 
		    		activePagerClass			: 'activeSlide',  	// class name used for the active pager link 
		    		updateActivePagerLink		: null,  	// callback fn invoked to update the active pager link (adds/removes activePagerClass style) 	});
			});


		}); //end $(function(){

		function submit_teilnahme_comment(idevent){
			var link = 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.comment.php';
			var data = $("#form_"+idevent).serialize();
			$("#comment_"+idevent).load(link,data);
			var anz = parseInt($("#counter"+idevent).html())+1;
			$("#counter"+idevent).html(anz);
		}
		
		
		function submit_comment(id){
			var add_comment = 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.pinnwand.php';
			var data = $("#add_comment_"+id).serialize();
			$("#comment_"+id).load(add_comment, data);
			$('#text_'+id).val('');
		}

		function check_Captcha(input){
			var md5_file = 'http://www.der-neue-lotse.de/backend/external/jquery/ajax.md5.php';
			var hidden = $('#cap_order_cses').val();
			//var input  = $('#cap_order').val();
			var string = $('#temp_cap').load(md5_file, 'string='+input);
			
			string = $('#temp_cap').val();
			console.log(string + hidden);
			if(string == hidden){
				return true;
			}else{
				return false;
			}
		}
		function kaufm(x) {
		  var k = (Math.round(x * 100) / 100).toString();
		  k += (k.indexOf('.') == -1)? '.00' : '00';
		  return k.substring(0, k.indexOf('.') + 3);
		}
		
		function return_int(str){
			if(str) return str.replace(/\D/, '');
		}
		
		function rechnen(){
			$('#go_frm380').val(return_int($('#go_frm380').val()));
			var preis = parseFloat($('#preis').val());
			var versand = parseFloat($('#versand').val());
			var anzahl = parseFloat($('#go_frm380').val());
			var summe = (anzahl * preis) + versand;
			if (!isNaN(anzahl)){
				if($('#go_frm440:checked').val()=="Nachnahme"){
					summe = summe + 4.4;
				}
			}else{
				summe = 0;
			}
			$('#go_frm480').val(kaufm(summe));
			$("label[for='go_frm500']").html(kaufm(summe).replace('.',',')+' &euro;');	
		}
//-->
