﻿/// <reference path="~/Cuke/JS/Dev/jquery-vsdoc.js" />
/*
* Depends: Cuke.js, jquery.js
* Revision: 3
* ReleaseTask: Minify
*/

function allThumbs(c, id, toSkip, viewPage) {
    var url = Cuke.RootUrl + 'BM/Community/Declination/Declination.ashx?action=all';
    jQuery("#loader", c).show();
    jQuery.post(url, { from: toSkip, thingId: id, to: -1, page: viewPage }, function(data) {
        if (data != '') {
            jQuery(".bm-declination-thumbs", c).append(data);
            jQuery("#loader", c).hide();
        }
    });
}

function addDeclination(c, id, t, d, name) {
    var url = 'BM/Community/Declination/Declination.ashx?action=add';
    jQuery.getJSON(url, { title: t, desc: d, thingId: id, fileName: name }, function(data) {
        if (data && data.Done == 1) {
            jQuery("#msgPane", c).html(data.Msg).show();
            jQuery("#loader", c).hide();
            jQuery("button", c).attr("disabled", "disabled");
            jQuery("#form_submit", c).empty();
        }
        else jQuery("#msgPane", c).html(data.Msg).show();
    });
}