// source --> https://flugverfolgung.net/wp-content/themes/affiliatetheme/_/js/comparison-functions.min.js function setCurrentCol(n,compareTableId,lastCol){if(typeof window["current_col_"+compareTableId]=="undefined"){window["current_col_"+compareTableId]=1}window["current_col_"+compareTableId]+=n;drawScrollButtons(compareTableId,lastCol)}function displayNavButtons(compareTableId){var compareBody=jQuery("#compare-content-body-"+compareTableId);var compareHeader=jQuery("#compare-content-header-"+compareTableId);var scrollBtnPrev=jQuery("#scroll_btn_prev_"+compareTableId);var scrollBtnNext=jQuery("#scroll_btn_next_"+compareTableId);if(scrollBtnPrev.length){var scrollBtn=scrollBtnPrev;var scrollBtnOffset=scrollBtn.actual("offset");var compareBodyOffset=compareBody.actual("offset");var compareHeaderOffset=compareHeader.actual("offset");var compareBodyBottom=parseInt(compareBodyOffset.top+compareBody.actual("outerHeight"),10);var scrollBtnHeight=parseInt(scrollBtn.actual("height"),10);var scrollBtnTop=scrollBtnOffset.top;var scrollBtnBottom=parseInt(scrollBtnTop+scrollBtnHeight,10);scrollBtnPrev.css({top:compareHeaderOffset.top+150,position:"absolute"});scrollBtnNext.css({top:compareHeaderOffset.top+150,position:"absolute"});if(compareBodyBottomparseInt(compareCellHeight)){compareCell.css({height:labelCellHeight})}else{labelCell.css({height:jQuery(this).actual("outerHeight")});labelCell.css({height:labelCell.actual("outerHeight")+(labelCellOuterHeight-labelCellInnerHeight)});compareCell.css({height:labelCell.actual("outerHeight")})}})}function initWindowResize(compareTableId,currentCol,lastCol){jQuery(window).resize(function(){drawScrollButtons(compareTableId,lastCol)})}function initCompareScrollHeader(compareTableId){jQuery(window).scroll(function(){scrollCompareHeader(compareTableId)})}function initNavButtonScroll(compareTableId){jQuery(window).scroll(function(){displayNavButtons(compareTableId)})}function initTableScroll(compareTableId,lastCol){jQuery("div#compare-content-body-"+compareTableId).scroll(function(){jQuery("div#compare-content-header-"+compareTableId).scrollLeft(jQuery(this).scrollLeft())})}function initScrollToRight(compareTableId){jQuery("#scroll_btn_next_"+compareTableId).click(function(event){var compareCellWidth=jQuery(".compare-cell-"+compareTableId).actual("outerWidth");jQuery("div#compare-content-body-"+compareTableId+", div#compare-content-header-"+compareTableId).animate({scrollLeft:"+="+compareCellWidth},"slow");setCurrentCol(1,lastCol)})}function initScrollToLeft(compareTableId,lastCol){jQuery("#scroll_btn_prev_"+compareTableId).click(function(event){var compareCellWidth=jQuery(".compare-cell-"+compareTableId).actual("outerWidth");jQuery("div#compare-content-body-"+compareTableId+", div#compare-content-header-"+compareTableId).animate({scrollLeft:"-="+compareCellWidth},"slow");setCurrentCol(-1,lastCol)})}function addToComparison(element,newParent,compareTableId){element=jQuery(element);elementId=element.val();var oldOffset=element.actual("offset");newParent=jQuery(newParent);var compareProduct=document.createElement("div");var productImageSrc=jQuery("#product-image-"+elementId).attr("src");var productTitle=jQuery("#product-title-"+elementId).html();jQuery(compareProduct).html(''+productTitle);elementX=jQuery(compareProduct);var newOffset=elementX.actual("offset");var temp=elementX.appendTo(newParent);temp.css({position:"absolute",left:oldOffset.left,"z-index":1e3,width:140,height:230});temp.attr("id","compare-product-"+elementId+"-"+compareTableId);var leftPos=jQuery("#compare-send-button-"+compareTableId).actual("offset").left;var tmpHeight=temp.actual("outerHeight");var parentHeight=newParent.actual("height");if(tmpHeight>parentHeight){newParent.height(temp.actual("outerHeight"))}temp.animate({left:leftPos},"slow",function(){elementX.show()});reorderCompareProducts(compareTableId)}function reorderCompareProducts(compareTableId){var newLeftPos=jQuery("#compare-send-button-"+compareTableId).actual("offset").left;jQuery("#compare-elements-"+compareTableId).children("div").each(function(){newLeftPos+=170;jQuery(this).animate({left:newLeftPos},"slow",function(){})})}function drawScrollButtons(compareTableId,lastCol){var scrollBtnPrev=jQuery("#scroll_btn_prev_"+compareTableId);var scrollBtnNext=jQuery("#scroll_btn_next_"+compareTableId);var compareTableLabels=jQuery(".compare-table-labels-"+compareTableId);var compareContentBox=jQuery("#compare-content-body-"+compareTableId).parent("div");var boxContentOffset=compareContentBox.actual("offset");var boxContentOffsetLeft=boxContentOffset.left;var posRightBorder=boxContentOffsetLeft+compareContentBox.actual("outerWidth");var boxContentPadding=compareContentBox.actual("outerWidth")-compareContentBox.actual("width");compareTableLabels.css({left:boxContentOffsetLeft+boxContentPadding/2});scrollBtnPrev.css({left:boxContentOffsetLeft+compareTableLabels.actual("outerWidth")+boxContentPadding/2});scrollBtnNext.css({left:posRightBorder-70-boxContentPadding/2});if(window["current_col_"+compareTableId]>=lastCol){scrollBtnNext.hide();window["current_col_"+compareTableId]=lastCol}else{scrollBtnNext.show()}if(window["current_col_"+compareTableId]<=1){scrollBtnPrev.hide();window["current_col_"+compareTableId]=1}else{scrollBtnPrev.show()}}function scrollCompareHeader(compareTableId){var windowScrollTop=jQuery(window).scrollTop();var compareBody=jQuery("#compare-content-body-"+compareTableId);var compareHeader=jQuery("#compare-content-header-"+compareTableId);var compareHeaderWidth=jQuery("#compare-content-body-"+compareTableId).actual("outerWidth");var fixedElement=jQuery("#navigation");var fixedElementOffset=jQuery("#navigation").actual("offset");var fixedElementBottom=fixedElementOffset.top+fixedElement.actual("height");var currentHeight=windowScrollTop+fixedElement.actual("outerHeight");currentHeight-=10;if(jQuery(fixedElement).css("position")!=="fixed"){currentHeight-=fixedElement.actual("outerHeight")}currentHeight=parseInt(currentHeight,10);var compareHeaderTop=parseInt(compareHeader.actual("offset").top,10);if(currentHeight>compareHeaderTop){compareHeader.css({top:currentHeight,position:"absolute",width:compareHeaderWidth})}else{if(currentHeightcompareBodyBottom-compareHeaderHeight){compareHeader.hide()}else{compareHeader.show()}}function handleCompareSend(compareTableId){jQuery("#compare-send-button-"+compareTableId).click(function(){var compareChooseProductList="";if(jQuery(this).hasClass("compare-send-button-active")){var compareChooseProducts=jQuery(".compare-choose-product-"+compareTableId);if(compareChooseProducts.filter(":checked").length>1){compareChooseProducts.filter(":checked").each(function(){compareChooseProductList+=jQuery(this).val()+","})}}if(compareChooseProductList!=""){jQuery("#compareproducts-"+compareTableId).val(compareChooseProductList);jQuery("#compareproducts-send-"+compareTableId).submit()}})}function getLastCol(compareTableId){var comparisonCell=jQuery("div#compare-content-body-"+compareTableId+" table#comparison-table-"+compareTableId+" tbody td");var colWidth=comparisonCell.actual("outerWidth");var compareContentBox=jQuery("#compare-content-body-"+compareTableId).parent("div");var boxContentWidth=compareContentBox.actual("width");var slidingWindowWidth=boxContentWidth-150+parseInt(compareContentBox.css("padding-left"))*2;var compareContentBodyWidth=jQuery("div#compare-content-body-"+compareTableId).actual("width");slidingWindowWidth=slidingWindowWidth-(slidingWindowWidth-compareContentBodyWidth);var visibleCols=Math.ceil(slidingWindowWidth/colWidth);var totalCols=jQuery("tr#attribute-value-row-0-"+compareTableId+" td").length;return totalCols-visibleCols+1}function handleHighlightedEmptyColumn(compareTableId){var compareContentBox=jQuery("#compare-content-body-"+compareTableId).parent("div");jQuery(".highlighted_empty_column_"+compareTableId).css("background-color",compareContentBox.css("backgroundColor"))}function handleScrollButtonsVisibility(compareTableId){var compareContentBodyWidth=jQuery("div#compare-content-body-"+compareTableId).actual("width");var compareContentBox=jQuery("#compare-content-body-"+compareTableId).parent("div");var boxContentWidth=compareContentBox.actual("width");var slidingWindowWidth=boxContentWidth-150+parseInt(compareContentBox.css("padding-left"))*2;slidingWindowWidth=slidingWindowWidth-(slidingWindowWidth-compareContentBodyWidth);var comparisonCell=jQuery("div#compare-content-body-"+compareTableId+" table#comparison-table-"+compareTableId+" tbody td");var colWidth=comparisonCell.actual("outerWidth");var visibleCols=Math.ceil(slidingWindowWidth/colWidth);var totalCols=jQuery("tr#attribute-value-row-0-"+compareTableId+" td").length;if(totalCols3){jQuery(this).removeAttr("checked")}else{if(this.checked){addToComparison(this,"#compare-elements-"+compareTableId,compareTableId)}else{jQuery("#compare-product-"+jQuery(this).val()+"-"+compareTableId).fadeOut(500,function(){jQuery(this).remove();reorderCompareProducts(compareTableId)})}}if(compareChooseProducts.filter(":checked").length>1){compareSendButton.removeClass("compare-send-button-inactive").addClass("compare-send-button-active")}else{compareSendButton.removeClass("compare-send-button-active").addClass("compare-send-button-inactive")}});jQuery(document).on("click",".fa.fa-times-circle-o.remove-from-comparison-"+compareTableId+"",function(){var elementId=jQuery(this).attr("id");var elementIdParts=elementId.split("_");jQuery("#compare-product_"+elementIdParts[1]+"_"+compareTableId).click()})}; // source --> https://flugverfolgung.net/wp-content/cache/autoptimize/js/autoptimize_single_6912605f837cd1291658f486c2ceaec1.js ;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else{factory(jQuery);}}(function($){$.fn.addBack=$.fn.addBack||$.fn.andSelf;$.fn.extend({actual:function(method,options){if(!this[method]){throw'$.actual => The jQuery method "'+method+'" you called does not exist';}var defaults={absolute:false,clone:false,includeMargin:false,display:'block'};var configs=$.extend(defaults,options);var $target=this.eq(0);var fix,restore;if(configs.clone===true){fix=function(){var style='position: absolute !important; top: -1000 !important; ';$target=$target.clone().attr('style',style).appendTo('body');};restore=function(){$target.remove();};}else{var tmp=[];var style='';var $hidden;fix=function(){$hidden=$target.parents().addBack().filter(':hidden');style+='visibility: hidden !important; display: '+configs.display+' !important; ';if(configs.absolute===true)style+='position: absolute !important; ';$hidden.each(function(){var $this=$(this);var thisStyle=$this.attr('style');tmp.push(thisStyle);$this.attr('style',thisStyle?thisStyle+';'+style:style);});};restore=function(){$hidden.each(function(i){var $this=$(this);var _tmp=tmp[i];if(_tmp===undefined){$this.removeAttr('style');}else{$this.attr('style',_tmp);}});};}fix();var actual=/(outer)/.test(method)?$target[method](configs.includeMargin):$target[method]();restore();return actual;}});}));