2
* Media helper for fancyBox
4
* @requires fancyBox v2.0 or later
7
* $(".fancybox").fancybox({
13
* http://www.youtube.com/watch?v=opj24KnzrWo
14
* http://youtu.be/opj24KnzrWo
16
* http://vimeo.com/25634903
18
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
19
* http://www.metacafe.com/watch/7635964/
21
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
23
* http://twitvid.com/QY7MD
25
* http://twitpic.com/7p93st
27
* http://instagr.am/p/IejkuUGxQn/
28
* http://instagram.com/p/IejkuUGxQn/
30
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
31
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
32
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
35
//Shortcut for fancyBox object
40
beforeLoad : function(opts, obj) {
41
var href = obj.href || '',
45
if ((rez = href.match(/(youtube\.com|youtu\.be)\/(v\/|u\/|embed\/|watch\?v=)?([^#\&\?]*).*/i))) {
46
href = '//www.youtube.com/embed/' + rez[3] + '?autoplay=1&autohide=1&fs=1&rel=0&enablejsapi=1';
49
} else if ((rez = href.match(/vimeo.com\/(\d+)\/?(.*)/))) {
50
href = '//player.vimeo.com/video/' + rez[1] + '?hd=1&autoplay=1&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1';
53
} else if ((rez = href.match(/metacafe.com\/watch\/(\d+)\/?(.*)/))) {
54
href = '//www.metacafe.com/fplayer/' + rez[1] + '/.swf?playerVars=autoPlay=yes';
57
} else if ((rez = href.match(/dailymotion.com\/video\/(.*)\/?(.*)/))) {
58
href = '//www.dailymotion.com/swf/video/' + rez[1] + '?additionalInfos=0&autoStart=1';
61
} else if ((rez = href.match(/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i))) {
62
href = '//www.twitvid.com/embed.php?autoplay=0&guid=' + rez[1];
65
} else if ((rez = href.match(/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i))) {
66
href = '//twitpic.com/show/full/' + rez[1];
69
} else if ((rez = href.match(/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i))) {
70
href = '//' + rez[1] + '/p/' + rez[2] + '/media/?size=l';
73
} else if ((rez = href.match(/maps\.google\.com\/(\?ll=|maps\/?\?q=)(.*)/i))) {
74
href = '//maps.google.com/' + rez[1] + '' + rez[2] + '&output=' + (rez[2].indexOf('layer=c') ? 'svembed' : 'embed');
b'\\ No newline at end of file'