// Written and linted with http://www.sublimetext.com/2, minified by http://incident57.com/codekit/

$(function(){var c=$("#openformtrigger"),d=$("#contactformholder"),b=$("#feedbackholder"),g=1000,e=400,f=(Modernizr.rgba)?"rgba(189, 26, 26, .95)":"#c90f1a",a=this;$(c).bind("click",function(h){if($(d).css("bottom")==="-308px"){$(d).animate({bottom:"0px"},g,function(){$(c).css({background:'url("img/bg_formsprite.png") no-repeat 278px -15px',"background-color":f})})}else{$(d).animate({bottom:"-308px"},g,function(){$(c).css({background:'url("img/bg_formsprite.png") no-repeat 278px 7px',"background-color":f})})}h.preventDefault()});$(a).bind("keydown",function(h){if(h.keyCode===27){if($(d).css("bottom")!=="-308px"){$(d).animate({bottom:"-308px"},g,function(){$(c).css({background:'url("img/bg_formsprite.png") no-repeat 278px 7px',"background-color":f})})}}});if($(b)){$(b).delay(6000).slideUp(g)}$("#contactform form:first-child").bind("submit",function(n){var k=$('#contactform form:first-child input[name="name"]'),j=$('#contactform form:first-child input[name="email"]'),h=$('#contactform form:first-child input[name="phone"]'),m=$('#contactform form:first-child textarea[name="message"]'),l=[k,j,h,m],i=false;$.each(l,function(o){if(!$(this).val()||$(this).val()==='Pflichtfeld'){$(this).effect("pulsate",{times:2},e);i=true}});if(i){n.preventDefault()}});$("#carousel").carouFredSel({scroll:1000,circular:true,infinite:true,auto:true,pagination:"#pag",prev:{button:"#prev",key:"left"},next:{button:"#next",key:"right"}});$('input,textarea').placeholder();});
