PageSourceSearch

https://www.moda2ruote.it/catalog/view/javascript/journal/journal.js

js moda2ruote.it collected 2026-10-06 13:17:04 UTC 23,785 bytes, 768 lines download raw bytes

1try {
2// special timer
3function getSpecialTimer(special_timer, special_timer_id, text_days, text_promo_expired){
4    
5	var countDownDate = new Date(special_timer).getTime();
6
7	var x = setInterval(function() {
8
9	  var now = new Date().getTime();
10
11	  var distance = countDownDate - now;
12
13	  var pad = "00";
14	  
15	  var days = Math.floor(distance / (1000 * 60 * 60 * 24));
16	  var hours = "" + Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
17	  var minutes = "" + Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
18	  var seconds = "" + Math.floor((distance % (1000 * 60)) / 1000);
19	  
20	  hours = pad.substring(0, pad.length - hours.length) + hours;
21	  minutes = pad.substring(0, pad.length - minutes.length) + minutes;
22	  seconds = pad.substring(0, pad.length - seconds.length) + seconds;
23
24      if(days > 0){
25        var timer = days + text_days + " " + hours + ":" + minutes + ":" + seconds;   
26      }else{
27        var timer = hours + ":" + minutes + ":" + seconds;
28      }
29      
30      $("#" + special_timer_id).html(timer).fadeIn('fast');
31
32	  if (distance < 0) {
33		clearInterval(x);
34		$("#" + special_timer_id).html(text_promo_expired).removeClass("timer_on").addClass("timer_off").fadeIn('fast');
35	  }
36	}, 200);
37}
38
39// cart hover
40function add_cart_hover() {
41	var $cart = $('#cart');
42	var timeout;
43	$('section.cart').die('mouseover').die('click').live('mouseover', function() {
44		if ($cart.hasClass('journal-active')) return false;
45
46		$cart.addClass('journal-active');
47
48		if ($('html').hasClass('ie8') || $('html').hasClass('safari5')) {
49			$cart.addClass('active');
50		}
51
52		$cart.topZIndex();
53
54		$cart.load('index.php?route=module/cart #cart > *', function() {
55			if (!$cart.hasClass('journal-active')) return false;
56			clearTimeout(timeout);
57			timeout = setTimeout(function(){
58				$cart.addClass('active');
59				$cart.topZIndex();
60				$('#cart .content').topZIndex();
61			}, 100);
62		});
63	});
64	$cart.die('mouseleave').live('mouseleave', function(){
65		clearTimeout(timeout);
66		$cart.removeClass('active').removeClass('journal-active');
67	});
68}
69
70// overwrite add to cart click
71function add_cart_click() {
72	var $cart = $('#cart');
73	if ($('.android').length) {
74		$("#cart").click(function(){
75			parent.window.location = "index.php?route=checkout/cart";
76		});
77		return;
78	}
79	var timeout;
80	$('#cart .heading a').die('mouseover').die('click').live('click', function() {
81		if ($cart.hasClass('active')) {
82			clearTimeout(timeout);
83			$cart.removeClass('active');
84		} else {
85			$cart.load('index.php?route=module/cart #cart > *', function() {
86			timeout = setTimeout(function(){
87				$cart.addClass('active');
88				$cart.topZIndex();
89			}, 100);
90		});
91		}
92	});
93	$cart.die('mouseleave');
94}
95
96function addToCart(product, quantity, product_type, merchant_code, product_value, currency, fbq_active) {
97	quantity = typeof(quantity) != 'undefined' ? quantity : 1;
98	$.ajax({
99		url: 'index.php?route=checkout/cart/add',
100		type: 'post',
101		data: {'product_id' : product, 'quantity' : quantity, 'product_type' : product_type, 'merchant_code' : merchant_code},
102		dataType: 'json',
103		success: function(json) {
104			$('.success, .warning, .attention, .information, .error').remove();
105
106			if (json['redirect']) {
107				location = json['redirect'];
108			}
109			
110			if (json['affiliate_redirect']) {
111				location = json['affiliate_redirect'];
112			}
113
114			if (json['success']) {
115				
116				if(fbq_active === 1){
117					fbq('track', 'AddToCart', {
118						content_ids: product,
119						content_type: 'product',
120						value: product_value,
121						currency: currency
122					});
123				}
124				
125				if(DIRECT_CHECKOUT){
126					location = 'index.php?route=checkout/cart';
127				}else if (typeof(custom_notifier) == "function") {
128					custom_notifier(json['success']);
129				} else {
130					$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/journal/images/close.png" alt="" class="close" /></div>');
131					$('.success').fadeIn('slow');
132					$('html, body').animate({ scrollTop: 0 }, 'slow');
133				}
134
135				$('#cart-total').html(json['total']);
136			}
137		}
138	});
139}
140
141function addToWishList(product, product_type, merchant_code) {
142	$.ajax({
143		url: 'index.php?route=account/wishlist/add',
144		type: 'post',
145		data: {'product' : product, 'product_type' : product_type, 'merchant_code' : merchant_code},
146		dataType: 'json',
147		success: function(json) {
148			$('.success, .warning, .attention, .information').remove();
149
150			if (json['success']) {
151				if (typeof(custom_notifier) == "function") {
152					custom_notifier(json['success']);
153				} else {
154					$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/journal/images/close.png" alt="" class="close" /></div>');
155					$('.success').fadeIn('slow');
156					$('html, body').animate({ scrollTop: 0 }, 'slow');
157				}
158
159				$('#wishlist-total').html(json['total']);
160			}
161		}
162	});
163}
164
165function addToCompare(product, product_type, merchant_code) {
166	$.ajax({
167		url: 'index.php?route=product/compare/add',
168		type: 'post',
169		data: {'product' : product, 'product_type' : product_type, 'merchant_code' : merchant_code},
170		dataType: 'json',
171		success: function(json) {
172			$('.success, .warning, .attention, .information').remove();
173
174			if (json['success']) {
175				if (typeof(custom_notifier) == "function") {
176					custom_notifier(json['success']);
177				} else {
178					$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/journal/images/close.png" alt="" class="close" /></div>');
179					$('.success').fadeIn('slow');
180					$('html, body').animate({ scrollTop: 0 }, 'slow');
181				}
182
183				$('#compare-total').html(json['total']);
184			}
185		}
186	});
187}
188
189function place_super_menu_divider() {
190	$('.mega-menu-divider').remove();
191	var n = WIDE_LAYOUT ? 5 : 4;
192	if ($(window).width() < 1220) n = 4;
193	if ($(window).width() < 980) n = 3;
194	if ($(window).width() < 760) return;
195	$('.mega-menu').each(function(){
196		var row = 0;
197		var i = 0;
198		$(this).find('.mega-menu-item').each(function(){
199			$(this).attr('data-row', row);
200			i++;
201			if (i == n) {
202				$(this).after($('<div class="mega-menu-divider"></div>'));
203				i=0;
204				row++;
205			}
206		});
207		row++;
208		for (var i=0; i<row; i++) {
209			var max = 0;
210			var max2 = 0;
211			$(this).find('.mega-menu-item[data-row=' + i + ']').each(function(){
212				max = Math.max(max, $(this).attr('data-height'));
213			});
214			$(this).find('.mega-menu-item[data-row=' + i + ']').each(function(){
215				$(this).css('height', parseInt(max) + 20);
216			});
217			// if($('html').hasClass('ipad')) {
218			// 	console.log(max2);
219			// 	$(this).css('height', 28 * max2 + 'px');
220			// 	// $(this).find('.mega-menu-item').css('min-height', 28 * max2 + 'px');
221			// }
222		}''
223	});
224}
225
226$(function(){
227	var isIPad = $('html').hasClass('ipad');
228	$('.mega-menu-item').each(function(){
229		if (isIPad) {
230			$(this).attr('data-height', $('> ul > li', this).length * 25);
231		} else {
232			$(this).attr('data-height', $(this).height());	
233		}
234		// console.log('data-height: ' + $(this).attr('data-height'));
235	});
236	place_super_menu_divider();
237	$(window).resize(function(){
238		place_super_menu_divider();
239	});
240});
241
242//responsive
243function responsive_980() {
244	if( $(window).width() < 980 && responsive_design ){
245		$('.product-info .image a').removeClass('zoom').addClass('colorbox');
246		$('#journal-header .cart').before($('#journal-header .welcome'));
247		$('#journal-header .cart').before($('#journal-header #search'));
248		$('.top-row').after($('.fb'));
249		$('.fb-box').hide();
250		add_cart_click();
251	} else {
252		$('#journal-header #search').before($('#journal-header .cart'));
253		$('#journal-header .welcome').before($('#journal-header .cart'));
254		$('.fb-box').show();
255		$('.fb').appendTo($('.fb-box'));
256		add_cart_hover();
257	}
258}
259
260function responsive_980_android() {
261	if( $(window).width() < 980 && responsive_design ){
262		$('.product-info .image a').removeClass('zoom').addClass('colorbox');
263		$('#journal-header .cart').before($('#journal-header .welcome'));
264		$('.top-row').after($('.fb'));
265		$('.fb-box').hide();
266		add_cart_click();
267	} else {
268		$('#journal-header .welcome').before($('#journal-header .cart'));
269		$('.fb-box').show();
270		$('.fb').appendTo($('.fb-box'));
271		add_cart_hover();
272	}
273}
274
275function responsive_760(){
276	if (!responsive_design) return;
277	$('#menu > ul li.open').unbind('click');
278	if( $(window).width() < 760 ){
279		enable_mobile_menu();
280
281		$('.login-content .left').before($('.login-content .right'));
282		$('#powered div p').appendTo( $('#powered div'));
283		return;
284	}
285	disable_mobile_menu();
286	$('.login-content .right').before($('.login-content .left'));
287}
288
289function responsive_470(){
290	if( $(window).width() < 470 ){
291		$('.checkout-product tfoot tr td:first-child').each(function(){
292			$(this).attr('colspan','3');
293		});
294		$('.top-links a').each(function(){
295			if ($(this).find('img').length > 0) {
296				$(this).find('span').hide();
297			}
298		});
299	} else{
300		$('.checkout-product tfoot tr td:first-child').each(function(){
301			$(this).attr('colspan','4');
302		});
303		$('.top-links a').each(function(){
304			if ($(this).find('img').length > 0) {
305				$(this).find('span').show();
306			}
307		});
308	}
309}
310
311(function($){
312
313	// add responsive class if enabled
314	if (responsive_design) {
315		$('html').addClass('responsive');
316		$(function(){
317			if ($('html').hasClass('android')) {
318				responsive_980_android();
319			}else{
320				responsive_980();
321			}
322			responsive_760();
323			responsive_470();
324		});
325		$(window).resize(function(){
326			//mega-menu dropdown
327			$('.dropdown-menu').each(function() {
328				var x = $('#super-menu > ul > li').not(".open").width() + "px";
329				$(this).css("min-width", x);
330			});
331			if ($('html').hasClass('android')) {
332				responsive_980_android();
333			}else{
334				responsive_980();
335			}
336			responsive_760();
337			responsive_470();
338		});
339
340	} else {
341		$(function(){
342			add_cart_hover();
343		});
344	}
345
346})(jQuery);
347
348(function($){
349
350
351	//hide preloader
352	$(window).load(function(){
353		$(".loader").fadeOut(250);
354	});
355
356	$(function(){
357
358		/* change first and last links on pagination */
359		(function(){
360			var $pag_first_link = $('.pagination .links a:first-child');
361			if ($pag_first_link.html() === '|&lt;') {
362				$pag_first_link.html('&#171;');
363			}
364			var $pag_last_link = $('.pagination .links a').last();
365			if ($pag_last_link.html() === '&gt;|') {
366				$pag_last_link.html('&#187;');
367			}
368		})();
369
370		/* products image effects */
371		(function(){
372			var $img = $('#image');
373			if (!$img.length) return;
374			var options = {};
375
376			/* global options */
377			options.cursor = "pointer";
378
379			if (CLOUD_ZOOM_TYPE === "inner") {
380				/* inner options */
381				options.zoomType = "inner";
382			} else {
383
384			}
385
386			if (!$('html').hasClass('mobile')){
387				if ($img.elevateZoom) {
388					$img.elevateZoom(options);
389				}
390
391			}
392
393			$('.product-info .image-additional a').click(function(e){
394				var $img = $('#image');
395				if (!$img.length) return false;
396				/* change big thumb */
397				$img.attr('src', $(this).attr('href'));
398				$img.parent().attr('href', $(this).attr('href'));
399				/* change zoom image */
400				if (!$('html').hasClass('mobile')){
401					$img.data('elevateZoom').swaptheimage($(this).attr('href'), $(this).attr('href'));
402				}
403				return false;
404			});
405
406		})();
407
408		/* enable swipebox gallery */
409		(function(){
410			if($('#swipebox .swipebox').length) {
411				$('.zoomContainer, #cboxOverlay, #colorbox').remove();
412				$('#first-a').click(function(e){
413					if ($('html').hasClass('ie8')) {
414						return false;
415					}
416					if($(e.target).is('#image')) {
417						var url = $(this).attr('href');
418						$('#swipebox a[href="' + url + '"]').first().click();
419					}
420					return false;
421				});
422			}
423		})();
424
425		if ($('.swipebox').length) {
426			$('.swipebox').swipebox();
427		}
428
429		// /* journal gallery */
430		// $('.journal-gallery').each(function(){
431		// 	var $sb = $(this).find('.swipebox');
432		// 	$sb.click(function(e, data){
433		// 		console.log($('#swipebox-overlay').length);
434		// 		if (data) return;
435		// 		$('#swipebox-overlay').remove();
436		// 		$sb.swipebox();
437		// 		$(this).trigger('click', true);
438		// 		return false;
439		// 	});
440		// 	// var imgs = [];
441		// 	// $(this).find('.swipebox').each(function(){
442		// 	// 	imgs.push({
443		// 	// 		href: $(this).attr('href'),
444		// 	// 		title: $(this).attr('title')
445		// 	// 	});
446		// 	// });
447		// 	// $(this).find('.swipebox').click(function(){
448		// 	// 	$.swipebox(imgs);
449		// 	// 	console.log($.swipebox);
450		// 	// 	return false;
451		// 	// })
452		// });
453
454		// $('.swipebox').swipebox();
455
456		/* opera menu fix */
457		(function(){
458			if ($('html').hasClass('opera')) {
459
460				$('.sf-menu > li').each(function(){
461             		$(this).hover( function(){
462						$(this).height($('ul', this).height() + 300);
463						$(this).css('background-color','transparent');
464						$('> a', this).css({'background-color':'#ea2e49', 'height':'40px'});
465
466				    },  function(){
467				        $(this).height(40);
468			    	    $('> a', this).css('background-color','transparent');
469				    });
470
471			    	$('.sf-menu > li > ul').css('top','40px');
472				});
473
474				$('#menu > ul').css('border-right', 'none !important');
475				$('#menu > ul > li').addClass('noborder').each(function(){
476					$(this).mouseover(function(){
477						if ($(this).find('div').length) {
478							$(this).attr('data-old-height', $(this).height());
479							$(this).css('height', parseInt($(this).find('div').height()) + parseInt($(this).height()));
480						}
481					});
482					$(this).mouseout(function(){
483						$(this).css('height', $(this).attr('data-old-height'));
484					});
485				});
486			}
487		})();		
488
489		/* disable default cart event */
490		$('#cart > .heading a').die('click');
491
492		//add sequential class names to menu items
493		$('.top-links a').each(function(i) {
494			$(this).addClass('item'+(i+1));
495		});
496
497		$('#menu > ul > li > a, #menu .sf-menu > li a').each(function(i) {
498			$(this).addClass('link'+(i+1));
499		});
500
501		$('#menu > ul > li > div ul li a').each(function(i) {
502			$(this).addClass('sub-link'+(i+1));
503		});
504
505		//sort orders
506		$('#cboxOverlay').topZIndex();
507		$('#colorbox').topZIndex();
508		$('#cboxWrapper > div:eq(1)').topZIndex();
509		$('.loader').topZIndex();
510
511		//positions
512		$('header').after($('.breadcrumb'));
513		$('.home').parent().addClass('home-container');
514		$('.tags a:empty').parent().hide();
515		
516		if (!$('html').hasClass('safari5')) {
517			$('<div class="column-head"></div>').prependTo($('#column-right'));
518			$('<div class="column-head"></div>').prependTo($('#column-left'));
519			// side column full height background
520			var cr = $('#column-right').parent();
521			cr.prepend($('<div class="side-shade"></div>'));
522			var cl = $('#column-left').parent();
523			cl.prepend($('<div class="side-shade2"></div>'));
524			var liActive = $('#column-right .box-content ul li a.active').parent();
525			liActive.addClass('active');
526			if ($('#column-right').length > 0){
527				$('.side-shade2').hide();
528			}
529		}
530		
531		$('#content h1').prependTo($('#content'));
532
533		//Blog Manager
534		$('.relProduct').css('width','');
535		$('a.button span').contents().unwrap();
536		$('.boxPlain').removeClass('boxPlain');
537		$('#column-right .recentComments, #column-right .popularArticles, #column-right .recentArticles, #column-left .recentComments, #column-left .popularArticles, #column-left .recentArticles').parent().removeClass('box-content').addClass('box-product');
538		$('#column-right .recentComments, #column-right .popularArticles, #column-right .recentArticles, #column-left .recentComments, #column-left .popularArticles, #column-left .recentArticles').each(function(){ $(this).addClass('prod');});
539		$('#tab-related-article').appendTo( $('#content'));
540		$('#tab-related-article > ul > li').each(function(){
541			var a1 = $(this).find('a').first();
542			var a2 = a1.next();
543			a2.insertBefore(a1);
544		});
545
546
547		//categories menu flexible width
548		$('#menu > ul > li > div > ul > li').each(function() {
549			var x = $(this).parent().parent().parent().width() + "px";
550			//$(this).css("min-width", x);
551			//$('.-moz- #menu > ul > li > div > ul').css("width", x);
552		});
553
554		//super fish
555		$('#menu .sf-menu > li ul').each(function() {
556			var x = $('#menu .sf-menu > li').not(".open").width() + "px";
557			$(this).css("min-width", x);
558		});
559
560		//mega-menu dropdown
561		$('.dropdown-menu').each(function() {
562			var x = $('#super-menu > ul > li').not(".open").width() + "px";
563			$(this).css("min-width", x);
564		});
565
566		var xx = $('.super-menu > li').not(':has(.dropdown-menu, .mega-menu, .brands-menu, .product-menu)');
567		xx.addClass('no-span');
568
569		/* ie8 hover fix !*/
570		$('.ie8 #menu > ul > li').hover(function(){
571			$(this).find('div').css('filter', 'alpha(opacity=100)');
572		}, function(){
573			$(this).find('div').css('filter', 'alpha(opacity=0)');
574		});
575
576		//center additonal product images if < 6
577		var count = $('.product-info .image-additional').children().length;
578		if(count < 6){
579		$('.product-info .image-additional').css('text-align','center');
580		}
581
582		//journal banners min-height
583		count = $('.journal-boxes ul').children().length;
584		if(count > 1){
585		$('.journal-boxes ul').css('min-height','100px');
586		}
587
588		$('#content .welcome + p').addClass('welcome-copy');
589
590		//border for login screen
591		$('<hr>').insertBefore($('.login-content .button'));
592
593		if(!$('.breadcrumb').next().is($('#container'))){
594			$('.breadcrumb').css('border','none');
595		}
596		$('.breadcrumb a').addClass('breadcrumbs');
597
598		$(window).scroll(function () {
599			if ($(this).scrollTop() > 300) {
600				$('.back-top').fadeIn();
601			} else {
602				$('.back-top').fadeOut();
603			}
604		});
605
606		// scroll body to 0px on click
607		$('.back-top').click(function () {
608			$('body, html').animate({
609				scrollTop: 0
610			}, 800, "easeInOutQuart");
611			return false;
612		});
613
614		/* enable sale badge */
615		if (DECIMAL_POINT === ',') {
616			$.Calculation.setDefaults({
617				// a regular expression for detecting European-style formatted numbers
618				reNumbers: /(-?\$?)(\d+(\.\d{3})*(,\d{1,})?|,\d{1,})/g
619				// define a procedure to convert the string number into an actual usable number
620				, cleanseNumber: function (v){
621				// cleanse the number one more time to remove extra data (like commas and dollar signs)
622				// use this for European numbers: v.replace(/[^0-9,\-]/g, "").replace(/,/g, ".")
623					return v.replace(/[^0-9,\-]/g, "").replace(/,/g, ".");
624				}
625			});
626		}
627
628		$('.price').each(function(){
629			var $price_old = $(this).find('.price-old');
630			var $price_new = $(this).find('.price-new');
631			if ($price_old.length && $price_new.length) {
632				var o = $price_old.parseNumber();
633				var n = $price_new.parseNumber();
634				var disc = Math.round((o - n) / o * 100);
635				$(this).find('.sale').html('-' + disc + '%');
636			}
637		});
638                
639        if($('.sale_product').length){
640            $(".sale_product").prependTo(".image");
641        }
642
643		/* hide shopping cart on window resize */
644		$(window).resize(function(){
645			$("#cart").removeClass('active');
646		});
647
648		$.curCSS = $.css;
649
650		/* custom blocks animation */
651		$('.custom-block-left .custom-block-icon').hoverIntent(function(){
652			$(this).parent().stop().animate({'left' : '0px'});
653		});
654
655		$('.custom-block-left .custom-block-content').mouseleave(function(){
656			var x = $(this).parent().width();
657			$(this).parent().stop().animate({'left': 0 - x});
658		});
659
660		$('.custom-block-right .custom-block-icon').hoverIntent(function(){
661			$(this).parent().stop().animate({'right' : '0px'});
662		});
663
664		$('.custom-block-right .custom-block-content').mouseleave(function(e){
665			var y = $(this).parent().width();
666			$(this).parent().stop().animate({'right' : 0 - y});
667		});
668
669		/* mega menu */
670		$('.mega-menu-sub').hover(function(){
671			$(this).closest('.mega-menu-item').find('img').attr('src', $(this).attr('data-img'));
672		}, function(){
673			$(this).closest('.mega-menu-item').find('img').attr('src', $(this).closest('.mega-menu-item').find('.mega-menu-top').attr('data-img'));
674		});
675
676		/* carousel */
677		// $('.journal-carousel').each(function(){
678		// 	var $this = $(this);
679		// 	$this.attr('data-pos', 0);
680		// 	$('<a class="prev"></a>').appendTo($this).click(function(){
681		// 		var $box = $(this).parent();
682		// 		var $item = $box.find('.box-product > div').first();
683		// 		var $box_product = $(this).parent().find('.box-product');
684		// 		var count = Math.floor($box.width() / $item.width());
685		// 		var px = count * ($item.width() + parseInt($item.css('margin-right')));
686		// 		var min = parseInt($box_product.css('left'));
687		// 		px += 20;
688		// 		px = Math.min(px, -min);
689		// 		$box_product.animate({'left':'+=' + px}, 280);
690		// 		return false;
691		// 	});
692		// 	$('<a class="next"></a>').appendTo($this).click(function(){
693		// 		var $box = $(this).parent();
694		// 		var $item = $box.find('.box-product > div').first();
695		// 		var $box_product = $(this).parent().find('.box-product');
696		// 		var count = Math.floor($box.width() / $item.width());
697		// 		var passed = Math.floor(-parseInt($box_product.css('left')) / $item.width());
698		// 		console.log(passed);
699		// 		var px = count * ($item.width() + parseInt($item.css('margin-right')));
700		// 		var min = parseInt($box_product.css('left'));
701		// 		var max = ($box.find('.box-product > div').length - count) * ($item.width() + parseInt($item.css('margin-right')));
702		// 		console.log(max, min-px);
703		// 		px = Math.min(px, max-min);
704		// 		px += 20;
705		// 		$box_product.animate({'left':'-=' + px}, 280);
706		// 		return false;
707		// 	});
708		// });
709	});
710})(jQuery);
711
712var journal_mobile_events = false;
713
714
715function enable_mobile_menu() {
716	if (journal_mobile_events) return;
717	journal_mobile_events = true;
718
719	$('#menu > ul, #menu .sf-menu, .super-menu').addClass('mobile-nav');
720	$('.mobile-nav a + ul, .mobile-nav a + div').addClass('menu-hide');
721
722	var $li = $('#menu > ul > li, #super-menu > ul > li').not('.open').addClass('menu-hide');
723
724	$('.mobile-nav li a span').addClass('rotate-0');
725
726	$('.mobile-nav .open').die('click').live('click', function(e){
727		e.stopPropagation();
728		$li.toggleClass('menu-hide');
729		return false;
730	});
731
732	$('.mobile-nav a').die('click').live('click', function(e){
733		e.stopPropagation();
734		$(this).find('span').trigger('click', $(this).attr('href'));
735	});
736
737	$('.mobile-nav li a span').die('click').live('click', function(e, href){
738		e.stopPropagation();
739		if (href) return false;
740		$(this).toggleClass('rotate-0').toggleClass('rotate-90');
741		if($('.mobile-nav').hasClass('super-menu')) {
742			$(this).parent().parent().find($('.mega-menu-item ul, .dropdown-menu')).toggleClass('menu-hide').topZIndex();
743			var $div = $(this).parent().next('div').toggleClass('menu-hide').topZIndex();
744			if(!$div.hasClass('menu-hide')){
745				$div.show();
746			}
747			var $ul = $(this).parent().parent().find($('.dropdown-menu'));
748			if(!$ul.hasClass('menu-hide')){
749				$ul.show();
750			}
751		} else {
752			$(this).parent().next('ul').toggleClass('menu-hide').topZIndex();
753		}
754		return false;
755	});
756
757}
758
759function disable_mobile_menu() {
760	journal_mobile_events = false;
761	var $li = $('#menu > ul > li, #super-menu > ul > li').not('.open').removeClass('menu-hide');
762	$('.mobile-nav a + ul, .mobile-nav a + div').removeClass('menu-hide');
763	$('#menu > ul, #menu .sf-menu, .super-menu').removeClass('mobile-nav');
764	$('.mega-menu, .dropdown-menu').hide();
765}
766
767
768}catch(e) {};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.