


$(function() {


	
	
				
		
		$('.maximize').live('click', function() { 
		
				var self = this;
				self.max = $('.max_content', self);
		
				if( $(self).hasClass('open') ) {
				
				 	$(self.max).hide(300);
				 	$(self).removeClass('open');
				
				 } else {
					$(self.max).show(300);
					$(self).addClass('open');
				
				 }
			 
				 return false;
				 
			});
		
	
		$('.versandkosten').fancybox({
		
					'opacity': true,
					'transitionIn'	:	'elastic',
					'transitionOut'	:	'fade',
					'speedIn'		:	300, 
					'speedOut'		:	100, 
					'overlayColor'	:	'#000',
					'overlayOpacity':	'0.6',
					'titleShow'		:	false
		
					});
	
	
		$('.fancybox').fancybox({
		
					'opacity': true,
					'transitionIn'	:	'elastic',
					'transitionOut'	:	'elastic',
					'speedIn'		:	500, 
					'speedOut'		:	300, 
					'overlayColor'	:	'#000',
					'overlayOpacity':	'0.7',
					'titleShow'		:	false
		
					});	
	
	
	
  var msie6 = $.browser == 'msie' && $.browser.version < 7;
  
  if (!msie6 && $('#warenkorb_mini').length > 0) {
    var top = $('#warenkorb_mini').offset().top - parseFloat( $('#warenkorb_mini').css('margin-top').replace(/auto/, 0) );
    $(window).scroll(function (event) {
      // what the y position of the scroll is
      var y = $(this).scrollTop();
      
      // whether that's below the form
      if (y >= top-35) {
        // if so, ad the fixed class
        $('#warenkorb_mini').addClass('fixed');
      } else {
        // otherwise remove it
        $('#warenkorb_mini').removeClass('fixed');
      }
    });
  } 
	
	
	
	
	
	
	
	
	
});

