$(document).ready(function()
{
    /* Downloads items */
    //$(".jqDownloadsSubnav").live("click", addActiveClass);
});



/**
* Method to get downloads
**/
function showDownloads(downloadsTypeId)
{
    if($("#jqDownloadsContainer").length > 0)
    {
        if(downloadsTypeId > 0)
        {
            $.ajax({

               url:baseUrl+"downloads/index/type/" +  downloadsTypeId,
               dataType:'json',
               success:function(response)
               {
                    if(response.error)
                    {
                        if(response.error == 'downloads')
                        {
                            alert(response.info);
                        }
                       /* else
                        {
                            handleAjaxError(response.error);
                        }*/
                    }
                    else if(response.success)
                    {
                        $("#jqDownloadsContainer").html(response.Html);
                    }
               },
               beforeSend:function()
               {
                   showAjaxLoader(true);
                   $(".jqDownloadsSubnav").removeClass("active");
                   $(".jqDownloadsSubnav" + downloadsTypeId).addClass("active");
               },
               complete:function()
               {
                   hideAjaxLoader();
               }
            });
        }
    }
    else
    {
        window.location = baseUrl+"downloads/index/type/" +  downloadsTypeId;
    }
    return false;
}

/**
 * Comment
 */
function addActiveClass()
{
    $(this).blur();
    $(".jqDownloadsSubnav").removeClass("active");
   
}