var Site = { // yellow background-color on all input fields initFocus: function() { var iFocus = new inputFocus({ form_id: 'contactform', setborder : false, txtcolor : '#3d3d3d', bgcolor : '#fefa8f', duration : 0 }); }, // input focus color on textareas initFocus2: function() { ffocus = $$('textarea'); ffocus.each(function(focus){ focus.addEvent('focus', function(){focus.setStyles({backgroundColor:'#fefa8f', color:'#000000'});}); focus.addEvent('blur', function(){focus.setStyles({backgroundColor:'#fefefe',color:'#585757'});}); }); }, // clears and restores default value on searchform input field initClear: function() { var iClear1 = new inputClear({ collection: $$('input[type=text], input[type=password]') }); }, // opens modal enlarged images initRemooz: function() { $('#content .graphicbox a.enlarge').remooz({ 'origin': 'img', 'shadow': 'onOpen', // fx is faster because shadow appears after resize animation 'resizeFactor': 0.9, // resize to maximum 80% of screen size 'cutOut': false, // don't hide the original 'opacityResize': 0.4, // opaque resize 'dragging': false, // disable dragging 'centered': true // resize to center of the screen, not relative to the source element }); }, // opens unobstrusive popup windows initMooPop: function() { var MooPop = new moopop({ attrVal:'popup' }); }, // injects the flash clock initFlashClock: function() { var obj = new Swiff('/files/flash_clock_xml.swf', { id: 'flashClock', container: 'clock', width: 70, height: 70, params: { wmode: 'transparent', align: 'middle', scale: 'scale' }, vars: { configurl: '' } }); }, // opens form submits in a new windows initOpenForms: function() { var OpenForm = new openForms({ collection: $$('.formopen') }); }, // prints the page initWindowPrint: function() { var print = new windowPrint({ collection: $$('a.print') }); }, initFeedbackOpen: function() { if ($('feedbackbox')) { var fxfeed = new Fx.Reveal($('feedbackbox'), {duration: 500, mode: 'vertical'}); $$('.feedback').each(function(el) { el.addEvent('click', function(evt) { $('feedbackbutton').disabled = false; $('feedmessage').set('value', ''); new Event(evt).stop(); (function(){ $('request').setStyles({display: 'none', zIndex: '0'}); $('success').setStyles({display: 'none', zIndex: '0'}); $('failure').setStyles({display: 'none', zIndex: '0'}); $('anon').setStyles({display: 'block', zIndex: '100'}); }).delay(1500); fxfeed.toggle().chain( function(){ var myFx = new Fx.Scroll(window, { duration: 750, transition: Fx.Transitions.Sine.easeOut}).toBottom(); } ); }); }); }; }, //Scrolls the window to the top initEmailTips: function() { var myTips = new Tips('.thisisatooltip'); }, //Scrolls the window to the top initScrollTop: function() { $(document.body).getElements('a[href$=top]').addEvents({ 'click': function(e){ evt = new Event(e); var myFx = new Fx.Scroll(window, { duration: 1000, transition: Fx.Transitions.Sine.easeOut, wait: false }).toTop(); evt.stop(); } }); }, initSponsorCarousel: function() { var dfd = jQuery('.sponsorContainer img.sponsorSmall').imagesLoaded(); dfd.done(function ($images) { var initHeight = 60; var initWidth = 100; $images.each(function (e, a) { var marginHeight = (initHeight - jQuery(this).height()) / 2; var marginWidth = (initWidth - jQuery(this).width()) / 2; jQuery(this).css({'top':marginHeight, 'left':marginWidth}); }) }); var elementCount = parseInt(jQuery('.staticSponsor').children().children().length); jQuery('.carouselSponsor').children().carouFredSel({ items:8-elementCount, scroll : { items : 1, easing : "quadratic", duration : 1000, pauseOnHover : true } }); jQuery('.staticSponsor .sponsor').each(function(){ jQuery(this).qtip({ content: { text: function(api){ return this.find('.tooltip').html(); } }, position: { target: 'mouse', adjust: { x: 20, y: 20 } } }) }) jQuery('.carouselSponsor .sponsor').each(function(){ jQuery(this).qtip({ content: { text: function(api){ return this.find('.tooltip').html(); } }, position: { target: 'mouse', adjust: { x: 20, y: 20 } } }) }) jQuery('.staticSponsor .sponsorBig').before('

Hauptförderer

'); } } window.addEvent('domready', function(){ Site.initFocus(); Site.initFocus2(); Site.initClear(); Site.initRemooz(); Site.initMooPop(); Site.initFlashClock(); Site.initOpenForms(); Site.initWindowPrint(); Site.initFeedbackOpen(); Site.initEmailTips(); Site.initSponsorCarousel(); });