var conf={configxml:'flv.xml',flv:'',skin:0,margin:0,width:326,height:260,showstop:1,showvolume:1,showvolume:1,showfullscreen:1,showtime:1,buttonovercolor:999999,sliderovercolor:999999,loadingcolor:0};
$(document).ready(function(){
	$("#arPlayerList").css("opacity","0.6");
	var w=$("#folderCol1").width()-432;
	$("#scrollListVideo").css("width",w+"px");
	$(".scrollableVideo").css("width",w+"px");
	$(".scrollableVideo .items").css("width",w+"px");
	$(".itemsTitle").css("width",(w-134-0)+"px");
	$("div.scrollableVideo").scrollable({ 
        vertical:true,  
		next:".next",
		prev:".prev",
        size: 3          
    }).mousewheel(); 
	
	$(".next").trigger("click");
	
	var ind = 0;
	$(".pxVG").mouseover(function(){
		$(this).css("cursor","pointer");
		x=$(".pxVG").index($(this));
		$(this).css("background","url(../images/video/pxVB.gif)");
		$(".itemsTitle").eq(x).css("background","url(../images/video/arrH.gif) no-repeat right");
		$(".textItems").eq(x).css("color","#fff");
	});
	$(".pxVG").mouseout(function(){
		//$(this).css("background","url(../images/video/pxVG.gif)");
		$(".pxVG").each(function(e){
			if(ind!=e){
				$(".pxVG").eq(e).css("background","url(../images/video/pxVG.gif)");
				$(".itemsTitle").eq(e).css("background","url(../images/video/arr.gif) no-repeat right");
				$(".textItems").eq(e).css("color","#424242");
			}
		});
	});
	$(".pxVG").click(function(){
		$("#textPlayerList").css("display","none");
		$("#arPlayerList").css("display","none");
		ind=$(".pxVG").index($(this));
		$(".pxVG").css("background","url(../images/video/pxVG.gif)");
		$(".itemsTitle").css("background","url(../images/video/arr.gif) no-repeat right");
		$(".galVideo p").css("background","url(../images/video/cadreImg.gif) no-repeat");
		$(".textItems").css("color","#424242");
		$(".itemsTitle").eq(ind).css("background","url(../images/video/arrH.gif) no-repeat right");
		$(".textItems").eq(ind).css("color","#fff");		
		$(this).css("background","url(../images/video/pxVB.gif)");

		$(".playList").css("display","none");
		p.getApi().SetVariable("player:jsStop", "");
		p.getApi().SetVariable("player:jsUrl", $(this).attr("abbr"));
		p.getApi().SetVariable('player:jsPlay', '');
		
	});
	$(".galVideo").click(function(){	
		$("#textPlayerList").css("display","none");
		$("#arPlayerList").css("display","none");
		$(".pxVG").css("background","url(../images/video/pxVG.gif)");
		$(".playList").css("display","none");
		
		$(".pxVG").css("background","url(../images/video/pxVG.gif)");
		$(".itemsTitle").css("background","url(../images/video/arr.gif) no-repeat right");
		$(".textItems").css("color","#424242");
		
		$(".galVideo p").css("background","url(../images/video/cadreImg.gif) no-repeat");
		$(".galVideo p").eq($(".galVideo").index($(this))).css("background","url(../images/video/cadreImgS.gif) no-repeat");
		
		p.getApi().SetVariable("player:jsStop", "");
		p.getApi().SetVariable("player:jsUrl", $(this).attr("abbr"));
		p.getApi().SetVariable('player:jsPlay', '');
		
	});
	$(".playList").click(function(){
		$("#textPlayerList").css("display","none");
		$("#arPlayerList").css("display","none");
		p.getApi().SetVariable('player:jsPlay', '');
		$(this).css("display","none");		
	});	
});
