$(document).ready(function() {
	$('a').click(function() { $(this).blur(); });
	
	$('div.hoverbox').hover(function() {
		//$(this).children('div.overlay').fadeIn('fast');
		$(this).children('div.overlay').show();
	},
	function() {
		//$(this).children('div.overlay').fadeOut('fast');
		$(this).children('div.overlay').hide();
	});
	$('div.hoverbox').hover(function() {
		$(this).children('div.overlaytext').fadeIn('fast');
	},
	function() {
		$(this).children('div.overlaytext').fadeOut('fast');
	});
	// tabbing initialisieren
	$('#product div.body').tabs();
	$('#product div.body').tabs('select',0);


	$('#hovernavi').hover(function() {
		$(this).addClass('active');
	},
	function() {
		$(this).removeClass('active');
	});	
	
	$('div#navigation ul li').hover(function() {
		$(this).addClass('over');
	},
	function() {
		$(this).removeClass('over');
	});
	
	$('div.neu').hover(function() {
		$(this).addClass('over');
	},
	function() {
		$(this).removeClass('over');
	});
	
	$('div.icon').hover(function() {
		$(this).addClass('over');
	},
	function() {
		$(this).removeClass('over');
	});
		
	
	$('div#hovernavi ul li').hover(function() {
		if(!$(this).hasClass('top') && !$(this).hasClass('bottom')) {
			$(this).addClass('over');
		}
	},
	function() {
		if(!$(this).hasClass('top') && !$(this).hasClass('bottom')) {
			$(this).removeClass('over');
		}
	});
	
	$('div#subnavi ul li').hover(function() {
		$(this).addClass('over');
	},
	function() {
		$(this).removeClass('over');
	});
	$('a#bookmark').click(function(e)
	{
	  //getting height and width of the message box
	  var height = $('#bookmarkbox').height();
	  var width = $('#bookmarkbox').width();
	  //calculating offset for displaying popup message
	  var pos = $('a#bookmark').position();
	  leftVal=pos.left-width+$('a#bookmark').width()-20+"px";
	  topVal=pos.top-height-30+"px";
	  //show the popup message and hide with fading effect
	  $('#bookmarkbox').css({left:leftVal,top:topVal}).fadeIn('slow');
	});	
	$('a#bookmark_close').click(function(e)
	{
		$('#bookmarkbox').fadeOut('slow');	
	});
});



