/* * Akkordeon-Effekte * Hängt ab von enquire.js, http://bit.ly/OHb0zR * Taquiri GmbH & Co. KG, Tim Kaufmann, tk@taquiri.de * * Container: .acc * Knopf für Toggle: .acc > .acc-toggle * Balg des Akkordeons: .acc > .acc-bellow * * Das Verhalten des Akkordeons wird über Klassen des Containers konfiguriert: * * .acc Muss * - Muss, damit überhaupt etwas passiert. Dient zugleich als Namespace. * * .acc-bp-{n}-(coll|exp|off) Muss * - Legt das Verhalten (collapsed, expanded oder off) bei Erreichen des jeweiligen * Breakpoints fest. Verändert sich die Breite des User-Agents (bspw. durch * Windows-Resize oder Smartphone-Rotation), müssen entsprechende Aufrufe von * accUpdate() über enquire.js getriggert werden. * * .acc-close-(none|siblings) Optional * - Ohne diese Klasse führt Klick auf ein .acc-toggle immer dazu, dass alle * anderen Akkordeons auf der Seite geschlossen werden. Ein eventuelles Eltern- * Akkordeon des Akkordeons, zu dem der geklickte Toggle gehört, wird dabei * ignoriert, weshalb wir die Akkordeons auch verschachteln können. * none: alle anderen Akkordeons bleiben unverändert * siblings: nur Geschwister-Akkordeons werden geschlossen * * .acc-scroll-(on|off) Optional * - Ohne diese Klasse wird bei Ausfahren eines Akkordeons immer so gescrollt, dass * dessen Oberkante möglichst nah an der Oberkante des User Agents liegt. * off: Kein Scrollen */ function accData($el) { var $r = []; var $parameterList = []; var $breakpoints = {}; if ($el.hasClass('acc')) { $r.container = $el; } else { $r.container = $el.closest('.acc'); } $r.toggle = $('.acc-toggle:first', $r.container); $r.bellow = $('.acc-bellow:first', $r.container); var $classList =$r.container.attr('class').split(/\s+/); $.each( $classList, function(index, $item){ if ($item.indexOf("acc-bp-") != -1) { $parameterList = $item.split('-'); $breakpoints[$parameterList[2]] = $parameterList[3]; } else if ($item.indexOf('acc-close-') != -1) { $parameterList = $item.split('-'); $r.close = $parameterList[2]; } $parameterList.length = 0; }); $r.breakpoints = $breakpoints; return $r; } function accUpdate($coll, $currentBreakpoint) { $coll.each(function() { $el = $(this); $a = accData($el); $newState = $a.breakpoints[$currentBreakpoint]; switch ($newState) { case 'off': if ($a.container.hasClass('is-acc-coll') || $a.container.hasClass('is-acc-exp')) { accDisable($a); } break; case 'coll': if ($a.container.hasClass('is-acc-exp')) { accCollapse($a); } else if (!$a.container.hasClass('is-acc-coll')) { accEnable($a); accCollapse($a); } break; case 'exp': if ($a.container.hasClass('is-acc-coll')) { accExpand($a, true); } else if (!$a.container.hasClass('is-acc-exp')) { accEnable($a); accExpand($a, true); } break; default: log('Akkordeon: Kein Zustand definiert für ' + $a.toggle.html()); } }) } function accDisable($a) { $a.toggle.off('click'); accExpand($a, true); $a.container .removeClass('is-acc-exp') .removeClass('is-acc-coll'); } function accEnable($a) { $a.toggle.on('click', accToggle); } function accExpand($a, $noscroll) { $noscroll = $noscroll || false; switch ($a.close) { case 'siblings': var $mustCollapse = $a.container.siblings('.is-acc-exp') break; case 'none': var $mustCollapse = $(); break; default: var $mustCollapse = $('.is-acc-exp').not($a.container.parents()); } $mustCollapse.each(function() { accCollapse(accData($(this))); }) $a.bellow.slideDown('fast', function() { if (!$a.container.hasClass('acc-scroll-off') && $noscroll == false) { if ($.browser.opera) { var $target = 'html'; } else { var $target = 'html,body'; } $($target).animate({ scrollTop: ($a.container.offset().top - 10) }, 1000); } }); $a.container .addClass('is-acc-exp') .removeClass('is-acc-coll'); } function accCollapse($a) { $a.bellow.slideUp('fast'); $a.container .removeClass('is-acc-exp') .addClass('is-acc-coll'); } function accToggle(event) { event.preventDefault(); $acc = accData($(this)); if ($acc.container.hasClass('is-acc-exp')) { accCollapse($acc); } else if ($acc.container.hasClass('is-acc-coll')) { accExpand($acc); } } ;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder');l==h.activeElement&&l.select()}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery)); /** * Equal Heights Plugin * Equalize the heights of elements. Great for columns or any elements * that need to be the same size (floats, etc). * * Version 1.0 * Updated 12/10/2008 * * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) * * Usage: $(object).equalHeights([minHeight], [maxHeight]); * * Example 1: $(".cols").equalHeights(); Sets all columns to the same height. * Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall. * Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more * than 300 pixels tall. Elements with too much content will gain a scrollbar. * */ (function($) { $.fn.equalHeights = function(minHeight, maxHeight) { tallest = (minHeight) ? minHeight : 0; this.each(function() { if($(this).height() > tallest) { tallest = $(this).height(); } }); if((maxHeight) && tallest > maxHeight) tallest = maxHeight; return this.each(function() { $(this).height(tallest).css("overflow","visible"); }); } })(jQuery); /* * Taquiri Slider */ function tqslideinit() { jQuery(function ($) { if ($('.ie67').length < 1) { if ($('#tqslidewrapper').length > 0) { tqslideinterval = 7000; if($('#tqslides .tqslide').length > 1) { $('#tqslides').append($('.tqslide:first').clone().wrapAll('
').parent().html()); $('#tqslidewrapper').css('background','none'); anz = $('#tqslides').children().size(); $('#tqslides').children().each(function(no){ myid = 'slidernav' + (no + 1) + 'x'; if((no +1 ) < anz){ $('#slidernav').append('