$(document).ready(function(){
	$('.button ul li').children('a.plus').click(function(){
		$(this).parent().parent().parent().parent().hide();
		$(this).parent().parent().parent().parent().parent().children('div.portf_detail').fadeIn(1200,'swing');
	});
	$('.button ul li').children('a.minus').click(function(){
		$(this).parent().parent().parent().parent().hide();
		$(this).parent().parent().parent().parent().parent().children('div.portf_carousel').fadeIn(1200,'swing');
	});
	$('#addBox').click(function(){
		$('#addNewbox').fadeIn(500);
		$('#main').css('opacity', 0.7);
	});
	$('.close_btn').click(function(){
		$('#addNewbox').fadeOut(500);
		$('#main').css('opacity', 1);
	});
	$(".inner1").hover(function(){
		$(".inner2").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner3").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner4").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".inner2").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner3").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner4").stop().animate({"opacity": 1}, 200, 'swing');
	});
	$(".inner2").hover(function(){
		$(".inner1").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner3").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner4").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".inner1").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner3").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner4").stop().animate({"opacity": 1}, 200, 'swing');
	});
	$(".inner3").hover(function(){
		$(".inner2").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner1").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner4").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".inner2").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner1").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner4").stop().animate({"opacity": 1}, 200, 'swing');
	});
		$(".inner4").hover(function(){
		$(".inner2").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner3").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".inner1").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".inner2").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner3").stop().animate({"opacity": 1}, 200, 'swing');
		$(".inner1").stop().animate({"opacity": 1}, 200, 'swing');
	});
	$(".157").hover(function(){
		$(".159").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".159").stop().animate({"opacity": 1}, 200, 'swing');
	});
		$(".159").hover(function(){
		$(".157").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".157").stop().animate({"opacity": 1}, 200, 'swing');
	});
	$(".footerfirst").hover(function(){
		$(".footersecond").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerthird").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerfourth").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".footersecond").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerthird").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerfourth").stop().animate({"opacity": 1}, 200, 'swing');
	});
	$(".footersecond").hover(function(){
		$(".footerfirst").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerthird").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerfourth").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".footerfirst").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerthird").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerfourth").stop().animate({"opacity": 1}, 200, 'swing');
	});
		$(".footerthird").hover(function(){
		$(".footersecond").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerfirst").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerfourth").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".footersecond").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerfirst").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerfourth").stop().animate({"opacity": 1}, 200, 'swing');
	});
		$(".footerfourth").hover(function(){
		$(".footersecond").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerthird").stop().animate({"opacity": 0.4}, 200, 'swing');
		$(".footerfirst").stop().animate({"opacity": 0.4}, 200, 'swing');
	},function(){
		$(".footersecond").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerthird").stop().animate({"opacity": 1}, 200, 'swing');
		$(".footerfirst").stop().animate({"opacity": 1}, 200, 'swing');
	},function(){
		$('.sterk_sec a').hover(function(){
		$('.sterk_sec a').toggle('bounce',300)
	});});
});
$(document).ready(function() {
$('#slider img:first-child').addClass('active');
});
function slideSwitch() {
    var $active = $('#mobile_slideshow IMG.active');
 
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
 
    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#mobile_slideshow IMG:first');
 
    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );
 
 
    $active.addClass('last-active');
 
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}
 
$('a').live('touchend', function(e) {
    var el = $(this);
    var link = el.attr('href');
    window.location = link;
});
