$(document).ready( function(){
	$(".lastVideo div a").mouseover( function(){
		$(this).parent("div").children("img").css({
			border: "4px solid #534741"
		});
	}).mouseout( function(){
		$(this).parent("div").children("img").css({
			border: "4px solid #1ebde2"
		});
	});
	$(".mostViewed img").mouseover( function(){
		$(this).prev("div.titleMostView").slideDown();
	}).mouseout( function(){
		$(this).prev("div.titleMostView").slideUp();
	});
	$(".mostViewed img").click( function(){
		document.location.href= $(this).attr("alt");
	});
    /*
    $("img#falsePlayer").click( function(){
        var url = document.location.href;
        window.open("http://www.facebook.com/sharer.php?u="+url,"zeubeuz", "width=700,height=400");
        $("div.step_3").css("display","block");
        $(this).css("display","none");
        $("div.espace").css("display","none");
    });
    */
    $("div#sharetohelp").mouseover( function(){
        $(this).css({
           cursor: "pointer",
           backgroundColor: "white",
           color: "#3b5998",
           border: "1px solid #3b5998"
        });
    }).click( function(){
        var url = document.location.href;
        window.open("http://www.facebook.com/sharer.php?u="+url,"zeubeuz", "width=700,height=400"); 
    }).mouseout( function(){
        $(this).css({
           backgroundColor: "#3b5998",
           color: "white",
           border: "1px solid transparent" 
        }); 
    });
    $("div.lastVideo img").mouseover( function(){
    	$(this).css({
    		border: "4px solid #534741",
    		cursor: "pointer"
    	});
    }).click( function(){
    	var url = $(this).prev().attr("href");
    	document.location.href = url;
    }).mouseout( function(){
    	$(this).css({
    		border: "4px solid #1EBDE2"
    	});
    });


    $("div.zeubeuzplus img").eq(0).qtip({
      content: 'La chaîne zeubeuz+ de Bref !',
      show: 'mouseover',
      hide: 'mouseout',
      style: { 
        name: 'dark',
        tip: 'bottomMiddle',
      },
      position: {
        corner: {
          tooltip: 'bottomMiddle',
          target: 'topMiddle'
        }
      }
    });
    $("div.zeubeuzplus img").eq(1).qtip({
      content: 'La chaîne zeubeuz+ de François l\'embrouille !',
      show: 'mouseover',
      hide: 'mouseout',
      style: { 
        name: 'dark',
        tip: 'bottomMiddle',
      },
      position: {
        corner: {
          tooltip: 'bottomMiddle',
          target: 'topMiddle'
        }
      }
    });
    $("div.zeubeuzplus img").eq(2).qtip({
      content: 'La chaîne zeubeuz+ de Norman fait des vidéos !',
      show: 'mouseover',
      hide: 'mouseout',
      style: { 
        name: 'dark',
        tip: 'bottomMiddle',
      },
      position: {
        corner: {
          tooltip: 'bottomMiddle',
          target: 'topMiddle'
        }
      }
    });
    $("div.zeubeuzplus img").eq(3).qtip({
      content: 'La chaîne zeubeuz+ de very bad blagues !',
      show: 'mouseover',
      hide: 'mouseout',
      style: { 
        name: 'dark',
        tip: 'bottomMiddle',
      },
      position: {
        corner: {
          tooltip: 'bottomMiddle',
          target: 'topMiddle'
        }
      }
    });

    $("div.zeubeuzplus img").eq(0).mouseover( function(){
       $(this).attr("src","http://zeubeuz.fr/images/brefHover.png");
    }).mouseout( function(){
       $(this).attr("src","http://zeubeuz.fr/images/bref.png");  
    });
    $("div.zeubeuzplus img").eq(1).mouseover( function(){
       $(this).attr("src","http://zeubeuz.fr/images/francoisHover.png"); 
    }).mouseout( function(){
       $(this).attr("src","http://zeubeuz.fr/images/francois.png");  
    });
    $("div.zeubeuzplus img").eq(2).mouseover( function(){
       $(this).attr("src","http://zeubeuz.fr/images/normanHover.png"); 
    }).mouseout( function(){
       $(this).attr("src","http://zeubeuz.fr/images/norman.png");  
    });
    $("div.zeubeuzplus img").eq(3).mouseover( function(){
       $(this).attr("src","http://zeubeuz.fr/images/veryHover.png"); 
    }).mouseout( function(){
       $(this).attr("src","http://zeubeuz.fr/images/very.png");  
    });


    if ( parseInt(document.location.href.substr(53,2)) == 12 ){
      $("body").css({
        backgroundImage: 'url("http://zeubeuz.fr/images/brefbg.png"),url("http://zeubeuz.fr/images/woven.png")',
        backgroundPosition: 'left top,left top',
        backgroundRepeat: 'no-repeat,repeat'
      });
    }
    if ( parseInt(document.location.href.substr(53,2)) == 13 ){
      $("body").css({
        backgroundImage: 'url("http://zeubeuz.fr/images/francoisbg.png"),url("http://zeubeuz.fr/images/woven.png")',
        backgroundPosition: 'left top,left top',
        backgroundRepeat: 'no-repeat,repeat'
      });
    }
    if ( parseInt(document.location.href.substr(53,2)) == 14 ){
      $("body").css({
        backgroundImage: 'url("http://zeubeuz.fr/images/verybg.png"),url("http://zeubeuz.fr/images/woven.png")',
        backgroundPosition: 'left top,left top',
        backgroundRepeat: 'no-repeat,repeat'
      });
    }
    if ( parseInt(document.location.href.substr(53,2)) == 15 ){
      $("body").css({
        backgroundImage: 'url("http://zeubeuz.fr/images/normanbg.png"),url("http://zeubeuz.fr/images/woven.png")',
        backgroundPosition: 'left top,left top',
        backgroundRepeat: 'no-repeat,repeat'
      });
    }


    $("img#allerPub").click( function(){
      $(this).css({display: "none"});
      $("div#videoCache").css({display: "block"});

      window.open("../../../../pub.html", "Contribuer à l'aide de zeubeuz", "directories=no,location=no,menubar=no,width=480,height=60,scrollbars=no,toolbar=no,status=no,top=400,left=300");


    });








});
