
var Zself = {};

Zself.hideChrome = function () {
	if (!location.hash) {
	    setTimeout(function(){
	        window.scrollTo(0,1);
	        //DEBUG: Workaround, since sometimes the window does not scroll.
	        setTimeout(function(){
	        window.scrollTo(0,0);
	        }, 0);
	    }, 0);
	}
}



$(document).ready(function () {

    /*image overstate*/

    $(".image-text").hide();
    $(".image-category").hide();
    $('.image-text').css('opacity', '0.8');
    $('.image-wrapper').click(function () {
        window.location = $(this).children('a').attr('href');
    });

    $(".image-wrapper").hover(function () {
        $(this).children().children(".image-text, .image-category").fadeIn('50');
    }, function () {
        $(this).children().children(".image-text, .image-category").fadeOut('50');
    });
    
});

// Execute scripts
window.onload = function () {
	Zself.hideChrome();
}
