// What is $(document).ready ? See: http://flowplayer.org/tools/documentation/basics.html#document_ready
// $(document).ready(function() {

// initialize scrollable together with the autoscroll plugin
// var root = $("#scroller").scrollable({circular: true}).autoscroll({ autoplay: true });

// provide scrollable API for the action buttons
// window.api = root.data("scrollable");

	
// });

$(document).ready(function () {
	$("a[rel=lightbox.sig0]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig1]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig2]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig3]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig4]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig5]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig6]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig7]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig8]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=lightbox.sig9]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow' 		: false
			});
	$("a[rel=map]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'width'				:  800,
				'height'			:  620,
				'scrolling'			: 'no',
				'padding'			:  0,
				'overlayColor'		:  '#000',
				'overlayOpacity'	:  0.7,
				'titleShow'			: false
			});
});

function unblur() {
		this.blur();
}

function blurLinks() {
		if (!document.getElementById) return;
			theLinks = document.getElementsByTagName("a");
			for(i=0; i<theLinks.length; i++) {
				theLinks[i].onfocus = unblur;
	}
}

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
	 if (anchor.getAttribute("href") && anchor.href.indexOf("nolimitgmbh") == -1 && anchor.href.indexOf("javascript") == -1 && anchor.href.indexOf("tel") == -1) {
     anchor.onclick = function() { window.open(this.href); return false; };
	 anchor.title = "Externer Link in neuem Fenster";
  }
 } 
}

/*
IEHoverPseudo = function() {
if ((navigator.userAgent.indexOf("MSIE 5") != -1) || (navigator.userAgent.indexOf("MSIE 6") != -1) && (navigator.userAgent.indexOf("Opera") == -1)) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
*/

/*
function addCSS() {
if ((navigator.platform.indexOf("Mac") != -1)) {
var newSS=document.createElement('link');
newSS.rel='stylesheet';
newSS.href='/m/c/mac-hack.css';
newSS.type='text/css';
document.getElementsByTagName("head")[0].appendChild(newSS);
}
}
*/

function xFunktionen() {
	blurLinks();
	externalLinks();
//	IEHoverPseudo();
//	addCSS();
}

window.onload = xFunktionen;
