var TimeSettings = new Array(); var TimeCount = 300; var AC_FL_RunContent = 0; var requiredMajorVersion = 8; var requiredMinorVersion = 0; var requiredRevision = 24; var hasRightFlashVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); function shadowboxOpen(pstrPage) { Shadowbox.open({ content: '/_public/child.php?thissite=/' + pstrPage, player: "iframe", title: "", height: 600, width: 800 }); return false; } $(function() { /* window.setTimeout(function(){ var objcontent = $('.items').html(); $('.items').append(objcontent); },200); */ $('.context_slider').each(function() { var boolAutoslide = true; //enable - disable autoslide var objTimeout; var boolaction = true; var animate = true; var intwidth; var objSlider = $(this); var objSliderItems = objSlider.find('div.context_slider_content'); var objContent = objSliderItems.children(); var intelements = objContent.length; objSliderItems.append(objSliderItems.html()); var arrposition = new Array(); var intactive; var intposition = 0; var x=0; objContent.each(function() { x++; if (x>1) { intposition = intposition - $(this).outerWidth(true); } arrposition[x] = intposition; intactive = x - (intelements - 1); }); objSliderItems.css('left',arrposition[intactive]+'px'); if (boolAutoslide) { objSlider.mouseenter(function() { animate = false; window.clearTimeout(objTimeout); }); objSlider.mouseleave(function() { animate = true; callback(); }); function animateSlider () { if (animate) { intactive++; if (intactive>intelements) { intactive = 1; intnewpos = arrposition[intelements]+arrposition[2]; objSliderItems.animate({ left: intnewpos+'px' },800, function() { objSliderItems.css('left','0px'); }); } else { objSliderItems.animate({ left: arrposition[intactive]+'px' },800, function(){ boolaction = true; }); } } } function callback() { objTimeout = window.setTimeout(function() { animateSlider(); callback(); }, 5000); } callback(); } }); $("#slider").each(function() { var boolaction = true; var intwidth; var objslider = $(this); var objprev = objslider.find('a.prev'); var objnext = objslider.find('a.next'); var objitems = objslider.find('.items'); var objcontent = objitems.children(); var intelements = objcontent.length; objitems.append(objitems.html()); var arrposition = new Array(); var intactive; var intposition = 0; var x=0; objcontent.each(function() { x++; if (x>1) { intposition = intposition - $(this).outerWidth(true); } arrposition[x] = intposition; if ($(this).children('div').hasClass('slider_active')) { intactive = x; } }); objitems.css('left',arrposition[intactive]+'px'); objprev.click(function(){ if (boolaction) { boolaction = false; intactive--; if (intactive<1) { intactive = intelements; intnewpos = arrposition[intactive]+arrposition[2]; objitems.css('left',intnewpos+'px'); } objitems.animate({ left: arrposition[intactive]+'px' },100, function() { boolaction = true; }); } }); objnext.click(function() { if (boolaction) { boolaction = false; intactive++; if (intactive>intelements) { intactive = 1; intnewpos = arrposition[intelements]+arrposition[2]; objitems.animate({ left: intnewpos+'px' },100, function() { objitems.css('left','0px'); boolaction = true; }); } else { objitems.animate({ left: arrposition[intactive]+'px' },100, function(){ boolaction = true; }); } } }); }); $('.labeled').each( function() { var objInput = $(this); var objParent = objInput.parent(); var strLabel = objInput.attr('label'); var strName = objInput.attr('name'); var strId = objInput.attr('id'); var strOutput = ''; objParent.prepend(strOutput); var objLabel = objParent.children('label'); if (objInput.attr('value')== '') { objLabel.css('display','inline'); } $('#label'+strId).click( function() { $(this).css('display','none'); $('#'+strId).focus(); }) objInput.focus( function() { objLabel.css('display','none'); }); objInput.blur( function() { if (objInput.attr('value')== '') { objLabel.css('display','inline'); } else { objLabel.css('display','none') } }); }); $('.BtnOver').hover( function() { $(this).attr('src', $(this).attr('over')); }, function() { $(this).attr('src', $(this).attr('out')); } ); $('a.SliderLink').click( function() { thisSliderBox = $(this).parent('div.SliderBox'); thisSliderContainer = thisSliderBox.parent('div.SliderContainer'); boolSlideDown = true; if (thisSliderBox.hasClass('OpenedSlider')) { boolSlideDown = false; } thisSliderContainer.children('div.OpenedSlider').each( function() { $(this).children('div.SliderContent').hide( ); $(this).removeClass('OpenedSlider'); $(this).addClass('ClosedSlider'); $(this).children('a.SliderLink').children('img').attr('src','/images/SliderArrowClosedSlider.gif'); }) if (boolSlideDown) { thisSliderBox.addClass('OpenedSlider'); thisSliderBox.removeClass('ClosedSlider'); $(this).children('img').attr('src','/images/SliderArrowOpenedSlider.gif'); thisSliderBox.children('div.SliderContent').show( ) } }); $('select.designed').each( function() { var objThis = $(this); var objOptions = objThis.children('option'); var objParent = objThis.parent(); var attrId = objThis.attr('id'); var attrName = objThis.attr('name'); var attrClass = objThis.attr('class'); var attrStyle = objThis.attr('style'); var styWidth = objThis.css('width'); //objParent.css('display','static'); var strHTML = ''; var strOptions = ''; var defOptValue,defOptHTML; var boolDefaultSelected = true; var arrOptions = new Array(); objOptions.each( function() { var objThisOption = $(this); var isSelected = objThisOption.attr('selected'); arrOptions.push( new Array ( objThisOption.attr('value'),objThisOption.html(),isSelected ) ); if (isSelected==true) { boolDefaultSelected = false; } }); for (x=0; x < arrOptions.length;x++) { var strActiveClass = ''; if (x==0 && boolDefaultSelected) { defOptValue = arrOptions[0][0]; defOptHTML = arrOptions[0][1]; strActiveClass = ' Active'; } if (arrOptions[x][2]==true) { defOptValue = arrOptions[x][0]; defOptHTML = arrOptions[x][1]; strActiveClass = ' Active'; } strOptions += '' + '' + '' + arrOptions[x][1] + '' + ''; } strHTML += '
' + '' + '
' + '
' + '' + defOptHTML + '' + '
' + '
' + '
' + '
' + strOptions + '
' + '
' + '' + '' '
'; objParent.html(strHTML); $('#selbox_'+attrId+' > div.SelectboxValue').click( function() { var thisSelectbox = $(this).parent(); var thisSelectboxOptions = thisSelectbox.children('div.SelectboxOptions'); var attrId = thisSelectbox.children('input').attr('id'); GeneralJS.ShowSelectboxLayer(attrId); }); $('#selbox_'+attrId+' > div.SelectboxValue').hover( function() { attrId = $(this).parent().children('input').attr('id'); window.clearTimeout(TimeSettings[attrId]); }, function() { attrId = $(this).parent().children('input').attr('id'); window.clearTimeout(TimeSettings[attrId]); TimeSettings[attrId] = window.setTimeout("GeneralJS.HideSelectboxLayer('"+attrId+"')", MainnavigationTime); } ); $('#selbox_'+attrId+' > div.SelectboxOptions').hover( function() { attrId = $(this).parent().children('input').attr('id'); window.clearTimeout(TimeSettings[attrId]); }, function() { attrId = $(this).parent().children('input').attr('id'); window.clearTimeout(TimeSettings[attrId]); TimeSettings[attrId] = window.setTimeout("GeneralJS.HideSelectboxLayer('"+attrId+"')", MainnavigationTime); } ); $('#selbox_'+attrId+' > div.SelectboxOptions > div.Wrapper > a').hover( function() { attrId = $(this).parent().parent().parent().children('input').attr('id'); window.clearTimeout(TimeSettings[attrId]); }, function() { attrId = $(this).parent().parent().parent().children('input').attr('id'); window.clearTimeout(TimeSettings[attrId]); } ); }); $('a.noLink').click( function() { return false; }); GeneralJS.flashdetect(); }); var GeneralJS = { flashdetect: function() { $('object.flashdetect').each(function() { if(!hasRightFlashVersion) { var objflashObject = $(this); var objflashParent = objflashObject.parent(); var objflashId = objflashObject.attr('id'); if (objflashId) { objflashParent.remove(); $('.'+objflashId).css('display','block'); } else { var strNoFlash = '
'+ ''+ 'Get Adobe Flash Player'+ ''+ '
'+ 'Für die Darstellung dieser Seite benötigen Sie den aktuellen Flash Player von Adobe.'+ '
'; objflashParent.html(strNoFlash); } } }); } }; Shadowbox.init({ players: ["img","swf","iframe"], overlayColor: "#0086CB" });