$(function(){
	var pathname = window.location.pathname;
	
	$("#mylogo").hide();
	
	$f("fplayer", pathname+"/swf/flowplayer.swf",{
		clip:{
			autoBuffering:true,
			bufferLength:3,
			/*scaling: 'orig'*/
		}
		/*
		onLoad: function(){
			$("#mylogo").show();
		}
		*/
	});
	
	$('.cat').click(function() {
		var id = $(this).attr('id');
		var mylength = $(this).attr('id').length;
		var classid = $(this).attr('id');//.substr(6,mylength-6);
		
		$('.videos').each(function() { $(this).hide(); });
		
		if(classid == id){
			$('div.video_scroll').show();
			$('#videos'+classid).show();
			$('div.video_scroll').jScrollPane({scrollbarMargin:16});//.show();
		}
		else{
			$('#videos'+classid).hide();
		}
	});
	
	$(".thumb_holder").mouseenter(function(){
		var myindex = $(this).index();
		var myparent = $(this).parent(".videos").attr("id");
		var mydesc = $(this).children('.pdesc').text();
		$("<div>"+mydesc+"</div>").appendTo("#desc_holder");
	});
	$(".thumb_holder").mouseleave(function(){
		$("#desc_holder").empty();
	});
}); 

