$(document).ready(function(){	
	
	$(document).pngFix();
	
	// navigation
	var path = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);	
	if (path == ""){
		$('ul.navigation li#home a').addClass('active');
	} else {	
		// add active class to current page link
		var currLink = $('ul.navigation li a[href$="' + path + '"]');
		$(currLink).addClass('active');
	}
	
	if ($('body').hasClass('home')){
		//flowplayer("player", "swf/flowplayer-3.1.5.swf");
		
		// facebook fan page
		FB.init("1407590eeb04042c4bca26df4e245c8e");
		$('#content-right').append('<fb:fan profile_id="116135647917" stream="1" connections="0" width="270"></fb:fan>')
	}
	
	//gallery
	if ($('body').hasClass('gallery')){
		$('#gallery').cycle({ 
			prev: '#prev', 
			next: '#next',
			speed: 500
		});
		$('#gallery').cycle('pause');
	}
});
