	
	var nbelements = $(".items > div").size();
	var widthSlides = nbelements * 445;	
	$(".items").css("width", widthSlides + "px");

	// INITIALIZE SLIDERS 
  $("div.slider").scrollable({ 
			vertical: false,
      size: nbelements + "-" + 1
  });	

$(document).ready(function(){ 
/* Changing videos by themes menu background */
        /*$('#box-tabs').children("div").each(function(){
            $(this).addClass("menu-tab");
            $(this).removeClass("menu-tab-selected");
            $(this).children("img").each(function() {
                $(this).attr("src","/images/"+$(this).attr("alt")+"-corner-tab.png");
                $(this).attr("class","corner-"+$(this).attr("alt"));
            })
        });

        $('.popup-link').parent().parent().addClass("menu-tab-selected");
        $('.popup-link').parent().siblings("img").each(function() {
                $(this).attr("src","/images/"+$(this).attr("alt")+"-corner-active-tab.png");
                $(this).attr("class","corner-"+$(this).attr("alt")+"-selected");
        });*/


	$(".program-listing div:first").siblings("a:first").css({background:"url('/images/accordion-prog-active-icon.png') no-repeat 0px 2px", color: "#ff6600"});
	$(".program-listing div:first").css({display: "block"});		
	
	$(".program-listing .accordion-prog-items").mouseover(function()
	{		
	   $(this).css({background:"url('/images/accordion-prog-active-icon.png') no-repeat 0px 2px", color: "#ff6600"}).next("div").slideDown(500).siblings("div").slideUp("slow").addClass("current-prog-accordion");
	   $(this).siblings("a").css({background:"url('/images/accordion-prog-default-icon.png') no-repeat 0px 2px", color: "#333333"}).removeClass("current-prog-accordion");
	});	

	// $(".slider").easySlider({
	// 	prevText: "",
	// 	nextText: "",
	// 	continuous: true 
	// });
	var nbelements = $(".items > div").size();
	var widthSlides = nbelements * 445;	
	$(".items").css("width", widthSlides + "px");

	// INITIALIZE SLIDERS 
  $("div.slider").scrollable({ 
			vertical: false,
      size: nbelements + "-" + 1
  });	
    $(".vid-container").mouseover(function(){
        $(this).siblings(".active-vid").children(".vid-info").children().css("font-size", "9px");
        $(this).siblings(".active-vid").children(".vid-info").children().children(".mark").animate({width: "7px"}, 0);

        if ($.browser.msie && !($.browser.version < 7)) {
            $(this).siblings(".active-vid").children(".vid-preview").children().children(".smallplay-preview-btn").animate({width: "20px"}, 0);
        }
       
        if($.browser.msie){
            $(this).siblings(".active-vid").animate({width: "100px", height: "130px"}, 0).removeClass("active-vid");
        }	else {
            $(this).siblings(".active-vid").animate({width: "100px", opacity: "0.6"}, 0).removeClass("active-vid");
        }
        if($.browser.msie){
            $(this).animate({width: "150px", height: "250px"}, 0).addClass("active-vid");
        }	else {
            $(this).animate({width: "150px", opacity: "1"}, 0).addClass("active-vid");
        }
        if ($.browser.msie && !($.browser.version < 7)) {
            $(this).children(".vid-preview").children().children(".smallplay-preview-btn").animate({width: "34px"}, 0);
        }

        $(this).children(".vid-info").children().css("font-size", "11px");
        $(this).children(".vid-info").children().children(".mark").animate({width: "10px"}, 0);
        $(this).children(".vid-info ul").css("font-size", "12px");
    });

    $('#more-details').click(function(){
    /*var sign=$(this).attr("name");
         if($(this).attr("name")==sign) {
            $(this).text("- de détails");
            $(this).attr("name","less");
         $('.theme-description').animate({
            height: '150%', opacity: 'toggle'
         }, "slow");
         exit;
            //$(".theme-description").css("height","150%");
         }
         else {
            $(this).text("+ de détails");
            $(this).attr("name","more");
            //$(".theme-description").css("height","-150%");
             $('.theme-description').animate({
                height: '-150%', opacity: 'toggle'
             }, "slow");
         exit;
         }*/
    });
});
