/*
	Autor: Grzegorz Jaworek
	E-mail: grzegorz.jaworek@gmail.com
	www: http://gjaworek.pl 
	Tel.: +48 696 818 300
*/


jQuery(document).ready(function(){
	try {
		jQuery("div#makeMeScrollable img").animate({opacity: .3});
		jQuery('div#makeMeScrollable img').mouseover(function () { jQuery(this).animate({ opacity: 1 }, 200); });
		jQuery('div#makeMeScrollable img').mouseout(function () { jQuery(this).animate({ opacity: .3 }, 200); });
		jQuery(".imgBox img").animate({opacity: .9});
		jQuery('.imgBox img').mouseover(function () { jQuery(this).animate({ opacity: 1 }, 200); });
		jQuery('.imgBox img').mouseout(function () { jQuery(this).animate({ opacity: .9 }, 200); });
		jQuery("div#makeMeScrollable").smoothDivScroll({scrollingSpeed: 9, mouseDownSpeedBooster: 2, autoScroll: "onstart", autoScrollDirection: "backandforth", autoScrollSpeed: 1, startAtElementId: "startAtMe"});
		jQuery("a.imgBox").fancybox();	
		if (jQuery('#project-'+currentPage+' .thumb-page').size() > 1 ) jQuery('#page-prev, #page-next').show() ;
		//jQuery('#projectDesc').css('top', parseInt((jQuery('#projectDescWrap').height()-jQuery('#projectDesc').height())/2)-1);
		jQuery('#project-'+currentPage).cycle({ 
			fx:     'fade', 
			speed:  0, 
			timeout: 0, 
			prev:  '#page-prev',
			next:  '#page-next'
		});
	} catch(err) {}
});
