Index: src/templates/EyeCandy/javascript/SubmenuHandler.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/templates/EyeCandy/javascript/SubmenuHandler.js	(revision fc6a03b1204b1471ed0f3d68a84e6e13c475d252)
+++ src/templates/EyeCandy/javascript/SubmenuHandler.js	(revision )
@@ -49,70 +49,68 @@
 	{
 		if(fb)console.log('SubmenuHandler init_binds');
 
+		if(typeof parentsIds != 'undefined') {
-		this.ie6_fix();
-        window.parentsIdsBak = $.extend([], parentsIds);
-        this.setCurrentsClasses();
-        
-		this.v_parent_ids_array = this.push_id(0, this.v_parent_ids_array);
-		this.find_loaded_submenus();
+			this.ie6_fix();
+			window.parentsIdsBak = $.extend([], parentsIds);
+			this.setCurrentsClasses();
+
+			this.v_parent_ids_array = this.push_id(0, this.v_parent_ids_array);
+			this.find_loaded_submenus();
 
-		$('.wrap_shop').die('click', coo_this.close_all);
+			$('.wrap_shop').die('click', coo_this.close_all);
-		$('.wrap_shop').live('click', function(){coo_this.close_all(true)});
+			$('.wrap_shop').live('click', function () {
+				coo_this.close_all(true)
+			});
 
-		$('.submenu li img').die('click', coo_this.open_link);
-		$('.submenu li img').live('click', coo_this.open_link);
+			$('.submenu li img').die('click', coo_this.open_link);
+			$('.submenu li img').live('click', coo_this.open_link);
 
-		$('.submenu li').die('mouseenter');
+			$('.submenu li').die('mouseenter');
-		$('.submenu li').live('mouseenter', function()
-		{
+			$('.submenu li').live('mouseenter', function () {
-			if(fb)console.log('.submenu li mouseenter');
+				if (fb)console.log('.submenu li mouseenter');
 
-			// clear title obscuring the menu
-			$(this).find('a').attr('title', '');
+				// clear title obscuring the menu
+				$(this).find('a').attr('title', '');
 
-			v_allow_close_all = false;
+				v_allow_close_all = false;
 
-			clearTimeout(v_timeout_close);
+				clearTimeout(v_timeout_close);
 
-			v_active_element = $(this).attr('id');
+				v_active_element = $(this).attr('id');
 
-			var t_coo_this = this;
+				var t_coo_this = this;
 
-			if(v_inactive_submenus_shown == true)
-			{
+				if (v_inactive_submenus_shown == true) {
-				v_timeout_open = setTimeout(function(){
+					v_timeout_open = setTimeout(function () {
-                    coo_this.open_menu(t_coo_this)
-                }, coo_this.v_delay_open);
-			}
-			// ignore open_delay if there are no submenus that could be left accidentally
+						coo_this.open_menu(t_coo_this)
+					}, coo_this.v_delay_open);
+				}
+				// ignore open_delay if there are no submenus that could be left accidentally
-			else
-			{
+				else {
-				if(fb)console.log('SubmenuHandler open_delay ignored')
+					if (fb)console.log('SubmenuHandler open_delay ignored')
-				coo_this.open_menu(t_coo_this);
-			}
-		});
+					coo_this.open_menu(t_coo_this);
+				}
+			});
 
-		$('.submenu li').die('mouseleave');
+			$('.submenu li').die('mouseleave');
-		$('.submenu li').live('mouseleave', function()
-		{
+			$('.submenu li').live('mouseleave', function () {
-			if(fb)console.log('.submenu li mouseleave');
+				if (fb)console.log('.submenu li mouseleave');
 
-			clearTimeout(v_timeout_open);
-			v_active_element = '';
-		});
+				clearTimeout(v_timeout_open);
+				v_active_element = '';
+			});
 
-		$('.submenu').die('mouseleave');
+			$('.submenu').die('mouseleave');
-		$('.submenu').live('mouseleave', function()
-		{
+			$('.submenu').live('mouseleave', function () {
-			if(fb)console.log('.submenu mouseleave');
+				if (fb)console.log('.submenu mouseleave');
 
-			v_allow_close_all = true;
+				v_allow_close_all = true;
 
-			if(typeof(gm_style_edit_mode_running) == 'undefined')
-			{
+				if (typeof(gm_style_edit_mode_running) == 'undefined') {
-				v_timeout_close = setTimeout(coo_this.close_all, coo_this.v_delay_close);
-			}
-        });
+					v_timeout_close = setTimeout(coo_this.close_all, coo_this.v_delay_close);
+				}
+			});
+		}
 	}
 
 
