/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$(document).ready(function() {
			$(".single_fancy").fancybox();

			$("a[rel=flickr_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
                        $("a[rel=group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			
			 $("area[rel=group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
                        $("a[rel=video]").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

                        $("a[class=iframe]").fancybox({
                                'width'			: 500,
                                'height'		: 300,
                                'autoScale'		: false,
                                'autoDimensions'	: false,
                                'transitionIn'		: 'none',
                                'transitionOut'		: 'none',
                                'scrolling'             : 'no',
                                'type'			: 'iframe'
                        });
                        
                        $("area[class=popup]").fancybox({
                                'width'			: 500,
                                'height'		: 300,
                                'autoScale'		: false,
                                'titleShow'		: false,
                                'autoDimensions'	: false,
                                'transitionIn'		: 'none',
                                'transitionOut'		: 'none',
                                'scrolling'             : 'no',
                                'type'			: 'iframe'
                        });
                        $(".youtubepopup").click(function() {
                                $.fancybox({
                                                'padding'		: 0,
                                                'autoScale'		: false,
                                                'transitionIn'          : 'none',
                                                'transitionOut'         : 'none',
                                                'title'			: this.title,
                                                'width'                 : 680,
                                                'height'		: 407,
                                                'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                                                'type'			: 'swf',
                                                'swf'			: {
                                                'wmode' 		: 'transparent',
                                                'allowfullscreen'	: 'true'
                                                }
                                        });

                                return false;
                        });
		});
