$(document).ready(function(){{$(".navigation a").hover(function(){$(this).stop(true,true).animate({paddingLeft:'8px',paddingRight:'3px'},'fast');},function(){$(this).stop().animate({paddingLeft:'0px',paddingRight:'0px'},'slow');});$("#logo").hover(function(){$(this).animate({top:"-45px"},{duration:400,easing:'easeOutBack'});},function(){$(this).stop(true,true).animate({top:"-100px"},{duration:400,easing:'easeInOutBack'});});$("#content_text a[href$='.pdf']").addClass('iconPdf');$("#content_text a[href$='.jpg']:not(.lightbox)").addClass('iconJpg');$("#content_text a[href$='.png']:not(.lightbox)").addClass('iconJpg');$("#content_text a[href$='.gif']:not(.lightbox)").addClass('iconJpg');$("#content_text a[href$='.zip']").addClass('iconZip');$("#content_text a[href^='mailto']").addClass('iconMail');}
$('.previewEvent').find('img').animate({opacity:0.5});$('.previewEvent').hover(function(){$(this).find('a,p').stop(true,true).animate({color:"#222"});$(this).find('img').stop(true,true).animate({opacity:1});$(this).stop(true,true).css({backgroundColor:"#fff"});$(this).find('.previewToday').stop(true,true).animate({left:"150px"});$(this).find('.previewTomorrow').stop(true,true).animate({left:"150px"});},function(){$(this).find('a,p').stop(true,true).animate({color:"#666"});$(this).find('img').stop(true,true).animate({opacity:0.5});$(this).stop(true,true).css({backgroundColor:""});$(this).find('.previewToday').stop(true,true).animate({left:"14px"});$(this).find('.previewTomorrow').stop(true,true).animate({left:"12px"});});$('.previewEvent').click(function(){var link=$(this).find("a").attr("href");window.location=link;});Date.firstDayOfWeek=1;Date.format='dd.mm.yyyy';$('#event_date').datePicker().val(new Date().asString()).trigger('change');for(i=10;i<30;i++){$('.dateH2_20'+i+':first').removeClass('dateH2_20'+i);$('.dateH2_20'+i).remove();}
$('.dateH2_2009:first').removeClass('dateH2_2009');$('.dateH2_2009').remove();$('.dateH2_2008:first').removeClass('dateH2_2008');$('.dateH2_2008').remove();$('.dateH2_2007:first').removeClass('dateH2_2007');$('.dateH2_2007').remove();$('.dateH2_2006:first').removeClass('dateH2_2006');$('.dateH2_2006').remove();$('.dateH2_2005:first').removeClass('dateH2_2005');$('.dateH2_2005').remove();$('.dateH2_2004:first').removeClass('dateH2_2004');$('.dateH2_2004').remove();$('#feedback').hide();$('#feedbackTrigger').click(function(){$('#feedback').slideToggle();});$('.backtotop').click(function(){$('html,body').animate({scrollTop:0},'slow');});$('.terminScroller').bind("click",function(event){event.preventDefault();var ziel=$(this).attr("href");$('html,body').animate({scrollTop:$(ziel).offset().top},1000,function(){location.hash=ziel;});});$(".sortGallery").sortable({delay:100,opacity:0.5,axis:'x',cursor:'move',handle:'.dragHandle',update:function(data){var order=$(this).sortable("serialize")+'&galsort=updateSort';$.ajax({type:'POST',url:"includes/capcha.inc.php",data:order,success:function(data){if(data){if(data==1234){$(".sortGallery").addClass('sendTrue');$('input[name="check"]').val('true');}else{$(".sortGallery").removeClass('sendTrue');$('input[name="check"]').val('');}}}});}});$('#validMail').blur(function(){if($(this).val()!=''){validateEmail(this.value);}});$('#validMail').focus(function(){$('#validMail').removeClass('valide');$('#validMail').removeClass('invalide');});$('input[type=text],input[type=password]').focus(function(){this.select();});$('input[type="text"]:not(#ical),textarea').focus(function(){if(this.value==this.defaultValue){this.value='';}
if(this.value!=this.defaultValue){this.select();}});$('input[type="text"]:not(#ical),textarea').blur(function(){if($.trim(this.value)==''){this.value=(this.defaultValue?this.defaultValue:'');}});$('input[name="email"],input[name="event_email_text"]').blur(function(){validateEmail($(this).val());});$(window).scroll(function(){if($(window).scrollTop()>1500){$('#backtotopWrapper').fadeIn(600);}else{$('#backtotopWrapper').fadeOut(600);}});$(".lightbox").hover(function(){$(this).stop().animate({opacity:0.8,},200);},function(){$(this).stop().animate({opacity:1,},200);});$('.gbookkomment img').css({opacity:"0.7"});$('#socialKontactWrapper li').hover(function(){$(this).stop().animate({paddingLeft:'8px'},'fast');},function(){$(this).stop().animate({paddingLeft:'0px'},'slow');});var title='';$('a:not(.lightbox, .sitemap, .impressum, #rssIconFeed, .eventWrapper *,.fotoeventWrapper *)').addClass('clickdown');$('#vsTweet, #rssIconFeed, #icalIcon_').hover(function(){$(this).stop(true,true).animate({top:"-18px"},{duration:400,easing:'easeOutBounce'});$('.iconTitle').remove();title=$(this).attr('title');$(this).append('<p style="display:none;" class="iconTitle">'+title+'</p>');$('.iconTitle').fadeIn(500);},function(){$(this).stop(true,true).animate({top:"0px"},{duration:800,easing:'easeOutQuart'});$('.iconTitle').fadeOut(700);});var date=new Date();var dd=date.getDate();$('#icalIcon_').append('<p id="setCurrentDate">'+dd+'</p>');$("a.lightbox").fancybox({'hideOnContentClick':true,'zoomSpeedIn':300,'zoomSpeedOut':300,'overlayShow':true,'zoomOpacity':true,'overlayOpacity':0.8});$("a.request").fancybox({'frameWidth':200,'frameHeight':250,'hideOnContentClick':false});});function checkform(){var name=$('input[name="name"]').val();var check=$('input[name="check"]').val();var email=$('input[name="email"]').val();var text=$('textarea[name="msg"]').val();if(check=='true'){if(name&&text&&validateEmail(email)){return true;}else{return false;}}else{return false;alert('Bitte sortier das Capcha.');}}
function validateEmail(email){if(/^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,4})$/.test(email)){$('input[name="email"],input[name="event_email_text"]').addClass('valide');$('input[name="email"],input[name="event_email_text"]').removeClass('invalide');return(true);}else{$('input[name="email"],input[name="event_email_text"]').addClass('invalide');$('input[name="email"],input[name="event_email_text"]').removeClass('valide');alert('Bitte eine Valide E-Mail Adresse eintragen!');return(false);}}
function checkformContact(){var name=$('#form_name').val();var nname=$('#form_nname').val();var email=$('#form_email').val();var betreff=$('#form_betreff').val();var text=$('#form_text').val();if(name!='Vorname*'&&nname!='Nachname*'&&validateEmail(email)&&text!='Nachricht*'){return true;}else{alert('Pflichtfelder nicht ausgefüllt!');return false;}}
function track(fk_download){$.ajax({url:"includes/track.ajax.php",data:"fk_download="+fk_download,global:false,type:"POST",dataType:"html",async:false,cache:false});}