var _SelectedMenu;

$(document).ready(function(){
    /*VideoJS.setupAllWhenReady();          
    
    $('.video-js-box').mouseover(function(){
        $(this).find('video')[0].player.play();
        //console.log($(this).find('video')[0].videoIsFullScreen);
    });
    
    $('.video-js-box').mouseleave(function(){
        $(this).find('video')[0].player.pause();
    });*/  
    
    
    $('.mentions').click(function(){
      $('#lightbox').css('display', 'block');  
      $('#lightbox').css('opacity', '0');
        $('#lightbox').animate({
            opacity: 1
        }, 500);
    });
    
    //Exit Lightbox
    $(document).keyup(function(e) {      
        if (e.keyCode == 27) {
            $('#lightbox').animate({
            opacity: 0
            }, 500, function(){
                $('#lightbox').css('display', 'none');                
            });
        }
    });

    $("#lightbox").click(function(e){
        if(e.target == this){
            $('#lightbox').animate({
            opacity: 0
            }, 500, function(){
                $('#lightbox').css('display', 'none');                
            });
        }
    });   
    
    //ipad and iphone fix
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
        $("li").click(function(){
            //we just need to attach a click event listener to provoke iPhone/iPod/iPad's hover event
            //strange
        });
    }
    else{
        
    }
    
	$(".gallery .marged").hover(
	  function () {
	  	jQuery.easing.def = "easeOutSine";
	  	$(this).find(">.hover").css("display", "block");
	  	$(this).find(">.hover").stop();
		$(this).find(">.hover").animate({
            opacity: 1
            }, 800, function(){
                                
            });
	  },
	  function () {
	  jQuery.easing.def = "easeInSine";
	  	$(this).find(">.hover").stop();
		$(this).find(">.hover").animate({
            opacity: 0
            }, 900, function(){
                                
        });
	  }
	);
	
    
});


