PageSourceSearch

https://mevlana-restaurant.de/templates/yoo_scoop/lib/js/yoo_tools.js

js mevlana-restaurant.de collected 2026-10-05 08:09:54 UTC 5,208 bytes, 119 lines download raw bytes

1/* Copyright (C) 2007 - 2009 YOOtheme GmbH */
2
3var YOOTools = {
4		
5	start: function() {
6		
7		/* Match height of div tags */
8		YOOTools.setDivHeight();
9
10		/* Accordion menu */
11		new YOOAccordionMenu('div#middle ul.menu li.toggler', 'ul.accordion', { accordion: 'slide' });
12
13		/* Fancy menu */
14		//new YOOFancyMenu($E('ul', 'menu'), { mode: 'fade', transition: Fx.Transitions.linear, duration: 500 });
15
16		/* Dropdown menu */
17		new YOODropdownMenu('div#menu li.parent', { mode: 'height', transition: Fx.Transitions.Expo.easeOut });
18
19		/* Morph: color settings */
20		var page = $('page');
21		
22		var enterColor = '#B45046';
23		if (page.hasClass('green'))     enterColor = '#97AF82';
24		if (page.hasClass('pink'))      enterColor = '#B995B1';
25		if (page.hasClass('orange'))    enterColor = '#D1934E';
26		if (page.hasClass('blue'))      enterColor = '#639FB7';
27		if (page.hasClass('yellow'))    enterColor = '#AEAC57';
28		if (page.hasClass('lilac'))     enterColor = '#87829D';
29		if (page.hasClass('turquoise')) enterColor = '#789696';
30		if (page.hasClass('black'))     enterColor = '#3C372D';
31		
32		/* Morph: main menu - level1 (background) */
33		var menuEnter = { 'background-color': enterColor };
34		var menuLeave = { 'background-color': '#E6E6D2' };
35		
36		new YOOMorph('div#menu li.level1', menuEnter, menuLeave,
37			{ transition: Fx.Transitions.linear, duration: 100, ignoreClass: 'active'},
38			{ transition: Fx.Transitions.sineIn, duration: 300 }, '.level1');
39
40		/* Morph: main menu - level2 and deeper (background) */
41		menuEnter = { 'margin-left': 0, 'margin-right': 0, 'text-indent': 20 };
42		menuLeave = { 'margin-left': 5, 'margin-right': 5, 'text-indent': 15 };
43		
44		var selector = 'div#menu li.level2 a, div#menu li.level2 span.separator';
45		/* fix for Opera because Mootools 1.1 is not compatible with latest Opera version */
46		if (window.opera) { selector = 'div#menu li.item1 li.level2 a, div#menu li.item1 li.level2 span.separator, div#menu li.item2 li.level2 a, div#menu li.item2 li.level2 span.separator, div#menu li.item3 li.level2 a, div#menu li.item3 li.level2 span.separator, div#menu li.item4 li.level2 a, div#menu li.item4 li.level2 span.separator, div#menu li.item5 li.level2 a, div#menu li.item5 li.level2 span.separator, div#menu li.item6 li.level2 a, div#menu li.item6 li.level2 span.separator, div#menu li.item7 li.level2 a, div#menu li.item7 li.level2 span.separator'; }
47		
48		new YOOMorph(selector, menuEnter, menuLeave,
49			{ transition: Fx.Transitions.expoOut, duration: 0},
50			{ transition: Fx.Transitions.sineIn, duration: 200 });
51		
52		/* Morph: main menu - level1 (color) */
53		menuEnter = { 'color': '#ffffff' };
54		menuLeave = { 'color': '#323232' };
55		
56		new YOOMorph('div#menu li.level1', menuEnter, menuLeave,
57			{ transition: Fx.Transitions.linear, duration: 0, ignoreClass: 'active'},
58			{ transition: Fx.Transitions.sineIn, duration: 200 }, '.level1');
59
60		/* Morph: main menu - level1 subline (color) */
61		menuEnter = { 'color': '#ffffff' };
62		menuLeave = { 'color': '#646464' };
63		
64		new YOOMorph('div#menu li.level1', menuEnter, menuLeave,
65			{ transition: Fx.Transitions.linear, duration: 0, ignoreClass: 'active'},
66			{ transition: Fx.Transitions.sineIn, duration: 200 }, 'span.sub');
67
68		/* Morph: sub menu (left/right) */
69		submenuEnter = { 'margin-left': 0, 'margin-right': 0, 'padding-left': 5 };
70		submenuLeave = { 'margin-left': 5, 'margin-right': 5, 'padding-left': 0 };
71
72		new YOOMorph('div#middle ul.menu a, div#middle ul.menu span.separator', submenuEnter, submenuLeave,
73			{ transition: Fx.Transitions.expoOut, duration: 0 },
74			{ transition: Fx.Transitions.sineIn, duration: 200 });
75
76		/* Morph: module (hover) */
77		var moduleEnter = { 'background-color': '#F5F5E6'};
78		var moduleLeave = { 'background-color': '#ffffff'};
79
80		new YOOMorph('div.mod-hover div.box-2', moduleEnter, moduleLeave,
81			{ transition: Fx.Transitions.expoOut, duration: 100 },
82			{ transition: Fx.Transitions.sineIn, duration: 300 });
83
84		/* Smoothscroll */
85		new SmoothScroll({ duration: 500, transition: Fx.Transitions.Expo.easeOut });
86	},
87
88	/* Include script */
89	include: function(library) {
90		$ES('script').each(function(s, i){
91			var src  = s.getProperty('src');
92			var path = '';
93			if (src && src.match(/yoo_tools\.js(\?.*)?$/)) path = src.replace(/yoo_tools\.js(\?.*)?$/,'');
94			if (src && src.match(/template\.js\.php(\?.*)?$/)) path = src.replace(/template\.js\.php(\?.*)?$/,'');
95			if (path != '') document.write('<script language="javascript" src="' + path + library + '" type="text/javascript"></script>');
96		});
97	},
98
99	/* Match height of div tags */
100	setDivHeight: function() {
101		YOOBase.matchDivHeight('div.topbox div.deepest', 40);
102		YOOBase.matchDivHeight('div.bottombox div.deepest', 40);
103		YOOBase.matchDivHeight('div.maintopbox div.deepest', 40);
104		YOOBase.matchDivHeight('div.mainbottombox div.deepest', 40);
105		YOOBase.matchDivHeight('div.contenttopbox div.deepest', 40);
106		YOOBase.matchDivHeight('div.contentbottombox div.deepest', 40);
107	}
108
109};
110
111/* Add functions on window load */
112window.addEvent('domready', YOOTools.start);
113
114/* Load IE6 fix */
115if (window.ie6) {
116	YOOTools.include('addons/ie6fix.js');
117	YOOTools.include('addons/ie6png.js');
118	YOOTools.include('yoo_ie6fix.js');
119}

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.