!function(e){"use strict";function t(e,t){var s=decodeURIComponent(e);if(s.length<=t)return e;var i=s.substring(0,t-1).lastIndexOf(" ");return s=encodeURIComponent(s.substring(0,i))+"…"}function s(t){var s=e('meta[name="'+t+'"]').attr("content");return s||""}function i(){var t=s("DC.title"),i=s("DC.creator");return t.length>0&&i.length>0?t+=" - "+i:t=e("title").text(),encodeURIComponent(t)}function a(){var t=document.location.href,s=e("link[rel=canonical]").attr("href");return s&&s.length>0&&(s.indexOf("http")<0&&(s=document.location.protocol+"//"+document.location.host+s),t=s),t}function o(e,t,s,i,a){var o=new Date;o.setTime(o.getTime()+24*s*60*60*1e3),document.cookie=e+"="+t+"; expires="+o.toUTCString()+"; path="+i+"; domain="+a}function r(e,t,s,i){var a=new Date;a.setTime(a.getTime()-100),document.cookie=e+"="+t+"; expires="+a.toUTCString()+"; path="+s+"; domain="+i}e.fn.socialSharePrivacy=function(s){function n(){var t=e.Deferred();return e.getJSON(l.lang_path+l.language+".lang",function(e){d=e,t.resolve()}).fail(function(e){"undefined"!=typeof console&&console.log("Error "+e.status+" while loading the language file ("+l.lang_path+l.language+".lang)"),t.reject()}),t.promise()}var c={services:{facebook:{status:"on",dummy_img:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/images/dummy_facebook.png",perma_option:"on",referrer_track:"",action:"recommend",layout:"button_count",sharer:{status:"off",dummy_img:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/images/dummy_facebook_share_de.png",img:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/images/dummy_facebook_share_active_de.png"}},twitter:{status:"on",dummy_img:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/images/dummy_twitter.png",perma_option:"on",referrer_track:"",tweet_text:i,count:"horizontal"},gplus:{status:"on",dummy_img:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/images/dummy_gplus.png",perma_option:"on",referrer_track:"",size:"medium"}},info_link:"https://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html",cookie_path:"/",cookie_domain:document.location.host,cookie_expires:"365",css_path:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/socialshareprivacy.css",uri:a,language:"de",lang_path:"https://www.ts-touristikservice.de/wp-content/themes/theme/lib/includes/ts/css/socialshareprivacy/lang/",skin:"light",alignment:"horizontal",switch_alignment:"left",perma_orientation:"down"},l=e.extend(!0,c,s),f="on"===l.services.facebook.status,m="on"===l.services.facebook.sharer.status,p="on"===l.services.twitter.status,u="on"===l.services.gplus.status;if(f||p||u){l.css_path.length>0&&"1"!=e(window).data("socialshareprivacy_css")&&(document.createStyleSheet?document.createStyleSheet(l.css_path):e("head").append(''),e(window).data("socialshareprivacy_css","1"));var d;return this.each(function(){var s=this;e.when(n()).then(function(){e(s).prepend('
');var i=e(".social_share_privacy_area",s);"dark"==l.skin&&e(i).addClass("skin-dark"),"vertical"==l.alignment&&(e(i).addClass("vertical"),"right"==l.switch_alignment&&(f&&"box_count"==l.services.facebook.layout||!f)&&(p&&"vertical"==l.services.twitter.count||!p)&&(u&&"tall"==l.services.gplus.size||!u)&&e(i).addClass("switch_right"));var a=l.uri;if("function"==typeof a&&(a=a(i)),f){var n,c,h="box_count"==l.services.facebook.layout?"61":"21",_="box_count"==l.services.facebook.layout?"90":"130",g=encodeURIComponent("https://www.facebook.com/TS.Touristik.Service");m?(n='',c=''):(n='',c=''),i.append(''+d.services.facebook.txt_info+''+d.services.facebook.txt_fb_off+''+n+"
");var v=e("li.facebook",i);e(i).on("click","li.facebook div.fb_like img.fb_like_privacy_dummy,li.facebook .switch",function(e){e.preventDefault(),v.find(".switch").hasClass("off")?(v.addClass("info_off"),v.find(".switch").addClass("on").removeClass("off").html(d.services.facebook.txt_fb_on),v.find("img.fb_like_privacy_dummy").replaceWith(c)):(v.removeClass("info_off"),v.find(".switch").addClass("off").removeClass("on").html(d.services.facebook.txt_fb_off),v.find(".fb_like").html(n))})}if(p){var w=l.services.twitter.tweet_text;"function"==typeof w&&(w=w()),w=t(w,"120");var k="horizontal"==l.services.twitter.count?"25":"62",y="horizontal"==l.services.twitter.count?"130":"83",b=encodeURIComponent(a+l.services.twitter.referrer_track),C=encodeURIComponent(a),x='',S='';i.append('");var T=e("li.twitter",i);e(i).on("click","li.twitter div.tweet img,li.twitter .switch",function(e){e.preventDefault(),T.find(".switch").hasClass("off")?(T.addClass("info_off"),T.find(".switch").addClass("on").removeClass("off").html(d.services.twitter.txt_twitter_on),T.find("img.tweet_this_dummy").replaceWith(x)):(T.removeClass("info_off"),T.find(".switch").addClass("off").removeClass("on").html(d.services.twitter.txt_twitter_off),T.find(".tweet").html(S))})}if(u){var D=a+l.services.gplus.referrer_track,z='',q='';i.append(''+d.services.gplus.txt_info+''+d.services.gplus.txt_gplus_off+''+q+"
");var I=e("li.gplus",i);e(i).on("click","li.gplus div.gplusone img,li.gplus .switch",function(e){e.preventDefault(),I.find(".switch").hasClass("off")?(I.addClass("info_off"),I.find(".switch").addClass("on").removeClass("off").html(d.services.gplus.txt_gplus_on),I.find("img.gplus_one_dummy").replaceWith(z)):(I.removeClass("info_off"),I.find(".switch").addClass("off").removeClass("on").html(d.services.gplus.txt_gplus_off),I.find(".gplusone").html(q))})}e(i).on("mouseenter",".help_info:not(.info_off)",function(){var t=e(this),s=window.setTimeout(function(){e(t).addClass("display")},500);e(this).data("timeout_id",s)}),e(i).on("mouseleave",".help_info",function(){var t=e(this).data("timeout_id");window.clearTimeout(t),e(this).hasClass("display")&&e(this).removeClass("display")});var P="on"===l.services.facebook.perma_option,U="on"===l.services.twitter.perma_option,j="on"===l.services.gplus.perma_option;if(f&&P||p&&U||u&&j){var R=document.cookie.split(";"),O="{",N=0;if(""!=R)for(;N'+d.settings+"");var B="r"+Math.floor(101*Math.random()),F=' checked="checked"';if(f&&P){var J="perma_on"===O.socialSharePrivacy_facebook?F:"";W.find("form fieldset").append('")}if(p&&U){var M="perma_on"===O.socialSharePrivacy_twitter?F:"";W.find("form fieldset").append('")}if(u&&j){var Q="perma_on"===O.socialSharePrivacy_gplus?F:"";W.find("form fieldset").append('")}e(i).on("click","li.settings_info .settings",function(t){t.preventDefault(),"on"==e(this).data("keyb")?(e("li.settings_info",i).trigger("mouseleave"),e(this).data("keyb","off")):(e("li.settings_info .settings",i).trigger("mouseenter"),e(this).data("keyb","on"))}),e(i).on("mouseenter","li.settings_info .settings",function(){var t=window.setTimeout(function(){W.find(".settings_info_menu").removeClass("off").addClass("on")},500);e(this).data("timeout_id",t)}),e(i).on("mouseleave","li.settings_info",function(){var t=e(this).data("timeout_id");window.clearTimeout(t),W.find(".settings_info_menu").removeClass("on").addClass("off")}),e(i).on("click","li.settings_info fieldset input",function(t){var s=t.target.id,a=s.substr(s.lastIndexOf("_")+1,s.length),n="socialSharePrivacy_"+a;e("#"+t.target.id+":checked").length?(o(n,"perma_on",l.cookie_expires,l.cookie_path,l.cookie_domain),e("form fieldset label[for="+s+"]",i).addClass("checked")):(r(n,"perma_on",l.cookie_path,l.cookie_domain),e("form fieldset label[for="+s+"]",i).removeClass("checked"))}),f&&P&&"perma_on"===O.socialSharePrivacy_facebook&&e("li.facebook .switch",i).click(),p&&U&&"perma_on"===O.socialSharePrivacy_twitter&&e("li.twitter .switch",i).click(),u&&j&&"perma_on"===O.socialSharePrivacy_gplus&&e("li.gplus .switch",i).click()}})})}}}(jQuery);