switch_off_posteffects = false;

$(function(){

	// Банхаммер! Мазафакааа!!
	$("a.executioner").each(function()
	{
		$( this )
			.fancybox({
				'overlayOpacity': 0.8,
				'hideOnContentClick': false,
				'overlayColor': '#000',
				'centerOnScroll': true,
				'padding': 3,
				'titleShow': false,
				'href': $( this ).attr( "mobile" ) != 1 ? $( this ).attr( "href" ) + "&ajax=1" : $( this ).attr( "href" )
			});
	});

	// Последний пост в теме, Первый пост в теме
	$( "a.lastForumPost, a.firstForumPost" )
		.mouseover( function( event ) {
			Extratools.GetForumPost( $( this ) );
		});

	// Помощник
	$( "#myassistant" ).dialog( {
		'width': 600,
		'resizable': false,
		'zIndex': 99,
		'autoOpen': false,
		'modal': true
	} );

	// Служебные попапы
	$( "a.popup" )
		.fancybox({
			'overlayOpacity': 0.8,
			'hideOnContentClick': false,
			'overlayColor': '#000',
			'centerOnScroll': true,
			'padding': 3,
			'titleShow': false
		});

	// Загружаем полезные штуки xD
	if( !switch_off_posteffects )
	{
		var effects = Extratools.PostEffects();

		for( var effect in effects )
		{
			if( $.isFunction(effects[effect]) )
			{
				effects[effect]();
			}
		}
	}
});