/*
 * 	Custom javascript functions for various purposes
 * 	================================================
 * 	Author: Bohus Kovac, kovac(at)zenos.sk
 * 	Version: 1.0-production
 * 	    
 * 	(c) Zenos Designworks Studio 2009 
 *  Learn from this code, but please do not steal it. Thank you.
 */
 
/* Initialize slider function*/
$(document).ready(function(){	
	$("#slider").easySlider({
		auto: true,
		continuous: true,
		controlsShow: false
	});

/* Initialize tabs*/
    $("#tabs").tabs();
    var $tabs = $('#tabs').tabs();
   /* Open tabs from footer or sidebar image links */
    $('div[id ^="tabs"]').each(function(index) {
		$('.open-t-' + index).click(function() {
  		$tabs.tabs('select', index-1);
  		return false;
		});
	}); 

/* Prepare fancybox video functionality */
	$('a.video').fancybox({ 
			'width': 475, 
			'height': 394, 
			'overlayOpacity':0.6,
			'type': 'iframe',
			'hideOnContentClick': false
	}); 

/* Generic function for showing images in fancybox layer */
    $(".images").each(function() {
    	$(this).fancybox();
    }); 
    

/* Show full testimonial for Alex */	
	$("a.inline").fancybox({
		'titlePosition': 'inside',
		'transitionIn': 'none',
		'transitionOut': 'none',
		'centerOnScroll': 'true'
});

/* Show Gallerific in Fancybox */	
	$("a.gallerific").fancybox({
		'width': 900,
		'height': 700,
    'autoScale': false,
		'type': 'iframe'
	});
});	

