$(document).ready(function() {

	$("a.modal").fancybox({
		'type' : 'image',
		'hideOnContentClick': true,
		'overlayColor'		: '#111',
		'overlayOpacity'	: 0.7,
		'padding'				: 7,
		'titleShow'			: false
	});	

	$("a#frame-puksta").fancybox({
		'overlayColor'		: '#111',
		'overlayOpacity'	: 0.7,
		'margin' 				: 2,
		'padding'				: 2,
        'zoomSpeedIn'		: 0, 
        'zoomSpeedOut'	: 0,
		'type'					: 'iframe',
		'titleShow'			: 'false',
		'scrolling'				: 'no',
		'width'					: 760,
		'height'					: 575
		});	

	$("a#frame-demo").fancybox({
		'overlayColor'		: '#111',
		'overlayOpacity'	: 0.7,
		'padding'				: 5,
        'zoomSpeedIn':  0, 
        'zoomSpeedOut': 0,
		'type'			: 'iframe',
		'transitionIn' : 'elastic',
		'transitionOut' : 'elastic',
		'titleShow'	: 'false',
		'scrolling'		: 'no',
		'width'			: 500,
		'height'		: 650
		});	

	$("a#frame").fancybox({
		'overlayColor'		: '#111',
		'overlayOpacity'	: 0.7,
		'padding'				: 5,
        'zoomSpeedIn':  0, 
        'zoomSpeedOut': 0,
		'type'			: 'iframe',
		'titleShow'	: 'false',
		'scrolling'		: 'no',
		'width'			: 655,
		'height'		: 415
		});
		
	$("a#frame-news").fancybox({
		'overlayColor'		: '#111',
		'overlayOpacity'	: 0.7,
		'padding'				: 5,
        'zoomSpeedIn':  0, 
        'zoomSpeedOut': 0,
		'type'			: 'iframe',
		'titleShow'	: 'false',
		'scrolling'		: 'auto',
		'width'			: 600,
		'height'		: 400
		});
		
	$("a.youtube_box").click(function() { 
	$.fancybox({
		'overlayOpacity': 0.7,
		'overlayColor'	: '#111',
		'padding'		: 7,
		'autoScale'		: false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'title'			: this.title,
		'width'			: 640,
		'height'		: 495,
		'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
		'type'			: 'swf',
		'swf'			: {
		   	 			'wmode'		: 'transparent',
						'allowfullscreen'	: 'true'}
		});
		return false;
});

	$("a#youtube_movie_box").click(function() { 
	$.fancybox({
		'overlayOpacity': 0.7,
		'overlayColor'	: '#111',
		'padding'		: 7,
		'autoScale'		: false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'title'			: this.title,
		'width'			: 380,
		'height'		: 280,
		'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
		'type'			: 'swf',
		'swf'			: {
		   	 			'wmode'		: 'transparent',
						'allowfullscreen'	: 'true'}
		});
		return false;
});

	$("a.youtube_audio").click(function() { 
	$.fancybox({
		'overlayOpacity': 0.7,
		'overlayColor'	: '#111',
		'padding'		: 7,
		'autoScale'		: false,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'title'			: this.title,
		'width'			: 320,
		'height'		: 260,
		'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
		'type'			: 'swf',
		'swf'			: {
		   	 			'wmode'		: 'transparent',
						'allowfullscreen'	: 'true'}
		});
	return false;
});
});
