﻿$(document).ready(function() {

    $('#viewer a').nyroModal({
        gallery: 'lightbox',
        addImageDivTitle: false,
        galleryCounts: NoCount,
        zIndexStart: 1000
    });

    $('ul.tabs li a').click(function(e) {
        e.preventDefault();
    });
    $('ul.tabs').tabs('div.panes > div', { tabs: 'li',
        current: 'selected',
        event: 'click'
    });

    $('#thumbnails a').each(function() {
        (new Image()).src = $(this).attr('href');
    });

    var link = $(lnkFirstThumbnailImageClientId);
    $('#thumbnails a').click(function(e) {
        e.preventDefault();
        $(link).attr('rel', 'lightbox nofollow')
        link = this;
        $(imgProductClientId).stop('true').animate({ opacity: 0 }, 'fast', '', function() {
            $(imgProductClientId).attr('src', $(link).find('img').attr('src').split("?z=")[1])
                                         .animate({ opacity: 1 }, 'slow');
            $(lnkMainImageClientId).attr('href', $(link).attr('href'));
            $(link).attr('rel', 'nofollow')
        });
    });

    //    $(ddlQuantityClientId).change();

    //    $(ddlQuantityClientId).change(function() {
    //        var rfvEl = document.getElementById(rfvQuantityClientId);
    //        var revEl = document.getElementById(revQuantityClientId);
    //        if ($(this).val() == '6+') {
    //            $(this).hide();
    //            $(txtQuantityClientId).show().focus().select();
    //            ValidatorEnable(rfvEl, true);
    //            ValidatorEnable(revEl, true);
    //        }
    //        else {
    //            ValidatorEnable(rfvEl, false);
    //            ValidatorEnable(revEl, false);
    //        }
    //    });
});

function NoCount(nb, total, elts, settings) {

}
        
