PageSourceSearch

https://starapraha.cz/script/mediabox.js

js starapraha.cz collected 2026-10-02 13:46:58 UTC 26,338 bytes, 400 lines download raw bytes

1/*
2	Mediabox version 0.7.3 - John Einselen (http://iaian7.com)
3	updated 15.12.07
4
5	tested in OS X 10.5 using FireFox 2, Flock 2, Opera 9, Safari 3, and Camino 1.5
6	tested in Windows Vista using Internet Explorer 7, FireFox 2, Opera 9, and Safari 3
7	loads flash, flv, quicktime, wmv, and html content in a Lightbox-style window effect.
8
9	based on Slimbox version 1.4 - Christophe Beyls (http://www.digitalia.be)
10			 Slimbox Extended version 1.3.1 - Yukio Arita (http://homepage.mac.com/yukikun/software/slimbox_ex/)
11			 Videobox Mod version 0.1 - Faruk Can 'farkob' Bilir (http://www.gobekdeligi.com/videobox/)
12			 DM_Moviebox.js - Ductchmonkey (http://lib.dutchmoney.com/)
13			(licensed same as originals, MIT-style)
14
15	inspired by the grandaddy of them all, Lightbox v2 - Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
16
17	distributed under the MIT license, terms:
18	copyright (c) 2007 dutchmoney llc
19
20	Permission is hereby granted, free of charge, to any person obtaining a copy
21	of this software and associated documentation files (the "Software"), to deal
22	in the Software without restriction, including without limitation the rights
23	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24	copies of the Software, and to permit persons to whom the Software is
25	furnished to do so, subject to the following conditions:
26
27	The above copyright notice and this permission notice shall be included in
28	all copies or substantial portions of the Software.
29
30	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
36	THE SOFTWARE.
37*/
38
39var Mediabox = {
40	init: function(options){
41		this.options = Object.extend({
42			resizeDuration: 240,
43			resizeTransition: Fx.Transitions.sineInOut,
44			overlayOpacity: 0.8,		// Overlay opacity, 0-1
45			topDistance: 15,			// Divisor of the total visible window height, higher number = higher Mediabox placement on screen
46										// If you wish to change this to an absolute pixel value, scroll down to lines 128 and 129 and swap the commenting slashes
47			initialWidth: 360,
48			initialHeight: 360,
49			defaultWidth: 640,			// Default width (px)
50			defaultHeight: 360,			// Default height(px)
51			animateCaption: true,		// This is not smooth animation in IE 6 with XML prolog.
52										// If your site is XHTML strict with XML prolog, disable this option.
53		// Mediaplayer settings and options
54			playerpath: 'http://iaian7.com/js/mediaplayer.swf',	// Path to the mediaplayer.swf or flvplayer.swf file
55			backcolor:  '0x777777',		// Base color for the controller, color name / hex value (0x000000)
56			frontcolor: '0x000000',		// Text and button color for the controller, color name / hex value (0x000000)
57			lightcolor: '0x000000',		// Rollover color for the controller, color name / hex value (0x000000)
58			fullscreen: 'true',			// Display fullscreen button
59			autostart: 'true',			// Automatically plays the video on load
60		// Quicktime options (QT plugin used for partial WMV support as well)
61			autoplay: 'true',			// Automatically play movie, true / false
62			bgcolor: 'black',			// Background color, name / hex value
63			controller: 'true',			// Show controller, true / false
64		// Flickr options
65			fkBGcolor: '#000000',		// Background colour option
66			fkFullscreen: 'true',		// Enable fullscreen button
67		// Revver options
68			revverID: '187866',			// Revver affiliate ID
69			revverFullscreen: 'true',	// Fullscreen option
70			revverBack: '#000000',		// Background colour
71			revverFront: '#ffffff',		// Foreground colour
72			revverGrad: '#000000',		// Gradation colour
73		// Seesmic options
74			ssFullscreen: 'true',		// Fullscreen option for Seesmic
75		// Youtube options
76			ytAutoplay: '1',			// Auto play, 0=false, 1=true
77		// Veoh options
78			vhAutoplay: '1',			// Enable autoplay, 0=false 1=true
79			vhFullscreen: 'true',		// Enable fullscreen
80		// Vimeo options
81			vmFullscreen: '1',			// Fullscreen option, 0=false, 1=true
82			vmTitle: '1',				// Show video title
83			vmByline: '1',				// Show byline
84			vmPortrait: '1',			// Show author portrait
85			vmColor: '5ca0b5'			// Custom controller colours, hex value minus the #
86		}, options || {});
87
88		if(window.ie6 && document.compatMode=="BackCompat"){ this.options.animateCaption = false; }	// IE 6 - XML prolog problem
89
90		this.anchors = [];
91		$each(document.links, function(el){
92			if (el.rel && el.rel.test(/^mediabox/i)){
93				el.onclick = this.click.pass(el, this);
94				this.anchors.push(el);
95			}
96		}, this);
97		this.eventKeyDown = this.keyboardListener.bindAsEventListener(this);
98		this.eventPosition = this.position.bind(this);
99		this.overlay = new Element('div').setProperty('id', 'lbOverlay').injectInside(document.body);
100		this.center = new Element('div').setProperty('id', 'lbCenter').setStyles({width: this.options.initialWidth+'px', height: this.options.initialHeight+'px', marginLeft: '-'+(this.options.initialWidth/2)+'px', display: 'none'}).injectInside(document.body);
101		this.canvas = new Element('div').setProperty('id', 'lbImage').injectInside(this.center);
102		this.bottomContainer = new Element('div').setProperty('id', 'lbBottomContainer').setStyle('display', 'none').injectInside(document.body);
103		this.bottom = new Element('div').setProperty('id', 'lbBottom').injectInside(this.bottomContainer);
104		new Element('a').setProperties({id: 'lbCloseLink', href: '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = this.close.bind(this);
105		this.caption = new Element('div', {'id': 'lbCaption'}).injectInside(this.bottom);
106		this.copyright = new Element('div', {'id': 'lbCopyright'}).injectInside(this.bottom);
107		new Element('div').setStyle('clear', 'both').injectInside(this.bottom);
108
109		/* Build effects */
110		var nextEffect = this.nextEffect.bind(this);
111		this.fx = {
112			overlay: this.overlay.effect('opacity', {duration: 500}).hide(),
113			center: this.center.effects({duration: this.options.resizeDuration, transition: this.options.resizeTransition, onComplete: nextEffect}),
114			content: this.canvas.effect('opacity', {duration: 500, onComplete: nextEffect}),
115			bottom: this.bottomContainer.effect('height', {duration: 400, onComplete: nextEffect})
116		};
117	},
118
119	click: function(link){
120		return this.open(link.href, link.title, link.rel);
121	},
122
123	open: function(url, title, rel){
124		this.href = url;
125		this.title = title;
126//		var titleSplit = url.split('::');
127//		this.titleHeader = titleSplit[0];
128//		this.titleBody = titleSplit[0];
129		this.rel = rel;
130		this.position();
131		this.setup(true);
132		var wh = (window.getHeight() == 0) ? window.getScrollHeight() : window.getHeight();
133		var st = document.body.scrollTop  || document.documentElement.scrollTop;
134		this.top = st + (wh / this.options.topDistance);
135//		this.top = 100;	// this is the code needed for an absolute pixel value, instead of proportional positioning
136		this.center.setStyles({top: this.top+'px', display: ''});
137		this.fx.overlay.start(this.options.overlayOpacity);
138		this.center.className = 'lbLoading';
139		return this.loadVideo(url);
140	},
141
142	position: function(){
143		this.overlay.setStyles({'top': window.getScrollTop()+'px', 'height': window.getHeight()+'px'});
144	},
145
146	setup: function(open){
147		var aDim = this.rel.match(/[0-9]+/g);													// videobox rel settings
148		this.contentsWidth = (aDim && (aDim[0] > 0)) ? aDim[0] : this.options.defaultWidth;		// videobox rel settings
149		this.contentsHeight = (aDim && (aDim[1] > 0)) ? aDim[1] : this.options.defaultHeight;	// videobox rel settings
150
151		var elements = $A(document.getElementsByTagName('object'));								// hide page content
152		elements.extend(document.getElementsByTagName(window.ie ? 'select' : 'embed'));
153		elements.each(function(el){
154			if (open) el.lbBackupStyle = el.style.visibility;
155			el.style.visibility = open ? 'hidden' : el.lbBackupStyle;
156		});
157
158		var fn = open ? 'addEvent' : 'removeEvent';
159		window[fn]('scroll', this.eventPosition)[fn]('resize', this.eventPosition);
160		document[fn]('keydown', this.eventKeyDown);
161		this.step = 0;
162	},
163
164	keyboardListener: function(event){
165		switch (event.keyCode){
166			case 27: case 88: case 67: this.close(); break;
167		}
168	},
169
170	loadVideo: function(url){
171		this.step = 1;
172
173// DailyMotion
174		if (url.match(/dailymotion\.com/i)) {
175			this.type = 'flash';
176			this.object = new SWFObject(url, "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
177			this.object.addParam('allowscriptaccess','always');
178			this.object.addParam('allowfullscreen','true');
179// Flickr
180		} else if (url.match(/flickr\.com/i)) {
181			this.type = 'flashobj';
182			var videoId = url.split('/');
183			this.videoID = videoId[5];
184//			this.object = '<object type="application/x-shockwave-flash" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" data="http://www.flickr.com/apps/video/stewart.swf?v=1.173" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="flashvars" value="intl_lang=en-us&amp;photo_secret=a8e6cdca81&amp;
184photo_id='+this.videoID+'"></param> <param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=1.173"></param> <param name="bgcolor" value="'+this.options.fkBGcolor+'"></param> <param name="allowFullScreen" value="'+this.options.fkFullscreen+'"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=1.173" bgcolor="'+this.options.fkBGcolor+'" allowfullscreen="'+this.options.fkFullscreen+'" flashvars="intl_lang=en-us&amp;photo_secret=a8e6cdca81&amp;photo_id='+this.videoID+'" height="'+this.contentsHeight+'" width="'+this.contentsWidth+'"></embed></object>';
185			this.object = '<object type="application/x-shockwave-flash" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" data="http://www.flickr.com/apps/video/stewart.swf?v=1.173" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="flashvars" value="intl_lang=en-us&amp;photo_id='+this.videoID+'"></param> <param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=1.173"></param> <param name="bgcolor" value="'+this.options.fkBGcolor+'"></param> <param name="allowFullScreen" value="'+this.options.fkFullscreen+'"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=1.173" bgcolor="'+this.options.fkBGcolor+'" allowfullscreen="'+this.options.fkFullscreen+'" flashvars="intl_lang=en-us&amp;photo_id='+this.videoID+'" height="'+this.contentsHeight+'" width="'+this.contentsWidth+'"></embed></object>';
186// Google Video
187		} else if (url.match(/google\.com\/videoplay/i)) {
188			this.type = 'flash';
189			var videoId = url.split('=');
190			this.videoID = videoId[1];
191			this.object = new SWFObject("http://video.google.com/googleplayer.swf?docId="+this.videoID+"&autoplay=1&hl=en", "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
192			this.object.addParam('allowscriptaccess','always');
193			this.object.addParam('allowfullscreen','true');
194// Metacafe
195		} else if (url.match(/metacafe\.com\/watch/i)) {
196			this.type = 'flash';
197			var videoId = url.split('/');
198			this.videoID = videoId[4];
199			this.object = new SWFObject("http://www.metacafe.com/fplayer/"+this.videoID+"/.swf", "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
200			this.object.addParam('allowscriptaccess','always');
201			this.object.addParam('allowfullscreen','true');
202// MyspaceTV
203		} else if (url.match(/myspacetv\.com/i)) {
204			this.type = 'flash';
205			var videoId = url.split('=');
206			this.videoID = videoId[2];
207			this.object = new SWFObject("http://lads.myspace.com/videos/vplayer.swf?m="+this.videoID+"&v=2&type=video", "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
208			this.object.addParam('allowscriptaccess','always');
209			this.object.addParam('allowfullscreen','true');
210//			this.type = 'flashobj';
211//			this.object = '<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m='+this.videoID+'&v=2&type=video" type="application/x-shockwave-flash" allowFullScreen="true" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
212// Revver
213		} else if (url.match(/revver\.com/i)) {
214			this.type = 'flash';
215			var videoId = url.split('/');
216			this.videoID = videoId[4];
217			this.object = new SWFObject("http://flash.revver.com/player/1.0/player.swf?mediaId="+this.videoID+"&affiliateId="+this.options.revverID+"&allowFullScreen="+this.options.revverFullscreen+"&backColor="+this.options.revverBack+"&frontColor="+this.options.revverFront+"&gradColor="+this.options.revverGrad+"&shareUrl=revver", "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
218			this.object.addParam('allowscriptaccess','always');
219			this.object.addParam('allowfullscreen','true');
220//			this.type = 'flashobj';
221//			this.object = '<object width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" data="http://flash.revver.com/player/1.0/player.swf?mediaId='
221+this.videoID+'&affiliateId='+this.options.revverID+'" type="application/x-shockwave-flash" id="revvervideoa17743d6aebf486ece24053f35e1aa23"><param name="Movie" value="http://flash.revver.com/player/1.0/player.swf?mediaId='+this.videoID+'&affiliateId='+this.options.revverID+'"></param><param name="FlashVars" value="allowFullScreen='+this.options.revverFullscreen+'&backColor=#000000&frontColor=#ffffff&gradColor=#000000&shareUrl=revver"></param><param name="AllowFullScreen" value="'+this.options.revverFullscreen+'"></param><param name="AllowScriptAccess" value="always"></param><embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf?mediaId='+this.videoID+'&affiliateId='+this.options.revverID+'" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" flashvars="allowFullScreen='+this.options.revverFullscreen+'&backColor=#000000&frontColor=#ffffff&gradColor=#000000&shareUrl=revver" allowfullscreen="'+this.options.revverFullscreen+'" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'"></embed></object>';
222// Seesmic
223		} else if (url.match(/seesmic\.com/i)) {
224			this.type = 'flash';
225			var videoId = url.split('/');
226			this.videoID = videoId[5];
227			this.object = new SWFObject("http://seesmic.com/Standalone.swf?video="+this.videoID+"&allowFullScreen="+this.options.revverFullscreen, "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
228			this.object.addParam('allowscriptaccess','always');
229			this.object.addParam('allowfullscreen',this.options.ssFullscreen);
230//			this.type = 'flashobj';
231//			this.object = '<object width="'+this.contentsWidth+'" height="'+this.contentsHeight+'"><param name="movie" value="http://seesmic.com/Standalone.swf?video='+this.videoID+'"></param><param name="allowFullScreen" value="'+this.options.ssFullscreen+'" /><embed src="http://seesmic.com/Standalone.swf?video='+this.videoID+'" type="application/x-shockwave-flash" allowFullScreen="'+this.options.ssFullscreen+'" wmode="transparent" allowScriptAccess="sameDomain" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'"></embed></object>';
232// YouTube
233		} else if (url.match(/youtube\.com\/watch/i)) {
234			this.type = 'flash';
235			var videoId = url.split('=');
236			this.videoID = videoId[1];
237			this.object = new SWFObject("http://www.youtube.com/v/"+this.videoID+"&autoplay=1", "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
238			this.object.addParam('allowscriptaccess','always');
239			this.object.addParam('allowfullscreen','true');
240// Veoh
241		} else if (url.match(/veoh\.com/i)) {
242			this.type = 'flash';
243			var videoId = url.split('videos/');
244			this.videoID = videoId[1];
245			this.object = new SWFObject("http://www.veoh.com/videodetails2.swf?permalinkId="+this.videoID+"&id=2907158&player=videodetailsembedded&videoAutoPlay="+this.options.vhAutoplay, "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
246			this.object.addParam('allowscriptaccess','always');
247			this.object.addParam('allowfullscreen','true');
248//			this.type = 'flashobj';
249//			this.object = '<embed src="http://www.veoh.com/videodetails2.swf?permalinkId='+this.videoID+'&id=2907158&player=videodetailsembedded&videoAutoPlay='+this.options.vhAutoplay+'" allowFullScreen="'+this.options.vhFullscreen+'" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
250
251// Viddler
252		} else if (url.match(/viddler\.com/i)) {
253//			this.type = 'flash';
254			var videoId = url.split('/');
255			this.videoId1 = videoId[4];
256			this.videoId2 = videoId[6];
257			this.videoID = "viddler_"+this.videoId1+"_"+this.videoId2;
258//			this.object = new SWFObject("http://www.veoh.com/videodetails2.swf?permalinkId="+this.videoID+"&id=2907158&player=videodetailsembedded&videoAutoPlay="+this.options.vhAutoplay, "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
259//			this.object.addParam('allowscriptaccess','always');
260//			this.object.addParam('allowfullscreen','true');
261			this.type = 'flashobj';
262			this.object = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" id="'+this.videoID+'"><param name="movie" value="http://www.viddler.com/player/e5398221/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="'+this.options.vdFullscreen+'" /><embed src="http://www.viddler.com/player/e5398221/" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="'+this.options.vdFullscreen+'" name="'+this.videoID+'" ></embed></object>';
263// Vimeo
264		} else if (url.match(/vimeo\.com/i)) {
265			this.type = 'flash';
266			var videoId = url.split('/');
267			this.videoID = videoId[3];
268			this.object = new SWFObject("http://www.vimeo.com/moogaloop.swf?clip_id="+this.videoID+"&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=5ca0b5", "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
269			this.object.addParam('allowscriptaccess','always');
270			this.object.addParam('allowfullscreen','true');
271//			this.type = 'flashobj';
272//			this.object = '<object id="mediabox" type="application/x-shockwave-flash" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" data="http://www.vimeo.com/moogaloop.swf?clip_id='+this.videoID+'&amp;server=www.vimeo.com&amp;fullscreen='+this.options.vmFullscreen+'&amp;show_title='+this.options.vmTitle+'&amp;show_byline='+this.options.vmByline+'&amp;show_portrait='+this.options.vmPortrait+'&amp;color=5ca0b5"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id='+this.videoID+'&amp;server=www.vimeo.com&amp;fullscreen='+this.options.vmFullscreen+'&amp;show_title='+this.options.vmTitle+'&amp;show_byline='+this.options.vmByline+'&amp;show_portrait='+this.options.vmPortrait+'&amp;color='+this.options.vmColor+'" /></object>';
273// Flash .SWF
274		} else if (url.match(/\.swf/i)) {
275			this.type = 'flash';
276			this.object = new SWFObject(url, "sfwvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
277			this.object.addParam('allowscriptaccess','always');
278			this.object.addParam('allowfullscreen','true');
279// Flash .FLV
280		} else if (url.match(/\.flv/i)) {
281			this.type = 'flash';
282			this.object = new SWFObject(this.options.playerpath+"?file="+url+"&autostart="+this.options.autostart+"&displayheight="+this.contentsHeight+"&allowfullscreen="+this.options.fullscreen+"&usefullscreen="+this.options.fullscreen+"&backcolor="+this.options.backcolor+"&frontcolor="+this.options.frontcolor+"&lightcolor="+this.options.lightcolor, "flvvideo", this.contentsWidth, this.contentsHeight, "9", "#000000", "wmode", "transparent");
283			this.object.addParam('allowscriptaccess','always');
284			this.object.addParam('allowfullscreen','true');
285//			this.type = 'flashobj';
286//			this.object = '<embed src="'+this.options.playerpath+'" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" allowscriptaccess="always" allowfullscreen="'+this.options.fullscreen+'" flashvars="height='+this.contentsHeight+'&width='+this.contentsWidth+'&file='+url+'$usefullscreen='+this.options.fullscreen+'"/>';
287// Quicktime .MOV
288		} else if (url.match(/\.mov/i)) {
289			this.type = 'qt';
290			if (this.options.controller=='true') {this.contentsHeight = (this.contentsHeight*1)+16};
291			if (navigator.plugins && navigator.plugins.length) {
292				this.object = '<object id="mediabox" standby="loading quicktime..." type="video/quicktime" codebase="http://www.apple.com/qtactivex/qtplugin.cab" data="'+url+'" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'"><param name="src" value="'+url+'" /><param name="scale" value="aspect" /><param name="controller" value="'+this.options.controller+'" /><param name="autoplay" value="'+this.options.autoplay+'" /><param name="bgcolor" value="'+this.options.bgcolor+'" /><param name="enablejavascript" value="true" /></object>';
293			} else {
294				this.object = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" standby="loading quicktime..." codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" id="mediabox"><param name="src" value="'+url+'" /><param name="scale" value="aspect" /><param name="controller" value="'+this.options.controller+'" /><param name="autoplay" value="'+this.options.autoplay+'" /><param name="bgcolor" value="'+this.options.bgcolor+'" /><param name="enablejavascript" value="true" /></object>';
295			}
296// Windows Media .WMV
297		} else if (url.match(/\.wmv/i)) {
298			this.type = 'wmv';
299			if (this.options.controller=='true') {this.contentsHeight = (this.contentsHeight*1)+16};
300			if (navigator.plugins && navigator.plugins.length) {
301				this.object = '<object id="mediabox" standby="loading windows media..." type="video/x-ms-wmv" data="'+url+'" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" /><param name="src" value="'+url+'" /><param name="autoStart" value="'+this.options.autoplay+'" /></object>';
302			} else {
303				this.object = '<object id="mediabox" standby="loading windows media..." classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" type="video/x-ms-wmv" data="'+url+'" width="'+this.contentsWidth+'" height="'+this.contentsHeight+'" /><param name="filename" value="'+url+'" /><param name="showcontrols" value="'+this.options.controller+'"><param name="autoStart" value="'+this.options.autoplay+'" /><param name="stretchToFit" value="true" /></object>';
304			}
305// Inline element
306		} else if (url.match(/\#mb_/i)) {
307			this.type = 'element';
308			var Id = url.split('#');
309			this.element = Id[1];
310			this.object = $(this.element).innerHTML;
311//			this.object = $(this.element).getText();
312// iFrame content
313		} else {
314			this.type = 'iframe';
315			this.iframeId = "lbFrame_"+new Date().getTime();	// Safari would not update iframe content that had a static id.
316			this.object = new Element('iframe').setProperties({id: this.iframeId, width: this.contentsWidth, height: this.contentsHeight, frameBorder:0, scrolling:'auto', src:url});
317		}
318
319		this.nextEffect();
320		return false;
321	},
322
323	nextEffect: function(url){
324		switch (this.step++){
325		case 1:
326			this.canvas.style.width = this.bottom.style.width = this.contentsWidth+'px';
327			this.canvas.style.height = this.contentsHeight+'px';
328			this.caption.innerHTML = this.title;
329			this.copyright.innerHTML = 'Obsah podléhá autorským právům.';
330
331			if (this.center.clientHeight != this.canvas.offsetHeight){
332				this.fx.center.start({height: this.canvas.offsetHeight, width: this.canvas.offsetWidth, marginLeft: -this.canvas.offsetWidth/2});
333				break;
334			} else if (this.center.clientWidth != this.canvas.offsetWidth){
335				this.fx.center.start({height: this.canvas.offsetHeight, width: this.canvas.offsetWidth, marginLeft: -this.canvas.offsetWidth/2});
336				break;
337			}
338			this.step++;
339
340		case 2:
341			this.bottomContainer.setStyles({top: (this.top + this.center.clientHeight)+'px', height:'0px', marginLeft: this.center.style.marginLeft, width:this.center.style.width, display: ''});
342			this.fx.content.start(1);
343			this.step++;
344
345		case 3:
346			if (this.type == 'flash'){
347				this.object.write(this.canvas);
348			} else if (this.type == 'iframe'){
349				this.object.injectInside(this.canvas)
350//			} else if (this.type == 'qt'){
351//				this.canvas.innerHTML(this.object)
352			} else {
353				this.canvas.setHTML(this.object);
354			}
355			this.currentObject = document.getElementById('mediabox');
356			this.center.className = '';
357			break;
358			this.step++;
359
360		case 4:
361			if (this.options.animateCaption){
362				this.fx.bottom.start(0,this.bottom.offsetHeight);
363				break;
364			}
365			this.bottomContainer.style.height = (this.bottom.offsetHeight)+'px';
366
367		case 5:
368			this.step = 0;
369		}
370	},
371
372	close: function(){
373			if (this.type == 'qt' && window.webkit) {
374				this.currentObject.Stop();	// safari needs to call Stop() to remove the object's audio stream...
375			}
376			if (navigator.plugins && navigator.plugins.length) {
377				this.canvas.setHTML('');
378			} else {
379				if (window.ie6) {
380//					this.currentObject.style.display = 'none';
381					this.canvas.innerHTML = '';
382				} else {
383					this.canvas.innerHTML = '';
384				}
385			}
386			this.currentObject = null;
387			this.currentObject = Class.empty;
388			this.type = false;
389
390		if (this.step < 0) return;
391		this.step = -1;
392
393		for (var f in this.fx) this.fx[f].stop();
394		this.center.style.display = this.bottomContainer.style.display = 'none';
395		this.fx.overlay.chain(this.setup.pass(false, this)).start(0);
396		return false;
397	}
398};
399
400window.addEvent('domready', Mediabox.init.bind(Mediabox));

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.