$(document).ready(function() {
	$("a.fancybox").fancybox({
		'titlePosition': 'inside',
		'type' : 'image'
	});
	$('#top-images').cycle({ 
		'fx':    'fade', 
    	'timeout':  5000  		
	});

	$('.images-rotator').cycle({ 
		'fx':    'fade', 
    	'timeout':  3000  		
	});

	$("a.fancytube").click(function() {
		$.fancybox({
			'titlePosition': 'inside',
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'width'		: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});
		return false;
	});

	$('#news-rotator').cycle({ 
		'fx':    'fade', 
    	'timeout':  4000,
	    'pager': '#nav',
	    'pause': 1
	});		

});

//Google Analitics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18342389-4']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


