$(document).ready(function () {

    $(".video-thumbs li").hover(function () {
        $(this).css({ 'z-index': '10' }); /*Add a higher z-index value so this image stays on top*/
        $(this).find('div.video-thumb-wrapper').stop() /* Add class of "hover", then stop animation queue buildup*/
            .animate({
                //top: '-16px', /* The next 4 lines will vertically align this image */
                //left: '-18px',
                //width: '80px', /* Set new width */
                //height: '80px', /* Set new height */
                padding: '0px'
            }, 200); /* this value of "200" is the speed of how fast/slow this hover animates */

    }, function () {
        $(this).css({ 'z-index': '0' }); /* Set z-index back to 0 */
        $(this).find('div.video-thumb-wrapper').stop()  /* Remove the "hover" class , then stop animation queue buildup*/
            .animate({
                top: '0',
                left: '0'
                //,width: '63px', /* Set width back to default */
                //height: '63px' /* Set height back to default */
            }, 300);
    }).click(function (evt) {
        //$(".video-thumbs li.selected").removeClass("selected");
        //$(this).addClass("selected");
        var relArr, embed, caption, count, vendor;
        relArr = $(this).find('a').attr('rel').split('|');
        vendor = relArr[0];
        embed = relArr[1];
        caption = relArr[2];
        count = relArr[3];
        document.getElementById('bbbplayer').setQueryStringParameters({ embedCode: embed, autoplay: 1 });
        $("#currentVideo-caption").text(caption);
        //$("#video-count").text(count);
        //document.getElementById('bbbplayer').playMovie();
        evt.preventDefault();
    });

   // photos/videos tab
    $(".photo-thumbs li").hover(function() {
        $(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/ 
        $(this).find('img').stop() /* Add class of "hover", then stop animation queue buildup*/
            .animate({
                top: '-16px', /* The next 4 lines will vertically align this image */ 
                left: '-18px',
                width: '100px', /* Set new width */
                height: '100px', /* Set new height */
                padding: '0px'
            }, 200); /* this value of "200" is the speed of how fast/slow this hover animates */
    
        } , function() {
        $(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
        $(this).find('img').stop()  /* Remove the "hover" class , then stop animation queue buildup*/
            .animate({
                top: '0',
                left: '0',
                width: '63px', /* Set width back to default */
                height: '63px' /* Set height back to default */
            }, 300);
    }).click(function(evt){
        $(".photo-thumbs li.selected").removeClass("selected");
        $(this).addClass("selected");
        var relArr, largeUrl, caption,count;
        relArr = $(this).find('a').attr('rel').split('|');
        largeUrl =  relArr[0];
        caption = relArr[1];
        count= relArr[2];
        $("#largeImage").attr('src',largeUrl);
        $("#large-photo-caption").text(caption);
        //$("#image-count").text(count);
        evt.preventDefault();
    });

});

