	/*
$(document).mousedown(function(e) { 

	if (!$(e.target).parents('#emm-left').length) {
			var elem = $('li#emm-left > a');
					elem.next().slideUp(100);
					elem.removeAttr('id');
		}

};
	*/
$(document).ready(function(){

	// calculate the maxHeight of tabs` content
	var maxHeight=0;
	var content=$(".c_box_content");
	content.each(function(){
		if (this.offsetHeight>maxHeight) {maxHeight=this.offsetHeight;}
	});
	content.height(maxHeight+"px");	

	// bannerek
	var timeoutId = 0;
	$('#mb').hover(function() {
		$('#mb span').stop(true,true);
		if ($('#mb span').is(':hidden')) {
			timeoutId = setTimeout(function(){
							$('#mb span').slideDown('fast');
						},500);
		}
		
	}, function() {
		clearTimeout(timeoutId);
		$('#mb span').slideUp('fast');
	});


	if ($.isFunction($("body").prettyPhoto)) {
		$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 'normal', /* fast/slow/normal */
			padding: 30, /* padding for each side of the picture */
			opacity: 0.35, /* Value betwee 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: true, /* true/false */
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_square' /* light_rounded / dark_rounded / light_square / dark_square */
		});
	}

});
