"use strict";window.is24=window.is24||{};is24.search=is24.search||{};is24.search.reporting=is24.search.reporting||{};is24.search.reporting.comscore=is24.search.reporting.comscore||{};is24.search.reporting.comscore.Report=function(counterName,dg1,dg2){this.counterName=counterName;this.dg1=dg1;this.dg2=dg2;this.mpln=null;this.ns_event=null;this.ns_type=null;this.sart=null;this.count_pm_suche=null;this.ityp=null;this.ozahl=null;this.reportingPostfix=null;this.ftc=null;this.ns_campaign=null;this.ns_mchannel=null;this.ns_source=null;this.ns_fee=null;this.kw=null;this.ns_linkname=null;this.getParameterKeys=function(){return["dg1","dg2","mpln","ns_event","sart","count_pm_suche","ityp","ozahl","ns_type","ftc","ns_campaign","ns_mchannel","ns_source","ns_fee","kw","ns_linkname"];};};is24.search.reporting.comscore.Report.create=function(counterName,dg1,dg2,reportOptions){var report=new is24.search.reporting.comscore.Report(counterName,dg1,dg2);for(var key in reportOptions){if(typeof key==='string'){report[key]=reportOptions[key];}}
return report;};is24.search.reporting.comscore.Reporter=function(reportingBaseUrl){var that=this;this.sendReport=function(report){var url=reportingBaseUrl+"?"+report.counterName;var parameterKeys=report.getParameterKeys();for(var k=0;k<parameterKeys.length;++k){var parameterKey=parameterKeys[k];var value=report[parameterKey];if(value||typeof value==='string'){url+="&"+parameterKey+"="+encodeURIComponent(value);}}
if(report.reportingPostfix){url+="&"+report.reportingPostfix;}
includeReportingPixel(url);};var includeReportingPixel=function(url){var pixelUrl=url+"&ns__t="+(new Date().getTime())+"&ns_c="+((document.characterSet)?document.characterSet:document.defaultCharset)+"&ns_ti="+escape(document.title)+"&ns_jspageurl="+escape(document.URL)+"&ns_referrer="+escape(document.referrer);that.sendReportingPixelUrl(pixelUrl);};this.sendReportingPixelUrl=function(pixelUrl){if(document.images){var image=new Image();image.onload=function(){if(jQuery.isReady){renderReportingDone();}else{jQuery(document).ready(function(){renderReportingDone();});}};image.src=pixelUrl;}else{var d=document;d.write('<'+'p><img src="'+pixelUrl+'" height="1" width="1" alt="*"></p>');}};var renderReportingDone=function(){if(!document.getElementById('reporting-done')){var doneIndicator=document.createElement('div');doneIndicator.appendChild(document.createTextNode(" "));doneIndicator.setAttribute('id','reporting-done');document.body.appendChild(doneIndicator);}};};
