$(document).ready(function(){
	//target blank
	$("a[@href^='http://']").attr('target','_blank');
	$("a[@href^='http://']").addClass('extern');
	
	
	$("a[@href$=.pdf]").addClass('pdf');
	$("a[@href$=.doc]").addClass('doc');
	$("a[@href$=.xls]").addClass('xls');
	$("a[@href$=.docx]").addClass('docx');
	$("a[@href^=mailto]").addClass('mailto');
	
	$("ul li:first-child").addClass('first');
	$("ul li:last-child").addClass('last');


	//for special effects in the navi
	$('#navigation ul ul').parent().addClass('sub');
	
	//fix the corner for hovers
	$('#navigation ul ul').parent().mouseover(function(){
		$(this).children('a').addClass('corner');
	});
	$('#navigation ul ul').parent().mouseout(function(){
		$(this).children('a').removeClass('corner');
	});
		
	
	$('#navigation li.sub').mouseover(function(){
		$(this).addClass('hover');
	});
	
	$('#navigation li.sub').mouseout(function(){
		$(this).removeClass('hover');
	});




	if (document.attachEvent)
	{
		// Suckerfish Hovers
		var sfEls = document.getElementById("navigation").getElementsByTagName("UL")[0].getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}


	//mobile.de
	$('.mobile_de_details .mainpic a,.mobile_de_details .extrapics a').fancybox({
				'zoomSpeedIn':	300, 
				'zoomSpeedOut':	300
	});
	
	
	
});
