(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
if(p==this){return false;}
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);

(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);

function lbinit(){
var useMetaKeyword = false;
var minLength = 40;
var useMetaAuthor = false;
var addLinks = true;
var skip = new Array("home","link","click here");
	
function D(b,a,c){if(b.addEventListener)b.addEventListener(a,c,false);else b.attachEvent&&b.attachEvent("on"+a,c)}function o(b,a){if(typeof b=="undefined"||b==null||!RegExp)return false;a=new RegExp("(^|\\s)"+a+"(\\s|$)");if(typeof b=="string")return a.test(b);else if(typeof b=="object"&&b.className)return a.test(b.className);return false}function E(b,a){var c=false,j;for(j=b.parentNode;j!=undefined;){if(b.parentNode==e.body)break;else if(b.parentNode==a){c=true;break}j=j.parentNode}return c}
function F(b){return b.replace(/^\s*/,"")}function G(b){return b.replace(/\s*$/,"")}function H(b){return G(F(b))}var I=new Array("home","link","click here"),e=document,x=window,t=e.getElementsByTagName("body")[0],p=e.getElementsByName("author"),i=e.getElementsByName("keywords"),q=x.location.toString(),u=e.title.toString(),d;if(!Array.indexOf)Array.prototype.indexOf=function(b,a){var c=-1;for(a=a|0;a<this.length||a==-1;a++)if(this[a]==b)c=a;return c};if(i.length>0&&useMetaKeyword){i=e.getElementsByName("keywords")[0].getAttribute("content").split(",");
u=Math.floor(Math.random()*i.length);i=i[u].replace(/^\s*|\s*$/,"")}else i=u;p=(p.length>0&&useMetaAuthor)?p[0].getAttribute("content"):e.domain;var y="<p id='credit'><br/>Mehr zu <a href='"+q+"'>"+i+"</a> bei <a href='http://"+e.domain+"' />"+p+"</a></p>";if(/MSIE/g.test(navigator.userAgent))var v="msie";else if(/Safari/g.test(navigator.userAgent))v="safChrome";q=e.createElement("span");q.setAttribute("id","sasText");t.appendChild(q);d=e.getElementById("sasText");posType=document.all&&!window.opera&&!window.XMLHttpRequest?
"absolute":"fixed";d.style.position=posType;d.style.top="0px";d.style.left="-9999px";D(t,"copy",function(){d.innerHTML=y;if(v=="msie"){for(var b=e.selection.createRange(),a=b.parentElement();a.nodeName!="BODY"&&!o(a,"lbExclude");)a=a.parentNode;if(o(a,"lbExclude"))return true;a=e.body.createTextRange();a.moveToElementText(d);var c=b.duplicate();c=c.htmlText;if(c.length>minLength){d.id="tempSasText";d.innerHTML=c+y;(c=e.getElementById("sasText"))&&c.parentNode.removeChild(c);d.id="sasText";a.select()}}else{b=
x.getSelection();for(a=b.anchorNode;a.nodeName!="BODY"&&!o(a,"lbExclude");)a=a.parentNode;if(o(a,"lbExclude"))return false;if(b==""&&v=="safChrome"){d.innerHTML=t.innerHTML;a=document.createRange();b.removeAllRanges();a.selectNodeContents(d);b.addRange(a)}else if(b.toString().length>minLength){var j=e.getElementById("credit");a=b.getRangeAt(0);c=a.cloneContents();d.id="tempSasText";d.insertBefore(c,j);(c=e.getElementById("sasText"))&&c.parentNode.removeChild(c);d.id="sasText";b.removeAllRanges();a.selectNode(d);
b.addRange(a)}}var w=[];a=d.getElementsByTagName("a");for(b=0;b<a.length;b++)w.push(a[b].href);if(addLinks){a=e.getElementsByTagName("a");for(b=0;b<a.length;b++){var r=a[b].href;if(w.indexOf(r)==-1)if(E(a[b],d)==false){var f=H(a[b].innerHTML).toLowerCase();if(skip.indexOf(f)==-1)if((new RegExp(e.domain,"g")).test(r)){var z=[];function n(g,k,l){for(var A=g.childNodes.length;A-- >0;){var h=g.childNodes[A];if(h.nodeType===1)h.tagName.toLowerCase()!=="a"&&n(h,k,l);else if(h.nodeType===3)for(var m=h.data.length;1;){m=
h.data.lastIndexOf(k,m);if(m===-1||z.indexOf(k.toLowerCase())!==-1)break;var B=/\w/;if(h.nodeValue.charAt(m-1).match(B)||h.nodeValue.charAt(m+f.length).match(B))break;l.call(window,h,m)}}}function s(g,k){g.splitText(k+f.length);var l=e.createElement("a");l.href=r;l.appendChild(g.splitText(k));g.parentNode.insertBefore(l,g.nextSibling);z.push(f.toLowerCase());w.push(r)}n(d,f,s);f=f.charAt(0).toUpperCase()+f.slice(1);n(d,f,s);f=f.toUpperCase();n(d,f,s);f=f.replace(/\w\S*/g,function(g){return g.charAt(0).toUpperCase()+
g.substr(1).toLowerCase()});n(d,f,s)}}}}})};

$(document).ready(function(){
	$('#inhalt > div.sucherg')
		.css("cursor","pointer").attr("title","Ergebnis klicken")
		.hover(function(){$(this).addClass("bgweiss");},function(){$(this).removeClass("bgweiss");})
		.click(function(){
			document.location.href=$(this).children("p:last").children(":first").attr("href");
		});
	$('#inhalt > div.festival > p, #inhalt_fp > div.festival > p')
		.css("cursor","pointer").attr("title","zum Festivaleintrag")
		.hover(function(){$(this).addClass("bgweiss");},function(){$(this).removeClass("bgweiss");})
		.click(function(){
			document.location.href=$(this).children(":first").children(":first").attr("href");
		});
	$('#rechts > .bggruen > p, .blockr.bggruen > p')
		.css("cursor","pointer").attr("title","News lesen")
		.hover(function(){$(this).addClass("bgweiss2");},function(){$(this).removeClass("bgweiss2");})
		.click(function(){
			document.location.href=$(this).children(":last").attr("href");
		});
	$('.bggelb > ul > li')
		.css("cursor","pointer").attr("title","Ticket kaufen")
		.hover(function(){$(this).addClass("bgweiss");},function(){$(this).removeClass("bgweiss");})
		.click(function(){
			document.location.href=$(this).children(":last").attr("href");
		});
	lbinit();
});