
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1145653-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);
  })();

var diff = 0; 
$(function() {
	$(document).ready(function() { 
		$(".fancy").fancybox({'hideOnContentClick':false,'overlayShow':'false','transitionIn':'elastic','transitionOut':'elastic','speedIn':'200','speedOut':'200'});
		$(".fancyvideo").click(function() {
			$.fancybox({
					'padding'		: 0,
					'autoScale'		: true,
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic',
					'speedIn':'200',
					'speedOut':'200',
					'title'			: this.title,
					'width'			: 500,
					'height'		: 364,
					'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
					'type'			: 'swf',
					'swf'			: {'wmode':'transparent','allowfullscreen':'true'
					}
				});

			return false;
		});
		
		var menutitle='';
		$('#topmenu a').mouseover(function(){
				menutitle = $(this).attr('title');
				$(this).attr('title', '');
		}).mouseout(function(){
				$(this).attr('title', menutitle);
				menutitle='';
		});
		$('#topmenu a').click(function(){
			if($('#'+menutitle).length>0) {
				$.scrollTo('#'+menutitle, 1000,{offset:{top:-80, left:0}});
				return false;
			}
		});
		
	});	
});
