// If JavaScript is not enabled the blocks will be visible
document.write("<style>.hide {display:none;}<\/style>");
$(document).ready(function(){
	/* Collapse portfolio list years blocks
	$('.year').click(function(){
		var y = $(this).attr('id');
		$('#y'+y).toggle('slow');
	});
	// Open year block from anchor in url
	var l = document.location.toString();
	if (l.match('#')) {
		var ly = l.split('#')[1];
		if($('#y'+ly).is(':hidden')){
			$('#y'+ly).show(0);
		}
	} */
	var l = document.location.toString();
	if (l.match('#')) {
		var ly = l.split('#')[1];
		$('a#'+ly).addClass('hover');
	}
	// Hash (anchor) scroller
	$.localScroll.hash({
		queue:true,
		duration:2000
	});
	/* Portfolio item next and previos arrows with site image preview */
	$('#next a, #prev a').hover(function(){
		$(this).children(".preview").fadeIn('slow');
	},function(){
		$(this).children(".preview").stop(true,true).fadeOut('slow');
	});
	
});