var xssLoader;(function(a){xssLoader={complete:true,queue:[],loading:undefined,preloaded:undefined,loaded:{},unused:{},load:function(c,b){this.initStaticResources();this.complete=false;this.unused=jQuery.extend({},this.loaded);a(c).each(function(){var f=this,g=f.src,d=xssLoader.resourceName(g);f.name=d;f.scopes={};f.scopes[b]=true;delete xssLoader.unused[d];if(xssLoader.loaded[d]){xssLoader.loaded[d].scopes[b]=true;return}else{if(xssLoader.preloaded[d]){return}}xssLoader.loaded[d]=f;switch(f.type){case"text/css":var e=document.createElement("link");e.rel="stylesheet";e.href=g;e.media=f.media||"all";e.type="text/css";xssLoader.appendToHead(e);break;case"text/javascript":xssLoader.queue.push(f);break;default:console.log("xssLoader.load: unsupported resource type: "+f.type)}});this.loadQueue(true);this.unloadUnused(b)},resourceName:function(b,c){var e,d=c?/([^\?]+)(\?.*)*$/:/\/([^\/\?]+)(\?.*)*$/;if(e=d.exec(b)){return e[1]}},initStaticResources:function(){if(xssLoader.preloaded===undefined){xssLoader.preloaded={};var c,d,b;a("script[src],link[href]",a("head")).each(function(){c=a(this);d=c.attr("src")||c.attr("href");if(b=xssLoader.resourceName(d,true)){xssLoader.preloaded[b]=d}})}},loadQueue:function(c){if(c!==true){xssLoader.queue.shift()}var b=xssLoader.queue[0];if(b){if(b===xssLoader.loading){return}xssLoader.loading=b;xssLoader.loadScript(b.src,xssLoader.loadQueue)}else{xssLoader.loading=undefined;xssLoader.complete=true}},loadScript:function(c,d){var b=document.createElement("script");if(b.addEventListener){b.addEventListener("load",d,false)}else{b.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){d.call(this)}}}b.type="text/javascript";b.src=c;xssLoader.appendToHead(b);b=null},unloadUnused:function(c){var b,d=[];for(b in xssLoader.unused){if(xssLoader.unused.hasOwnProperty(b)){if(xssLoader.unused[b].scopes[c]){delete xssLoader.unused[b].scopes[c]}if(a.isEmptyObject(xssLoader.unused[b].scopes)){d.push(xssLoader.unused[b])}}}xssLoader.unload(d);xssLoader.unused={}},unload:function(c){var d,b;a(c).each(function(){b=this;d=b.src;switch(b.type){case"text/css":a('link[href="'+d+'"]').remove();break;case"text/javascript":a('script[src="'+d+'"]').remove();break;default:console.log("xssLoader.unload: unsupported resource type: "+b.type)}delete xssLoader.loaded[b.name]})},appendToHead:function(b){a("head")[0].appendChild(b)}};if(typeof vidibus!=="undefined"){vidibus.loader=xssLoader}}(jQuery));

jQuery(document).ready(function($) {
  var checkNuna=function(a,b,h){var c=$("body #nuna"),f=c.find("a"),d=$("meta[name=robots]"),g;if(c.length!==1){g='The BODY element must contain exactly one DIV tag with id "nuna"!'}else{if(f.length!==1){g='The DIV element "nuna" must contain exactly one A tag!'}else{if(f.attr("href")!==a){g="The link's href attribute must match \""+a+'"!'}else{if(f.html()!==b){g="The link's label must match \""+b+'"!'}else{if(f.attr("title")!==h){g="The link's title attribute must match \""+h+'"!'}else{if(f.attr("rel").match(/nofollow/)){g='The link\'s rel attribute must not match "nofollow"!'}else{if(d.length!==0){if(d.attr("content").match(/nofollow/)){g="There must not be a nofollow META tag!"}else{if(d.attr("content").match(/noindex/)){g="There must not be a noindex META tag!"}}}}}}}}}if(g){alert("Error: "+g+"\n\nNuna integration has been disabled.")}else{return true}};
  if (checkNuna("http://www.nuna.tv/schlager/chris-alexandros", "Chris Alexandros Videos", "Schlager Videos auf NUNA.tv")) {
    xssPathPrefix = "/s/a9ffb640224d012ee78d6c626d6073fe";
    xssLoader.load([{"src":"http://www.nuna.tv/s/a9ffb640224d012ee78d6c626d6073fe.css","type":"text/css"},{"src":["http://assets1.nuna.vidibus.net/stylesheets/syndication.1329637692.css"],"type":"text/css"},{"src":"http://common.vidibus.net/javascripts/vidibus.js","type":"text/javascript"},{"src":"http://common.vidibus.net/javascripts/xss/jquery.ba-bbq.js","type":"text/javascript"},{"src":"http://common.vidibus.net/javascripts/xss/vidibus.xss.js?r=3","type":"text/javascript"},{"src":"http://www.nuna.tv/s/a9ffb640224d012ee78d6c626d6073fe.xss?scope=nuna","type":"text/javascript"}]);
  }
});

