	function checkKey(e){     switch (e.keyCode) {        case 39:            maxImg = jQuery('#max-image').html();		maxImg = Number(maxImg);		currentImg = jQuery('#current-image').html();		nextImg = Number(currentImg) + 1;		if (nextImg == maxImg + 1){		nextImg = 1;		}		jQuery('#current-image').html(nextImg);			jQuery('.image-galery-'+currentImg).fadeOut(800, function () {						jQuery('.image-galery-'+nextImg).fadeIn(800);			});            break;        case 37:           maxImg = jQuery('#max-image').html();		maxImg = Number(maxImg);		currentImg = jQuery('#current-image').html();		prevImg = Number(currentImg) - 1;		if (prevImg == 0){		prevImg = maxImg;		}		jQuery('#current-image').html(prevImg);		jQuery('.image-galery-'+currentImg).fadeOut(800, function () {						jQuery('.image-galery-'+prevImg).fadeIn(800);			});            break;            }      }if (jQuery.browser.mozilla) {    jQuery(document).keypress (checkKey);} else {    jQuery(document).keydown (checkKey);}jQuery(document).ready(function(){	jQuery('.fb').hover(function() { 		jQuery(this).stop().animate({"opacity": 0.7}); 	},function() { 		jQuery(this).stop().animate({"opacity": 1}); 	});	jQuery('.twitter').hover(function() { 		jQuery(this).stop().animate({"opacity": 0.7}); 	},function() { 		jQuery(this).stop().animate({"opacity": 1}); 	});	jQuery('.thumbnail-post').hover(function() { 		jQuery(this).stop().animate({"opacity": 0.8}); 	},function() { 		jQuery(this).stop().animate({"opacity": 1}); 	});	jQuery('.thumbnail-post-style2').hover(function() { 		jQuery(this).stop().animate({"opacity": 0.8}); 	},function() { 		jQuery(this).stop().animate({"opacity": 1}); 	});	jQuery('.thumbnail-home').hover(function() { 		jQuery(this).stop().animate({"opacity": 0.8}); 	},function() { 		jQuery(this).stop().animate({"opacity": 1}); 	});	jQuery('#btn-next').click(function() {		maxImg = jQuery('#max-image').html();		maxImg = Number(maxImg);		currentImg = jQuery('#current-image').html();		nextImg = Number(currentImg) + 1;		if (nextImg == maxImg + 1){		nextImg = 1;		}		jQuery('#current-image').html(nextImg);			jQuery('.image-galery-'+currentImg).fadeOut(800, function () {						jQuery('.image-galery-'+nextImg).fadeIn(800);			});	});	jQuery('#diaporama a').click(function() {		maxImg = jQuery('#max-image').html();		maxImg = Number(maxImg);		currentImg = jQuery('#current-image').html();		nextImg = Number(currentImg) + 1;		if (nextImg == maxImg + 1){		nextImg = 1;		}		jQuery('#current-image').html(nextImg);		jQuery('.image-galery-'+currentImg).fadeOut(800, function () {						jQuery('.image-galery-'+nextImg).fadeIn(800);			});	});	jQuery('#btn-prev').click(function() {		maxImg = jQuery('#max-image').html();		maxImg = Number(maxImg);		currentImg = jQuery('#current-image').html();		prevImg = Number(currentImg) - 1;		if (prevImg == 0){		prevImg = maxImg;		}		jQuery('#current-image').html(prevImg);		jQuery('.image-galery-'+currentImg).fadeOut(800, function () {						jQuery('.image-galery-'+prevImg).fadeIn(800);			});		});}); 
