/**
 *@author svenb
 */

$(document).ready(function(){
	
	/*Anchor Scrolling*/
	if (!$.browser.opera) {
		
		$('a[href*=#x], area[href*=#x]').click(function(){
			if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &&
			location.hostname == this.hostname) {
			
				var $target = $(this.hash);
				$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
				
				if ($target.length) {
				
					var targetOffset = $target.offset().top;
					
					$('html,body').animate({
						scrollTop: targetOffset
					}, 1000);
					
					return false;
				}
			}
		});
	}
    
	/*Grossansicht einblenden*/
	$("a.grossansicht").click(function () {
		$('div.produkt').css('z-index', '2');
		$('div.bigview').hide('fast');
		$(this).parent().parent().css('z-index', '2000');	
		$(this).parent().parent().find('div.bigview').show('fast');
    });
	
	/*Grossansicht ausblenden*/
	$("area.closeBigView").click(function () { 
		$('div.bigview').hide('fast');
	});
		
});
