/* ******************************************
front-end preparation (html, css, jQuery):
steffen heidemann / dev@steffenheidemann.com
****************************************** */

$(document).ready(function() {


	$('#sortby').selectBox();	

	/* fade div inhalt/content*/
	//$(".hide").stop().animate({"opacity": 0}, 0);
	//$(".fadeIn").stop().delay(400).animate({"opacity": 1}, 800, "easeInOutExpo");

	//$('.selectBox-options a').wrapInner('<span/>');

	/* hover catalogue index preview thumbs */
	
	/*$(".hov_2").live('mouseover', function() {
		$(this).stop().animate({"opacity": 1}, 250);
	});
	$(".hov_2").live('mouseout', function() {
		$(this).stop().animate({"opacity": 0}, 250);
	});*/

	/* slideOut-menu @ top // expand/collapse */
	$('.slideOut_btn').click(
		function() {
			$('#slideOut_area').slideToggle(500, "easeOutExpo");
			return false;
		}
	);
	
	/*$blog = $('.b-blog');
    $blog.imagesLoaded(function(){
        $blog.masonry({
            itemSelector: '.b-blog-anounce',
            columnWidth : 190,
            gutterWidth: 10,
            isFitWidth: true
        });
    }); */

	 $('.adress-href').toggle(function(){
	        $adress = $(this).nextAll('.adress');
        	$adress.css('height','auto');
	        $adress.find('p').show('slow');
        	$adress.css('padding','10px');
	    }, function(){
	        $adress = $(this).nextAll('.adress');
        	$adress.find('p').hide('slow');
	        $adress.animate({height:'3px'},250);
        	$adress.css('padding','0px');
	  });

   
	$('.b-product-details__shover').toggle(function() {
        	$(this).nextAll().show(250);
	        //$(this).find('img').attr({src:'/_img/_icons/icon-arrow2.png', width:16 , height:13});
		$(this).find('img').attr({src:'/_img/_icons/icon-arrow2.png'});
    	}, function() {		
        	$(this).nextAll().hide(250);
		//$(this).find('img').attr({src:'/_img/_icons/icon-arrow3.png', width:13, height:15});
		$(this).find('img').attr({src:'/_img/_icons/icon-arrow3.png'});
   	});

    $('.b-product-details__form .menu li').click(function(e){
        $this = $(this);
        if ($this.find('a').attr('class') != 'act') {
            $this.parent().find('i').toggleClass('divide1');
            $this.find('a').toggleClass('act').removeAttr('href');
            $this.siblings().find('a').toggleClass('act').attr('href','#');
        }

        e.preventDefault();
    });
	
	
});
