/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

	function FrontEnd()
	{
		var self = this;
		
		FrontEnd.prototype.init = 
			function () {
				jQuery('#menu-profileId').click(
					function(e) {
						return showModalWindow({href : this.href, title : this.title});
					}
				);

				jQuery.preload([ 'over_home', 'over_admin', 'over_register', 'over_basket', 'over_login', 'over_logout'], {
					base:'/img/MainNav/',
					ext:'.png'
				});

				jQuery('.clossSystemMessage').live(
					'click',
					function(e) {
						jQuery.ajax({
							type	: "POST",
							dataType: "json",
							async	: false,
							data	: {messageHash: jQuery(this).attr('lang')},
							url 	: '/main/systemmessage/close',
							success	: function (answer) {
								if (!answer) {
									alert(
										'Sorry we can not hide ' 
										+ 'this message try latter please'
									);
								} else {
									jQuery('#systemMessagePlaceHolderId > div')
										.fadeOut(
											'fast', 
											function () {
												jQuery(this).parent().remove()
											}
										);
								}
							},
							error	: function () {
								alert('Error happened');
							}
						});
					}
				);
			}
		
		self.init();
	}



