var $window = $(window), $maxSloagenHeight = 220, $maxSloagenFontHeight = 150, $maxLogoHeight = 160, $maxHeaderTop = 150, $maxNewsHeight = 300, $maxAgendaHeight = 300, $maxAgendaWidth = 612, $maxNavigation1FontSize = 12, $maxNavigation1PaddingTop = 8, $maxNavigation1PaddingSide = 6, $calcHeight = 0, $calcWidth = 0, $mouseoverAgenda = 0; function resizeUI() { var $windowHeight = $window.innerHeight(), $windowWidth = $window.innerWidth(); $calcHeight = $windowHeight / 2; $calcWidth = $windowWidth / 2; if($calcHeight > 650) { $calcHeight = 650; } if($calcHeight < 150) { $calcHeight = 150; } if($calcWidth < $windowWidth) { $calcWidth = $windowWidth; } $('div#random').height($calcHeight).width($calcWidth); $('div.slider-wrapper').height($('div#random').innerHeight()); $('div#slider').height($('div#random').innerHeight()); var $calcSloagenPadding = Math.max(0,($windowWidth - 1060) / 2) + 24; var $calcNewsMarginLeft = $calcSloagenPadding; var $calcAgendaMarginLeft = $calcSloagenPadding + 400; $('div#sloagen').css('padding-left',$calcSloagenPadding+'px'); $('div#news').css('margin-left',$calcNewsMarginLeft+'px'); $('div#agenda').css('margin-left',$calcAgendaMarginLeft+'px'); if($windowWidth < 1060) { var $calcAgendaWidth = $windowWidth - 448; $('div#agenda').width($calcAgendaWidth); if($windowWidth <= 650) { $('div#agenda').hide(); } } else { $('div#agenda').width($maxAgendaWidth); } if($calcHeight < 700) { var $calcSloagenHeight = ($maxSloagenHeight / 700) * $calcHeight, $calcLogoHeight = ($maxLogoHeight / 700) * $calcHeight; $calcHeaderTop = Math.min(100, ($maxHeaderTop - ($maxHeaderTop / 700) * $calcHeight)), $calcNavigation1Top = Math.max(6, (62 / 150 * (150-parseInt($calcHeaderTop)))), $calcNewsHeight = ($maxNewsHeight / 700) * $calcHeight, $calcNewsTitleSize = Math.max(12,(18 / 700) * $calcHeight), $calcNewsTextTitleSize = Math.max(12,(14 / 700) * $calcHeight), $calcNewsTextSize = Math.max(12,(14 / 700) * $calcHeight), $calcNewsPaddingBottom = (24 / 700) * $calcHeight, $calcNewsTitlePaddingBottom = (12 / 700) * $calcHeight; $calcSloagenHeight = $('#random').innerHeight() / 3; var $calcFontSizeSloagen = ($maxSloagenFontHeight / 1060) * $windowWidth; var $calcFontSizeSloagen2 = ($maxSloagenFontHeight / 700) * $calcHeight; $('div#sloagen').css('font-size',Math.min($calcFontSizeSloagen,$calcFontSizeSloagen2)+'%'); $('div#sloagen').height($calcSloagenHeight); $('img#logo').height($calcLogoHeight); $('div#headertop').css('margin-top','-'+$calcHeaderTop+'px'); $('#navigation1').css('top',$calcNavigation1Top+'px'); $('div#news').height($calcNewsHeight); $('div#agenda').height($calcNewsHeight); $('#news div.headertitle').css({'font-size':$calcNewsTitleSize+'px','padding-bottom':$calcNewsPaddingBottom+'px'}); $('#news div.headernewstitle').css({'font-size':$calcNewsTextTitleSize+'px','padding-bottom':$calcNewsTitlePaddingBottom+'px'}); $('#news div.headernewstext').css({'font-size':$calcNewsTextSize+'px'}); $('#news div.headernewsmore a').css({'font-size':$calcNewsTextSize+'px'}); $('#agenda div.headertitle').css({'font-size':$calcNewsTitleSize+'px','padding-bottom':$calcNewsPaddingBottom+'px'}); $('.titel').css({'font-size':Math.min(16,($calcNewsTitleSize+3))+'px'}); $('.text_footer').css({'font-size':Math.min(14,($calcNewsTitleSize-1))+'px'}); $('.text').css({'font-size':Math.min(14,$calcNewsTitleSize)+'px'}); $('.nachoben').css({'font-size':Math.min(14,$calcNewsTitleSize)+'px'}); $('.titel_gross').css({'font-size':Math.min(14,($calcNewsTitleSize))+'px'}); $('span.titel_gross').css({'font-size':Math.min(14,($calcNewsTitleSize))+'px'}); $('span.titel_gross a').css({'font-size':Math.min(14,($calcNewsTitleSize))+'px'}); $('span.titel').css({'font-size':Math.min(16,($calcNewsTitleSize+3))+'px'}); $('span.text_footer').css({'font-size':Math.min(14,($calcNewsTitleSize-1))+'px'}); $('span.text').css({'font-size':Math.min(14,$calcNewsTitleSize)+2+'px'}); $('span.nachoben').css({'font-size':Math.min(14,$calcNewsTitleSize)+'px'}); $('.medientexte_datum').css({'font-size':Math.min(11,($calcNewsTitleSize-1))+'px'}); $('.medientexte_title').css({'font-size':Math.min(16,($calcNewsTitleSize+3))+'px'}); $('.medientexte_text').css({'font-size':Math.min(14,$calcNewsTitleSize)+2+'px'}); if($calcSloagenHeight <= 100) { $('div#news').hide();$('div#agenda').hide(); } else { $('div#news').show(); } } else { $calcSloagenHeight = $maxSloagenHeight; $('img#logo').height($maxLogoHeight); $('div#headertop').css('margin-top','0'); $('#navigation1').css('top','72px'); $('div#news').height($maxNewsHeight).fadeIn(); $('div#agenda').height($maxAgendaHeight); $('#news div.headertitle').css({'font-size':'18px','padding-bottom':'24px'}); $('#news div.headernewstitle').css({'font-size':'14px','padding-bottom':'12px'}); $('#news div.headernewstext').css({'font-size':'13px'}); $('#news div.headernewsmore a').css({'font-size':'13px'}); $('#agenda div.headertitle').css({'font-size':'18px','padding-bottom':'24px'}); $('div#sloagen').css('font-size','150%'); } $('div#content').css({ 'margin-left':$calcSloagenPadding+'px', 'width':($windowWidth-($calcSloagenPadding*2))-48+'px' }); $('div#footer').css({ 'margin-left':'-'+$calcSloagenPadding-24+'px', 'width':$windowWidth+'px' }); $('div#innersloagen').css('margin-top',( ($calcSloagenHeight / 2) - ($('div#innersloagen').height() / 2) )); if($windowWidth <= 750 || $calcSloagenHeight <= 100) { $('div#agenda').hide(); $('div#news').width($(window).innerWidth()-48).css('border-radius','12px 12px 0 0'); } else { $('div#agenda').show(); $('div#news').width(400).css('border-radius','12px 0 0 0'); } if($windowWidth <= 1060) { $calcNavigation1FontSize = $maxNavigation1FontSize / 1060 * $windowWidth; $calcNavigation1PaddingTop = $maxNavigation1PaddingTop / 1060 * $windowWidth; $calcNavigation1PaddingSide = $maxNavigation1PaddingSide / 1060 * $windowWidth; $calcNavigation1Right = 24 / 1060 * $windowWidth; $('#navigation1').css('right',($calcSloagenPadding+$calcNavigation1Right)+'px'); $('#navigation1 li a').css({ 'font-size':$calcNavigation1FontSize+'px', 'padding':$calcNavigation1PaddingTop+'px '+$calcNavigation1PaddingSide+'px' }); $('div.mitteilungenfrontcontainer').css('width',Math.max(100,(500 / 1060 * $windowWidth))+'px'); $('.openmobilenavigation').parents('ul').css({'margin-left':$calcSloagenPadding+'px','width':(($windowWidth-($calcSloagenPadding*2)))+'px'}); $('.gallery_container').css('width',Math.max(180,($('#content').innerWidth()-450))+'px'); $('div#socialmedia').css({'left':$windowWidth-464+'px'}); $('#service').hide(); } else { $('#navigation1').css('right',($calcSloagenPadding+24)+'px'); $('#navigation1 li a').css({ 'font-size':$maxNavigation1FontSize+'px', 'padding':$maxNavigation1PaddingTop+'px '+$maxNavigation1PaddingSide+'px' }); $('div.mitteilungenfrontcontainer').css('width','500px'); $('.openmobilenavigation').parents('ul').css({'margin-left':$calcSloagenPadding+'px','width':'1012px'}); $('.gallery_container').css('width','550px'); $('div#socialmedia').css({'left':'584px'}); $('#service').show(); } if($windowWidth <= 840) { $('#sektionenliste').hide(); $('#sektionenliste2').hide(); $('.gallery_container').css('width','100%'); } if($windowWidth <= 700) { $('span.titel').css({'width':'100%'}); $('span.text_footer').css({'width':'100%'}); if($('div#news').is(":hidden")) { $('#navigation1 li a').css({ 'font-size':'8px', 'padding':'2px 2px', 'margin-top':'1px', 'margin-bottom':'1px' }); } $('.cbm').css('font-size','9px'); $('.cbm a').css('font-size','9px'); $('#karte').hide(); $('.gallery_container').css('width','100%'); } else { $('.cbm').css('font-size','11px'); $('.cbm a').css('font-size','11px'); $('#karte').show(); } $('img#logo').css('padding-left',$calcSloagenPadding+'px'); $('div#footer_content').css('margin-left',$calcSloagenPadding+'px'); $('div#footer_title').css('padding-left',$calcSloagenPadding+'px'); $('div.cbm').css('width',($windowWidth-($calcSloagenPadding*2))-12+'px'); if($windowWidth <= 600) { $('img#logo').css({'padding-left':'0px'}); $('div#sektionname').css({'font-size':'8px'}); $('#navigation1').css({'right':'6px'}); $('div.mitteilungenfrontcontainer').css('width','100%'); $('div#contentvline').hide(); $('#dynamicKandidatenContainer').hide(); $('div#publicwall').css({ 'position':'relative', 'left':'0', 'top':'12px', 'width':Math.max(200,($('#content').innerWidth()-72))+'px' }); $('div.journalcontainer').css({ 'position':'relative', 'left':'0', 'top':'24px' }); } else { $('#dynamicKandidatenContainer').show(); $('div#sektionname').css({'font-size':'11px'}); if($('div.journalcontainer').length > 0) { $('div#contentvline').css('left',$('.mitteilungenfrontcontainer').innerWidth()+60+'px').show(); $('div#publicwall').css({ 'position':'absolute', 'width':(Math.max(150,($('#content').innerWidth()-72)) - ($('.mitteilungenfrontcontainer').innerWidth()+60) )+'px', 'left':(parseInt($('div#contentvline').css('left')) + 24) +'px', 'top':'24px' }).children('img').css('max-width','150px'); $('#dynamicKandidatenContainer').css({ 'position':'absolute', 'left':(parseInt($('div#contentvline').css('left')) + 36) +'px', 'top': '24px', 'width':(Math.max(150,($('#content').innerWidth())) - ($('.mitteilungenfrontcontainer').innerWidth()+110) )+'px' }); if($('#dynamicKandidatenContainer').length>0) { var $topdistKandidaten = 48 + $('#dynamicKandidatenContainer').innerHeight(); } else { var $topdistKandidaten = 0; } if($('#publicwall').length>0) { $topdistKandidaten = $topdistKandidaten + Math.max(12,parseInt($('div#publicwall').css('top'))+$('div#publicwall').innerHeight()); } $('div.journalcontainer').css({ 'position':'absolute', 'left':(parseInt($('div#contentvline').css('left')) + 24) +'px', 'top':$topdistKandidaten + 24 + 'px' }).children('img').css('max-width','150px'); } } if($('#dynamicKandidatenContainer').length == 0 && $('#publicwall').length == 0) { $('.journalcontainer').css('top','24px'); } if($windowWidth <= 960) { if($windowWidth <= 600) { $('#sponsorenright').show(); $('#titledponsorenwebseite').show(); } else { $('#sponsorenright').hide(); $('#titledponsorenwebseite').hide(); } } else { $('#sponsorenright').show(); $('#titledponsorenwebseite').show(); } if($windowWidth <= 500) { $('#navigation1').hide(); $('div#sektionname').css({'right':'8px','margin-right':'0'}); $('div#sektionname span.small').hide().next().hide(); $('div#sektionname span.langswitch').hide().next().hide(); } else { $('#navigation1').show(); $('div#sektionname').css({'right':'4px','margin-right':(parseInt($('#navigation1').css('right')))+'px'}); $('div#sektionname span.small').show().next().show(); $('div#sektionname span.langswitch').show().next().show(); } if($windowHeight <= 650) { $('#navigation1').hide(); $('img#logo').css({'padding-left':'8px','top':'0'}); } else { if($windowWidth > 500) { $('#navigation1').show(); } $('img#logo').css('top','0'); } $('.agendatopdistance').css('height',($('div#agenda').height()-30)+'px'); $('#navigation1 li').mouseenter(function() { $(this).children('ul.ulsubnav1').show(); $(this).children('a').addClass('tmpactive'); }); $('#navigation1 li').mouseleave(function() { $(this).children('ul.ulsubnav1').hide(); $(this).children('a').removeClass('tmpactive'); }); $('#navigation1 li.subnav1').mouseenter(function() { $(this).children('ul.ulsubnav2').show(); $(this).children('a').addClass('tmpactive'); }); $('#navigation1 li.subnav1').mouseleave(function() { $(this).children('ul.ulsubnav2').hide(); $(this).children('a').removeClass('tmpactive'); }); $('#navigation1 ul.ulsubnav1').css({'top':(parseInt($('#navigation1 ul').css('top')) + $('#navigation1 ul').innerHeight() )+'px'}); if($('#navigation1').is(":hidden")) { $('#random').hide(); $('#headerline').hide(); $('#mobilenav').show(); } else { $('#mobilenav').hide(); $('#random').show(); $('#headerline').show(); } if($('div#contentvline').is(":visible")) { $('#content').find('.titel').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('.text').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('img').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('hr').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('.text').css('display','block'); } else { $('#content').find('.titel').css('max-width',''); $('#content').find('.text').css('max-width',''); $('#content').find('img').css('max-width','100%'); $('#content').find('hr').css('max-width',''); $('#content').find('.text').css('display',''); } $('#wappen').css({'top':($calcSloagenHeight+20)+'px','right':$calcSloagenPadding+'px'}); var $newsTop = $('#news').position(); $('#buttonmitgliedwerden').css({'top':($newsTop.top - 38 ),'left':$calcSloagenPadding+'px'}); $('#typewriter').css('width', ($('#content').innerWidth() - 100) + 'px'); var $suvc = $('#dynamicKandidatenContainer').innerHeight() + $('.journalcontainer').innerHeight(); if(parseInt($('#content').css('height')) < $suvc) { $('#content').css('min-height',($suvc + 24) +'px'); } } (function( $ ) { $(document) .on('mouseenter','#agenda',function() { $mouseoverAgenda = 1; }) .on('mouseleave','#agenda',function() { $mouseoverAgenda = 0; }) ; $(window).resize(function(e) { resizeUI(); }); var $calcNewsTitleSize = Math.max(12,(18 / 700) * $calcHeight); setInterval(function() { $.ajax({ type: "POST", url: "/2013/push/getnews.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { if(strip_tags(msg) != str_replace(">",">",strip_tags($('div.headernewscontainer').html()))) { $('div.headernewscontainer').animate({ top:'+=700' }, "fast",function() { $(this).html(msg); if($calcHeight < 650) { $calcNewsTextTitleSize = Math.max(12,(14 / 650) * $calcHeight), $calcNewsTextSize = Math.max(12,(14 / 650) * $calcHeight), $calcNewsPaddingBottom = (24 / 650) * $calcHeight, $calcNewsTitlePaddingBottom = (12 / 650) * $calcHeight; $('#news div.headertitle').css({'font-size':$calcNewsTitleSize+'px','padding-bottom':$calcNewsPaddingBottom+'px'}); $('#news div.headernewstitle').css({'font-size':$calcNewsTextTitleSize+'px','padding-bottom':$calcNewsTitlePaddingBottom+'px'}); $('#news div.headernewstext').css({'font-size':$calcNewsTextSize+'px'}); $('#news div.headernewsmore a').css({'font-size':$calcNewsTextSize+'px'}); } else { $('#news div.headertitle').css({'font-size':'18px','padding-bottom':'24px'}); $('#news div.headernewstitle').css({'font-size':'14px','padding-bottom':'12px'}); $('#news div.headernewstext').css({'font-size':'13px'}); $('#news div.headernewsmore a').css({'font-size':'13px'}); } $(this).animate({ top:'-=700' },"slow"); }); } }); },10000); $.ajax({ type: "POST", url: "/2013/push/getnews.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('div.headernewscontainer').html(msg).fadeIn(); if($calcHeight < 650) { $calcNewsTextTitleSize = Math.max(11,(14 / 650) * $calcHeight), $calcNewsTextSize = Math.max(12,(14 / 650) * $calcHeight), $calcNewsPaddingBottom = (24 / 650) * $calcHeight, $calcNewsTitlePaddingBottom = (12 / 650) * $calcHeight; $('#news div.headertitle').css({'font-size':$calcNewsTitleSize+'px','padding-bottom':$calcNewsPaddingBottom+'px'}); $('#news div.headernewstitle').css({'font-size':$calcNewsTextTitleSize+'px','padding-bottom':$calcNewsTitlePaddingBottom+'px'}); $('#news div.headernewstext').css({'font-size':$calcNewsTextSize+'px'}); $('#news div.headernewsmore a').css({'font-size':$calcNewsTextSize+'px'}); } else { $('#news div.headertitle').css({'font-size':'18px','padding-bottom':'24px'}); $('#news div.headernewstitle').css({'font-size':'14px','padding-bottom':'12px'}); $('#news div.headernewstext').css({'font-size':'13px'}); $('#news div.headernewsmore a').css({'font-size':'13px'}); } }); setInterval(function() { var $windowHeight = $window.innerHeight(), $windowWidth = $window.innerWidth(); $calcHeight = $windowHeight / 2; $calcWidth = $windowWidth / 2; $.ajax({ type: "POST", url: "/2013/push/getparolen.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('#typewriter').css('width', ($('#content').innerWidth() - 100) + 'px'); if(strip_tags(str_replace("\n","",str_replace(" ","",msg))).length != (strip_tags(str_replace("\n","",str_replace(" ","",$('div#innersloagen').html()))).length + 1)) { $('div#innersloagen').fadeOut(450,function() { $(this).html(str_replace("\n","
",msg)); if($calcHeight < 700) { var $calcFontSizeSloagen = ($maxSloagenFontHeight / 1060) * $windowWidth; var $calcFontSizeSloagen2 = ($maxSloagenFontHeight / 700) * $calcHeight; $('div#sloagen').css('font-size',Math.min($calcFontSizeSloagen,$calcFontSizeSloagen2)+'%'); } else { $('div#sloagen').css('font-size','150%'); } $calcSloagenHeight = $('#random').innerHeight() / 3; $('div#sloagen').height($calcSloagenHeight); $(this).fadeIn("fast"); }); } }); },25000); var $windowHeight = $window.innerHeight(), $windowWidth = $window.innerWidth(); $calcHeight = $windowHeight / 2; $calcWidth = $windowWidth / 2; $.ajax({ type: "POST", url: "/2013/push/getparolen.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('div#innersloagen').html(str_replace("\n","
",msg)).fadeIn(); if($calcHeight < 700) { var $calcFontSizeSloagen = ($maxSloagenFontHeight / 1060) * $windowWidth; var $calcFontSizeSloagen2 = ($maxSloagenFontHeight / 700) * $calcHeight; $('div#sloagen').css('font-size',Math.min($calcFontSizeSloagen,$calcFontSizeSloagen2)+'%'); } else { $('div#sloagen').css('font-size','150%'); } $calcSloagenHeight = $('#random').innerHeight() / 3; $('div#sloagen').height($calcSloagenHeight); }); setInterval(function() { $.ajax({ type: "POST", url: "/2013/push/getsponsoren.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { if(strip_tags(str_replace("\n","",str_replace(" ","",msg))).length != (strip_tags(str_replace("\n","",str_replace(" ","",$('div#sponsorenrandom').html()))).length + 1)) { $('div#sponsorenrandom').fadeOut(450,function() { $(this).html(str_replace("\n","
",msg)); $(this).fadeIn("fast"); }); } }); },15000); $.ajax({ type: "POST", url: "/2013/push/getsponsoren.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('div#sponsorenrandom').html(str_replace("\n","
",msg)).fadeIn(); }); setInterval(function() { $.ajax({ type: "POST", url: "/2013/push/getsponsoren_home.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { if(strip_tags(str_replace("\n","",str_replace(" ","",msg))).length != (strip_tags(str_replace("\n","",str_replace(" ","",$('div#sponsorenright').html()))).length + 1)) { $('#sponsorenright').fadeOut(450,function() { $(this).html(str_replace("\n","
",msg)); $(this).fadeIn("fast"); }); } }); },25000); $.ajax({ type: "POST", url: "/2013/push/getsponsoren_home.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('#sponsorenright').html(str_replace("\n","
",msg)).fadeIn(); }); var $agendaPos = 0, $agendaHeight = 0, $scrollback = 0; $.ajax({ type: "POST", url: "/2013/push/getagenda.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('div.headeragendascontainer').html(msg).fadeIn(); var $agclearpos = $('.agendaclearing').position(); if($agclearpos) { $agendaHeight = $agclearpos.top + $('.agendatopdistance').innerHeight(); } else { $agendaHeight = 400; } $('.agendaclearing').css('height',$('#agenda').innerHeight()+'px'); setInterval(function() { if($scrollback == 0 && $mouseoverAgenda == 0) { $agendaPos += 0.5; $('.headeragendascontainer').scrollTop($agendaPos); if($agendaPos >= $agendaHeight) { $agendaPos = 0; $scrollback = 1; $('.headeragendascontainer').animate({scrollTop:(0)}, 'slow', function() { $scrollback = 0; }); } } },25); $('.agendatopdistance').css('height',($('#agenda').height()-30)+'px'); }); $.ajax({ type: "POST", url: "/2013/push/getsektionname.php", data: { conobj: get_url_param('ConObj'), language:'' } }).done(function(msg) { $('#sektionname').html(msg); if($window.innerWidth() <= 600) { $('img#logo').css({'padding-left':'10px','bottom':'6px'}); $('div#sektionname').css({'font-size':'8px'}); } else { $('div#sektionname').css({'font-size':'11px'}); } if($window.innerWidth() <= 500) { $('div#sektionname').css({'right':'8px','margin-right':'0'}); $('div#sektionname span.small').hide().next().hide(); $('div#sektionname span.langswitch').hide().next().hide(); } else { $('div#sektionname').css({'right':'4px','margin-right':(parseInt($('#navigation1').css('right')))+'px'}); $('div#sektionname span.small').show().next().show(); $('div#sektionname span.langswitch').show().next().show(); } }); })( jQuery ); $(document).ready(function(){ resizeUI(); $('a.openmobilenavigation').click(function() { if($('.openmobilenavigation').hasClass('isclose')) { $(this).addClass('isopen'); $(this).removeClass('isclose'); $('.openmobilenavigation').parents('ul').children('li.close').addClass('open'); $('.openmobilenavigation').parents('ul').children('li.close').removeClass('close'); } else { $(this).addClass('isclose'); $(this).removeClass('isopen'); $('.openmobilenavigation').parents('ul').children('li.open').addClass('close'); $('.openmobilenavigation').parents('ul').children('li.open').removeClass('open'); } }); if($('div.journalcontainer').length==0) { $('div#contentvline').hide(); $('#content').find('.titel').css('max-width',''); $('#content').find('.text').css('max-width',''); $('#content').find('img').css('max-width','100%'); $('#content').find('hr').css('max-width',''); $('#dynamicKandidatenContainer').hide(); } else { if($('div#contentvline').is(":visible")) { $('#content').find('.titel').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('.text').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('.text').css('display','block'); $('#content').find('img').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); $('#content').find('hr').css('max-width',(parseInt($('div#contentvline').css('left'))-50)+'px'); } else { $('#content').find('.titel').css('max-width',''); $('#content').find('.text').css('max-width',''); $('#content').find('img').css('max-width','100%'); $('#content').find('hr').css('max-width',''); $('#content').find('.text').css('display',''); } $('div#contentvline').show(); $('#dynamicKandidatenContainer').show(); } $('#slider').nivoSlider({ effect: 'fade', // Specify sets like: 'fold,fade,sliceDown' slices: 15, // For slice animations boxCols: 8, // For box animations boxRows: 4, // For box animations animSpeed: 1000, // Slide transition speed pauseTime: 10000, // How long each slide will show startSlide: 0, // Set starting Slide (0 index) directionNav: false, // Next & Prev navigation controlNav: false, // 1,2,3... navigation controlNavThumbs: false, // Use thumbnails for Control Nav pauseOnHover: false, // Stop animation while hovering manualAdvance: false, // Force manual transitions randomStart: true, // Start on a random slide beforeChange: function(){}, // Triggers before a slide transition afterChange: function(){}, // Triggers after a slide transition slideshowEnd: function(){}, // Triggers after all slides have been shown lastSlide: function(){}, // Triggers when last slide is shown afterLoad: function(){} // Triggers when slider has loaded }); setTimeout(function() { $("#siteloader").slideUp("normal", function() { $(this).remove(); }); },350); if($('#dynamicKandidatenContainer').length!=0) { var $countkandidaten = 1; setInterval(function() { $('#dynamicKandidaten_'+$countkandidaten).hide(); if($countkandidaten == $('#anzKandidaten').val()) { $countkandidaten = 1; } else { $countkandidaten++; } $('#dynamicKandidaten_'+$countkandidaten).show(); var $topdistKandidaten = 48 + $('#dynamicKandidatenContainer').innerHeight(); if($('#publicwall').length>0) { $topdistKandidaten = $topdistKandidaten + Math.max(12,parseInt($('div#publicwall').css('top'))+$('div#publicwall').innerHeight()); } $('div.journalcontainer').css({ 'position':'absolute', 'left':(parseInt($('div#contentvline').css('left')) + 24) +'px', 'top':$topdistKandidaten + 24 + 'px' }); },10000); } var $isslide = 0; $(document) .on('mouseenter','#openorganisationnav', function(e) { if($window.innerWidth() > 840) { if($('#sektionenliste').css('display') != 'block') { $('#wappen').hide(); $('#logo').hide(); $isslide = 1; $('#sektionenliste').slideDown("fast", function() { $isslide = 0; }); } } else { $(this).parent().hide(); $(this).parent().prev().hide(); } }) .on('mouseleave','#sektionenliste', function(e) { if($isslide == 0) { $('#sektionenliste').slideUp("fast",function() { $('#wappen').show(); $('#logo').show(); }); } }) .on('mouseenter','#maprow', function(e) { if($('#sektionenliste2').css('display') != 'block') { $isslide = 1; $('#sektionenliste2').slideDown("fast", function() { $isslide = 0; }); } }) .on('mouseleave','#sektionenliste2', function(e) { if($isslide == 0) { $('#sektionenliste2').slideUp("fast"); } }) .on('click','.sektionenliste', function(e) { $('#sektionenliste').slideUp("fast",function() { $('#wappen').show(); $('#logo').show(); }); }) .on('click','.fancybox', function(e) { $('#wappen').hide(); $('#logo').hide(); }) .on('click','.fancybox-close', function(e) { $('#wappen').show(); $('#logo').show(); }) ; $(window).mousemove(function() { if($('#sektionenliste').css('display') != 'block') { if($('.fancybox-overlay-fixed').length == 0) { $('#wappen').show(); $('#logo').show(); } } }); $('#typewriter').css('width', ($('#content').innerWidth() - 100) + 'px'); if($('#subdistcontainerjournal').length!=0) { var $suvc = $('#dynamicKandidatenContainer').innerHeight() + $('.journalcontainer').innerHeight(); if(parseInt($('#content').css('height')) < $suvc) { $('#content').css('min-height',($suvc + 24) +'px'); } } $("#journalopener").click(function() { if($("#journalcontent").css("display") == "block") { $("#journalcontent").slideUp(); } else { $("#journalcontent").slideDown(); } }); $("#linkjahresberichte").click(function() { if($("#containerjahresberichte").css("display") == "block") { $("#containerjahresberichte").slideUp(); } else { $("#containerjahresberichte").slideDown(); } }); $(".mitteilungenfrontcontainer div.titel").click(function() { var $this = $(this); if($this.parents(".mitteilungenfrontcontainer").children(".medientext_row_group").css("display") == "block") { $this.parents(".mitteilungenfrontcontainer").find(".medientext_row_group").slideUp("fast"); $this.parents(".mitteilungenfrontcontainer").find(".medientext_row").slideUp("fast"); $this.parents(".mitteilungenfrontcontainer").children("div.titel").removeClass("hover"); } else { $this.parents(".mitteilungenfrontcontainer").find(".medientext_row_group").slideDown("fast"); $this.parents(".mitteilungenfrontcontainer").find(".medientext_row").slideDown("fast"); $this.parents(".mitteilungenfrontcontainer").children("div.titel").addClass("hover"); } }); $(".mitteilungenfrontcontainer div.titel").prepend(''); });