InventoryClass = function(){
	this.title = null;
	
	this.notify = function(html, title, cookieName){
		if(cookieName == undefined) cookieName = '';
		if (!getCookie('invSh'+cookieName, false)) {
			BodyMask.show();
			topOffest = 150;
			if (jQuery.support.allowFixed()	) {
				$('#inventory_notifier').parent().parent().css( { position: 'fixed', top: topOffest } );
			} else {
				$('#inventory_notifier').parent().parent().css( { position: 'absolute', top: topOffest + $(window).scrollTop() } );
			}
			$('#inventory_notifier_content').html(html);
			$('#inventory_notifier').stop(true).css( {opacity: 0}).show().fadeTo(333, 1);
			this.title = title;
			setCookie('invSh'+cookieName, 'true');
		}
	}
	
	this.hide = function(){
		pageTracker._trackEvent('Инвентаризация', this.title);
		$('#inventory_notifier').stop(true).fadeOut(333, 0, function(){$(this).hide()});
		BodyMask.hide();
	}
}

inventory = new InventoryClass();
