$(document).ready(function() {
	
		$(".gallery_th_img a, .artikl_img_left a").fancybox({
			'autoScale'			: true,
			'cyclic'			: true,
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'type'				: 'image',
			'autoDimensions'	: true,
			'titleShow'			: true,
			'titlePosition'		: 'over',
			'overlayColor'		: '#000'
		});
		
		$(".show_img").fancybox({
			'autoScale'			: true,
			'cyclic'			: true,
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'type'				: 'image',
			'autoDimensions'	: true,
			'titleShow'			: false,
			'overlayColor'		: '#000'
		});
		
		$(".prijava_popup").fancybox({
			'width'				: 450,
			'height'			: 250,
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'type'				: 'iframe',
			'titleShow'			: false
		});
		
		$(".komentiraj_popup").fancybox({
			'width'				: 460,
			'height'			: 370,
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'type'				: 'iframe',
			'titleShow'			: false
		});
		
		$.fn.wait = function(time, type) {
	
	        time = time || 1000;
	
	        type = type || "fx";
	
	        return this.queue(type, function() {
	
	            var self = this;
	
	            setTimeout(function() {
	
	                $(self).dequeue();
	
	            }, time);
	
	        });
	
	    };
});


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
