$(document).ready( function(){
	
	function followLink(href, target) {
		if (target!='_blank') {
			// open in same window
			var link=document.location.protocol+'//'+document.location.host+'/'+href;
			document.location.href=link;
		}
		else {
			// open new window
			window.open(href);
			return false;
		}
	}
	
	$('.tx-macpriprodukte-pi2 .produkte-small-wrap,.tx-macpriprodukte-pi5 .produkte-big-wrap').click(function() {
		var href=$(this).find('a').attr('href');
		if (href) {
			followLink(href);
		}
	});
	
	if (jQuery.browser.msie && jQuery.browser.version.substr(0,1)=="6") {
		// no hover for ie6

		// help the flash hints a bit
		$(document).ready( function() {
			$('.product-hint-more').css('border', '1px solid #ff0000');
			
		});
	}
	else {
		$('.produkte-small-wrap, .produkte-big-wrap, .content-info-right img, .product-wrap-1,.product-wrap-2, .content-single-left a img').mouseover(function() {
			$(this).addClass('hover');
		});


		$('.produkte-small-wrap, .produkte-big-wrap, .content-info-right img, .product-wrap-1,.product-wrap-2, .content-single-left a img').mouseout(function() {
			$(this).removeClass('hover');
		});
		
		// add hover for flash hints
		$('#hint-flash').mouseover(function() {
			$('.content-info-right a img, .content-single-left a img').addClass('hover');
		});


		$('#hint-flash').mouseout(function() {
			$('.content-info-right a img, .content-single-left a img').removeClass('hover');
		});
}
	
	// add link function to flash hint
	var link=$('.content-info-right a').attr('href');
	if (!link)
		var link=$('.content-single-left a').attr('href');
	
	if (link) {
		$('#hint-flash').click( function() {
			followLink(link, '_blank');
		});
	}
});
