

/*QA solr url*/
/*var solrURL = "https://qa-search.listany.com/restroqa/select";
var solitaireSolrURL = "http://68.183.246.145:8983/solr/solitaire/select";*/
/*Production solr url*/
var solrURL = "https://search.listany.com/production/select";



var appName = "Udyogsoftware";

var serverCalls = {
    _custom_req_Solar_Ajax: function(data, callBack) {
        $.ajax({
            'url': solrURL,
            'data': data,
            'dataType': 'jsonp',
            'jsonp': 'json.wrf',
            'async': 'false',
            'success': callBack
        });
    },
    _req_Solitaire_Solar_Ajax: function(data, callBack) {
        $.ajax({
            'url': solitaireSolrURL,
            'data': data,
            'dataType': 'jsonp',
            'jsonp': 'json.wrf',
            'async': 'false',
            'success': callBack
        });
    },
    _req_Solar_Ajax: function(query, startC, rowsC, callBack) {
        var username = "m#tau43r";
        var password = "$0lrEx";
        $.ajax({
            'url': solrURL,
            'data': { 'wt': 'json', 'q': query, start: startC, rows: rowsC },
            'dataType': 'jsonp',
            'jsonp': 'json.wrf',
            'async': 'false',
            'beforeSend': function(xhr) {
                xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
            },
            'success': callBack
        });
    },
    _req_Solar_Exchange_Ajax: function(key,exchangeURL, callBack) {
        var username = "m#tau43r";
        var password = "$0lrEx";
        $.ajax({
            'url': exchangeURL,
            'data': { 'key': key },
            // 'jsonpCallback':'xyz',
            'dataType': 'jsonp',
            'jsonp': 'jsoncallback',
            'async': 'false',
            'beforeSend': function(xhr) {
                xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
            },
            'success': callBack
        });

    },
    _req_Ajax_Post2: function(url, standardParams, params, callBack) {
        var token = $("meta[name='_csrf']").attr("content");
        var header = $("meta[name='_csrf_header']").attr("content");
        for (id in standardParams) {
            params[id] = standardParams[id];
        }
        $.ajax({
            type: "POST",
            url: url,
            beforeSend: function(request) {
                request.setRequestHeader(header, token);
            },
            dataType: "json",
            data: params,
            success: callBack
        });
    },
    _req_Ajax_Post_Normal: function(url, params, callBack) {
        var token = $("meta[name='_csrf']").attr("content");
        var header = $("meta[name='_csrf_header']").attr("content");
        $.ajax({
            type: "POST",
            url: url,
            beforeSend: function(request) {
                request.setRequestHeader(header, token);
            },
            data: params,
            success: callBack
        });
    },
    _req_jquery: function(url, params, callBack) {
        params['xyz'] = new Date().getTime();
        $.getJSON(url, params, function(response) {
            callBack(response);
        });
    },
    _req_Ajax_Get: function(url, params, callBack, async) {
        params['xyz'] = new Date().getTime();
        $.ajax({
            type: "GET",
            async: async,
            url: url,
            dataType: "json",
            data: params,
            success: callBack
        });
    },
    _req_Ajax_Post: function(url, params, callBack) {
        var token = $("meta[name='_csrf']").attr("content");
        var header = $("meta[name='_csrf_header']").attr("content");
        $.ajax({
            type: "POST",
            url: url,
            beforeSend: function(request) {
                request.setRequestHeader(header, token);
            },
            dataType: "json",
            data: params,
            success: function(data) {
                callBack(data);
            }
        });
    },
    _req_Ajax_PostJson: function(url, params, callBack) {
        var token = $("meta[name='_csrf']").attr("content");
        var header = $("meta[name='_csrf_header']").attr("content");
        $.ajax({
            type: "POST",
            url: url,
            beforeSend: function(request) {
                request.setRequestHeader(header, token);
            },
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            data: params,
            success: function(data) {
                callBack(data);
            }
        });
    }
};
/*
 * $Id: base64.js,v 2.15 2014/04/05 12:58:57 dankogai Exp dankogai $
 *
 *  Licensed under the BSD 3-Clause License.
 *    http://opensource.org/licenses/BSD-3-Clause
 *
 *  References:
 *    http://en.wikipedia.org/wiki/Base64
 */

(function(global) {
    'use strict';
    // existing version for noConflict()
    var _Base64 = global.Base64;
    var version = "2.1.9";
    // if node.js, we use Buffer
    var buffer;
    if (typeof module !== 'undefined' && module.exports) {
        try {
            buffer = require('buffer').Buffer;
        } catch (err) {}
    }
    // constants
    var b64chars
        = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    var b64tab = function(bin) {
        var t = {};
        for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
        return t;
    }(b64chars);
    var fromCharCode = String.fromCharCode;
    // encoder stuff
    var cb_utob = function(c) {
        if (c.length < 2) {
            var cc = c.charCodeAt(0);
            return cc < 0x80 ? c
                : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
                                + fromCharCode(0x80 | (cc & 0x3f)))
                : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
                   + fromCharCode(0x80 | ((cc >>>  6) & 0x3f))
                   + fromCharCode(0x80 | ( cc         & 0x3f)));
        } else {
            var cc = 0x10000
                + (c.charCodeAt(0) - 0xD800) * 0x400
                + (c.charCodeAt(1) - 0xDC00);
            return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
                    + fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
                    + fromCharCode(0x80 | ((cc >>>  6) & 0x3f))
                    + fromCharCode(0x80 | ( cc         & 0x3f)));
        }
    };
    var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
    var utob = function(u) {
        return u.replace(re_utob, cb_utob);
    };
    var cb_encode = function(ccc) {
        var padlen = [0, 2, 1][ccc.length % 3],
        ord = ccc.charCodeAt(0) << 16
            | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
            | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
        chars = [
            b64chars.charAt( ord >>> 18),
            b64chars.charAt((ord >>> 12) & 63),
            padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
            padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
        ];
        return chars.join('');
    };
    var btoa = global.btoa ? function(b) {
        return global.btoa(b);
    } : function(b) {
        return b.replace(/[\s\S]{1,3}/g, cb_encode);
    };
    var _encode = buffer ? function (u) {
        return (u.constructor === buffer.constructor ? u : new buffer(u))
        .toString('base64')
    }
    : function (u) { return btoa(utob(u)) }
    ;
    var encode = function(u, urisafe) {
        return !urisafe
            ? _encode(String(u))
            : _encode(String(u)).replace(/[+\/]/g, function(m0) {
                return m0 == '+' ? '-' : '_';
            }).replace(/=/g, '');
    };
    var encodeURI = function(u) { return encode(u, true) };
    // decoder stuff
    var re_btou = new RegExp([
        '[\xC0-\xDF][\x80-\xBF]',
        '[\xE0-\xEF][\x80-\xBF]{2}',
        '[\xF0-\xF7][\x80-\xBF]{3}'
    ].join('|'), 'g');
    var cb_btou = function(cccc) {
        switch(cccc.length) {
        case 4:
            var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
                |    ((0x3f & cccc.charCodeAt(1)) << 12)
                |    ((0x3f & cccc.charCodeAt(2)) <<  6)
                |     (0x3f & cccc.charCodeAt(3)),
            offset = cp - 0x10000;
            return (fromCharCode((offset  >>> 10) + 0xD800)
                    + fromCharCode((offset & 0x3FF) + 0xDC00));
        case 3:
            return fromCharCode(
                ((0x0f & cccc.charCodeAt(0)) << 12)
                    | ((0x3f & cccc.charCodeAt(1)) << 6)
                    |  (0x3f & cccc.charCodeAt(2))
            );
        default:
            return  fromCharCode(
                ((0x1f & cccc.charCodeAt(0)) << 6)
                    |  (0x3f & cccc.charCodeAt(1))
            );
        }
    };
    var btou = function(b) {
        return b.replace(re_btou, cb_btou);
    };
    var cb_decode = function(cccc) {
        var len = cccc.length,
        padlen = len % 4,
        n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
            | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
            | (len > 2 ? b64tab[cccc.charAt(2)] <<  6 : 0)
            | (len > 3 ? b64tab[cccc.charAt(3)]       : 0),
        chars = [
            fromCharCode( n >>> 16),
            fromCharCode((n >>>  8) & 0xff),
            fromCharCode( n         & 0xff)
        ];
        chars.length -= [0, 0, 2, 1][padlen];
        return chars.join('');
    };
    var atob = global.atob ? function(a) {
        return global.atob(a);
    } : function(a){
        return a.replace(/[\s\S]{1,4}/g, cb_decode);
    };
    var _decode = buffer ? function(a) {
        return (a.constructor === buffer.constructor
                ? a : new buffer(a, 'base64')).toString();
    }
    : function(a) { return btou(atob(a)) };
    var decode = function(a){
        return _decode(
            String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' })
                .replace(/[^A-Za-z0-9\+\/]/g, '')
        );
    };
    var noConflict = function() {
        var Base64 = global.Base64;
        global.Base64 = _Base64;
        return Base64;
    };
    // export Base64
    global.Base64 = {
        VERSION: version,
        atob: atob,
        btoa: btoa,
        fromBase64: decode,
        toBase64: encode,
        utob: utob,
        encode: encode,
        encodeURI: encodeURI,
        btou: btou,
        decode: decode,
        noConflict: noConflict
    };
    // if ES5 is available, make Base64.extendString() available
    if (typeof Object.defineProperty === 'function') {
        var noEnum = function(v){
            return {value:v,enumerable:false,writable:true,configurable:true};
        };
        global.Base64.extendString = function () {
            Object.defineProperty(
                String.prototype, 'fromBase64', noEnum(function () {
                    return decode(this)
                }));
            Object.defineProperty(
                String.prototype, 'toBase64', noEnum(function (urisafe) {
                    return encode(this, urisafe)
                }));
            Object.defineProperty(
                String.prototype, 'toBase64URI', noEnum(function () {
                    return encode(this, true)
                }));
        };
    }
    // that's it!
    if (global['Meteor']) {
       Base64 = global.Base64; // for normal export in Meteor.js
    }
})(this);

var currencyData = {},
    currencyText = {},
    dollarvalue = 67.30,
    gbp = 81.96,
    singaporeDollar = 50.7258,
    australianDollar = 53.6882,
    canadianDollar = 53.9416,
    euro = 79.85,
    swissFranc = 66.96,
    frenchFranc = 11.52,
    malaysianRingitt = 16.45,
    indonesianRupiah = 0.0048,
    thaiBatt = 2.10,
    hkDollar = 8.58,
    uae = 18.33,
    openDiv, // required varable for storing open div
    showDiv = false,
    documetsPath = "",
    isTestEnvrnment = false,
    advSearch = { 'productsLength': '', 'originalData': [] },
    scheduleTrialProducts = [],
    storeLocationsDetails = [],
    storeLocationAddress = [],
    availTrylistItemList = [],
    availWishlistItemList = [],
    selectedVariantOptions = {},
    isTryListOptionActive = false,
    isWishListOptionActive = false,
    productViewInListing = new Object(),
    solitaireProductPreview = new Object(),
    productPreview = new Object();
var appUtil = {
    xomsLoadedTemplates: {},
    getPath: function (name) {
        return appContextPath + '/static/' + themeName + '/templates/' + name + '.jsp';
    },
    WhatsAppSharingAction: function () {
        if (/webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
            /*var url = window.location.href;
            var whatsappUrl = 'https://api.whatsapp.com/send?phone=whatsappphonenumber&text=';
            var finalUrl = whatsappUrl+url;
            window.open(finalUrl,'_blank');*/
            $("#myBlogShareModal").modal();
        } else if (/Android/i.test(navigator.userAgent)) {
            var url = window.location.href;
            var whatsappUrl = 'whatsapp://send?text=';
            var finalUrl = whatsappUrl + url;
            window.open(finalUrl, '_blank');
        } else {
            $("#myBlogShareModal").modal();
        }
    },
    gettingShareMobileNo: function () {
        var phoneNo = $('#whatsAppMobileNo').val();
        if (phoneNo == "") {
            $('#whatsAppMobileNoError').html('Please enter mobile no');
        } else if (phoneNo.length != 10) {
            $('#whatsAppMobileNoError').html('Please enter valid mobile no');
        } else {
            appUtil.sharingSelProductUrl(phoneNo);
        }
    },
    sharingSelProductUrl: function (phoneNo) {
        var productUrl = window.location.href;
        var whatsappUrl = 'https://api.whatsapp.com/send?phone=' + '91' + phoneNo;
        var whatsappUrl1 = whatsappUrl + '&text=' + productUrl;
        window.open(whatsappUrl1, '_blank');
    },
    renderTemplate: function (item, model, callback) {
        item.model = model;
        if (appUtil.xomsLoadedTemplates[item.fileName]) {
            $.templates(item.tmpl).link(item.container, item.model);
            if (callback)
                callback.call();
        } else {
            var file = this.getPath(item.fileName);
            $.get(file, null, function (tmplData) {
                $('head').append(tmplData);
                appUtil.xomsLoadedTemplates[item.fileName] = item.fileName;
                $.templates(item.tmpl).link(item.container, item.model);
                if (callback)
                    callback.call();
            });
        }
    },
    loadJsonStructure: function (fileName, next) {
        $.getJSON(appContextPath + '/static/' + themeName + "/json/" + fileName + ".json", function (jsonData) {
            next(jsonData);
        });
    },
    getProductImagePath: function (image) {
        var imageUrl = '';
        if (image != undefined && image) {
            if (image.startsWith("http")) {
                imageUrl = image;
            } else {
                imageUrl = appContextPath + "/web" + image;
            }
        } else {
            imageUrl = appContextPath + '/static/' + themeName + '/images/Image-Coming-Soon.png';
        }
        return imageUrl;
    },
    getDialingCode: function (code, obj) {
        var s = $.view(obj);
        if (!_.isEmpty(countryWiseDialingCode)) {
            var currentCountryData = _.find(countryWiseDialingCode.available_country.country_dialing_code, function (eachItem) {
                if (eachItem.Country_code.toLowerCase() === code.toLowerCase()) {
                    return eachItem;
                }
            });

            if (currentCountryData) {
                if (s.parentElem.parentElement.className.indexOf('signup') > -1) {
                    document.getElementsByName('input_mobile_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#mobileNo").focus();
                } else if (s.parentElem.parentElement.className.indexOf('shipping') > -1) {
                    document.getElementsByName('country_add_ship_prefix_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#myprofile_shipping_mobileNo").focus();
                } else if (s.parentElem.parentElement.className.indexOf('billing') > -1 || s.parentElem.parentElement.className.indexOf('updateBillingAdd') > -1) {
                    document.getElementsByName('country_add_prefix_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#myprofile_billing_mobileNo").focus();
                } else if (s.parentElem.parentElement.className.indexOf('addressNewDeliver') > -1) {
                    document.getElementsByName('deliveryNew_country_prefix_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#phone1").focus();
                } else if (s.parentElem.parentElement.className.indexOf('addressNewBilling') > -1) {
                    document.getElementsByName('billingNew_country_prefix_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#billingPhone").focus();
                } else if (s.parentElem.parentElement.className.indexOf('pickupBillingSec') > -1) {
                    document.getElementsByName('billingPickup_country_prefix_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#billingPhone").focus();
                } else if (s.parentElem.parentElement.className.indexOf('delivery_country') > -1) {
                    document.getElementsByName('delivery_country_add_prefix_code')[0].value = currentCountryData.Country_code + ' ' + currentCountryData.International_Dialing;
                    $("#phone1").focus();
                }
            }
        }
    },
    validateDataObjectIsEmpty: function (m) {
        var x;
        if (!_.isEmpty(m)) {
            x = _.filter(m, function (c) {
                if (c.length > 0) {
                    return c;
                }
            })
        }
        return x != undefined ? false : true;
    },
    getCountryDialingCodes: function (fileName, callback) {
        appUtil.loadJsonStructure(fileName, function (data) {
            var xObj = {};
            xObj['available_country'] = data;
            xObj['country_code'] = [];
            xObj['country_names'] = [];
            xObj.codeValues = {}
            if (!_.isEmpty(data)) {
                _.each(data.country_dialing_code, function (eachObj) {
                    xObj.country_code.push(eachObj.Country_code)
                    xObj.country_names.push(eachObj.Country)
                    xObj.codeValues[eachObj.Country_code] = {};
                    xObj.codeValues[eachObj.Country_code]['code'] = eachObj.Country_code
                    xObj.codeValues[eachObj.Country_code]['country_name'] = eachObj.Country
                });
            }
            xObj.country_code = xObj.country_code.sort()
            xObj.country_names = appUtil.getUniqueData(xObj.country_names).sort(function (a, b) {
                a = a.toLowerCase();
                b = b.toLowerCase();
                if (a > b) {
                    return 1;
                } else if (a < b) {
                    return -1;
                } else if (a === b) {
                    return 0;
                }
            });
            if (callback)
                callback(xObj);
        });
    },
    callPageLayout: function (fileName) {
        appUtil.loadJsonStructure(fileName, function (data) {
            var layout = data[fileName];
            appUtil.prepareContentWidgets(layout);
        })
    },
    profileUserName: function (profile) {
        var nameString;
        if (profile.firstName && profile.lastName) {
            return profile.firstName + " " + profile.lastName
        } else {
            return profile.firstName
        }
    },
    prepareContentWidgets: function (layout) {
        if (layout != undefined) {
            var layoutWidgets = layout.widgets;
            for (var i = 0; i < layoutWidgets.length; i++) {
                var layoutWidget = layoutWidgets[i];
                var widgets = layoutWidget.widget;
                for (var key in widgets) {
                    var container = key; //layoutWidget.column+' #'+key;
                    try {
                        var baseWidget = this.getWidgetObjectName(key);
                        if (isTestEnvrnment)
                            window[baseWidget + '_js'].testWidget(baseWidget, container, widgets[key]);
                        else
                            window[baseWidget + '_js'].initCall(container, widgets[key]);
                    } catch (e) { console.log(e) }
                }
            }
        }
    },
    getWidgetObjectName: function (widget) {
        var baseWidget = widget;
        if (widget.indexOf("_horizontal") >= 0) {
            var index = widget.indexOf("_horizontal");
            baseWidget = widget.substring(0, index);
        } else if (widget.indexOf("_vertical") >= 0) {
            var index = widget.indexOf("_vertical");
            baseWidget = widget.substring(0, index);
        }
        return baseWidget;
    },
    getSelMenuBanner: function (menuData) {
        var blockName = "Menu Over Text";
        var title = appUtil.firstLetterCapitalFormation(overMenuSel);
        if (title != "") {
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId, orgId: orgId, blockName: blockName, title: title },
                function (responce) {
                    if (responce.status) {
                        if (responce.result.length > 0) {
                            var contentSec = "";
                            $('.menu_banner').remove();
                            if (responce.result[0].fullContent != null && responce.result[0].fullContent != "") {
                                contentSec = responce.result[0].fullContent;
                            }

                            if (title == "Digital Transformation") {
                                $('#Digital_Transformation_subMenuBanner').append(contentSec);
                            } else if (title == "Finance Transformation") {
                                $('#Finance_Transformation_subMenuBanner').append(contentSec);
                            } else if (title == "Data Processing") {
                                $('#Data_Processing_subMenuBanner').append(contentSec);
                            } else if (title == "Cloud Services") {
                                $('#Cloud_Services_subMenuBanner').append(contentSec);
                            } else if (title == "Data Engineering") {
                                $('#Data_Engineering_subMenuBanner').append(contentSec);
                            } else if (title == "Process Automation") {
                                $('#Process_Automation_subMenuBanner').append(contentSec);
                            } else if (title == "Professional Service") {
                                $('#Professional_Service_subMenuBanner').append(contentSec);
                            } else if (title == "About Us") {
                                $('#About_Us_subMenuBanner').append(contentSec);
                            }
                            else {
                                $('#' + title + '_subMenuBanner').append(contentSec);
                            }
                        }
                    }
                });

        }
    },
    renderImage: function (url) {
        if (url != undefined) {
            if (!String.prototype.startsWith) {
                String.prototype.startsWith = function (searchString, position) {
                    position = position || 0;
                    return this.indexOf(searchString, position) === position;
                };
            }
            if (url.startsWith("/files"))
                return appContextPath + "/web" + url;
            else
                return url;
        } else {
            return "";
        }
    },
    getUniqueData: function (a) {
        var seen = {};
        var out = [];
        var len = a.length;
        var j = 0;
        for (var i = 0; i < len; i++) {
            var item = a[i];
            if (seen[item] !== 1) {
                seen[item] = 1;
                out[j++] = item;
            }
        }
        return out;
    },
    renderAndLink: function (item, model) {
        item.model = model;
        item.template.link(item.container, item.model);
    },
    getVideoEmbedId: function (url) {
        var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
        var match = url.match(regExp);

        if (match && match[2].length == 11) {
            return match[2];
        } else {
            return 'error';
        }
    },
    checkEmailId: function (inputvalue) {
        var EmailRegex = new RegExp(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
        if (EmailRegex.test(inputvalue)) {
            return true;
        } else {
            return false;
        }
    },
    redirectToCart: function (count) {
        serverCalls._req_jquery(appContextPath + '/web/shopRest/getUserCart.json', { storeId: storeId }, function (data) {
            if (data.status) {
                if (data.result.length > 0) {
                    window.location.href = appContextPath + "/web/checkout";
                } else {
                    window.location.href = appContextPath + "/cart-empty";
                    //mmMessages.warning("Please start shopping with us..!!!");
                }
            } else {
                window.location.href = appContextPath + "/cart-empty";
                //mmMessages.warning("Please start shopping with us..!!!")
            }
        });
    },
    specifiedAttributeName: function (name) {
        if (name.toLowerCase().indexOf('_') > -1) {
            name = appUtil.replaceSplChars(name, ' ')
            return appUtil.firstLetterCapitalFormation(name);
        } else if (name.toLowerCase().indexOf('gst') > -1) {
            return name
        } else if (name.toLowerCase().indexOf('round off') > -1) {
            return name;
        } else {
            return appUtil.firstLetterCapitalFormation(name);
        }
    },
    generateCustomAttributeName: function (byOption, name, resObj) {
        if (byOption == 'title') {
            var titleName = resObj[name];
            if (titleName != undefined && titleName != "") {
                return appUtil.firstLetterCapitalFormation(resObj[name]);
            } else {
                return "";
            }
        } else if (byOption == 'subTitle') {
            if (name.indexOf('_') > -1) {
                return appUtil.firstLetterCapitalFormation(appUtil.replaceSplChars(name.substring(0, name.toLowerCase().indexOf("_stone_")), ' '))
            } else {
                return appUtil.firstLetterCapitalFormation(name)
            }
        }
    },
    //following method allows a-z A-Z space and . which starts with alphabet a-z/A-Z
    checkAlphabets: function (inputvalue) {
        var pattern = /^[a-zA-Z]([a-zA-Z., ])+$/i;
        if (pattern.test(inputvalue)) {
            return true;
        } else {
            return false;
        }
    },
    //following method allows a-z A-Z 0-9 space and . & which starts with alphabet a-z/A-Z/0-9
    checkAlphaNumeric: function (inputvalue) {
        var pattern = /^[a-zA-Z0-9]{0,1}([a-z0-9A-Z.&,-\/ ])+$/i;
        if (pattern.test(inputvalue)) {
            return true;
        } else {
            return false;
        }
    },
    getShippingSettings: function (obj) {
        var shippingString;
        if (obj.handlingTime != "" && obj.handlingTimeMax != "") {
            shippingString = obj.handlingTime + " - " + obj.handlingTimeMax + " Days";
        }

        return shippingString;
    },
    onlyNumbers: function (e) {
        var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
        if (verified) { e.preventDefault(); }
    },
    onlyDecimal: function (e) {
        var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9.]/);
        if (verified) { e.preventDefault(); }
    },
    scrollById: function (id) {
        $('html,body').animate({
            scrollTop: $("#" + id).offset().top
        }, 'slow');
    },
    scrollByIdCustomize: function (id, top) {
        $('html,body').animate({
            scrollTop: $("#" + id).offset().top - $("#" + id).offset().top
        }, 'slow');
    },
    getCurrencySymbol: function () {
        return currencyUtil.getCurrecyHTMLCode();
    },


    manageAddToCart: function (params, callback) {
        serverCalls._req_Ajax_Post(appContextPath + '/web/shopRest/addToCart.json', params, function (data) {
            if (callback)
                callback(data)
        });
    },
    prepareProductRemarks: function (navigator) {
        var productObj = {};
        var remarksObj = {};
        if (navigator == "listing") {
            productObj = productViewInListing;
        } else {
            productObj = productPreview;
        }

        if (!_.isEmpty(productObj)) {
            var optionObj = { "product_gross_weight": { "Product Gross Weight": "" }, "sku_code": { "SKU Code": "" }, "gold_purity": { "Gold Purity": "" }, "metal_type": { "Gold Type": "" }, "product_net_weight": { "Product Net Weight": "" }, "polish": { "Polish": "" }, "setting_type": { "Setting Type": "" } }
            if (!_.isEmpty(productObj.productSpecifications)) {
                _.each(productObj.productSpecifications, function (eachObj) {
                    _.each(eachObj, function (eachParam, paramKey) {
                        _.each(optionObj, function (eachOption, optionKey) {
                            if (optionKey == paramKey) {
                                for (var key in eachOption) {
                                    if (eachOption.hasOwnProperty(key)) {
                                        if (!remarksObj.hasOwnProperty(key)) {
                                            if (eachParam.unit) {
                                                remarksObj[appUtil.replaceSplChars(key, "_")] = eachParam.value + " " + eachParam.unit
                                            } else {
                                                remarksObj[appUtil.replaceSplChars(key, "_")] = eachParam.value
                                            }
                                        }
                                    }
                                }

                            }
                        });
                    });
                });

                if (!_.isEmpty(productObj.productSpecifications.PriceBreakup)) {
                    _.each(productObj.productSpecifications.PriceBreakup, function (eachValue, eachKey) {
                        if (eachKey.toLowerCase().indexOf("gst") > -1) {
                            remarksObj[eachKey] = eachValue.value;
                        }
                    });
                }
            }
        }
        return remarksObj;

    },
    removeCurrentVariantPopUp: function (viewModal) {
        productViewInListing = {}
        $("#" + viewModal).modal('hide');
        $(".modal-backdrop").remove();
        $("body").removeClass("modal-open");
    },


    popUtility: function (collectedId) {
        setTimeout(function () {
            $('#' + collectedId).addClass('hideDiv_opacity');
            if (collectedId == 'wishlist_Popup') {
                wishlistCount = 0;
            }
            shoppingCartCount = 0;
        }, 3000);
    },

    togglePopupDiv: function (divID) {
        if (divID != openDiv)
            $('#' + openDiv).fadeToggle(200);
        $("#" + divID).fadeToggle(200, function () {
            openDiv = $(this).is(':visible') ? divID : null;
        });
    },

    registerPopupDiv: function (divID, action) {
        if (action == undefined) {
            if ($("#" + divID).is(':visible')) {
                $("#" + divID).removeClass('showDiv');

                $("#" + divID).addClass('hideDiv');

            } else {
                $("#" + divID).removeClass('hideDiv');
                $("#" + divID).addClass('showDiv');
            }
        }
    },
    formatDegit: function (val) {
        var sampleVal = val.toString();
        if (sampleVal.indexOf(".") > -1) {
            sampleVal = sampleVal.split(".");
            sampleVal = sampleVal[0] + "." + sampleVal[1].charAt(0);
        }
        return parseFloat(sampleVal);
    },
    getApplicationMenus: function (callback) {
        serverCalls._req_Ajax_PostJson(appContextPath + '/web/content/getContentStructure.json', JSON.stringify({ storeId: storeId, orgId: orgId, groupType: "menu" }), function (response) {
            callback(response);
        });
    },
    getListingMenuCategory: function (menuId, menuList, dataParams, callback) {
        if (!dataParams.isCategorySelected) {
            var menuArray = menuList;
        } else if (dataParams.isCategorySelected == false) {
            var menuArray = _.filter(menuList, function (num) { return num._id == dataParams.catDetails.menuId; });
        } else {
            var menuArray = _.filter(menuList, function (num) { return num._id == menuId; });
        }
        if (callback)
            callback(menuArray);
    },
    subscribeSubmit: function () {
        var subEmail = $('#subscribeEmail').val();
        //var subMobile = $('#subscribePhoneNo').val();
        if (subEmail != "") {
            if (!appUtil.checkEmailId(subEmail)) {
                mmMessages.error("Please enter valid email address");
            } else {
                loader.startLoader();
                localStorageUtil.setStorage("subscribeMailId", $('#subscribeEmail').val());

                var reqDate = new Date();
                var reqtime = reqDate.getDate() + "/" + (reqDate.getMonth() + 1) + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

                var formData = { 'Email_id': subEmail, 'Requested_Date': reqtime };
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Subscribe", formData: JSON.stringify(formData) }, function (response) {
                    if (response.status) {
                        loader.stopLoader();
                        var subject = "We have received your request for subscription To Newsletter";
                        var body = " ";
                        body += "<br/> Hello Dear User";
                        body += '<br/><br/>Thank you for your interest in UdyogSoftware. We are pleased to welcome you as a new subscriber to our newsletter.';
                        body += "<br/><br/></br>";
                        var message = "Your request for a Sign Up To Newsletter has been received successfully.";
                        var senderEmailId = subEmail;
                        appUtil.triggerEmail(body, subject, senderEmailId, senderEmailId, 'subscribeForm', message);
                        mmMessages.success("Successfully subscribed");
                        $('#subscribeEmail').val("");
                        // $('#subscribePhoneNo').val("");
                    } else {
                        loader.stopLoader();
                        mmMessages.error(response.message);
                    }
                });
            }
        } else {
            mmMessages.error('Please enter your email address');
        }
    },
    subscripPopupBtnAction: function () {
        var subEmail = $('#subPopupEmail').val();
        if (subEmail != "") {
            if (!appUtil.checkEmailId(subEmail)) {
                alert("Please enter valid email id");
            } else {
                var formData = { Email_id: subEmail };
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Subscribe Newsletter", formData: JSON.stringify(formData) }, function (response) {
                    if (response.status) {
                        mmMessages.success("Successfully subscribed");
                        $('#subPopupEmail').val("");
                        localStorage.setItem('subscripePopupStatus', 1);
                        $('#subscribePopUp').modal('hide');
                    }
                });
            }
        } else {
            alert('Please enter your email id');
        }
    },
    triggerEmail: function (body, subject, senderEmailId, senderName, formId, message) {
        serverCalls._req_Ajax_Post(appContextPath + '/web/commonRest/sendGenericMail', { body: body, subject: subject, receivers: senderEmailId }, function (data) {
            if (data.status) {
                $('#subscribeEmail').val("");
                mmMessages.success(message);
                $('#' + formId).each(function () {
                    this.reset();
                });

                /*setTimeout(function() {
                    window.location = "/";
                }, 3000);*/
            } else {
                mmMessages.error(senderName + " Sorry !! we are unable to process your request now");
            }
        });
    },
    submitReqDemoForm: function (formId) {
        var isFormValid = appUtil.validateReqDemoForm(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var reqDemo_fName = $('#reqDemoFName').val(),
                reqDemo_org = $('#reqDemoOrg').val(),
                reqDemo_des = $('#reqDemoDesign').val(),
                reqDemo_email = $('#reqDemoEmail').val(),
                reqDemo_phoneNo = $('#reqDemoMNo').val(),
                reqDemo_message = $('#reqDemoQuery').val();
            var formData = { 'Name': reqDemo_fName, 'Organisation': reqDemo_org, 'Designation': reqDemo_des, 'Email': reqDemo_email, 'Phone_No': reqDemo_phoneNo, 'Message': reqDemo_message };
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Demo Request", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "Request for Demo " + reqDemo_fName;
                    var body = " ";
                    body += "<br/> Name: " + $('#reqDemoFName').val();
                    body += "<br/> Organisation: " + $('#reqDemoOrg').val();
                    body += "<br/> Designation: " + $('#reqDemoDesign').val();
                    body += "<br/> Email Id: " + $('#reqDemoEmail').val();
                    body += "<br/> Contact Number: " + $('#reqDemoMNo').val();
                    body += "<br/> Message: " + $('#reqDemoQuery').val();
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    appUtil.triggerEmail(body, subject, reqDemo_email, reqDemo_fName, formId, message);
                    window.location.href = "/thankyou";
                    /*mmMessages.success("Your request sent successfully");
                    $( '#contactUsForm' ).each(function(){
                        this.reset();
                    });*/
                }
            });
        }
    },
    validateReqDemoForm: function (formId) {
        return $('#' + formId).validate({
            rules: {
                reqDemoFName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                reqDemoOrg: {
                    required: true,
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                reqDemoDesign: {
                    required: true,
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                reqDemoEmail: {
                    email3: true
                },
                reqDemoMNo: {
                    minlength: 10,
                    maxlength: 10,
                    number: true
                },
                reqDemoQuery: {
                    required: true
                }
            },
            messages: {
                reqDemoFName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                reqDemoOrg: {
                    required: "Please enter your Organisation",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                reqDemoDesign: {
                    required: "Please enter your Designation",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                reqDemoEmail: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                reqDemoMNo: {
                    required: "Please enter your Phone No.",
                    minlength: "Please enter a valid Phone No.",
                    maxlength: "Please enter a valid Phone No.",
                    number: "Only numbers are allowed"
                },
                reqDemoQuery: {
                    required: "Please enter your Message"
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },

    getDemoFormSubmit: function(formId){
        var isFormValid = this.validateGetDemoForm(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fname = $('#req_name').val(),
                emailId = $('#req_emailId').val(),
                mobileNo = $('#req_mobileNo').val(),
                location = $('#req_location').val(),
                company = $('#req_company').val(),
                messages = $('#req_mesg').val();
                var reqDate = new Date();
                var reqtime = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

               var dataFields = {'Name':fname,'emailId':emailId,'mobile':mobileNo,'location':location,'Company_Name':company,'Message':messages,'Requested_Date':reqtime};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"Book a Demo",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fname +', </br><br/>',
                        body += "Thank you for reaching out to us , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/>";
                        body += '<strong> Your provided details:</strong>';
                        body += "<br/><br/>Name: " + fname;
                        body += "<br/><br/>Email Id: " + emailId;
                        body += "<br/><br/>Mobile Number: " + mobileNo;
                        body += "<br/><br/>Location: " + location;
                        body += "<br/><br/>Company Name: " + company;
                        body += "<br/><br/>Message: " + messages +'</br>',
                        body += "<br/><br/>";
                        var message = "Your request sent successfully";
                        var subject = "UdyogSoftware - Get a Demo page submission";
                        appUtil.triggerEmail(body, subject, emailId, fname, formId, message);

                        var HRsubject = "UdyogSoftware - Get a Demo page submission";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br>",
                            HRbody += "</br><br/>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/>',
                            HRbody += "<br/>";
                            HRbody += '<strong> Your provided details:</strong>';
                            HRbody += "<br/><br/>Name: " + fname;
                            HRbody += "<br/><br/>Email Id: " + emailId;
                            HRbody += "<br/><br/>Mobile Number: " + mobileNo;
                            HRbody += "<br/><br/>Location: " + location;
                            HRbody += "<br/><br/>Message: " + messages;
                            HRbody += "<br/><br/>";
                            //appUtil.triggerEmail(HRbody, HRsubject, emailId, fName, formId, message);
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fname, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com, lkrapally@adaequare.com', fname, formId, message);
                            mmMessages.success("Your request sent successfully");
                            window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },
    validateGetDemoForm: function(formId) {
        return $('#' + formId).validate({
            rules: {
                req_name: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                req_emailId: {
                    email3: true
                },
                req_mobileNo: {
                    minlength: 10,
                    //maxlength: 10,
                    number: true
                },
                req_location: {
                    required: true, 
                }
            },
            messages: {
                req_name: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                req_emailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                req_mobileNo: {
                    required: "Please enter your Mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    //maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                },
                req_location: {
                    required: "Please enter your Location",
                }
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },

    /*contactFormSubmit:function(formId){
        var isFormValid = this.validateContactForms(formId).form();
        if (!isFormValid) {
                return false;
        }else{
            var con_name = $('#subFullName').val(),
                con_emailId = $('#subEmailId').val(),
                con_mobileNo = $('#subMobileNo').val(),
                con_location = $('#location').val(),
                con_orgName = $('#orgName').val();
                con_query = $('#subQuery').val();
               var dataFields = {'Name':con_name,'emailId':con_emailId,'phoneNo':con_mobileNo,'Location':con_location,'Organization Name':con_orgName,'query':con_query};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"Contact Us",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var subject = "Thanks for reaching Tracet";
                        var body = " ";
                        body += "Hi " + con_name +', </br><br/>',
                        body += "Thank you for reaching out to us with your Fixed Asset Management requirements , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/>";
                        var message = "Your request sent successfully";
                        appUtil.triggerEmail(body, subject, con_emailId, con_name, formId, message);

                        var HRsubject = "Customer enquiry - Contact";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br><br/>",
                            HRbody += "</br><br/>We have received request from customer on Tracet website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>Name: " + con_name +'</br>',
                            HRbody += "<br/>Email Id: " + con_emailId +'</br>',
                            HRbody += "<br/>Phone No: " + con_mobileNo +'</br>',
                            HRbody += "<br/>Location: " + con_location +'</br>',
                            HRbody += "<br/>Organization Name: " + con_orgName +'</br>',
                            HRbody += "<br/>Query: " + con_query +'</br>',
                            HRbody += "<br/>";
                            appUtil.triggerEmail(HRbody, HRsubject, 'bgouni@adaequare.com,lkrapally@adaequare.com,apmothe@adaequare.com', fName, formId, message);

                        mmMessages.success("Your request sent successfully");
                        window.location.href = "/thankyou-for-get-call-back";
                    }

                });
        }
        loader.stopLoader();
    },*/
    contactPageFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validatecontactPageForm(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
             var contact_fname = $('#con_fullName').val(),
                    contact_lastName = $('#con_lastName').val(),
                    contact_email = $('#con_email_Id').val(),
                    contact_mobile = $('#con_phoneno').val(),
                    //contact_state = $('#con_state').val(),
                    //con_city = $('#con_city').val(),
                    con_company = $('#con_companyName').val(),
                    con_msg = $('#con_message').val();

            var reqDate = new Date();
            var today = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

            var formData = { 'Name': contact_fname+ contact_lastName, 'Email_id': contact_email, 'Mobile_No': contact_mobile, 'Company_Name': con_company, 'Message':con_msg, 'Requested_Date': today };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Contact Details", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "Contact us form submission";
                    var body = " ";
                    body += "Hi " + contact_fname + ', </br>',
                        body += "</br>Thank you for reaching out to us, One of our team members will call you shortly !" + '<br/>',
                        body += "<br/>";
                    var message = "Your request sent successfully";

                    appUtil.triggerEmail(body, subject, contact_email, contact_fname, formId, message);
                    //mmMessages.success("Your request sent successfully");

                    var HRsubject = "UdyogSoftware - Contact us form submission";
                    var HRbody = " ";
                    HRbody += "Hi Team, </br>", 
                    HRbody += "</br>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details." + '<br/><br/>',
                    HRbody += "<br/>Name: " + contact_fname + contact_lastName;
                    HRbody += "<br/><br/>Email Id: " + contact_email;
                    HRbody += "<br/><br/>Mobile Number: " + contact_mobile;
                    HRbody += "<br/><br/>Company Name: " + con_company;
                    HRbody += "<br/><br/>Message: " + con_msg;
                    HRbody += "<br/><br/><br/>";
                    //appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com,ptdhirde@adaequare.com', contact_fname, formId, message);
                    appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', contact_fname, formId, message);
                    mmMessages.success("Your request sent successfully");
                    window.location.href = "/thankyou";

                    $('#contactUsForm').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },
    validatecontactPageForm: function (formId) {
        return $('#' + formId).validate({
            rules: {
                con_fullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_lastName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_emailId: {
                    email3: true
                },
                con_phoneno: {
                    minlength: 10,
                    //maxlength: 13,
                    number: true
                },
                con_state: {
                    required: true,
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_city: {
                    required: true,
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_interest: {
                    required: true,
                },
                con_companyName: {
                    required: true,
                }
            },
            messages: {
                con_fullName: {
                    required: "Please enter your First Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_lastName: {
                    required: "Please enter your Last Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_emailId: {
                    required: "Please enter your Email",
                    email3: "Please enter a valid Email"
                },
                con_phoneno: {
                    required: "Please enter your Phone No.",
                    minlength: "Please enter a valid Phone No.",
                    //maxlength: "Please enter a valid Phone No.",
                    number: "Only numbers are allowed"
                },
                con_state: {
                    required: "Please enter your State",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_city: {
                    required: "Please enter your City",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_interest: {
                    required: "Please Select your Interest"
                },
                con_companyName: {
                    required: "Please enter your Company Name",
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },
    contactFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validateGetDemoForm(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {

            if (formId == "contactPopupForm") {
                var contact_name = $('#con_name').val(),
                    contact_email = $('#con_emailId').val(),
                    contact_mobile = $('#con_mobileNo').val(),
                    contact_location = $('#con_location').val(),
                    con_orgName = $('#con_orgName').val(),
                    con_query = $('#con_query').val();
            } else {
                var contact_name = $('#contact_name').val(),
                    contact_email = $('#contact_emailId').val(),
                    contact_mobile = $('#contact_mobileNo').val(),
                    contact_location = $('#contact_location').val();
            }

            var reqDate = new Date();
            var today = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

            var formData = { 'Name': contact_name, 'Email_id': contact_email, 'Mobile_No': contact_mobile, 'Location': contact_location, 'Requested_Date': today };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Contact Details", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "UdyogSoftware - Contact us form submission";
                    var body = " ";
                    body += "Hi " + contact_name + ', </br>',
                        body += "</br>Thank you for reaching out to us with your Fixed Asset Management requirements , One of our team members will call you shortly !" + '<br/>',
                        body += "<br/>";
                    var message = "Your request sent successfully";

                    appUtil.triggerEmail(body, subject, contact_email, contact_name, formId, message);
                    //mmMessages.success("Your request sent successfully");

                    var HRsubject = "UdyogSoftware - Contact us form submission";
                    var HRbody = " ";
                    HRbody += "Hi Team, </br>",
                    HRbody += "</br>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details." + '<br/><br/>',
                    HRbody += "<br/>Name: " + contact_name;
                    HRbody += "<br/><br/>Email Id: " + contact_email;
                    HRbody += "<br/><br/>Mobile Number: " + contact_mobile;
                    HRbody += "<br/><br/>Location: " + contact_location;
                    if (formId == "contactPopupForm") {
                        HRbody += "<br/><br/>Organization Name: " + con_orgName;
                        HRbody += "<br/><br/>Message: " + con_query;
                    }
                    HRbody += "<br/><br/><br/>";
                    appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com,lkrapally@adaequare.com,anantmothe@gmail.com,bgouni@adaequare.com', contact_name, formId, message);
                    //appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', contact_name, formId, message);
                    mmMessages.success("Your request sent successfully");
                    window.location.href = "/thankyou";

                    $('#contactForm').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },
    validateContactForms: function (formId) {
        return $('#' + formId).validate({
            rules: {
                con_subFullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_orgName: {
                    required: true,
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_location: {
                    required: true,
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_subEmailId: {
                    email3: true
                },
                con_subMobileNo: {
                    minlength: 10,
                    maxlength: 13,
                    number: true
                },
                con_subQuery: {
                    required: true
                }
            },
            messages: {
                con_subFullName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_orgName: {
                    required: "Please enter your Organisation",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_location: {
                    required: "Please enter your Location",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_subEmailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                con_subMobileNo: {
                    required: "Please enter your Contact No.",
                    minlength: "Please enter a valid Contact No.",
                    maxlength: "Please enter a valid Contact No.",
                    number: "Only numbers are allowed"
                },
                con_subQuery: {
                    required: "Please enter your Message"
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },
    addActiveSection: function (menuId) {
        if (isCategorySelected) {
            $("#" + menuId).addClass("selected");
        } else {
            $("#sub" + menuId).addClass("selected");
        }
    },
    getDataInObjectForm: function (catArray, returnObj) {
        var sampleObj = {}
        _.each(catArray, function (eachCat) {
            sampleObj[eachCat._id] = eachCat;
        });
        if (returnObj)
            returnObj(sampleObj);
    },
    getFirstCharacterCapital: function (str) {
        if (str != null) {
            return str.charAt(0).toUpperCase() + str.slice(1);
        }
    },
    firstLetterCapitalFormation: function (str) {
        if (str) {
            str = str.toLowerCase();
            var strArray = [];
            var newString = "";
            if (str.indexOf(" ") > -1) {
                str = str.split(" ");
                for (var i = 0; i < str.length; i++) {
                    strArray.push(str[i].charAt(0).toUpperCase() + str[i].slice(1))
                }
                if (strArray) {
                    for (var j = 0; j < strArray.length; j++) {
                        if (newString != "") {
                            newString = newString + " " + strArray[j];
                        } else {
                            newString = strArray[j];
                        }
                    }
                }
            } else {
                newString = appUtil.getFirstCharacterCapital(str);
            }
            return newString;
        } else {
            return str;
        }
    },
    customCurrencyFormatted: function (amount) {
        var n = amount,
            c = isNaN(c = Math.abs(c)) ? 2 : c,
            d = d == undefined ? "." : d,
            t = t == undefined ? "," : t,
            s = n < 0 ? "-" : "",
            i = String(parseInt(n = Math.abs(Number(n)))),
            j = (j = i.length) > 3 ? j % 3 : 0;
        return parseFloat(s + i + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""));

    },
    currencyFormatted: function (amount) {
        var n = amount,
            c = isNaN(c = Math.abs(c)) ? 2 : c,
            d = d == undefined ? "." : d,
            t = t == undefined ? "," : t,
            s = n < 0 ? "-" : "",
            i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
            j = (j = i.length) > 3 ? j % 3 : 0;
        if (currency == "INR")
            return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
        else
            return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t);

    },
    isDeviceTypeNonDeskTop: function () {
        var isMobile = false; //initiate as false
        // device detection
        if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) ||
            /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipad|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))) isMobile = true;
        return isMobile
    },
    checkTagAvailability: function (tags, tag) {
        var availTags = tags.map(function (tArr) { return tArr.toLowerCase() })
        if (availTags.indexOf(tag) > - 1) {
            return true
        } else {
            return false
        }
    },
    checkCategoryAvailability:function(categoryList, category){
        var availTags = categoryList.map(function(tArr){ return tArr.toLowerCase()})
        if(availTags.indexOf(category) > - 1){
            return true
        }else{
            return false
        }
    },
    isMobileDevice: function () {
        var isMobile = false; //initiate as false
        // device detection
        if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) ||
            /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))) isMobile = true;
        return isMobile
    },
    replaceSplChars: function (q, replaceChar) {
        var replacedString = q;
        if (replacedString) {
            if (replaceChar != undefined) {
                replacedString = q.replace(/[^a-zA-Z0-9]/g, replaceChar);
            } else {
                replacedString = q.replace(/[^a-zA-Z0-9]/g, '*');
            }
        }
        return replacedString;
    },
    setCurrencyChange: function (currencyRequest, selectCurrency) {
        var selectedCurrency;
        if (selectCurrency != undefined) {
            selectedCurrency = selectCurrency;
        } else if (localStorageUtil.getStorage("selectedCurrency")) {
            selectedCurrency = localStorageUtil.getStorage("selectedCurrency");
        } else if (sessionStorage.getItem("selectedCurrency")) {
            selectedCurrency = sessionStorage.getItem("selectedCurrency");
        } else {
            selectedCurrency = selectCurrency;
        }
        appUtil.setChangeCurrencyField(selectedCurrency, currencyRequest);
    },
    setChangeCurrencyField: function (selectedCurrency, currencyRequest) {
        $("#currencySelected .currencyName").html(currencyRequest);
        $("#currencySelected img").attr('src', '');
        $("#currencySelected img").attr('src', appContextPath + '/static/' + themeName + '/images/countries/' + selectedCurrency + '.png');
        sessionStorage.setItem('selectedCurrency', selectedCurrency);
        localStorageUtil.setStorage('selectedCurrency', selectedCurrency)
        appUtil.loadPage(currencyRequest);
    },
    loadPage: function (currencyRequest) {
        if (currencyRequest != undefined) {
            setTimeout(function () {
                location.reload();
            }, 1000);
        }
    },

    showMobileFilterOption: function () {
        $(".leftPanelFilterSection").toggleClass("displayBlock");
    },
    gettingDocumentPath: function (documentPath) {
        documetsPath = window.location.origin + '/web' + documentPath;
    },
    gettingDocumentPathother: function (documentPathother) {
        documetsPathother = window.location.origin + '/web' + documentPathother;
    },
    othercareerFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validateotherCareerForms(formId).form();

        if (!isFormValid) {

            var slectVacancies = $("#selectVacancies").val();
            if (slectVacancies == "") {
                $('#vacanciesErrorMsg').show();
                $('#vacanciesErrorMsg').text('Please select required vacancie');
            }

            try {
                if (documetsPathother == "") {
                    $('#uploadFileErrorMsgother').show();
                    $('#uploadFileErrorMsgother').text("Please upload your profile.");
                    return false;
                }
            }
            catch (err) {
                $('#uploadFileErrorMsgother').show();
                $('#uploadFileErrorMsgother').text("Please upload your profile.");
                return false;
            }


            if (documetsPathother == "") {
                $('#uploadFileErrorMsgother').text("Please upload your profile.");
            }
            return false;
        } else {
            var slectVacancies = $("#selectVacancies").val();
            if (slectVacancies == "") {
                $('#vacanciesErrorMsg').show();
                $('#vacanciesErrorMsg').text('Please select required vacancie');
            } else if (documetsPathother == "") {
                $('#uploadFileErrorMsgother').text("Please upload your profile.");
            } else {
                var career_Name = $('#othercareer_Name').val(),
                    career_email = $('#othercareer_email').val(),
                    career_qualification = $('#career_qualification').val(),
                    career_qualification_year = $('#career_qualification_year').val(),
                    career_work_exp = $('#career_work_exp').val(),
                    career_dob = $('#career_dob').val(),
                    career_gender = $('input[name=gender]:checked').val(),
                    career_phoneNo = $('#othercareer_phoneNo').val();
                car_vacancie = $("#selectVacancies").val(),
                    othercar_document = documetsPathother;
                var formData = { Name: career_Name, Email_id: career_email, Phone_No: career_phoneNo, Date_of_Birth: career_dob, Gender: career_gender, Highest_Qualification: career_qualification, Highest_Qualification_Completion_Year: career_qualification_year, Work_Experience: career_work_exp, Vacancie_Name: car_vacancie, Profile: othercar_document };
                loader.startLoader();
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Job Vacancies", formData: JSON.stringify(formData) }, function (response) {
                    if (response.status) {
                        mmMessages.success("Your request sent successfully.");
                        $('#uploadFileSucessMsgother').hide();
                        loader.stopLoader();
                        var subject = "We have received your request for UdyogSoftware Careers";
                        var body = " ";
                        body += "Hi " + career_Name + "<br/><br/>";
                        body += "Thank you for applying to the <strong>" + car_vacancie.toLowerCase() + "</strong> position at udyog software.";
                        body += "<br/><br/> <strong>Your provided details :</strong>";
                        body += "<br/><br/> Name: " + career_Name;
                        body += "<br/><br/> Email Id: " + career_email;
                        body += "<br/><br/> Mobile No: " + career_phoneNo;
                        body += "<br/><br/> Highest Qualification: " + career_qualification;
                        body += "<br/><br/> Highest Qualification Completion Year: " + career_qualification_year;
                        body += "<br/><br/> Date of birth: " + career_dob;
                        body += "<br/><br/> Updated Document: " + othercar_document;
                        body += "<br/><br/></br>";
                        var message = "Your request sent successfully.";
                        var senderEmailId = career_email;
                        appUtil.triggerEmail(body, subject, senderEmailId, senderEmailId, 'othercareerForm', message);

                        mmMessages.success("Your request sent successfully");
                        documetsPathother = "";
                        $('#othercareerForm').each(function () {
                            this.reset();
                            $('#file-upload-filenameother').empty();
                        });
                        //$('#file-upload-filename').empty();

                    }
                });
            }
        }
    },
 
    validateotherCareerForms: function (formId) {
        return $('#' + formId).validate({
            rules: {
                othercareer_Name: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                othercareer_lName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                othercareer_email: {
                    email3: true
                },
                othercareer_city: {
                    letterfirst: true,
                    minlength: 2,
                    maxlength: 75
                },
                othercareer_phoneNo: {
                    minlength: 10,
                    maxlength: 13,
                    number: true
                }
            },
            messages: {
                othercareer_Name: {
                    required: "Please enter Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                othercareer_lName: {
                    required: "Please enter Last Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                othercareer_email: {
                    required: "Please enter Email",
                    email3: "Please enter a valid email id"
                },
                othercareer_city: {
                    required: "Please enter city",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                othercareer_phoneNo: {
                    required: "Please enter Phone No",
                    minlength: "Please enter a valid Phone No",
                    maxlength: "Please enter a valid Phone No",
                    number: "Only numbers are allowed"
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },
    partnerFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validatepartnerForms(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var partner_fName = $('#partner_Name').val(),
                partner_email = $('#partner_email').val(),
                partner_phoneNo = $('#partner_phoneNo').val(),
                partner_org = $('#partner_orgname').val(),
                //partner_desg = $('#partner_designation').val(),
                partner_loc = $('#partner_location').val(),
                partner_desc = $('#partner_description').val();

            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
            var yyyy = today.getFullYear();
            today = dd + '/' + mm + '/' + yyyy;

            var formData = { 'Name': partner_fName, 'Organization_Name': partner_org, 'Business_Email': partner_email, 'Phone_No': partner_phoneNo, 'Location': partner_loc, 'Description': partner_desc, 'Requested_Date': today };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Partner us", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "UdyogSoftware - Partners Request from " + partner_fName;
                    var body = " ";
                    body += "<br/> Dear, " + partner_fName;
                    body += "<br/><br/>Thank you for your interest in UdyogSoftware. One of our experts will contact you shortly to assist you in your query. .<br/><br/><b>Your provided details:</b><br>"
                    body += "<br/> Name: " + partner_fName;
                    body += "<br/> Business Email: " + partner_email;
                    body += "<br/> Contact Number: " + partner_phoneNo;
                    body += "<br/> Organization Name: " + partner_org;
                    //body += "<br/> Designation: " + $('#partner_designation').val();
                    body += "<br/> Location: " + partner_loc;
                    body += "<br/> Description: " + partner_desc;
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    appUtil.triggerEmail(body, subject, partner_email, partner_fName, formId, message);
                    window.location.href = "/thankyou";
                    //mmMessages.success("Your request sent successfully");

                    var HRsubject = "UdyogSoftware - Partners Request from " + partner_fName;
                    var HRbody = "Find below applicant details:";
                    HRbody += "<br/><br/> Name: " + partner_fName;
                    HRbody += "<br/> Business Email: " + partner_email;
                    HRbody += "<br/> Contact Number: " + partner_phoneNo;
                    HRbody += "<br/> Organization Name: " + partner_org;
                    //HRbody += "<br/> Designation: " + $('#partner_designation').val();
                    HRbody += "<br/> Location: " + partner_loc;
                    HRbody += "<br/> Description: " + partner_desc;
                    HRbody += "<br/><br/>";
                    //appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', partner_fName, formId, message);
                    appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com,lkrapally@adaequare.com,anantmothe@gmail.com,bgouni@adaequare.com', partner_fName, formId, message);
                    $('#partnerForm').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },
    pricingFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validatepartnerForms(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var p_fName = $('#partner_Name').val(),
                p_email = $('#partner_email').val(),
                p_phoneNo = $('#partner_phoneNo').val(),
                no_assets = $('#noof_assets').val(),
                no_users = $('#noof_users').val(),
                prefer_variant = $('#prefer_variant').val(),
                p_desc = $('#partner_description').val();

            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
            var yyyy = today.getFullYear();
            today = dd + '/' + mm + '/' + yyyy;

            var formData = { 'Name': p_fName, 'Business_Email': p_email, 'Phone_No': p_phoneNo, 'Number_of_Assets': no_assets, 'Number_of_Users': no_users, 'Prefer_Variant': prefer_variant,  'Message': p_desc, 'Requested_Date': today };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Partner us", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "UdyogSoftware - Pricing Request from " + p_fName;
                    var body = " ";
                    body += "<br/> Dear, " + p_fName;
                    body += "<br/><br/>Thank you for your interest in UdyogSoftware. One of our experts will contact you shortly to assist you in your query. .<br/><br/><b>Your provided details:</b><br>"
                    body += "<br/> Name: " + p_fName;
                    body += "<br/> Business Email: " + p_email;
                    body += "<br/> Contact Number: " + p_phoneNo;
                    body += "<br/> Number of Assets: " + no_assets;
                    body += "<br/> Number of Users: " + no_users;
                    body += "<br/> Prefer Variant: " + prefer_variant;
                    body += "<br/> Message: " + p_desc;
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    appUtil.triggerEmail(body, subject, p_email, p_fName, formId, message);
                    window.location.href = "/thankyou";
                    //mmMessages.success("Your request sent successfully");

                    var HRsubject = "UdyogSoftware - Pricing Request from " + p_fName;
                    var HRbody = "Find below applicant details:";
                    HRbody += "<br/><br/> Name: " + p_fName;
                    HRbody += "<br/> Business Email: " + p_email;
                    HRbody += "<br/> Contact Number: " + p_phoneNo;
                    HRbody += "<br/> Number of Assets: " + no_assets;
                    HRbody += "<br/> Number of Users: " + no_users;
                    body += "<br/> Prefer Variant: " + prefer_variant;
                    HRbody += "<br/> Message: " + p_desc;
                    HRbody += "<br/><br/>";
                    appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', p_fName, formId, message);
                    //appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com,lkrapally@adaequare.com,anantmothe@gmail.com,bgouni@adaequare.com', p_fName, formId, message);
                    $('#partnerForm').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },
    LandingContactFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validatepartnerForms(formId).form();
        if (!isFormValid) {
            if (!$('#termsAndConditions').is(':checked')) {
                $('#m_termscondtn').html('This field is required.');
            } else {
                $('#m_termscondtn').html('');
            }
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var partner_fName = $('#partner_Name').val(),
                partner_email = $('#partner_email').val(),
                partner_phoneNo = $('#partner_phoneNo').val(),
                partner_org = $('#org_Name').val(),
                partner_desg = $('#partner_designation').val(),
                partner_loc = $('#partner_location').val(),
                partner_desc = $('#partner_description').val();

            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
            var yyyy = today.getFullYear();
            today = dd + '/' + mm + '/' + yyyy;

            var formData = { 'Name': partner_fName, 'Organization_Name': partner_org, 'Business_Email': partner_email, 'Phone_No': partner_phoneNo, 'Designation': partner_desg, 'Location': partner_loc, 'Description': partner_desc, 'Requested_Date': today };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Landing Page Contact Us", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "Request for Contact Us from " + partner_fName;
                    var body = " ";
                    body += "<br/> Dear, " + $('#partner_Name').val();
                    body += "<br/><br/>Thank you for your interest in UdyogSoftware. One of our experts will contact you shortly to assist you in your query. .<br/><br/><b>Your provided details:</b><br>"
                    body += "<br/> Name: " + $('#partner_Name').val();
                    body += "<br/> Organization Name: " + $('#org_Name').val();
                    body += "<br/> Business Email: " + $('#partner_email').val();
                    body += "<br/> Contact Number: " + $('#partner_phoneNo').val();
                    body += "<br/> Designation: " + $('#partner_designation').val();
                    body += "<br/> Location: " + $('#partner_location').val();
                    body += "<br/> Description: " + $('#partner_description').val();
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    appUtil.triggerEmail(body, subject, partner_email, partner_fName, formId, message);
                    window.location.href = "/thankyou";
                    //mmMessages.success("Your request sent successfully");

                    var HRsubject = "Applicant Details of " + partner_fName + " for Contact Us";
                    var HRbody = "Find below applicant details:";
                    HRbody += "<br/><br/> Name: " + $('#partner_Name').val();
                    HRbody += "<br/> Organization Name: " + $('#org_Name').val();
                    HRbody += "<br/> Business Email: " + $('#partner_email').val();
                    HRbody += "<br/> Contact Number: " + $('#partner_phoneNo').val();
                    HRbody += "<br/> Designation: " + $('#partner_designation').val();
                    HRbody += "<br/> Location: " + $('#partner_location').val();
                    HRbody += "<br/> Description: " + $('#partner_description').val();
                    HRbody += "<br/><br/>";
                    appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', partner_fName, formId, message);
                    //appUtil.triggerEmail(HRbody, HRsubject, 'anantmothe@gmail.com,lkrapally@adaequare.com,apmothe@adaequare.com,bgouni@adaequare.com', partner_fName, formId, message);
                    $('#partnerForm').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },
    validatepartnerForms: function (formId) {
        $.validator.addMethod("valueNotEquals", function(value, element, arg){
          return arg !== value;
        }, "Which variant do you prefer?");

        return $('#' + formId).validate({
            rules: {
                con_fullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_lastName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                partner_Name: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_emailId: {
                    email3: true
                },
                con_city: {
                    required: true
                },
                con_query: {
                    required: true
                },
                con_phoneno: {
                    required: true
                },
                con_state: {
                    required: true
                },
                partner_designation: {
                    required: true
                },
                partner_description: {
                    required: true
                },
                org_Name: {
                    required: true
                },
                partner_location: {
                    required: true
                },
                noof_assets: {
                    required: true
                },
                noof_users: {
                    required: true
                },
                prefer_variant: { 
                    valueNotEquals: "Which variant do you prefer?"
                },
            },
            messages: {
                con_fullName: {
                    required: "Please enter your First Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_lastName: {
                    required: "Please enter your Last Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                partner_Name: {
                    required: "Please enter your Name",
                },
                con_emailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                con_phoneno: {
                    required: "Please enter your Phone Number"
                },
                con_city: {
                    required: "Please enter your City"
                },
                con_state: {
                    required: "Please enter your State"
                },
                con_query: {
                    required: "Please enter your Message"
                },
                partner_designation: {
                    required: "Please enter your Designation"
                },
                partner_description: {
                    required: "Please enter Description"
                },
                org_Name: {
                    required: "Please enter Organization Name"
                },
                partner_location: {
                    required: "Please enter Location"
                },
                noof_assets: {
                    required: "Please enter No. Of Assets"
                },
                noof_users: {
                    required: "Please enter No. Of Users"
                },
                prefer_variant: { 
                    valueNotEquals: "Please Select Which variant do you prefer?"
                },
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },
    contactusFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validateDynamicForms(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var con_fName = $('#con_fullName').val(),
                con_lName = $('#con_lastName').val(),
                con_email = $('#con_emailId').val(),
                con_phoneNo = $('#con_phoneno').val(),
                con_City = $('#con_city').val(),
                con_state = $('#con_state').val(),
                con_Country = $('#con_country').val(),
                con_product = $('#con_product').val();
            var formData = { First_Name: con_fName, Last_Name: con_lName, Email_id: con_email, Phone_No: con_phoneNo, State: con_state, Country: con_Country, City: con_City, Interested_in: con_product };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Contact Us", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "Request for Contact Us from " + con_fName;
                    var body = " ";
                    body += "<br/> Dear, " + $('#con_fullName').val();
                    body += "<br/><br/>Thank you for your interest in UdyogSoftware. One of our experts will contact you shortly to assist you in your query. .<br/><br/><b>Your provided details:</b>"
                    body += "<br/>First Name: " + $('#con_fullName').val();
                    body += "<br/>Last Name: " + $('#con_lastName').val();
                    body += "<br/>Email Id: " + $('#con_emailId').val();
                    body += "<br/>Contact Number: " + $('#con_phoneno').val();
                    body += "<br/>State: " + $('#con_state').val();
                    body += "<br/>City: " + $('#con_city').val();
                    body += "<br/>Interested in: " + $('#con_product').val();
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    //var clientMailids = "uchheda@tracetadaequare.com"+","+"sales@tracetadaequare.com";
                    //var clientMailids = "prachidhirde92@gmail.com"+","+"ajadhav@tracetadaequare.com";
                    //appUtil.triggerEmail(body, subject, con_email, con_fName, formId, message);
                    //appUtil.triggerEmail(body, subject,clientMailids +','+ con_email, con_fName, formId, message);
                    //mmMessages.success("Your request sent successfully");

                    appUtil.triggerEmail(body, subject, con_email, con_fName, formId, message);
                    //mmMessages.success("Your request sent successfully");

                    var HRsubject = "Request for Contact Us from " + con_fName;
                    var HRbody = "Find below applicant details:";
                    HRbody += "<br/>First Name: " + $('#con_fullName').val();
                    HRbody += "<br/>Last Name: " + $('#con_lastName').val();
                    HRbody += "<br/>Email Id: " + $('#con_emailId').val();
                    HRbody += "<br/>Contact Number: " + $('#con_phoneno').val();
                    HRbody += "<br/>State: " + $('#con_state').val();
                    HRbody += "<br/>City: " + $('#con_city').val();
                    HRbody += "<br/>Interested in: " + $('#con_product').val();
                    HRbody += "<br/><br/><br/>";
                    appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', con_fName, formId, message);
                    //appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com', con_fName, formId, message);
                    $('#contactUsForm').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },
    submitParnersFormDemo: function(formId){
        var isFormValid = this.validateParnersFormDemo(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fName = $('#partFullName').val(),
                orgName = $('#partOrgName').val(),
                emailId = $('#partSubEmailId').val(),
                mobileNo = $('#partSubMobileNo').val(),
                designationName =$('#degName').val(),
                location = $('#partLocation').val(),
                description = $('#description').val();

                // var today = new Date();
                // var dd = String(today.getDate()).padStart(2, '0');
                // var mm = String(today.getMonth() + 1).padStart(2, '0');
                // var yyyy = today.getFullYear();
                // today = dd + '/' + mm + '/' + yyyy;

                var reqDate = new Date();
                var today = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

               var dataFields = {
                'Name':fName,
                'EmailId':emailId,
                'PhoneNo':mobileNo, 
                'Location':location,
                'Organization Name':orgName,
                'Designation Name':designationName, 
                'Description' :description,
                'Requested_Date':today
                };
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"Become a Partner Form",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fName +', </br><br/>',
                        body += "Thanks for reaching out to us for Partners connection.One of our team members will call you shortly !"+'<br/>',
                        body += "<br/>";
                        var message = "Your request sent successfully";
                        var subject = "UdyogSoftware - Become a Partner Request";
                        appUtil.triggerEmail(body, subject, emailId, fName, formId, message);

                        var HRsubject = "UdyogSoftware - Become a Partner Request";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br><br/>",
                            HRbody += "</br>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>Name: " + fName +'</br>',
                            HRbody += "<br/>Email Id: " + emailId +'</br>',
                            HRbody += "<br/>Phone No: " + mobileNo +'</br>',
                            HRbody += "<br/>Location: " + location +'</br>',
                            HRbody += "<br/>Organization Name: " + orgName +'</br>',
                            HRbody += "<br/>Description: " + description +'</br>',
                            HRbody += "<br/>";
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fName, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'anantmothe@gmail.com,lkrapally@adaequare.com,apmothe@adaequare.com,bgouni@adaequare.com,ptdhirde@adaequare.com', fName, formId, message);

                        mmMessages.success("Your request sent successfully");
                        $( '#partnerPopupModal' ).modal('hide');
                        window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },

    validateParnersFormDemo: function(formId) {
        return $('#' + formId).validate({
            rules: {
                partFullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                partSubEmailId: {
                    email3: true
                },
                partSubMobileNo: {
                    minlength: 10,
                   // maxlength: 13,
                    number: true
                },
                partLocation: {
                    required: true, 
                },
                partOrgName:{
                    required: true,
                },
                degName:{
                    required: true,
                },
                description:{
                    required: true,
                }
            },
            messages: {
                partFullName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                partSubEmailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                partSubMobileNo: {
                    required: "Please enter your Mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    //maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                },
                partLocation: {
                    required: "Please enter your Location",
                },
                partOrgName:{
                    required: "Please enter your Organization Name",
                },
                degName:{
                    required : "Please enter your Designation"
                },
                description:{
                    required: "Please enter Description",
                }
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },
    demoerpformSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validateDynamicForms(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var con_Name = $('#demo-erp-box_Name').val(),
                con_CompanyName = $('#demo-erp-box_CompanyName').val(),
                con_email = $('#demo-erp-box_email').val(),
                con_phoneNo = $('#demo-erp-box_phoneNo').val(),
                con_state = $('#demo-erp-box_state').val(),
                con_interestedin = $('#demo-erp-box_interestedin').val(),
                con_Message = $('#demo-erp-box_message').val();
            var formData = { Name: con_Name, CompanyName: con_CompanyName, Email_id: con_email, Phone_No: con_phoneNo, State: con_state, InterestedIn: con_interestedin, Message: con_Message };
            loader.startLoader();
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Demo Form", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "Request for Contact Us from " + con_Name;
                    var body = " ";
                    body += "<br/> Dear, " + $('#demo-erp-box_Name').val();
                    body += "<br/><br/>Thank you for your interest in UdyogSoftware. One of our experts will contact you shortly to assist you in your query. .<br/><br/>Your provided details:"
                    body += "Name: " + $('#demo-erp-box_Name').val();
                    body += "<br/>Company Name: " + $('#demo-erp-box_CompanyName').val();
                    body += "<br/> Email Id: " + $('#demo-erp-box_email').val();
                    body += "<br/> Contact Number: " + $('#demo-erp-box_phoneNo').val();
                    body += "<br/> State: " + $('#demo-erp-box_state').val();
                    body += "<br/> InterestedIn: " + $('#demo-erp-box_interestedin').val();
                    body += "<br/> Message: " + $('#demo-erp-box_message').val();
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    appUtil.triggerEmail(body, subject, con_email, con_Name, formId, message);

                    var HRsubject = "Request for Contact Us from " + con_fName;
                    var HRbody = "Find below applicant details:";
                    HRbody += "<br/>Name: " + $('#demo-erp-box_Name').val();
                    HRbody += "<br/>Company Name: " + $('#demo-erp-box_CompanyName').val();
                    HRbody += "<br/>Email Id: " + $('#demo-erp-box_email').val();
                    HRbody += "<br/>Contact Number: " + $('#demo-erp-box_phoneNo').val();
                    HRbody += "<br/>State: " + $('#demo-erp-box_state').val();
                    HRbody += "<br/>InterestedIn: " + $('#demo-erp-box_interestedin').val();
                    HRbody += "<br/>Message: " + $('#demo-erp-box_message').val();
                    HRbody += "<br/><br/><br/>";
                    //appUtil.triggerEmail(HRbody, HRsubject, 'anantmothe@gmail.com,lkrapally@adaequare.com,apmothe@adaequare.com,bgouni@adaequare.com', con_Name, formId, message);
                    appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', con_Name, formId, message);

                    //mmMessages.success("Your request sent successfully");
                    $('#demo-erp-form').each(function () {
                        this.reset();
                    });
                }
            });
        }
        loader.stopLoader();
    },


    validateDynamicForms: function (formId) {
        return $('#' + formId).validate({
            rules: {
                con_fullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_lastName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_fName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                con_emailId: {
                    email3: true
                },
                con_city: {
                    required: true
                },
                con_location: {
                    required: true
                },
                con_query: {
                    required: true
                },
                con_orgName: {
                    required: true
                },
                con_phoneno: {
                    required: true
                },
                con_state: {
                    required: true
                },
                con_mb: {
                    minlength: 10,
                    maxlength: 10,
                    number: true
                },
            },
            messages: {
                con_fullName: {
                    required: "Please enter your First Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_fName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_lastName: {
                    required: "Please enter your Last Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                con_emailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                con_phoneno: {
                    required: "Please enter your Phone Number"
                },
                con_city: {
                    required: "Please enter your City"
                },
                con_location: {
                    required: "Please enter your Location"
                },
                con_orgName: {
                    required: "Please enter your Organization Name"
                },
                con_state: {
                    required: "Please enter your State"
                },
                con_query: {
                    required: "Please enter your Message"
                },
                con_mb: {
                    required: "Please enter your Mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },

    careerFormSubmit: function (formId) {
        $('#serverError').html('');
        var isFormValid = this.validateCareerForms(formId).form();
        if (!isFormValid) {
            var slectVacancies = $("#selectVacancies").val();
            if (slectVacancies == "") {
                $('#vacanciesErrorMsg').show();
                $('#vacanciesErrorMsg').text('Please select required vacancie');
            }
            if (documetsPath == "") {
                $('#uploadFileErrorMsg').text("Please upload your profile.");
            }
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var slectVacancies = $("#selectVacancies").val();
            if (slectVacancies == "") {
                $('#vacanciesErrorMsg').show();
                $('#vacanciesErrorMsg').text('Please select required vacancie');
            } else if (documetsPath == "") {
                $('#uploadFileErrorMsg').text("Please upload your profile.");
            } else {
                var car_fName = $('#career_fName').val(),
                    car_lName = $('#career_lName').val(),
                    car_email = $('#career_email').val(),
                    car_phoneNo = $('#career_phoneNo').val(),
                    car_vacancie = $("#selectVacancies").val();
                car_document = documetsPath;
                var formData = { First_Name: car_fName, Last_Name: car_lName, Email_id: car_email, Phone_No: car_phoneNo, Vacancie_Name: car_vacancie, Profile: car_document };
                //applicant mail
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Current Vacancies", formData: JSON.stringify(formData) }, function (response) {
                    if (response.status) {
                        var subject = 'Thank you for Your application at CKC Group of Jewellers';
                        var body = "Hi " + car_fName + ",";
                        body += "<br/><br/><br/>";
                        body += "Thank you for applying to the " + car_vacancie.toLowerCase() + " position at CKC Group of Jewellers.";
                        body += "<br/><br/>";
                        body += "I would like to inform you that we received your application. Our hiring team is currently reviewing all applications and we are planning to schedule interviews soon. If you are among qualified candidates, you will receive a call/email from our one of our recruiters to schedule an interview. In any case, we will keep you posted on the status of your application.";
                        var message = "Your request sent successfully.";
                        appUtil.triggerEmail(body, subject, car_email, car_fName, formId, message);
                        mmMessages.success("Your request sent successfully");
                        $('#uploadFileSucessMsg').hide();
                        documetsPath = "";
                        $('#careerForm').each(function () {
                            this.reset();
                        });
                        //HR mail
                        var HRsubject = "Applicant Details of " + $('#career_fName').val(); +"for " + car_vacancie.toLowerCase() + " position";
                        var HRbody = "Find below applicant deatils:";
                        HRbody += "First Name: " + $('#career_fName').val();
                        HRbody += "Last Name: " + $('#career_lName').val();
                        HRbody += "Email Id: " + $('#career_email').val();
                        HRbody += "<br/> Contact Number: " + $('#career_phoneNo').val();
                        HRbody += "<br/> Applicant Details: <a href='" + car_document + "'>Applicant Details</a>";
                        HRbody += "<br/><br/> HR Team CKC Group of Jewellers";
                        appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', con_fName, formId, message);
                        loader.stopLoader();
                    }
                });
            }
        }
    },
    gettingDocumentPath: function (documentPath) {
        documetsPath = window.location.origin + '/web' + documentPath;
    },
    validateCareerForms: function (formId) {
        return $('#' + formId).validate({
            rules: {
                career_fName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                career_lName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                career_email: {
                    email3: true
                },
                career_phoneNo: {
                    minlength: 10,
                    maxlength: 13,
                    number: true
                }
            },
            messages: {
                career_fName: {
                    required: "Please enter first name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                career_lName: {
                    required: "Please enter last name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                career_email: {
                    required: "Please enter email",
                    email3: "Please enter a valid email id"
                },
                career_phoneNo: {
                    required: "Please enter phone no",
                    minlength: "Please enter a valid Phone No",
                    maxlength: "Please enter a valid Phone No",
                    number: "Only numbers are allowed"
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    },


    timeFormatChanges: function (birthTime) {
        var timeSplit = birthTime.split(':'),
            hours,
            minutes,
            meridian;
        var hours = timeSplit[0];
        var minutes = timeSplit[1];
        if (hours > 12) {
            meridian = 'PM';
            hours -= 12;
        } else if (hours < 12) {
            meridian = 'AM';
            if (hours == 0) {
                hours = 12;
            }
        } else {
            meridian = 'PM';
        }
        var time = hours + ':' + minutes + ' ' + meridian;
        return time;
    },

    staticPolicyContentSlick: function (container, slickId) {
        $.templates("#" + container + "_tmpl").link("#" + container, null);
        var deviceType = ('ontouchstart' in document.documentElement && navigator.userAgent.match(/Mobi/));
        if (deviceType)
            if (deviceType.input.toLowerCase().indexOf('ipad') > -1) {
                slickSlider.addSlider(slickId, 4, 1, true, 3000, false, false, false, false, false);
            } else if (deviceType.input.toLowerCase().indexOf('mobi') > -1) {
                slickSlider.addSlider(slickId, 1, 1, true, 3000, false, false, false, false, false);
            }
    },
    userAddress: function (obj) {
        var textString = '';
        if (obj.billingAddress) {
            if (obj.billingAddress.line3 != null) {

                textString = '<p>' + obj.billingAddress.name + '</p>'

                if (obj.billingAddress.line1) {
                    textString += '<p>' + obj.billingAddress.line1 + ', </p>'
                }
                if (obj.billingAddress.line2) {
                    textString += '<p>' + obj.billingAddress.line2 + ', </p> '
                }
                if (obj.billingAddress.line3) {
                    textString += '<p>' + obj.billingAddress.line3 + ', </p>'
                }
                if (obj.billingAddress.city) {
                    textString += '<p>' + obj.billingAddress.city + ', </p>'
                }
                if (obj.billingAddress.state) {
                    textString += '<p>' + obj.billingAddress.state + ', </p>'
                }
                if (obj.billingAddress.country) {
                    textString += '<p>' + obj.billingAddress.country + '</p> '
                }
                if (obj.billingAddress.pincode) {
                    textString += '<p>' + obj.billingAddress.pincode + '</p>'
                }
            } else {

                textString = '<p>' + obj.billingAddress.name + '</p>'

                if (obj.billingAddress.line1) {
                    textString += '<p>' + obj.billingAddress.line1 + ', </p>'
                }
                if (obj.billingAddress.line2) {
                    textString += '<p>' + obj.billingAddress.line2 + ', </p> '
                }
                if (obj.billingAddress.city) {
                    textString += '<p>' + obj.billingAddress.city + ', </p>'
                }
                if (obj.billingAddress.state) {
                    textString += '<p>' + obj.billingAddress.state + ', </p>'
                }
                if (obj.billingAddress.country) {
                    textString += '<p>' + obj.billingAddress.country + '</p> '
                }
                if (obj.billingAddress.pincode) {
                    textString += '<p>' + obj.billingAddress.pincode + '</p>'
                }
            }
            textString = textString + '<p class="marginTop10">Contact No : ' + obj.billingAddress.phone + '</p><p>Email ID : ' + obj.emailId + '</p>';
        }

        return textString;
    },
    userProfileLocation: function (obj) {
        var dataVal = ''
        if (obj.shippingAddress) {
            if (obj.shippingAddress.city != "NA")
                dataVal = obj.shippingAddress.city;
        }
        return dataVal;
    }

};
var mmMessages = {
    info: function (msg) {
        $('#messagePId').parent('div').removeClass();
        $('#messagePId').parent('div').addClass('info_message');
        $('#messagePId').html(msg);
        mmMessages.slideMsg('info_message');
    },
    error: function (msg) {
        $('#messagePId').parent('div').removeClass();
        $('#messagePId').parent('div').addClass('error_message');
        $('#messagePId').html(msg);
        mmMessages.slideMsg('error_message');
    },
    warning: function (msg) {
        $('#messagePId').parent('div').removeClass();
        $('#messagePId').parent('div').addClass('warning_message');
        $('#messagePId').html(msg);
        mmMessages.slideMsg('warning_message');
    },
    success: function (msg) {
        $('#messagePId').parent('div').removeClass();
        $('#messagePId').parent('div').addClass('success_message');
        $('#messagePId').html(msg);
        mmMessages.slideMsg('success_message');
    },
    slideMsg: function (className) {
        var divClass = '.' + className;
        $(divClass).fadeIn('slow');
        setTimeout("$('" + divClass + "').fadeOut('slow');", 5000);
    }
};
var localStorageUtil = {

    /**
     * removeStorage: removes a key from localStorage and its sibling expiracy key  params:
     * @param    <string> key      : localStorage key to remove
     * @returns  <boolean>         : telling if operation succeeded
     */
    removeStorage: function (key) {
        try {
            localStorage.removeItem(key);
            localStorage.removeItem(key + '_expiresIn');
        } catch (e) {
            console.log('removeStorage: Error removing key [' + key + '] from localStorage: ' + JSON.stringify(e));
            return false;
        }
        return true;
    },

    /**
     * getStorage: retrieves a key from localStorage previously set with setStorage():
     * @param    <string> key      : localStorage key
     * @returns
     *           <string>         : value of localStorage key
     *            null            : in case of expired key or failure
     */
    getStorage: function (key) {

        var now = Date.now(); //the time, lets deal only with integer
        // set expiration for storage
        var expiresIn = localStorage.getItem(key + '_expiresIn');
        if (expiresIn === undefined || expiresIn === null) {
            expiresIn = 0;
        }

        if (expiresIn < now) { // Expired
            this.removeStorage(key);
            return null;
        } else {
            try {
                var value = JSON.parse(localStorage.getItem(key));
                return value;
            } catch (e) {
                console.log('getStorage: Error reading key [' + key + '] from localStorage: ' + JSON.stringify(e));
                return null;
            }
        }
    },



    /**
     * setStorage: writes a key into localStorage setting a expire time:
     * @param    <string> key      : localStorage key
     * @param    <string> value    : localStorage value
     * @param    <number> expires  : number of seconds from now to expire the key
     * @returns  <boolean>         : telling if operation succeeded
     */
    setStorage: function (key, value, expires) {

        if (expires === undefined || expires === null) {
            expires = (24 * 60 * 60); // default: seconds for 1 day
        } else {
            expires = Math.abs(expires); //make sure it's positive
        }

        var now = Date.now(); //millisecs since the time, lets deal only with integer
        var schedule = now + expires * 1000;
        try {
            localStorage.setItem(key, JSON.stringify(value));
            localStorage.setItem(key + '_expiresIn', schedule);
        } catch (e) {
            console.log('setStorage: Error setting key [' + key + '] in localStorage: ' + JSON.stringify(e));
            return false;
        }
        return true;
    }
}

var slickSlider = {
    addSlider: function (selecter, showSlide, scrollBySlide, isAutoPlay, playSpeed, isArrows, isDots, hOrientation, vOrientation, infinite) {
        $("#" + selecter).slick({
            infinite: infinite,
            slidesToScroll: scrollBySlide,
            slidesToShow: showSlide,
            autoplay: isAutoPlay,
            autoplaySpeed: playSpeed,
            arrows: isArrows,
            easing: 'linear',
            dots: isDots,
            arrows: true,
            vertical: vOrientation,
            horizontal: hOrientation,
            responsive: [{
                breakpoint: 1024,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                },
                breakpoint: 769,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                },
                breakpoint: 480,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                }
            }

            ]
        });
    },
    addSliderNew: function (selecter, showSlide, scrollBySlide, isAutoPlay, playSpeed, isArrows, isDots, hOrientation, vOrientation, infinite, rows) {
        $("#" + selecter).slick({
            infinite: infinite,
            slidesToScroll: scrollBySlide,
            slidesToShow: showSlide,
            autoplay: isAutoPlay,
            autoplaySpeed: playSpeed,
            arrows: isArrows,
            easing: 'linear',
            dots: isDots,
            arrows: true,
            vertical: vOrientation,
            horizontal: hOrientation,
            rows: rows,
            responsive: [{
                breakpoint: 1024,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                },
                breakpoint: 769,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                },
                breakpoint: 480,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                }
            }

            ]
        });
    },
    addLogosSlider: function (selecter, showSlide, scrollBySlide, isAutoPlay, playSpeed, isArrows, isDots, hOrientation, vOrientation, infinite, leftArrow, rightArrow) {
        $('#trusted_sec').slick({
            slidesToShow: 7,
            slidesToScroll: 1,
            arrows: true,
            dots: false,
            speed: 300,
            infinite: true,
            autoplaySpeed: 2000,
            autoplay: true,
            responsive: [
          {
            breakpoint: 1200,
            settings: {
              slidesToShow: 5,
            }
          },
          {
            breakpoint: 992,
            settings: {
              slidesToShow: 4,
            }
          },
          {
            breakpoint: 768,
            settings: {
              slidesToShow: 2,
            }
          }
        ]
          });

    },
    customeSlider: function (selecter, showSlide, scrollBySlide, isAutoPlay, playSpeed, isArrows, isDots, hOrientation, vOrientation, infinite) {
        $(selecter).slick({
            infinite: infinite,
            slidesToScroll: scrollBySlide,
            slidesToShow: showSlide,
            autoplay: isAutoPlay,
            autoplaySpeed: playSpeed,
            arrows: isArrows,
            easing: 'linear',
            dots: isDots,
            vertical: vOrientation,
            horizontal: hOrientation,
            responsive: [{
                breakpoint: 1024,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                },
                breakpoint: 769,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                },
                breakpoint: 480,
                settings: {
                    slidesToShow: showSlide,
                    slidesToScroll: scrollBySlide
                }
            }

            ]
        });
    }
};

/*Zoom Api Integration Changes Start*/
var zoom_api = {
    openZoomRequestPopUp: function () {
        $('#zoomApiCustDetPopup').modal('show');
        $('#zoomDateTimePicker').datepicker({
            changeMonth: false,
            changeYear: false,
            dateFormat: "yy-mm-dd",
            minDate: 1,
            beforeShow: function (el, dp) {
                inputField = $(el);
                inputField.parent().append($('#ui-datepicker-div'));
                $('#ui-datepicker-div').addClass('datepicker-modal');
                $('#ui-datepicker-div').hide();
            }
        });
    },
    submitZoomPopupDetails: function (formId) {
        var isFormValid = zoom_api.zoomDetailsFormValidation(formId).form();
        if (!isFormValid) {
            return false;
            event.preventDefault(); // Stop the form from submitting
        } else {
            var userName = $('#zoom_customer_fullName').val(),
                userEmailId = $('#zoom_customer_email').val(),
                userMobileNo = $('#zoom_customer_mobile').val(),
                meetDes = $('#meeting_agenda').val(),
                meetDate = $('#zoomDateTimePicker').val(),
                meetTime = $('#zoomTime').val();
            var meetFinalDate = meetDate + ' ' + meetTime;
            var participants = [{ 'name': userName, 'email': userEmailId, 'mobile': userMobileNo }];
            var params = { 'storeId': storeId, 'orgId': orgId, 'startTime': meetFinalDate, 'agenda': meetDes, 'duration': 30, 'timezone': 'Asia/Kolkata', 'participants': participants, 'meetingProvider': 'Zoom', 'meetingRequestFrom': userEmailId };
            var formData = { UserName: userName, Email_id: userEmailId, Mobile_Number: userMobileNo, Meeting_Date: meetDate, Meeting_Time: meetTime, Meeting_Description: meetDes };
            loader.startLoader();
            serverCalls._req_Ajax_PostJson(appContextPath + '/web/liveMeeting/create', JSON.stringify(params), function (data) {
                if (data.status) {
                    loader.stopLoader();
                    mmMessages.success(data.message);
                    //console.log(data);
                    $('#' + formId).each(function () {
                        this.reset();
                    });
                    $('#zoomApiCustDetPopup').modal('hide');
                } else {
                    loader.stopLoader();
                    //console.log(data);
                    mmMessages.success(data.message);
                }
            });
            serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId, type: "Customer Enquiry for Demo- UdyogSoftware", formData: JSON.stringify(formData) }, function (response) {
                if (response.status) {
                    var subject = "UdyogSoftware - Book a Demo Request";
                    var body = " ";
                    body += "Dear " + userName + "," + "<br/><br/>";
                    body += "Your interest for Shubh Laxmi Jewellers is appreciated. Will review the details provided and revert soon.";
                    body += "<br/> <strong>Your provided details :</strong>";
                    body += "<br/> Name: " + $('#zoom_customer_fullName').val();
                    body += "<br/> Email Id: " + $('#zoom_customer_email').val();
                    body += "<br/> Contact Number: " + userMobileNo;
                    body += "<br/><br/><br/>";
                    var message = "Your request sent successfully.";
                    /*appUtil.triggerEmail(body, subject, userEmailId, userName, formId, message); */
                    mmMessages.success("Your request sent successfully.");
                    $('#' + formId).each(function () {
                        this.reset();
                    });
                    $('#zoomApiCustDetPopup').modal('hide');
                }
            });
        }
    },
    zoomDetailsFormValidation: function (formId) {
        return $('#' + formId).validate({
            rules: {
                zoom_customer_fullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                zoom_customer_email: {
                    email3: true
                },
                zoom_customer_mobile: {
                    minlength: 10,
                    maxlength: 10,
                    number: true
                },
                zoomDateTimePicker: {
                    required: true
                },
                meeting_agenda: {
                    required: true
                }
            },
            messages: {
                zoom_customer_fullName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                zoom_customer_email: {
                    required: "Please enter your email address",
                    email3: "Please enter a valid email address"
                },
                zoom_customer_mobile: {
                    required: "Please enter your mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                },
                zoomDateTimePicker: {
                    required: "Please enter date"
                },
                meeting_agenda: {
                    required: "Please enter meeting description"
                }
            },
            onfocusout: function (element) {
                this.element(element);
            }
        });
    }
};
/*Zoom Api Integration Changes End*/

var currencyUtil = {
    currencyData: {
        'dollar': dollarvalue,
        'gbp': gbp,
        "uae": uae,
        'singaporeDollar': singaporeDollar,
        'australianDollar': australianDollar,
        'canadianDollar': canadianDollar,
        'euro': euro,
        'swissFranc': swissFranc,
        'frenchFranc': frenchFranc,
        'malaysianRingitt': malaysianRingitt,
        'indonesianRupiah': indonesianRupiah,
        'thaiBatt': thaiBatt,
        'hkDollar': hkDollar,
        'rupee': 1
    },
    currencyText: {
        'australianDollar': 'AUSD',
        'canadianDollar': 'CAD',
        'euro': 'EUR',
        'frenchFranc': 'FRANC',
        'gbp': 'GBP',
        'hkDollar': 'HKD',
        'indonesianRupiah': 'IDR',
        'rupee': 'INR',
        'malaysianRingitt': 'MYR',
        'singaporeDollar': 'SGD',
        'swissFranc': 'CHF',
        'thaiBatt': 'THB',
        "uae": "AED",
        'dollar': 'USD'
    },
    getCurrencyDetailsByThemeCurrency: function (callback) {
        serverCalls._req_jquery(appContextPath + '/web/actionRest/getCurrencyByCode.json', { currencyCode: currency },
            function (responce) {
                if (callback)
                    callback(responce)
            });
    },
    renderCurrencyTemplate: function () {
        var exchangeURL = "https://implqa-ckc.excellor.com/mmbgsrv/action/exchange";
        serverCalls._req_Solar_Exchange_Ajax('INR', exchangeURL, function (data) {
            dollarvalue = data.baseCurrencyConversion;
            var currencyVal;
            if (sessionStorage.getItem('selectedCurrency')) {
                currencyVal = sessionStorage.getItem('selectedCurrency')
            } else if (localStorageUtil.getStorage('selectedCurrency')) {
                currencyVal = localStorageUtil.getStorage('selectedCurrency')
            } else {
                currencyVal = defaultCurrencyValue;
            }
            currentCurrency = currencyVal;
            $.templates("#currency_dropdown_tmpl").link("#currency_dropdown", currencyObj); /********flag template rendering***********/
            $("#currencySelected .currencyName").html(currencyUtil.currencyText[currencyVal]);
            $("#currencySelected img").attr('src', '');
            $("#currencySelected img").attr('src', appContextPath + '/static/' + themeName + '/images/countries/' + currencyVal + '.png');
        });
    },
    getCurrecyHTMLCode: function () {
        switch (currency) {
            case "INR":
                return '&#8377;';
                break;
            case "USD":
                return '$';
                break;
            default:
                return "$";

        }
    },
    getCustomValueBySelectedCurrency: function (price, key) {
        var convertedValue = 0;
        if (typeof (price) == "string") {
            price = parseFloat(price);
        }
        if (currency === 'INR') {
            if (currenyByThemeCurrency && currenyByThemeCurrency.status) {
                convertedValue = parseFloat(price) * parseFloat(currenyByThemeCurrency.result.baseConversion);
            } else {
                currencyUtil.getCurrencyDetailsByThemeCurrency(function (response) {
                    currenyByThemeCurrency = response;
                    convertedValue = parseFloat(price) * parseFloat(currenyByThemeCurrency.result.baseConversion);
                });
            }
        } else {
            convertedValue = price;
        }
        if (key) {
            return appUtil.customCurrencyFormatted(convertedValue);
        } else {
            return appUtil.currencyFormatted(convertedValue);
        }
    },
    getValueBySelectedCurrency: function (price, key) {
        if (price && price.toString().indexOf(',') > -1)
            price = price.replace(/\,/g, '');
        var convertedValue = 0;
        if (typeof (price) == "string") {
            price = parseFloat(price);
        }
        if (currency === 'INR') {
            if (currenyByThemeCurrency && currenyByThemeCurrency.status) {
                convertedValue = parseFloat(price);
            } else {
                convertedValue = parseFloat(price);
            }
        } else {
            convertedValue = price;
        }
        if (key) {
            return appUtil.customCurrencyFormatted(convertedValue);
        } else {
            return appUtil.currencyFormatted(convertedValue);
        }
    },
    getConvertedValueByCurrency: function (price, key) {
        var convertedValue = 0;
        if (typeof (price) == "string") {
            price = parseFloat(price);
        }
        if (currency === 'INR') {
            if (currenyByThemeCurrency && currenyByThemeCurrency.status) {
                convertedValue = parseFloat(price) / parseFloat(currenyByThemeCurrency.result.baseConversion);
            } else {
                currencyUtil.getCurrencyDetailsByThemeCurrency(function (response) {
                    currenyByThemeCurrency = response;
                    convertedValue = parseFloat(price) / parseFloat(currenyByThemeCurrency.result.baseConversion);
                });
            }
        } else {
            convertedValue = price;
        }
        if (key) {
            return appUtil.customCurrencyFormatted(convertedValue);
        } else {
            return appUtil.currencyFormatted(convertedValue);
        }
    },
    getValueBySelectedCustomCurrency: function (price) {
        if (typeof (price) == "string") {
            price = parseInt(price);
        }
        if (currentCurrency) {
            var currentCurrencyValue = currencyUtil.currencyData[currentCurrency];
        } else {
            if (sessionStorage.getItem('selectedCurrency')) {
                currentCurrency = sessionStorage.getItem('selectedCurrency');
            } else if (localStorageUtil.getStorage('selectedCurrency')) {
                currentCurrency = localStorageUtil.getStorage('selectedCurrency');
            } else {
                currentCurrency = 'rupee';
            }
            var currentCurrencyValue = currencyUtil.currencyData[currentCurrency];
        }
        var convertedValue = parseFloat(price) / parseFloat(currentCurrencyValue);
        return appUtil.customCurrencyFormatted(convertedValue);
    }
}

var currencyObj = {
    'selectedCurrencyText': currencyUtil.currencyText[defaultCurrencyValue],
    'selectedCurrencyValue': currencyUtil.currencyData[defaultCurrencyValue],
    'currencyData': currencyUtil.currencyData,
    'currencyText': currencyUtil.currencyText,
    'defaultCurrencyValue': defaultCurrencyValue
}

var finalContentObj = {};
var collection_widget = {
    getCollection: function (callback) {
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId, orgId: orgId },
            function (responce) {
                if (callback)
                    callback(responce);
            });
    },
    renderCollection: function () {
        loader.startLoader();
        collection_widget.getCollection(function (returnCollection) {
            collection_widget.getContentByType('collection', returnCollection, function (response) {
                var collection = new Object();
                if (response.collection.length > 0) {
                    collection.banner = _.filter(response.collection, function (data) { return data.tags != 'collectionImages'; });
                    collection.banner = collection.banner[0];
                    collection.collectionList = _.filter(response.collection, function (data) { return data.tags == 'collectionImages'; });
                }
                $.templates("#collectionData_tmpl").link("#collectionDetails", collection);
                loader.stopLoader();
            });
        });
    },
    getContentByType: function (byType, availableContentType, sendContent) {
        finalContentObj[byType] = _.filter(availableContentType.result, function (data) { return data.blockName == byType; });
        if (sendContent)
            sendContent(finalContentObj)
    }
};
/*
 * mm.imageupload.js file starts here. It is a Business Bank details object for
 * client side
 */

var MMFileUploadUtil = function (suffix, callback, type) {
    console.log("File Upload init");
    $('#file_upload_' + suffix).fileUploadUI({
        namespace: 'file_upload_' + suffix,
        fileInputFilter: '#file_' + suffix,
        dropZone: $('#drop_zone_' + suffix),
        uploadTable: $('#files_' + suffix),
        downloadTable: $('#files_' + suffix),
        buildUploadRow: function (files, index) {
            var tableObject = document.getElementById('files_' + suffix);
            if (tableObject.rows.length > 0) {
                tableObject.deleteRow(0);
            }
            return $('<tr>' +
                '<td class="file_upload_progress"><div><\/div><\/td>' +
                '<\/tr>');
        },
        buildDownloadRow: function (file) {
            var tableObject = document.getElementById('files_' + suffix);
            if (tableObject.rows.length > 0) {
                tableObject.deleteRow(0);
            }
            if (callback) callback(file, type);
            if (file.error_ext_img != undefined && file.error_ext_img.length > 0) {
                //mmMessages.error('Invalid Image '+file.error_ext_img+'.Allowed are jpeg,jpg,png,gif');
                return $('');
            }
            if (file.error_size != undefined && file.error_size.length > 0) {
                //mmMessages.error('Invalid Image '+file.error_size+'.Maximum Length: 1MB');
                return $('');
            }
            raja = file.imagesInfo;
            id = file.id;
            if (callback) callback(file, type);
            var tableObject = document.getElementById('files_' + suffix);
            if (tableObject.rows.length > 0) {
                tableObject.deleteRow(0);
            }
            // return $('<tr><td>' +'<input name="imgurl" id="imgurl"
            // type="hidden" value="'+file.url+'"><img src="'+file.url+'"
            // width="100px" height="100px" /><\/td><\/tr>');
            return $('');
        }
    });
};
/* mm.imageupload.js ends here */

var commonUtil = {
    _isToF: function (val) {
        if (val == "true" || val == true)
            return true;
        else if (val == "false" || val == false)
            return false;

    }
};

var dataQueryUtil = {
    getProductsByTagQuery: function (searchStartIndex, displayCount, metaInfo) {
        searchStartIndex = (searchStartIndex ? searchStartIndex : 0);
        displayCount = (displayCount ? displayCount : 20);
        var sortby = ((metaInfo.queryParamNames && metaInfo.queryParamNames['sort']) ? metaInfo.queryParamNames['sort'] : metaInfo.sortBy);

        var query = '(';

        if (_.isUndefined(q) || q == "null") {
            if (dealId != "null") {
                query = query + 'dealId:' + dealId + ' AND ';
            } else {
                seoTags = (_.isObject(seoTags) ? seoTags : JSON.parse(seoTags));
                _.each(seoTags, function (tag) {
                    query = query + 'tags:' + appUtil.replaceSplChars(tag, "*").toLowerCase() + ' AND ';
                });
            }
            query = query.substring(0, query.lastIndexOf("AND"));
        } else if (!metaInfo.hasNoResultsFlag) {
            // This gets excuted  when you are searching from search box
            //q=q.toLowerCase();
            q = appUtil.replaceSplChars(q, '*');
            query += '(productName:*' + q + '* OR id:*' + q + '* OR itemCode:*' + q + '* OR tags:*' + q;

            _.each(metaInfo.facetFields, function (item) {
                query += " OR " + item + ":*" + q + "*";
            });
            query += ')';
        } else {
            query += 'type:product';
        }


        query = query + ')';

        query = query + ' AND storeId:' + storeId;

        //queryParams- This is used to get all facet - Filter information
        var queryParams = "wt=json&q=" + query;

        // If any Filter Applied, appends this to fq - filterQuery
        var filterQuery = "";
        if (metaInfo.selectedFilterData) {
            _.each(metaInfo.selectedFilterData, function (filteredItems, key) {
                if (filteredItems.length > 0) {
                    var fq = 'fq={!tag=' + key + '}' + key + ": (",
                        values = '';
                    _.each(filteredItems, function (item) {
                        if (item.type == "amount") {
                            values += (item.value);
                        } else {
                            values += (appUtil.replaceSplChars(item.value, '*'));
                        }
                        values += ' OR '
                    });

                    values = values.substring(0, values.lastIndexOf("OR"));
                    values += ') & ';
                    fq += values;
                    filterQuery += fq;
                }
            });
            if (filterQuery.length > 0) {
                filterQuery = filterQuery.substring(0, filterQuery.lastIndexOf("&"));
                queryParams += "&" + filterQuery;
            }
        }

        if (!_.isUndefined(metaInfo.facetFields) && _.isArray(metaInfo.facetFields) && metaInfo.facetFields.length > 0) {
            queryParams = this.prepareFacetsQuery(queryParams, metaInfo);
        }
        var statsQuery = this.prepareStatsQuery(metaInfo) ? this.prepareStatsQuery(metaInfo) : '&stats=true&stats.field=' + metaInfo.sortBy;
        queryParams += "&start=" + searchStartIndex + "&rows=" + displayCount + "&sort=" + metaInfo.filterBy + "," + sortby + "" + statsQuery;

        var q_fq = query;
        if (filterQuery.length > 0) {
            q_fq += "&" + filterQuery;
        }

        // globalQuery is used to get products only, usually used to get data when pagination or virtual scroll(Lazy Load)
        globalQuery = { 'wt': 'json', 'q': query, 'fq': filterQuery, 'start': searchStartIndex, 'rows': displayCount, 'sort': metaInfo.filterBy + "," + sortby, stats: true, 'stats.field': metaInfo.sortBy };

        var queryObj = {
            "queryParams": queryParams,
            "globalQuery": globalQuery
        }

        return queryObj;
    },
    prepareFacetsQuery: function (queryParams, metaInfo) {
        facetFields = metaInfo.facetFields;
        var currentSelectedFacets = _.keys(metaInfo.selectedFilterData);
        var facetQuery = "&facet=true";


        if (metaInfo.selectedFilterData) {
            _.each(metaInfo.selectedFilterData, function (filteredItems, key) {
                facetQuery += "&facet.field="
                if (filteredItems.length > 0) {
                    var excludeFilter = "{!ex=";

                    excludeFilter += key;
                    // excludeFilter = excludeFilter.substring(0, excludeFilter.lastIndexOf(","));
                    facetQuery += excludeFilter + '}' + key;
                } else {
                    facetQuery += key;
                }
            });
        } else {
            _.each(facetFields, function (item) {
                facetQuery += "&facet.field=" + item;
            });
        }
        queryParams += facetQuery;
        return queryParams;
    },
    prepareStatsQuery: function (metaInfo) {
        var statsFields = metaInfo.statsFields;
        var statsQuery;
        if (statsFields) {
            statsQuery = "&stats=true";
            _.each(statsFields, function (item) {
                statsQuery += "&stats.field=" + item;

            });
        }
        return statsQuery;
    },
    getProductsByCustomTagQuery: function (itemTag, searchStartIndex, displayCount, sortBy, option, searchParams, byView) {
        var currentProductOptions = (byView === 'preview') ? productPreview.currentProductData : solitaireProductPreview.currentProductData;
        searchStartIndex = (searchStartIndex ? searchStartIndex : 0);
        displayCount = (displayCount ? displayCount : 18);
        var query = '('
        if (searchParams) {
            searchTags = (_.isObject(searchParams) ? searchParams : JSON.parse(searchParams));
            _.each(searchTags, function (tag) {
                if (tag)
                    query = query + option + ':' + appUtil.replaceSplChars(tag, "*").toLowerCase() + ' OR ';
            });
            query = query.substring(0, query.lastIndexOf("OR"));
            query = query + ')';
        } else if (byView && byView == "preview" || byView && byView === "solitairePreview") {
            _.each(itemTag, function (tag) {
                if (tag)
                    query = query + 'tags:' + appUtil.replaceSplChars(tag, "*").toLowerCase() + ' AND ';
            });
            query = query.substring(0, query.lastIndexOf("AND"));
            query += ') AND NOT id: ' + currentProductOptions._id + ' AND storeId:' + storeId;
        } else if (byView && byView == "solitaire") {
            _.each(itemTag, function (tag) {
                if (tag)
                    query = query + 'tags:' + appUtil.replaceSplChars(tag, "*").toLowerCase() + ' AND ';
            });
            query = query.substring(0, query.lastIndexOf("AND"));
            query += ') AND storeId:' + storeId;
        } else {
            query = query + option + ':*' + appUtil.replaceSplChars(itemTag, "*").toLowerCase() + '* OR ';
            query = query.substring(0, query.lastIndexOf("OR"));
            query += ') AND storeId:' + storeId;
        }

        var queryParams = "wt=json&q=" + query;
        queryParams += "&start=" + searchStartIndex + "&rows=" + displayCount + "&sort=" + "inStock desc," + sortBy + ' asc';
        var globalQuery = { 'wt': 'json', 'q': query, 'start': searchStartIndex, 'rows': displayCount, 'sort': "inStock desc," + sortBy + ' asc', 'stats': true, 'stats.field': sortBy };
        var queryObj = {
            "queryParams": queryParams,
            "globalQuery": globalQuery
        }
        return queryObj;
    },

    getResultsByGlobalQuery: function (globalQuery, callback) {
        var query = "",
            response = [];
        _.each(globalQuery, function (value, key) {
            if (key != 'fq') {
                query += key + "=" + value + "&";
            }
        });

        if (!_.isUndefined(globalQuery.fq)) {
            query += globalQuery.fq;
        } else {
            query = query.substring(0, query.lastIndexOf("&"));
        }

        if (query.length > 0) {
            serverCalls._custom_req_Solar_Ajax(query,
                function (resp) {
                    if (callback)
                        callback(resp);
                });
        } else {
            callback(response);
        }
    }
};

// Set the cookie
function setCookie(c_name, value, expire) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + expire);
    document.cookie = c_name + "=" + escape(value) + ((expire == null) ? "" : ";expires=" + exdate.toGMTString()) + ';path=' + appContextPath + '/';
}

// Get the cookie content
function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1;
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) {
                c_end = document.cookie.length;
            }
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return '';
}
function deleteCookie(c_name) {
    this.setCookie(c_name, "", -1);
}

function removeCacheObjects() {
    localStorageUtil.removeStorage('selectedFilterData_cache');
    localStorageUtil.removeStorage('fieldsMap_cache');
}
function isSmartDevice() {
    var isMobile = false; //initiate as false
    // device detection
    if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
        || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))) isMobile = true;
    return isMobile
}


var browseMenu_js = {
    redirectMenuById: function (id, menuType, menuName) {
        deleteCookie("browseFilterParameters");
        localStorageUtil.removeStorage('selectedFilterData_cache');
        localStorageUtil.removeStorage('fieldsMap_cache');
        window.location = appContextPath + '/web/listing?id' + id + '&type=' + menuType + '&select=' + appUtil.replaceSplChars(menuName, '-').toLowerCase();
    },
    redirectMenuBySeo: function (seoUrl) {
        deleteCookie("browseFilterParameters");
        localStorageUtil.removeStorage('selectedFilterData_cache');
        localStorageUtil.removeStorage('fieldsMap_cache');
        window.location = appContextPath + seoUrl;
    }
};

var listing_banner_widget = {
    listingBanner: function () {
        this.getListingBanner(function (bannerData) {
            if (bannerData.length > 0) {
                $.templates("#listingBanner_tmpl").link("#listingBannerContainerId", { bannerList: bannerData });
            }
        });
    },
    getListingBanner: function (callback) {
        var blockName = 'Listing_Category_SubCategory';
        if (seoUrls != undefined) {
            if (seoUrls.length == 1) {
                selectedMenu = seoUrls[0];
            } else { selectedMenu = seoUrls[0] + "-" + seoUrls[1]; }
            this.getWebContent(blockName, selectedMenu, function (bannerResponce) {
                if (callback)
                    callback(bannerResponce.result)
            });
        } else if (q != "null") {
            this.getWebContent(blockName, 'search', function (bannerResponce) {
                if (callback)
                    callback(bannerResponce.result)
            });
        } else if (dealId != "null") {
            this.getWebContent(blockName, 'deal', function (bannerResponce) {
                if (callback)
                    callback(bannerResponce.result)
            });
        }
    },
    getWebContent: function (blockName, type, callback) {
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId, orgId: orgId, blockName: blockName, title: type },
            function (responce) {
                if (callback)
                    callback(responce);
            });
    }
}

function isFloat(value) {
    if (/\./.test(value)) {

        return true;

    } else {

        return false;

    }
}

var loader = {
    startLoader: function () {
        // $("#fadeOutDiv").show();
        //$("#loderMask").show();
    },

    stopLoader: function () {
        // $("#fadeOutDiv").hide();
        // $("#loderMask").hide();
    }
}

function priceSortMob() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
        $(".pricedropdown").toggle();
        if ($(".pricedropdown").is(":visible")) {
            $('.price_accordian_mob').css('transform', 'rotate(90deg)');
        }
        else {
            $('.price_accordian_mob').css('transform', 'rotate(-360deg)');
        }

    }
}

function ctnBtnAction() {
    window.location = appContextPath + "/";
}


function showCustomDiv() {
    var c = !_.isEmpty(productPreview) ? productPreview : (!_.isEmpty(productViewInListing) ? productViewInListing : solitaireProductPreview);
    var p = _.find(c.variantAttributes, function (x) {
        if (x.variantPriority === 1)
            return x;
    });
    if (p && $('#variantKey_' + appUtil.replaceSplChars(p.attributeName.toLowerCase(), '_')).val() !== 'select') {
        if (isVariantDataAvailable) {
            $(".customDataSection , .customOptionSection").toggle();
            if ($('.customDataSection').is(':visible')) {
                customOptionsView = true;
            } else {
                customOptionsView = false;
            }
        } else {
            mmMessages.error('Sorry no product available with selected variant combination, Please select diffrent available option..!!');
        }
    } else {
        mmMessages.error("Please select valid default variant combination..!")
    }

}
function subMenuClickAction(menuName, seoUrl) {
    console.log(menuName + " , " + seoUrl);
    if (menuName != "Products") {
        if (seoUrl != "") {
            seoUrl = seoUrl.replace("/", "#");
        }
        if (menuName != "" && menuName != null) {
            window.location.href = appContextPath + "/" + menuName.toLowerCase() + seoUrl;
        } else {
            window.location.href = appContextPath + seoUrl;
        }
    } else {
        window.location.href = appContextPath + seoUrl;
    }
}


function whatsAppChatAction() {
    serverCalls._req_Ajax_Get(appContextPath + '/web/commonRest/getStoreConfigurationsByType', { orgId: orgId, storeId: storeId, setting: 'STORE_SETTING', type: 'SOCIAL_SHARE_SETTING' }, function (response) {
        if (response.status) {
            if (response.data.configuration.length > 0) {
                var message = response.data.configuration[0].message,
                    url = response.data.configuration[0].url,
                    mobileNo = response.data.configuration[0].mobileNum;
                var whatsAppUrl = url + mobileNo + '?text=' + message;
                if (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
                    window.location.assign(whatsAppUrl);
                } else if (/ipad/i.test(navigator.userAgent)) {
                    window.location.assign(whatsAppUrl);
                } else {
                    window.open(whatsAppUrl, '_blank');
                }
            }
        }
    });
}
$.views.helpers({
    getBannerImagePath: function(image, siteBannerCDNImage) {
        var imageUrl = '';
        if (image != undefined && image.document) {
            if (image.document.startsWith("https")) {
                imageUrl =image.document;
            }else{
                imageUrl = appContextPath + "/web" + image.document;
            }
            
        } else {
            imageUrl = siteBannerCDNImage.document;
        }
        return imageUrl;
    },
    getImageAltName: function(image) {
         var imageUrl = '';
         if (image != undefined) {
            imageUrl = image;
            var imgAlt= imageUrl.split("/");
            var imgAltName = imgAlt[imgAlt.length-1].split(".")[0];
            //console.log(imgAltName);
            return imgAltName;
         }
    },
    getCategoryListAvailability:function(categoryList, category){ 
       return appUtil.checkCategoryAvailability(categoryList, category);
    },
    getDateFormat:function(dateValue){
        var dateF;
        var udate = new Date(dateValue);
        return dateFormat(dateValue, "dd-mm-yyyy");
    },
    getSocialBlogShareAction:function(socialName, title){
        var blogUrl = window.location.href;
        var title = title;
        if (socialName == "Facebook") {
            var facebookShareUrl = "https://www.facebook.com/sharer.php?u="+blogUrl+"&t="+title;
            return facebookShareUrl;;
            return facebookShareUrl;
        }else if (socialName == "Twitter") {
            var twitterShareUrl = "https://twitter.com/intent/tweet?url="+blogUrl;
            return twitterShareUrl;
        }else if (socialName == "Google+") {
            var googlePlusShareUrl = "https://plus.google.com/share?url="+blogUrl;
            return googlePlusShareUrl;
        }
    },
    getCurrencySymbol: function() {
        return currencyUtil.getCurrecyHTMLCode();
    },
    getFormattedPrice:function(price){
        return currencyUtil.getValueBySelectedCurrency(price);
    },
    getCustomFormattedPrice:function(p){
        return currencyUtil.getCustomValueBySelectedCurrency(p);
    },
    getRoundOffAmount:function(price){
        return Math.round(price);
    },
    getTotalSavings:function(){
        return appUtil.checkoutTotalSavingsValue();
    },
    getUserName:function(obj){
        return appUtil.profileUserName(obj);
    },
    getTotalDiscountPrice:function(cartFormList){
        return appUtil.checkoutTotalDiscountValue(cartFormList);
    },
    getUserProfileFields:function(value){
        if(value){
            return value;
        }else{
            return ''
        }
    },
    getUserProfileName:function(name, title){
        if(title != "" && title != null){
            return title+' '+name;
        }else{
            return name;
        }
    },
    getProductFriendlyUrl: function(url) {
        return url;
    },
    getUserProfileDOB:function(value){
        return value;
    },
    getFormalCase:function(value){
        return appUtil.getFirstCharacterCapital(value);
    },
    getUserProfileGender:function(value){
        return appUtil.getFirstCharacterCapital(value);
    },
    getProductPreviewUrl:function(productId){
        return appContextPath + "/web/preview.jsp?itemId="+productId;
    },
    getCertificateImagePath:function(certificateImage){
        return amazonS3Path+certificateImage+'m.jpg';
    },
    getCertificatePreviewImagePath:function(certificateImage){
        return amazonS3Path+certificateImage+'p.jpg';
    },
    renderImage: function(url) {
        return appUtil.renderImage(url);
    },
    getCouponCodesDetails:function(couponsList, title){
        var name = "";
        if (couponsList.length > 0) {
            for(var i=0; i < couponsList.length; i++){
                if(couponsList[i].couponCode.toLowerCase().indexOf(title) > -1){
                    name = title;
                    return name;
                }
            }
        }else{
            return name;
        }
    },
    getRedeemDetails:function(redeem, title){
        var name = "";
        if (redeem.length > 0) {
            for(var i=0; i < redeem.length; i++){
                if(redeem[i].loyaltyName.toLowerCase().indexOf(title) > -1){
                    name = title;
                    return name;
                }
            }
        }else{
            return name;
        }
    },
    
    getValueBySelectedCustomCurrency: function(price){
        if(typeof(price) == "string"){
           price = parseInt(price); 
        }
        if(currentCurrency){
            var currentCurrencyValue = currencyUtil.currencyData[currentCurrency];
        }else{
            if(sessionStorage.getItem('selectedCurrency')){
                currentCurrency =  sessionStorage.getItem('selectedCurrency');
            }else if(localStorageUtil.getStorage('selectedCurrency')){
                currentCurrency  = localStorageUtil.getStorage('selectedCurrency');
            }else{
                currentCurrency = 'rupee'; 
            }
            var currentCurrencyValue = currencyUtil.currencyData[currentCurrency];
        }
        var convertedValue = parseFloat(price)/parseFloat(currentCurrencyValue);
        return appUtil.customCurrencyFormatted(convertedValue);
    },
    getCDNProductImagePath:function(image){
        var imageUrl = '';
        if (image != undefined) {
            if (image.startsWith("https")) {
                imageUrl = image;
            } else {
                imageUrl = appContextPath + "/web" + image;
            }
        } else {
            imageUrl = appContextPath + '/static/' + themeName + '/images/Image-Coming-Soon.png';
        }
        return imageUrl;
    },
    getProductImagePath2: function(image) {
        return appUtil.getProductImagePath(image);
    },
    getVideoImagePath:function(url){
        var getEmbedId = appUtil.getVideoEmbedId(url);
        var imagePath = null;
         if (getEmbedId != 'error') {
            var imageUrl = "https://img.youtube.com/vi/"+getEmbedId+"/hqdefault.jpg";
            imagePath = imageUrl;
         }
         return imagePath;
    },
    // getYouTubeVideoLink:function(url){
    //     var getEmbedId = appUtil.getVideoEmbedId(url);
    //     var url2 = null;
    //     if (getEmbedId != 'error') {
    //         var url = "//www.youtube.com/embed/"
    //         url2 = url+getEmbedId;
    //     }
    //     return url2;
    // },
    getYouTubeVideoLink:function(url){
       var getEmbedId = appUtil.getVideoEmbedId(url);
        var url2 = null;
        if (getEmbedId != 'error') {
            var url = "//www.youtube.com/embed/"
            url2 = url+getEmbedId;
        }else{
            url2 = url;
        }
        return url2;
    },
    getUnitPrice: function(price) {
    	return appUtil.currencyFormatted(price);
    },
    getContentInCamelCase: function(details) {
        return appUtil.firstLetterCapitalFormation(details);
    },
    getTagAvailability:function(tags, tag){
       return appUtil.checkTagAvailability(tags, tag);
    },
    checkIsMobileDevice:function(){
        return appUtil.isMobileDevice();
    },
    getReplaceSpecialCharsByValue: function (value, byKey) {
        return appUtil.replaceSplChars(value, byKey);
    },
    getTitleId:function(id){
        return appUtil.replaceSplChars(id.toLowerCase(), '_')
    },
    getCurrentTheme:function(){
        return themeName;
    },
    getCartSubTotal: function(data){
        return appUtil.checkoutSubTotal(data)
    },
    getCartSavedTotal: function(data){
      return appUtil.checkoutTotalSavedAmount(data)  
    },
    getCartFinalTotal: function(data){
        return appUtil.finalCartAmount(data);
    },
    getDeviceTypeNonDeskTop:function(){
        return appUtil.isDeviceTypeNonDeskTop();
    },
    isEmptyObjectCheck:function(obj){
        return $.isEmptyObject(obj);
    },
    getShippingSetting:function(obj){
        return appUtil.getShippingSettings(obj);
    },
    getUserAddress:function(dataObj){
        return appUtil.userAddress(dataObj);
    },
    getUserProfileLocation:function(obj){
        return appUtil.userProfileLocation(obj);
    },
    getSpecifiedAttributeName:function(name){
        return appUtil.specifiedAttributeName(name);
    },
    getIndexCheckListing:function(index){
        if((index / 3) == 0){
            return 'menu-grids agile-leftnone';
        }else{
             return 'menu-grids agile';
        }
    },
    getFormattedSubTotal:function(cartTotal, cartFormList){
        return appUtil.formattedSubTotal(cartTotal, cartFormList);
    },
    getVerticalSelectStyle: function(displayOrientation) {
        if (displayOrientation == "vertical_filters") {
            return 'vertical_select_box';
        }
    },
    getCustomAttributeName:function(byOption, name, dataObj){
        return appUtil.generateCustomAttributeName(byOption, name, dataObj);
    },
    getCurrentAttributeName:function(attributes){
        var attributeName;
        if (attributes.length>0) {
            for (var i=0; i<attributes.length; i++){
                if (attributes[i].indexOf('Color') > -1) {
                    var details = attributes[i].split('_'),
                        name1 = details[0],
                        name2 = details[1];
                    attributeName = name1 +" "+name2;
                    break;                      
                }
            }
        }
        return attributeName;
    },
    getLoginUserName:function(cartId){
        if(userFirstName != ""){
            return userFirstName + ' ' + userLastName
        }else{
            $('#giftwarapMessageFrom_' + cartId).removeAttr('value');
        }
    },
    getCountryCode:function(name, byOption){
        var codeValue = _.find(countryWiseDialingCode.available_country.country_dialing_code, function(eachData){
            if(eachData.Country === name){
                return eachData;
            }
        });

        if(codeValue){
            if(byOption === 'code'){
                return codeValue.Country_code;
            }else{
                return codeValue.Country + ' ' + codeValue.International_Dialing
            }
        }
    },
    getBackgroundTheme:function(){
        if(!userId){
            return 'color: #9c9999;'
        }
    },
    getSubCatName:function(name){
        var subCatName;
        if (name.indexOf('_') > -1) {
            var details = name.split('_'),
                name1 = details[0],
                name2 = details[1];
            subCatName = name1 +" "+name2;    
            return subCatName; 
        }else{
            return name;
        }
    },
    getContactData:function(obj, option){
        if(obj){
            var c, n, p ;
            if(obj.mobileNo.indexOf('-') > -1){
                p = obj.mobileNo.split('-');
                c = p[0];
                n = p[1];
            }
            
            if(option === 'countryCode'){
                if (c != undefined && c != "") {
                    return c;   
                }else{
                    return '+91';
                } 
            }else{
                if(n != undefined){
                    return n;
                }else{
                    return obj.mobileNo;
                }
            }
        }
    },
    getSelectedChecked:function(p){
        if(p){
            return 'checked';
        }
    },
    getRedirectPath:function(target){
        if(target){
            return target;
        }else{
            return 'javascript:void(0)'
        }
    },
    getProductsImagePath: function(image) {
        var imageUrl = '';
        if (image != undefined && image.document) {
            if (image.document.startsWith("http")) {
                imageUrl = image.document;
            } else {
                imageUrl = appContextPath + "/web" + image.document;
            }
        } else if(image != undefined){
                if (image.startsWith("https")) {
                    imageUrl = image;
                }else{
                    imageUrl = appContextPath + "/web" + image;
                }
        } else {
            imageUrl = appContextPath + '/static/' + themeName + '/images/Image-Coming-Soon.png';
        }
        return imageUrl;
    },
    getFilterNameInDescribeFormat:function(n, t){
        if(n.toLowerCase() === 'very'){
            if(t.toLowerCase() === 'fluorescence'){
                return 'Very Slight'
            }else{
                return 'Very Good'
            }
        }else{
            return n
        }
    },
    getPostalCodelength:function(){
        return country.toLowerCase() === 'india' ? 6 : 5
    }
});
var productCollection={
  "collectionImages":[
    {
    	"collectionName":"classic collection",
    	"path" : "classic collectionLogo.png"
    }
  ]
}
var captchaToken;
var SignUpUtil = {
    getCallBackFormValidate: function(formId){
        var isFormValid = this.validatecallbackForms(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fName = $('#subFullName').val(),
                emailId = $('#subEmailId').val(),
                mobileNo = $('#subMobileNo').val(),
                location = $('#location').val(),
                orgName = $('#orgName').val();
                query = $('#subQuery').val();

                // var today = new Date();
                // var dd = String(today.getDate()).padStart(2, '0');
                // var mm = String(today.getMonth() + 1).padStart(2, '0');
                // var yyyy = today.getFullYear();
                // today = dd + '/' + mm + '/' + yyyy;

                var reqDate = new Date();
                var today = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

               var dataFields = {'Name':fName,'emailId':emailId,'phoneNo':mobileNo, 'Location':location,'Organization Name':orgName,'query':query, 'Requested_Date':today};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"Customer Enquiry for Trial - UdyogSoftware",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fName +', </br><br/>',
                        body += "Thank you for reaching out to us with your Fixed Asset Management requirements , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/>";
                        var message = "Your request sent successfully";
                        var subject = "UdyogSoftware - Get a Demo Request";
                        appUtil.triggerEmail(body, subject, emailId, fName, formId, message);

                        var HRsubject = "UdyogSoftware - Get a Demo Request";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br><br/>",
                            HRbody += "</br><br/>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>Name: " + fName +'</br>',
                            HRbody += "<br/>Email Id: " + emailId +'</br>',
                            HRbody += "<br/>Phone No: " + mobileNo +'</br>',
                            HRbody += "<br/>Location: " + location +'</br>',
                            HRbody += "<br/>Organization Name: " + orgName +'</br>',
                            HRbody += "<br/>Query: " + query +'</br>',
                            HRbody += "<br/>";
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fName, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'anantmothe@gmail.com,lkrapally@adaequare.com,apmothe@adaequare.com,bgouni@adaequare.com', fName, formId, message);

                        mmMessages.success("Your request sent successfully");
                        window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },

    validatecallbackForms: function(formId) {
        return $('#' + formId).validate({
            rules: {
                subFullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                subEmailId: {
                    email3: true
                },
                subMobileNo: {
                    minlength: 10,
                    maxlength: 10,
                    number: true
                },
                location: {
                    required: true, 
                },
                orgName:{
                    required: true,
                },
                subQuery:{
                    required: true,
                },
                meeting_agenda:{
                    required: true,
                },
                zoomDateTimePicker:{
                    required: true,
                }
            },
            messages: {
                subFullName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                subEmailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                subMobileNo: {
                    required: "Please enter your Mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                },
                location: {
                    required: "Please enter your Location",
                },
                orgName:{
                    required: "Please enter your Organization Name",
                },
                subQuery:{
                    required : "Please enter your message"
                },
                meeting_agenda:{
                    required: "Please enter meeting agenda",
                },
                zoomDateTimePicker:{
                    required: "Please enter date and time",
                }
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },


    submitPopupDetailsForm: function(formId){
        var isFormValid = this.validatecallbackForms(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fName = $('#zoom_customer_fullName').val(),
                emailId = $('#zoom_customer_email').val(),
                mobileNo = $('#zoom_customer_mobile').val(),
                description = $('#meeting_agenda').val(),
                meetingDate = $('#zoomDateTimePicker').val();
                time = $('#zoomTime').val();
                
                var today = new Date();
                var dd = String(today.getDate()).padStart(2, '0');
                var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
                var yyyy = today.getFullYear();

                today = dd + '/' + mm + '/' + yyyy;
                

               var dataFields = {'Name':fName,'email':emailId,'Mobile':mobileNo,'Description':description,'Meeting Date':meetingDate,'Meeting Time':time, 'Requested_Date':today};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"Customer Enquiry for Demo- UdyogSoftware",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fName +', </br>',
                        body += "Thank you for reaching out to us with your Fixed Asset Management requirements , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/>";
                        var message = "Your request sent successfully";
                        var subject = "UdyogSoftware - Book a Demo Request";
                        appUtil.triggerEmail(body, subject, emailId, fName, formId, message);

                        var HRsubject = "UdyogSoftware - Book a Demo Request";
                        var HRbody = " ";
                            //HRbody += "Hi Team, ",
                            HRbody += "Hi Team, </br>",
                            HRbody += "</br><br/>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>Name: " + fName +'</br>',
                            HRbody += "<br/>Email: " + emailId +'</br>',
                            HRbody += "<br/>Mobile: " + mobileNo +'</br>',
                            HRbody += "<br/>Description: " + description +'</br>',
                            HRbody += "<br/>Meeting Date: " + meetingDate +'</br>',
                            HRbody += "<br/>Meeting Time: " + time +'</br>',
                            HRbody += "<br/>";
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fName, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'apmothe@adaequare.com,lkrapally@adaequare.com,anantmothe@gmail.com,bgouni@adaequare.com', fName, formId, message);

                        mmMessages.success("Your request sent successfully");
                        window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },
    landingPagebookdemoform: function(formId){
        var isFormValid = this.validatequoteform(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fName = $('#quoteFullName').val(),
                emailId = $('#quoteEmailId').val(),
                mobileNo = $('#quoteMobileNo').val(),
                organization = $('#quoteorgName').val(),
                designation = $('#quoteDesignation').val();
                query = $('#quoteQuery').val();
                var reqDate = new Date();
                var reqtime = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

               var dataFields = {'Name':fName,'emailId':emailId,'phoneNo':mobileNo,'Organization':organization,'Designation':designation,'Message':query,'Requested_Date':reqtime};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"LandingPage BookDemo",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fName +', </br><br/>',
                        body += "Thank you for reaching out to us , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/><br/>";
                        body += '<strong> Your provided details:</strong>';
                        body += "<br/><br/>Name: " + fName +'</br>',
                        body += "<br/>Email Id: " + emailId +'</br>',
                        body += "<br/>Phone No: " + mobileNo +'</br>',
                        body += "<br/>Organization: " + organization +'</br>',
                        body += "<br/>Designation: " + designation +'</br>',
                        body += "<br/>Message: " + query +'</br>',
                        //body += "<br/>Requested Date: " + reqtime +'</br>',
                        body += "<br/>";
                        var message = "Your request sent successfully";
                        var subject = "Welcome to UdyogSoftware";
                        appUtil.triggerEmail(body, subject, emailId, fName, formId, message);

                        var HRsubject = "UdyogSoftware Landing Page - Customer Enquiry";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br><br/>",
                            HRbody += "</br><br/>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>";
                            HRbody += '<strong> Your provided details:</strong>';
                            HRbody += "<br/><br/>Name: " + fName +'</br>',
                            HRbody += "<br/>Email Id: " + emailId +'</br>',
                            HRbody += "<br/>Phone No: " + mobileNo +'</br>',
                            HRbody += "<br/>Organization: " + organization +'</br>',
                            HRbody += "<br/>Designation: " + designation +'</br>',
                            HRbody += "<br/>Message: " + query +'</br>',
                            HRbody += "<br/>";
                            // appUtil.triggerEmail(HRbody, HRsubject, emailId, fName, formId, message);
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fName, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'ptdhirde@udyogsoftware.com,lkrapally@adaequare.com,bgouni@adaequare.com,apmothe@adaequare.com', fName, formId, message);

                        mmMessages.success("Your request sent successfully");
                        window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },
    landingPageQuoteForm: function(formId){
        var isFormValid = this.validatequoteform(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fName = $('#l_FullName').val(),
                emailId = $('#l_EmailId').val(),
                mobileNo = $('#l_MobileNo').val(),
                organization = $('#l_orgName').val(),
                designation = $('#l_Designation').val();
                query = $('#l_Query').val();
                var reqDate = new Date();
                var reqtime = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

               var dataFields = {'Name':fName,'emailId':emailId,'phoneNo':mobileNo,'Organization':organization,'Designation':designation,'Message':query,'Requested_Date':reqtime};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"LandingPage BookDemo",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fName +', </br><br/>',
                        body += "Thank you for reaching out to us , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/><br/>";
                        body += '<strong> Your provided details:</strong>';
                        body += "<br/><br/>Name: " + fName +'</br>',
                        body += "<br/>Email Id: " + emailId +'</br>',
                        body += "<br/>Phone No: " + mobileNo +'</br>',
                        body += "<br/>Organization: " + organization +'</br>',
                        body += "<br/>Designation: " + designation +'</br>',
                        body += "<br/>Message: " + query +'</br>',
                        //body += "<br/>Requested Date: " + reqtime +'</br>',
                        body += "<br/>";
                        var message = "Your request sent successfully";
                        var subject = "Welcome to UdyogSoftware";
                        appUtil.triggerEmail(body, subject, emailId, fName, formId, message);

                        var HRsubject = "Customer Enquiry";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br><br/>",
                            HRbody += "</br><br/>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>";
                            HRbody += '<strong> Your provided details:</strong>';
                            HRbody += "<br/><br/>Name: " + fName +'</br>',
                            HRbody += "<br/>Email Id: " + emailId +'</br>',
                            HRbody += "<br/>Phone No: " + mobileNo +'</br>',
                            HRbody += "<br/>Organization: " + organization +'</br>',
                            HRbody += "<br/>Designation: " + designation +'</br>',
                            HRbody += "<br/>Message: " + query +'</br>',
                            HRbody += "<br/>";
                            // appUtil.triggerEmail(HRbody, HRsubject, emailId, fName, formId, message);
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fName, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'lkrapally@adaequare.com,bgouni@adaequare.com,apmothe@adaequare.com', fName, formId, message);

                        mmMessages.success("Your request sent successfully");
                        window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },
    validatequoteform: function(formId) {
        return $('#' + formId).validate({
            rules: {
                quoteFullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                quoteEmailId: {
                    email3: true
                },
                quoteMobileNo: {
                    minlength: 10,
                    maxlength: 10,
                    number: true
                },
                quoteorgName: {
                    required: true, 
                },
                quotedesignation:{
                    required: true,
                },
                quoteQuery:{
                    required: true,
                },
                meeting_agenda:{
                    required: true,
                },
                zoomDateTimePicker:{
                    required: true,
                }
            },
            messages: {
                quoteFullName: {
                    required: "Please enter your Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                quoteEmailId: {
                    required: "Please enter your Email Address",
                    email3: "Please enter a valid Email Address"
                },
                quoteMobileNo: {
                    required: "Please enter your Mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                },
                quoteorgName: {
                    required: "Please enter your Organization",
                },
                quotedesignation:{
                    required: "Please enter your Designation",
                },
                quoteQuery:{
                    required : "Please enter your message"
                },
                meeting_agenda:{
                    required: "Please enter meeting agenda",
                },
                zoomDateTimePicker:{
                    required: "Please enter date and time",
                }
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },
    
    submithomereqcallForm: function(formId){
        var isFormValid = this.validatecallbackForms(formId).form();
        if (!isFormValid) {
                return false;
                event.preventDefault(); // Stop the form from submitting
        }else{
            var fName = $('#homereqcallfullname').val(),
                emailId = $('#homereqcallemail').val(),
                mobileNo = $('#homereqcallnumber').val(),
                company = $('#homereqcallcompany').val(),
                designation = $('#homereqcalldesig').val(),
                reqmessage = $('#homereqcallmessage').val();
                var reqDate = new Date();
                var reqtime = reqDate.getDate() + "/" + (reqDate.getMonth()+1)  + "/" + reqDate.getFullYear() + " @ " + reqDate.getHours() + ":" + reqDate.getMinutes() + ":" + reqDate.getSeconds();

               var dataFields = {'Name':fName,'EmailId':emailId,'PhoneNo':mobileNo,'Company':company,'Designation':designation,'Message':reqmessage,'Requested_Date':reqtime};
                serverCalls._req_Ajax_Post_Normal(appContextPath + '/web/content/saveDynamicForm.json', { storeId: storeId, orgId: orgId,type:"LandingPage BookDemo",formData:JSON.stringify(dataFields)}, function(response) {
                    if (response.status){
                        var body = " ";
                        body += "Hi " + fName +', </br><br/>',
                        body += "Thank you for reaching out to us , One of our team members will call you shortly !"+'<br/>',
                        body += "<br/><br/>Name: " + fName +'</br>',
                        body += "<br/>Email Id: " + emailId +'</br>',
                        body += "<br/>Phone No: " + mobileNo +'</br>',
                        body += "<br/>Organization: " + company +'</br>',
                        body += "<br/>Designation: " + designation +'</br>',
                        body += "<br/>Message: " + reqmessage +'</br>';
                        //body += "<br/>Requested Date: " + reqtime +'</br>';
                        var message = "Your request sent successfully";
                        var subject = "Welcome to UdyogSoftware";
                        appUtil.triggerEmail(body, subject, emailId, fName, formId, message);

                        var HRsubject = "Customer Enquiry";
                        var HRbody = " ";
                            HRbody += "Hi Team, </br><br/>",
                            HRbody += "</br><br/>We have received request from customer on UdyogSoftware website, Kindly refer to the below submitted details."+'<br/><br/>',
                            HRbody += "<br/><br/>";
                            HRbody += '<strong> Your provided details:</strong>';
                            HRbody += "<br/>Name: " + fName +'</br>',
                            HRbody += "<br/>Email Id: " + emailId +'</br>',
                            HRbody += "<br/>Phone No: " + mobileNo +'</br>',
                            HRbody += "<br/>Organization: " + company +'</br>',
                            HRbody += "<br/>Designation: " + designation +'</br>',
                            HRbody += "<br/>Message: " + reqmessage +'</br>';
                            //HRbody += "<br/>Requested Date: " + reqtime +'</br>';
                            HRbody += "<br/>";
                            // appUtil.triggerEmail(HRbody, HRsubject, emailId, fName, formId, message);
                            appUtil.triggerEmail(HRbody, HRsubject, 'uchheda@udyogsoftware.com', fName, formId, message);
                            //appUtil.triggerEmail(HRbody, HRsubject, 'ptdhirde@udyogsoftware.com,bgouni@adaequare.com,lkrapally@adaequare.com,apmothe@adaequare.com', fName, formId, message);


                        mmMessages.success("Your request sent successfully");
                        $( '#homereqcallForm' ).each(function(){
                        this.reset();
                    });
                        window.location.href = "/thankyou";
                    }
                    
                });
        }
        loader.stopLoader();
    },
    getLoginForm: function() {
        $('#loginformfp').show();
        $('#lgnfpform').hide();
    },
    getFPForm: function(flag) {
        if (!flag)
            $('#errorMsg').html('');
        $('#loginformfp').hide();
        $('#lgnfpform').show();
        $('#loginErrorDivId').hide();
    },
    submitForm: function(formId) {
        $('#serverError').html('');
        var isFormValid = this.validateSignUp(formId).form();
        var emailId = $('#emailId').val();
        var mobileNo = $('#mobileNo').val();
        if (emailId == "" && mobileNo == "") {
            $('#error').html('Email Id or Mobile Number is mandatory');
            $('#error').show();
            isFormValid = false;
        }
        if (!isFormValid) {
            return false;
        } else {
        	$('.busyCursor').addClass("btnDisabled");
    		$('.busyCursor').attr("disabled", true);
            document.getElementById(formId).method = "POST";
            document.getElementById(formId).action = appContextPath + "/web/user/signup";
            document.getElementById(formId).submit();
        }
    },
    displayForgetPasswordOption:function(fPasswordDiv, loginDiv){
        if($("#" + loginDiv).is(":visible")){
            $("#" + loginDiv).css("display", "none");
            $('#'+ fPasswordDiv).toggle();
        }else{
            $("#" + loginDiv).css("display", "block");
            $('#'+ fPasswordDiv).toggle();
        }
         
    },
    showLogin:function(loginDiv, fPasswordDiv){
       if($('#'+ loginDiv).is(':visible')){ 
            $('#'+ loginDiv).css('display', 'none');
       }else{
            if($('#'+ fPasswordDiv).is(":visible")){
               $('#'+ fPasswordDiv).toggle(); 
            }
            $('#'+ loginDiv).css('display', 'block');
       }
    },
    getForgotPassword:function(formId){
        if(SignUpUtil.validateForgetPasswordForm(formId).form()){
           var userId = $('#forgot_emailId').val();
           serverCalls._req_Ajax_Post(appContextPath + '/web/userRest/forgotPassword.json', {userName:userId}, 
                function(data) {
                    if(data.status){
                        mmMessages.success("Your request for new password has been submitted..!!")
                         setTimeout(function(){
                            window.location = '/forgot-password';
                            //window.location = appContextPath + 'web/reset-password-success.jsp'
                        }, 2000);
                    }else{
                        if(data.message == "User not found"){
                            mmMessages.error("Entered email address is not registered with us..");
                            $( '#' + formId).each(function(){
                                this.reset();
                            });
                        }else{
                            mmMessages.error(data.message);
                            $( '#' + formId).each(function(){
                                this.reset();
                            });
                        }
                    }
           }); 
        }
    },
    validateForgetPasswordForm: function(formId) {
        return $('#' + formId).validate({
            rules: {
                forgot_emailId: {
                    required: true,
                    email3: {
                        depends: function(element) {
                            var userName = $('#forgot_emailId').val();
                            return /^[a-zA-Z]{1}.*$/.test(userName);
                        }
                    },
                    number: {
                        depends: function(element) {
                            var userName = $('#forgot_emailId').val();
                            return /^[0-9].*$/i.test(userName);
                        }
                    },
                    minlength: function(element) {
                        var userName = $('#forgot_emailId').val();
                        if (/^[0-9].*$/i.test(userName))
                            return 10;
                    },
                    maxlength: function(element) {
                        var userName = $('#forgot_emailId').val();
                        if (/^[0-9].*$/i.test(userName))
                            return 10;
                    }
                }
            },
            messages: {
                forgot_emailId: {
                    required: "Please enter Email Address",
                    email3: "Please enter valid Email Address",
                    number: "Please enter valid mobile number",
                    minlength: "Minimum 10 digits should be there",
                    maxlength: "Maximum 10 digits are allowed"
                },
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },
    validateTitleDropdown:function(t){
        if(t){
            if(t.toLowerCase() === 'select title'){
                $('#userTitle-error').show();
                $('#userTitle-error').html('Please select title') ;
            }else{
                $('#userTitle-error').hide();
                $('#userTitle-error').html('') ;
            }
        }
    },
    submitSignUpPopupForm:function(formId){
        loader.startLoader();
        $('#serverError').html('');
        var isFormValid = this.validateSignUp(formId).form();
        if (!isFormValid) {
             $('.modal-content').css('height', '700px');
             $('.modal-content').css('overflow-y', 'scroll');
             if (!$('#termsAndConditions').is(':checked')) {
                $('#m_terms').html('Please accept Terms and Conditions');
             } else {
                    $('#m_terms').html('');
             }
            /*if($('#userTitle').val().toLowerCase() === 'select title'){
                $('#userTitle-error').show();
               $('#userTitle-error').html('Please select title') ;
            }*/
            loader.stopLoader();
            return false;
        } else {
            /*if($('#userTitle').val().toLowerCase() === 'select title'){
                $('#userTitle-error').show();
                $('#userTitle-error').html('Please select title') ;
                loader.stopLoader();
            }else{
               $('#userTitle-error').hide();
               $('#userTitle-error').html('') ;*/

                if (!$('#termsAndConditions').is(':checked')) {
                    $('#m_terms').html('Please accept Terms and Conditions');
                    loader.stopLoader();
                } else {
                    $('#m_terms').html('');

                    $('#signupPopupBtn').addClass("btnDisabled");
                    $('#signupPopupBtn').attr("disabled", true);
                    //var userTitle = $('#userTitle').val(),
                    var fullName = $('#fullName').val(),
                    //dob = $('#dob').val(),
                    mCode = $("#input_mobile_code").val().split(' '),
                    mobileNo = mCode[1] +"-"+ $('#mobileNo').val(),
                    email = $('#emailId').val(),
                    password = $('#password').val(),
                    gender = $('input[name=gender]:checked').val();          

                    serverCalls._req_Ajax_Get(appContextPath + '/web/userRest/userExists.json', { emailId: email, mobileNo: mobileNo}, function(response) {
                        if (response.status) {
                            loader.stopLoader();
                            $('#signupErrorMsg').show();
                            $('#signupErrorMsg').text("Email Address/Mobile No. already exist");
                            $('#signupPopupBtn').removeClass("btnDisabled");
                            $('#signupPopupBtn').attr("disabled", false);
                        }else{
                            serverCalls._req_Ajax_Post(appContextPath + '/web/commonRest/generateOTP.json', { mobileNo:mobileNo, type:"SIGNUP", emailId:email }, function(response) {
                                if(response.status){
                                    if (response.otherInfo == "2") {
                                        loader.stopLoader();
                                        mmMessages.success('Successfully sent OTP to your Mobile No. and Email Address');
                                        $('#otpPopupDivId').show();
                                        $('#mobileVerfNo').text(mobileNo);
                                    }else{
                                        loader.stopLoader();
                                        var signupDetailsObj = { firstName: fullName, emailId: email, mobileNo:mobileNo, password:password, gender:gender,captchaToken:captchaToken,additionalInformation:{} }; 
                                        SignUpUtil.signupActionSubmit(signupDetailsObj);
                                    }
                                }else{
                                    loader.stopLoader();
                                    $('#signupPopupBtn').removeClass("btnDisabled");
                                    $('#signupPopupBtn').attr("disabled", false);
                                    $('#signupErrorMsg').show();
                                    $('#signupErrorMsg').text("Something went wrong try again in a few seconds");
                                }
                            }); 
                        }
                    });
                } 
            //}
            //document.getElementById(formId).method = "POST";
            //document.getElementById(formId).action = appContextPath + "/web/user/signup";
            //document.getElementById(formId).submit();
        }
    },
    signupActionSubmit: function(signupDetailsObj){
        loader.startLoader();
        var code = $("#input_mobile_code").val().split(' ');
        var encodePassword = $('#password').val(Base64.encode($('#password').val()));
        var fullName = $('#fullName').val(),
                //dob = $('#dob').val(),
                mobileNo = code[1] +"-"+ $('#mobileNo').val(),
                email = $('#emailId').val(),
                password = $('#password').val(),
                //userTitle = $('#userTitle').val(),
                gender = $('input[name=gender]:checked').val(); 
        serverCalls._req_Ajax_PostJson(appContextPath + '/web/userRest/signup.json', JSON.stringify({ firstName: fullName, emailId: email, mobileNo:mobileNo, password:password, gender:gender, captchaToken:captchaToken,additionalInformation:{} }), function(response) {
            if(response.status == false){
                loader.stopLoader();
                $('.modal-content').css('height', '700px');
                $('.modal-content').css('overflow-y', 'scroll');
                if(response.message == "Captcha validation fails"){
                    $('#captcahErrorMsg').show();
                    $('#captcahErrorMsg').html(response.message);
                }else{
                    $('#signupErrorMsg').show();
                    $('#signupErrorMsg').text(response.message);
                }
                $('#signupPopupBtn').removeClass("btnDisabled");
                $('#signupPopupBtn').attr("disabled", false);
            }else{
                loader.stopLoader();
                window.location.reload(true);
            }
        });
    },
    generateOTP: function(mobileNo, emailId){
        //var mobileNo = $('#mobileVerfNo').val();
        //var eamil = $('#emailId').val();
        serverCalls._req_Ajax_Post(appContextPath + '/web/ckcPaymentsRest/generateOTP.json', { mobileNo:mobileNo, type:"SIGNUP", emailId:emailId }, function(response) {
            if(response.status){
                mmMessages.success('Successfully sent OTP to your Mobile No. and Email Address');
            }else{
                mmMessages.error(response.message);
            }
        });    
    },
    validateOTP: function() {
        var otpValue = $('#otp').val();
        var mobileNo = $('#mobileVerfNo').val();
        if (otpValue != '' && otpValue.length > 0) {
            serverCalls._req_Ajax_Post(appContextPath + '/web/commonRest/validateOTP.json', { mobileNo:mobileNo, otp:otpValue }, function(response) {
                if(response.status){
                    mmMessages.success('Successfully Validated.');
                    $('#otpPopupDivId').hide();
                    SignUpUtil.signupActionSubmit();
                }else{
                    mmMessages.error(response.message);
                }
            });        
        }else{
            $('#otpError').html("Please enter OTP");
        }
    },
    submitLoginForm: function(formId) {
        var isFormValid = this.validateLoginForm(formId).form();
        if (!isFormValid) {
            return false;
        } else {
            $('#fpuserStoreId').val($('#fpuserid').val() + ':' + $('#fpstoreId').val());
            document.getElementById(formId).method = "POST";
            document.getElementById(formId).submit();
        }
    },
    loginPopupAction: function(formId){
        loader.startLoader();
        var isFormValid = this.validateLoginForm(formId).form();
        if (!isFormValid) {
            loader.stopLoader();
            return false;
        } else {
            if ($('#rememberChkBox').is(':checked')) {
                    rememberMe();
                }
            var encodePassword = $('#login_password').val(Base64.encode($('#login_password').val()));
            var detailsStr = "cemailId=" + $("#login_emailId").val() + "&cPassword=" + $("#login_password").val();
            serverCalls._req_Ajax_Post(appContextPath + '/web/userRest/ajaxLogin.json', detailsStr, function(data) {
                if (data.status) {
                    loader.stopLoader();
                    if (window.location.pathname == "/forgot-password") {
                        window.location = '/';
                    }else{
                        window.location.replace(appContextPath + window.location.pathname);
                    }
                } else {
                    loader.stopLoader();
                    $('#loginMessageId').html(data.message);
                }
            });
        }
    },
    submitFPForm: function(formId) {
        var isFormValid = this.validateFPForm(formId).form();
        if (!isFormValid) {
            return false;
        } else {
            document.getElementById(formId).method = "POST";
            document.getElementById(formId).action = appContextPath + "/web/user/forgotPassword";
            document.getElementById(formId).submit();
        }
    },
    validateFPForm: function(formId) {
        $('#errorMsg').html('');
        return $('#' + formId).validate({
            rules: {
                userName: {
                    required: true,
                    email3: {
                        depends: function(element) {
                            var userName = $('#userName').val();
                            return /^[a-zA-Z]{1}.*$/.test(userName);
                        }
                    },
                    number: {
                        depends: function(element) {
                            var userName = $('#userName').val();
                            return /^[0-9].*$/i.test(userName);
                        }
                    },
                    minlength: function(element) {
                        var userName = $('#userName').val();
                        if (/^[0-9].*$/i.test(userName))
                            return 10;
                    },
                    maxlength: function(element) {
                        var userName = $('#userName').val();
                        if (/^[0-9].*$/i.test(userName))
                            return 10;
                    }
                }
            },
            messages: {
                userName: {
                    required: "Please enter Email Address",
                    email3: "Please enter valid Email Address",
                    number: "Please enter valid mobile number",
                    minlength: "Minimum 10 digits should be there",
                    maxlength: "Maximum 10 digits are allowed"
                },
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },
    validateLoginForm: function(formId) {
        $('#fpclientError').html('');
        return $('#' + formId).validate({
            rules: {
                j_password: {
                    required: true
                },
                j_username: {
                    required: true,
                    email3: {
                        depends: function(element) {
                            var userName = $('#fpuserid').val();
                            return /^[a-zA-Z]{1}.*$/.test(userName);
                        }
                    },
                    number: {
                        depends: function(element) {
                            var userName = $('#fpuserid').val();
                            return /^[0-9].*$/i.test(userName);
                        }
                    },
                    minlength: function(element) {
                        var userName = $('#fpuserid').val();
                        if (/^[0-9].*$/i.test(userName))
                            return 10;
                    },
                    maxlength: function(element) {
                        var userName = $('#fpuserid').val();
                        if (/^[0-9].*$/i.test(userName))
                            return 10;
                    }
                }
            },
            messages: {
                j_password: {
                    required: "Please enter Password",
                },
                j_username: {
                    required: "Please enter Email Address",
                    email3: "Please enter valid Email Address",
                    number: "Please enter valid mobile number",
                    minlength: "Minimum 10 digits should be there",
                    maxlength: "Maximum 10 digits are allowed"
                },
            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    },
    validateSignUp: function(formId) {
        return $('#' + formId).validate({
            rules: {
                fullName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    minlength: 2,
                    maxlength: 75
                },
                lastName: {
                    letterfirst: true,
                    letterswithapostrophe: true,
                    maxlength: 75
                },
                emailId: {
                    email3: true
                },
                mobileNo: {
                    minlength: 10,
                    maxlength: 10,
                    number: true
                },
                password: {
                    required: true,
                    nowhitespace: true,
                    minOneDigit: true,
                    minOneAlpha: true,
                    minOneSpeclChar: true,
                    minlength: 6,
                    maxlength: 20
                },
                cpassword: {
                    required: true,
                    equalTo: '#password',
                    nowhitespace: true,
                    minOneDigit: true,
                    minOneAlpha: true,
                    minOneSpeclChar: true,
                    minlength: 6,
                    maxlength: 20
                }
            },
            messages: {
                fullName: {
                    required: "Please enter Full Name",
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    minlength: "Minimum 2 characters should be there",
                    maxlength: "Maximum 75 characters are allowed"
                },
                lastName: {
                    letterswithapostrophe: "Alphabets and apostrophe only allowed",
                    maxlength: "Maximum 75 characters are allowed"
                },
                emailId: {
                    required: "Please enter Email Address",
                    email3: "Please enter a valid Email Address"
                },
                password: {
                    required: "Please enter Password",
                    nowhitespace: "No whitespace is allowed",
                    minOneDigit: "Password should have atleast one digit",
                    minOneAlpha: "Password should have atleast one alphabet",
                    minOneSpeclChar: "Password should have atleast one special character",
                    minlength: "Password min length should be 6 and max length should be 20 characters",
                    maxlength: "Password min length should be 6 and max length should be 20 characters"
                },
                mobileNo: {
                    required: "Please enter Mobile No.",
                    minlength: "Please enter a valid Mobile No.",
                    maxlength: "Please enter a valid Mobile No.",
                    number: "Only numbers are allowed"
                },
                dob:{
                    required: "Please enter Date Of Birth"
                },
                cpassword: {
                    required: "Please enter Confirm Password",
                    equalTo: "Password and Confirm password should be same",
                    nowhitespace: "No whitespace is allowed",
                    minOneDigit: "Password should have atleast one digit",
                    minOneAlpha: "Password should have atleast one alphabet",
                    minOneSpeclChar: "Password should have atleast one special character",
                    minlength: "Password min length should be 6 and max length should be 20 characters",
                    maxlength: "Password min length should be 6 and max length should be 20 characters"
                }

            },
            onfocusout: function(element) {
                this.element(element);
            }
        });
    }
}
$(document).ready(function() {
    $('#password').keyup(function() {
        $('#result').html(checkStrength($('#password').val()))
    })

    function checkStrength(password) {
        var strength = 0
        if (password.length < 6) {
            $('#result').removeClass()
            $('#result').addClass('short')
            return 'Too&nbsp;short'
        }
        if (password.length > 6) strength += 1
        if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) strength += 1
        if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) strength += 1
        if (password.match(/([\!\@\#\$\%\^\&\*\(\)])/)) strength += 1
        if (password.match(/(.*[!,%,&,@,#,$,^,*,?,_,~].*[!,%,&,@,#,$,^,*,?,_,~])/)) strength += 1
        if (strength < 2) {
            $('#result').removeClass()
            $('#result').addClass('weak')
            return 'Weak'
        } else if (strength == 2) {
            $('#result').removeClass()
            $('#result').addClass('good')
            return 'Good'
        } else {
            $('#result').removeClass()
            $('#result').addClass('strong')
            return 'Strong'
        }
    }
});

function validateFPForm() {
    return $("#lgnfpform").validate({
        rules: {
            userName: {
                required: true
            }
        },
        messages: {
            userName: {
                required: "Please enter Email Address/Mobile Number",
            },
        }
    }).form();
}
var verifyCallback = function(response) {
	  //alert(response);
      captchaToken = response;
	};
	var onloadCallback = function() {
	  grecaptcha.render('gCaptcahDivId', {
	    'sitekey' : reCaptchSecreteKey,
	    'callback' : verifyCallback,
	    'theme' : 'light'
	  });
	};
var storeBanner = {
    renderMain: function () {
        loader.startLoader();

        web_content_widget.renderHomeBanner();
        web_content_widget.renderBusinessProcessModules();
        web_content_widget.renderExploreBenefits();
        web_content_widget.renderUdyogIntegrates();
        web_content_widget.renderUdyogNumbers();
        web_content_widget.renderIndustries();
        web_content_widget.getWebContentByTag();
        web_content_widget.renderGetDemo();        

        loader.stopLoader();

    },

    getStoreBanners: function (callback) {
        serverCalls._req_jquery(appContextPath + '/web/content/getStoreBanners.json', { storeId: storeId, orgId: orgId }, function (response) {
            callback(response);
        });
    },
    getSliderData: function () {
        $("#occasionCarousel").responsiveSlides({
            auto: true,
            pager: true,
            arrows: true,
            nav: true,
            namespace: "centered-btns"
        });
        //web_content_widget.renderAboutTracetVideo();
    }

};
var STORE_BANNER_WIDGET = {
    MAIN: {
        fileName: 'store_banner_widget',
        tmpl: "#store_banners_tmpl",
        model: null,
        container: "#store_bannersContainerId"
    }
};
var finalProductObj = {};
var availMenus;
var categoryListing = {
    renderCategoryWiseProducts: function() {
        appUtil.getApplicationMenus(function(response) {
            var availMenuList = _.filter(response.result, function(num) { return num.contentType == "dynamic"; });
            availMenus = availMenuList
            if (availMenuList) {
                appUtil.getDataInObjectForm(availMenuList, function(cateObj) {
                    categoryListing.getProductsByMuneName(cateObj, function(responseData) {
                        localStorageUtil.setStorage("menuList", responseData);
                        appUtil.renderTemplate(CATEGORY_LISTING_WIDGET.MAIN, { response: responseData }, function() {});
                    });
                });
            }
        });

    },
    getProductsByMuneName: function(menuList, callback) {
        var promises = [];
        _.each(menuList, function(record) {
            promises.push(categoryListing.loadProduts(record, function(data) {}));
        });
        Promise.all(promises)
            .then(function(result) {
                if (callback)
                    callback(availMenus)
            })
            .catch(function(e) {
                console.log("error", e);
            });

    },
    loadProduts: function(record) {
        return new Promise(function(resolve) {
            serverCalls._req_jquery(appContextPath + '/web/catalogueRest/getProductsByContentId.json', { id: record._id, page: 1, rows: 3, contentType: "menu" },
                function(data) {
                    $.each(availMenus, function(key, value) {
                        if (value._id == record._id) {
                            availMenus[key]['products'] = data.rows
                        }
                    });
                    resolve();
                });
        });
    },

    renderSubcategoriesList:function(){
        var subCatList = [];
        appUtil.getApplicationMenus(function(response) {
            var availMenuList = _.filter(response.result, function(num) { return num.contentType == "dynamic"; });
            availMenus = availMenuList
            if (availMenuList) {
                appUtil.getDataInObjectForm(availMenuList, function(cateObj) {
                    _.each(cateObj, function(mainMenu) {
                        if (mainMenu.children != null) {
                            _.each(mainMenu.children, function(eachSubCat) {
                                if (eachSubCat.menuName == "Diamond") {
                                   _.each(eachSubCat.children, function(eachSubCategory) {
                                        subCatList.push(eachSubCategory)
                                    }); 
                                }
                            });
                        }
                    });
                });
                console.log(subCatList);
                if (subCatList.length > 0) {
                    appUtil.renderTemplate(CATEGORY_LISTING_WIDGET.SUBCATEGORIESMENU, { response: subCatList }, function() {});
                }
            }
        });
    }
};
var CATEGORY_LISTING_WIDGET = {
    MAIN: {
        fileName: 'category_listing_widget',
        tmpl: "#category_listing_tmpl",
        model: null,
        container: "#category_ListingContainerId"
    },
    SUBCATEGORIESMENU: {
        fileName: 'category_listing_widget',
        tmpl: "#subcategories_menuListing_tmpl",
        model: null,
        container: "#subCategiores_ContainerId"
    },
};
var finalContentObj = {};
var availableContentType = ["SPECIAL OFFERS", "SPECIAL COLLECTION", "CUSTOMER TESTIMONIALS", "Solitaire Collection", "Exclusive Categories"];
var contentTypeHeading = {'Solitaire Collection' : 'Solitaire Customize'};
var web_content_widget = {

    /*Home page webcontent start*/
    renderHomeBanner:function(){
        var blockName = "home_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#homebanner_tmpl" ).link('#homebanner', {dataContent : responce});
                    } 
                }
        });
    },
    renderBusinessProcessModules:function(){
        var blockName = "business_process_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#businessProcessModules_tmpl" ).link('#businessProcessModules', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('module_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('module_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('module_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderExploreBenefits:function(){
        var blockName = "explore_our_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#exploreOurBenefits_tmpl" ).link('#exploreOurBenefits', {dataContent : responce});
                    } 
                }
        });
    },
    renderPricingCustomers:function(){
        var blockName = "pricing_customers";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#pricingCustomers_tmpl" ).link('#pricingCustomers', {dataContent : responce});
                    } 
                }
        });
    },
    renderUdyogIntegrates:function(){
        var blockName = "udyog_integrates";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#udyogIntegrates_tmpl" ).link('#udyogIntegrates', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('udyogIntegrates_lists', 4, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('udyogIntegrates_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('udyogIntegrates_lists', 6, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderUdyogNumbers:function(){
        var blockName = "udyog_numbers";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#udyogNumbers_tmpl" ).link('#udyogNumbers', {dataContent : responce});
                    } 
                }
        });
    },
    renderIndustries:function(){
        var blockName = "industries_we_serve";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#industries_tmpl" ).link('#industries', {dataContent : responce});
                    } 
                }
        });
    },
    renderGetDemo:function(){
        var blockName = "get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#getaDemo_tmpl" ).link('#getaDemo', {dataContent : responce});
                    } 
                }
        });
    },

    /*Home page webcontent end*/



    /*FAM page webcontent start*/
    renderFAMBanner:function(){
        var blockName = "FAM_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#fam_banner_tmpl" ).link('#fam_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderFAMChooseUdyogERP:function(){
        var blockName = "FAM_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#fam_choose_udyog_tmpl" ).link('#fam_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderFAMFeatures:function(){
        var blockName = "FAM_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#famFeatures_tmpl" ).link('#famFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderFAMBenefits:function(){
        var blockName = "FAM_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#famBenefits_tmpl" ).link('#famBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderFAMIndustrySolutions:function(){
        var blockName = "FAM_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#famIndustrySolutions_tmpl" ).link('#famIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderFAMRelatedModules:function(){
        var blockName = "FAM_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#fam_related_modules_tmpl" ).link('#fam_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderFAMGetDemo:function(){
        var blockName = "FAM_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#FAMGetaDemo_tmpl" ).link('#FAMGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*FAM page webcontent end*/

    /*PM page webcontent start*/

         renderPMBanner:function(){
            var blockName = "PM_banner";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#pm_banner_tmpl" ).link('#pm_banner', {dataContent : responce});
                        } 
                    }
            });
        },
        renderPMChooseUdyogERP:function(){
            var blockName = "PM_choose_udyog";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#pm_choose_udyog_tmpl" ).link('#pm_choose_udyog', {dataContent : responce});
                        } 
                    }
            });
        },
        renderPMFeatures:function(){
            var blockName = "PM_features";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#pmFeatures_tmpl" ).link('#pmFeatures', {dataContent : responce});
                            if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                                slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                            } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                                slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                            } else{
                                slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                            }
                        } 
                    }
            });
        },
        renderPMBenefits:function(){
            var blockName = "PM_benefits";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#pmBenefits_tmpl" ).link('#pmBenefits', {dataContent : responce});
                            if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                                slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                            } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                                slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                            } else{
                                slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                            }
                        } 
                    }
            });
        },
        renderPMIndustrySolutions:function(){
            var blockName = "PM_industry_solutions";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#pmIndustrySolutions_tmpl" ).link('#pmIndustrySolutions', {dataContent : responce});
                            if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                                slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                            } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                                slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                            } else{
                                slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                            }
                        } 
                    }
            });
        },
        renderPMRelatedModules:function(){
            var blockName = "PM_related_modules";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#pm_related_modules_tmpl" ).link('#pm_related_modules', {dataContent : responce});
                        } 
                    }
            });
        },
        renderPMGetDemo:function(){
            var blockName = "PM_get_a_demo";
            serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
                function(responce) {
                    if (responce.status) {
                        if (responce.result.length>0) {
                            $.templates("#PMGetaDemo_tmpl" ).link('#PMGetaDemo', {dataContent : responce});
                        } 
                    }
            });
        },

    /*PM page webcontent end*/

    /* GST-cm page webcontent end*/
    renderGSTBanner:function(){
        var blockName = "GST_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GST_banner_tmpl" ).link('#GST_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderGSTChooseUdyogERP:function(){
        var blockName = "GST_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GST_choose_udyog_tmpl" ).link('#GST_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderGSTFeatures:function(){
        var blockName = "GST_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GSTFeatures_tmpl" ).link('#GSTFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderGSTBenefits:function(){
        var blockName = "GST_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GSTBenefits_tmpl" ).link('#GSTBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderGSTIndustrySolutions:function(){
        var blockName = "GST_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GST_IndustrySolutions_tmpl" ).link('#GST_IndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderGSTRelatedModules:function(){
        var blockName = "GST_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GST_related_modules_tmpl" ).link('#GST_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderGSTGetDemo:function(){
        var blockName = "GST_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#GST_GetaDemo_tmpl" ).link('#GST_GetaDemo', {dataContent : responce});
                    } 
                }
        });
    },

    /* GST-cm page webcontent end*/

    /*Inventory Mgmt page webcontent start*/
    renderInventoryMgmtBanner:function(){
        var blockName = "inventory_management_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventory_mgmt_banner_tmpl" ).link('#inventory_mgmt_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderInventoryMgmtChooseUdyogERP:function(){
        var blockName = "inventory_management_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventory_mgmt_choose_udyog_tmpl" ).link('#inventory_mgmt_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderInventoryMgmtFeatures:function(){
        var blockName = "inventory_management_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventoryMgmt_tmpl" ).link('#inventoryMgmtFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderInventoryMgmtBenefits:function(){
        var blockName = "inventory_management_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventoryMgmtBenefits_tmpl" ).link('#inventoryMgmtBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderInventoryMgmtIndustrySolutions:function(){
        var blockName = "inventory_management_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventoryMgmtIndustrySolutions_tmpl" ).link('#inventoryMgmtIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderInventoryMgmtRelatedModules:function(){
        var blockName = "inventory_management_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventoryMgmt_related_modules_tmpl" ).link('#inventoryMgmt_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderInventoryMgmtGetDemo:function(){
        var blockName = "inventory_management_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#inventoryMgmtGetaDemo_tmpl" ).link('#inventoryMgmtGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Inventory Mgmt page webcontent end*/

    /*MRPM page webcontent start*/
    renderMRPMBanner:function(){
        var blockName = "MRPM_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpm_banner_tmpl" ).link('#mrpm_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderMRPMChooseUdyogERP:function(){
        var blockName = "MRPM_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpm_choose_udyog_tmpl" ).link('#mrpm_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderMRPMFeatures:function(){
        var blockName = "MRPM_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpmFeatures_tmpl" ).link('#mrpmFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderMRPMBenefits:function(){
        var blockName = "MRPM_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpmBenefits_tmpl" ).link('#mrpmBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderMRPMIndustrySolutions:function(){
        var blockName = "MRPM_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpmIndustrySolutions_tmpl" ).link('#mrpmIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderMRPMRelatedModules:function(){
        var blockName = "MRPM_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpm_related_modules_tmpl" ).link('#mrpm_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderMRPMGetDemo:function(){
        var blockName = "MRPM_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#mrpmGetaDemo_tmpl" ).link('#mrpmGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*MRPM page webcontent end*/

    /*Labour Job Module page webcontent start*/
    renderLabourJobModuleBanner:function(){
        var blockName = "labourJobModule_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModule_banner_tmpl" ).link('#labourJobModule_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderLabourJobModuleChooseUdyogERP:function(){
        var blockName = "labourJobModule_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModule_choose_udyog_tmpl" ).link('#labourJobModule_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderLabourJobModuleFeatures:function(){
        var blockName = "labourJobModule_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModuleFeatures_tmpl" ).link('#labourJobModuleFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderLabourJobModuleBenefits:function(){
        var blockName = "labourJobModule_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModuleBenefits_tmpl" ).link('#labourJobModuleBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderLabourJobModuleIndustrySolutions:function(){
        var blockName = "labourJobModule_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModuleIndustrySolutions_tmpl" ).link('#labourJobModuleIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderLabourJobModuleRelatedModules:function(){
        var blockName = "labourJobModule_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModule_related_modules_tmpl" ).link('#labourJobModule_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderLabourJobModuleGetDemo:function(){
        var blockName = "labourJobModule_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#labourJobModuleGetaDemo_tmpl" ).link('#labourJobModuleGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Labour Job Module page webcontent end*/

    /*Sales & Purchase page webcontent start*/
    renderSalesPurchaseBanner:function(){
        var blockName = "salesPurchase_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchase_banner_tmpl" ).link('#salesPurchase_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderSalesPurchaseChooseUdyogERP:function(){
        var blockName = "salesPurchase_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchase_choose_udyog_tmpl" ).link('#salesPurchase_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderSalesPurchaseFeatures:function(){
        var blockName = "salesPurchase_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchaseFeatures_tmpl" ).link('#salesPurchaseFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderSalesPurchaseBenefits:function(){
        var blockName = "salesPurchase_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchaseBenefits_tmpl" ).link('#salesPurchaseBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderSalesPurchaseIndustrySolutions:function(){
        var blockName = "salesPurchase_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchaseIndustrySolutions_tmpl" ).link('#salesPurchaseIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderSalesPurchaseRelatedModules:function(){
        var blockName = "salesPurchase_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchase_related_modules_tmpl" ).link('#salesPurchase_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderSalesPurchaseGetDemo:function(){
        var blockName = "salesPurchase_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#salesPurchaseGetaDemo_tmpl" ).link('#salesPurchaseGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Sales & Purchase page webcontent end*/

    /*Quality Management page webcontent start*/
    renderQualityMgmtBanner:function(){
        var blockName = "quality_management_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmt_banner_tmpl" ).link('#qualityMgmt_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderQualityMgmtChooseUdyogERP:function(){
        var blockName = "quality_management_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmt_choose_udyog_tmpl" ).link('#qualityMgmt_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderQualityMgmtFeatures:function(){
        var blockName = "quality_management_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmtFeatures_tmpl" ).link('#qualityMgmtFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderQualityMgmtBenefits:function(){
        var blockName = "quality_management_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmtBenefits_tmpl" ).link('#qualityMgmtBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderQualityMgmtIndustrySolutions:function(){
        var blockName = "quality_management_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmtIndustrySolutions_tmpl" ).link('#qualityMgmtIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderQualityMgmtRelatedModules:function(){
        var blockName = "quality_management_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmt_related_modules_tmpl" ).link('#qualityMgmt_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderQualityMgmtGetDemo:function(){
        var blockName = "quality_management_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#qualityMgmtGetaDemo_tmpl" ).link('#qualityMgmtGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Quality Management page webcontent end*/

    /*Project Management page webcontent start*/
    renderProjectManagementBanner:function(){
        var blockName = "project_management_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagement_banner_tmpl" ).link('#projectManagement_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderProjectManagementChooseUdyogERP:function(){
        var blockName = "project_management_choose_udyog";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagement_choose_udyog_tmpl" ).link('#projectManagement_choose_udyog', {dataContent : responce});
                    } 
                }
        });
    },
    renderProjectManagementFeatures:function(){
        var blockName = "project_management_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagementFeatures_tmpl" ).link('#projectManagementFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderProjectManagementBenefits:function(){
        var blockName = "project_management_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagementBenefits_tmpl" ).link('#projectManagementBenefits', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderProjectManagementIndustrySolutions:function(){
        var blockName = "project_management_industry_solutions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagementIndustrySolutions_tmpl" ).link('#projectManagementIndustrySolutions', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderProjectManagementRelatedModules:function(){
        var blockName = "project_management_related_modules";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagement_related_modules_tmpl" ).link('#projectManagement_related_modules', {dataContent : responce});
                    } 
                }
        });
    },
    renderProjectManagementGetDemo:function(){
        var blockName = "project_management_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#projectManagementGetaDemo_tmpl" ).link('#projectManagementGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Project Management page webcontent end*/ 

  /*export Management page webcontent start*/
  
  renderexportManagementBanner:function(){
    var blockName = "Export_management_banner";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagement_banner_tmpl" ).link('#exportManagement_banner', {dataContent : responce});
                } 
            }
    });
  },
  renderexportManagementChooseUdyogERP:function(){
    var blockName = "Export_management_choose_udyog";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagement_choose_udyog_tmpl" ).link('#exportManagement_choose_udyog', {dataContent : responce});
                } 
            }
    });
  },
  renderexportManagementFeatures:function(){
    var blockName = "Export_management_features";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagementFeatures_tmpl" ).link('#exportManagementFeatures', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('famFeature_lists', 2, 1, true, 2000, true, false, true, false, true);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('famFeature_lists', 1, 1, true, 2000, true, false, true, false, true);
                    } else{
                        slickSlider.addSlider('famFeature_lists', 3, 1, true, 2000, true, false, true, false, true);    
                    }
                } 
            }
    });
  },
  renderexportManagementBenefits:function(){
    var blockName = "Export_management_benefits";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagementBenefits_tmpl" ).link('#exportManagementBenefits', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSliderNew('fam_benefit_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSliderNew('fam_benefit_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                    } else{
                        slickSlider.addSliderNew('fam_benefit_list', 3, 1, true, 2000, true, false, true, false, false, 2);    
                    }
                } 
            }
    });
  },
  renderexportManagementIndustrySolutions:function(){
    var blockName = "Export_management_industry_solutions";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagementIndustrySolutions_tmpl" ).link('#exportManagementIndustrySolutions', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                    } else{
                        slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                    }
                } 
            }
    });
  },
  renderexportManagementRelatedModules:function(){
    var blockName = "Export_management_related_modules";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagement_related_modules_tmpl" ).link('#exportManagement_related_modules', {dataContent : responce});
                } 
            }
    });
  },
  renderexportManagementGetDemo:function(){
    var blockName = "Export_management_get_a_demo";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportManagementGetaDemo_tmpl" ).link('#exportManagementGetaDemo', {dataContent : responce});
                } 
            }
    });
  },
 /*export Management page webcontent end*/

 /*Manufacturing industry page webcontent start*/  
    renderManufacturingBanner:function(){
        var blockName = "manufacturing_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturing_banner_tmpl" ).link('#manufacturing_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderManufacturingCustomers:function(){
        var blockName = "manufacturing_customers";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturing_customers_tmpl" ).link('#manufacturing_customers', {dataContent : responce});
                    } 
                }
        });
    },
    renderManufacturingBusinessVericals:function(){
        var blockName = "manufacturing_business_vericals";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturing_verticals_tmpl" ).link('#manufacturing_verticals', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('vertical_list', 3, 1, true, 2000, true, false, true, false, false);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('vertical_list', 2, 1, true, 2000, true, false, true, false, false);
                        } else{
                            slickSlider.addSlider('vertical_list', 4, 1, true, 2000, true, false, true, false, false); 
                        }
                    } 
                }
        });
    },
    renderManufacturingChallenges:function(){
        var blockName = "manufacturing_industry_challenges";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturingIndustryChallenges_tmpl" ).link('#manufacturingIndustryChallenges', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderManufacturingFeatures:function(){
        var blockName = "manufacturing_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturingFeatures_tmpl" ).link('#manufacturingFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('industry_feature_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderManufacturingBenefits:function(){
        var blockName = "manufacturing_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturingBenefits_tmpl" ).link('#manufacturingBenefits', {dataContent : responce});
                    } 
                }
        });
    },
    renderManufacturingRelatedIndustries:function(){
        var blockName = "manufacturing_related_industries";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturing_related_industries_tmpl" ).link('#manufacturing_related_industries', {dataContent : responce});
                    } 
                }
        });
    },
    renderManufacturingGetDemo:function(){
        var blockName = "manufacturing_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#manufacturingGetaDemo_tmpl" ).link('#manufacturingGetaDemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Manufacturing industry page webcontent end*/ 
    
    /*services industry page webcontent start*/  
    renderservicesBanner:function(){
        var blockName = "services_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#services_banner_tmpl" ).link('#services_banner', {dataContent : responce});
                    } 
                }
        });
    },
    renderservicesCustomers:function(){
        var blockName = "services_customers";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#services_customers_tmpl" ).link('#services_customers', {dataContent : responce});
                    } 
                }
        });
    },
    renderservicesBusinessVericals:function(){
        var blockName = "Services_business_vericals";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#services_verticals_tmpl" ).link('#services_verticals', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('vertical_list', 3, 1, true, 2000, true, false, true, false, false);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('vertical_list', 2, 1, true, 2000, true, false, true, false, false);
                        } else{
                            slickSlider.addSlider('vertical_list', 4, 1, true, 2000, true, false, true, false, false); 
                        }
                    } 
                }
        });
    },
    renderservicesChallenges:function(){
        var blockName = "services_industry_challenges";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#servicesIndustryChallenges_tmpl" ).link('#servicesIndustryChallenges', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                        } else{
                            slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                        }
                    } 
                }
        });
    },
    renderservicesFeatures:function(){
        var blockName = "services_features";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#servicesFeatures_tmpl" ).link('#servicesFeatures', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSliderNew('industry_feature_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                        } else{
                            slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);    
                        }
                    } 
                }
        });
    },
    renderservicesBenefits:function(){
        var blockName = "services_benefits";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#servicesBenefits_tmpl" ).link('#servicesBenefits', {dataContent : responce});
                    } 
                }
        });
    },
    renderservicesRelatedIndustries:function(){
        var blockName = "services_related_industries";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#services_related_industries_tmpl" ).link('#services_related_industries', {dataContent : responce});
                    } 
                }
        });
    },
    renderServicesGetDemo:function(){
        var blockName = "Services_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#services_GetaDemo_tmpl" ).link('#services_GetaDemo', {dataContent : responce});
                    } 
                }
        });
      },
    /*services industry page webcontent end*/ 
    
  /*energy industry page webcontent start*/  
   renderenergyBanner:function(){
    var blockName = "energy_banner";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energy_banner_tmpl" ).link('#energy_banner', {dataContent : responce});
                } 
            }
    });
  },
  renderenergyCustomers:function(){
    var blockName = "energy_customers";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energy_customers_tmpl" ).link('#energy_customers', {dataContent : responce});
                } 
            }
    });
 },
  renderenergyBusinessVericals:function(){
    var blockName = "energy_business_vericals";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energy_verticals_tmpl" ).link('#energy_verticals', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('vertical_list', 3, 1, true, 2000, true, false, true, false, false);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('vertical_list', 2, 1, true, 2000, true, false, true, false, false);
                    } else{
                        slickSlider.addSlider('vertical_list', 4, 1, true, 2000, true, false, true, false, false); 
                    }
                } 
            }
    });
  },
  renderenergyChallenges:function(){
    var blockName = "energy_industry_challenges";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energyIndustryChallenges_tmpl" ).link('#energyIndustryChallenges', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                    } else{
                        slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                    }
                } 
            }
    });
  },
  renderenergyFeatures:function(){
    var blockName = "energy_features";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energyFeatures_tmpl" ).link('#energyFeatures', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSliderNew('industry_feature_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                    } else{
                        slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);    
                    }
                } 
            }
    });
  },
  renderenergyBenefits:function(){
    var blockName = "energy_benefits";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energyBenefits_tmpl" ).link('#energyBenefits', {dataContent : responce});
                } 
            }
    });
  },
  renderenergyRelatedIndustries:function(){
    var blockName = "energy_related_industries";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energy_related_industries_tmpl" ).link('#energy_related_industries', {dataContent : responce});
                } 
            }
    });
  },
  renderenergyGetDemo:function(){
    var blockName = "energy_get_a_demo";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#energyGetaDemo_tmpl" ).link('#energyGetaDemo', {dataContent : responce});
                } 
            }
    });
  },
  /*energy industry page webcontent end*/ 

  /*Technology industry page webcontent start*/  
  rendertechnologyBanner:function(){
    var blockName = "technology_banner";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technology_banner_tmpl" ).link('#technology_banner', {dataContent : responce});
                } 
            }
    });
   },
   rendertechnologyCustomers:function(){
    var blockName = "technology_customers";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technology_customers_tmpl" ).link('#technology_customers', {dataContent : responce});
                } 
            }
    });
  },
  rendertechnologyBusinessVericals:function(){
    var blockName = "technology_business_vericals";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technology_verticals_tmpl" ).link('#technology_verticals', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('vertical_list', 3, 1, true, 2000, true, false, true, false, false);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('vertical_list', 2, 1, true, 2000, true, false, true, false, false);
                    } else{
                        slickSlider.addSlider('vertical_list', 4, 1, true, 2000, true, false, true, false, false); 
                    }
                } 
            }
    });
   },
   rendertechnologyChallenges:function(){
    var blockName = "technology_industry_challenges";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technologyIndustryChallenges_tmpl" ).link('#technologyIndustryChallenges', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                    } else{
                        slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                    }
                } 
            }
    });
   },
   rendertechnologyFeatures:function(){
    var blockName = "technology_features";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technologyFeatures_tmpl" ).link('#technologyFeatures', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSliderNew('industry_feature_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                    } else{
                        slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);    
                    }
                } 
            }
    });
   },
   rendertechnologyBenefits:function(){
    var blockName = "technology_benefits";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technologyBenefits_tmpl" ).link('#technologyBenefits', {dataContent : responce});
                } 
            }
    });
   },
   rendertechnologyRelatedIndustries:function(){
    var blockName = "technology_related_industries";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technology_related_industries_tmpl" ).link('#technology_related_industries', {dataContent : responce});
                } 
            }
    });
   },
   rendertechnologyGetDemo:function(){
    var blockName = "technology_get_a_demo";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#technologyGetaDemo_tmpl" ).link('#technologyGetaDemo', {dataContent : responce});
                } 
            }
    });
   },
  /*Technology industry page webcontent end*/ 

  /*Export_and_import industry page webcontent start*/  
  renderExportAndImportBanner:function(){
    var blockName = "exportAndImport_banner";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#export_and_ImportBanner_tmpl" ).link('#export_and_importBanner', {dataContent : responce});
                } 
            }
    });
   },
   renderExportAndImportCustomers:function(){
    var blockName = "exportAndImport_customers";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportAndImport_customers_tmpl" ).link('#exportAndImport_customers', {dataContent : responce});
                } 
            }
    });
   },
   renderExportAndImportBusinessVericals:function(){
    var blockName = "exportAndImport_business_vericals";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportAndImport_verticals_tmpl" ).link('#export_and_import_verticals', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('vertical_list', 3, 1, true, 2000, true, false, true, false, false);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('vertical_list', 2, 1, true, 2000, true, false, true, false, false);
                    } else{
                        slickSlider.addSlider('vertical_list', 4, 1, true, 2000, true, false, true, false, false); 
                    }
                } 
            }
    });
   },
   renderExportAndImportChallenges:function(){
    var blockName = "exportAndImport_industry_challenges";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#export_and_importIndustryChallenges_tmpl" ).link('#export_and_importIndustryChallenges', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSlider('famSolutions_lists', 2, 1, true, 2000, true, false, true, false, true);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSlider('famSolutions_lists', 1, 1, true, 2000, true, false, true, false, true);
                    } else{
                        slickSlider.addSlider('famSolutions_lists', 3, 1, true, 2000, true, false, true, false, true);    
                    }
                } 
            }
    });
   },
   renderExportAndImportFeatures:function(){
    var blockName = "exportAndImport_features";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#export_and_importFeatures_tmpl" ).link('#export_and_importFeatures', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                        slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);
                    } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                        slickSlider.addSliderNew('industry_feature_list', 1, 1, true, 2000, true, false, true, false, false, 2);
                    } else{
                        slickSlider.addSliderNew('industry_feature_list', 2, 1, true, 2000, true, false, true, false, false, 2);    
                    }
                } 
            }
     });
    },
    renderExportAndImportBenefits:function(){
    var blockName = "exportAndImport_benefits";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#export_and_importBenefits_tmpl" ).link('#export_and_importBenefits', {dataContent : responce});
                } 
            }
    });
   },
   renderExportAndImportRelatedIndustries:function(){
    var blockName = "exportAndImport_related_industries";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#exportAndImport_related_industries_tmpl" ).link('#exportAndImport_related_industries', {dataContent : responce});
                } 
            }
    });
   },
   renderExportAndImportGetDemo:function(){
    var blockName = "exportAndImport_get_a_demo";
    serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
        function(responce) {
            if (responce.status) {
                if (responce.result.length>0) {
                    $.templates("#export_and_importGetaDemo_tmpl" ).link('#export_and_importGetaDemo', {dataContent : responce});
                } 
            }
    });
   },
   /*Export_and_import industry page webcontent end*/ 
  


    /*Our Products page webcontent start*/
    renderOurProductsBanner:function(){ 
        var blockName = "our_products_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#ourProductsBanner_tmpl" ).link('#ourProductsBanner', {dataContent : responce});
                    } 
                }
        });
    },
    renderDiscoverProducts:function(){ 
        var blockName = "discover_products";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#discoverProducts_tmpl" ).link('#discoverProducts', {dataContent : responce});
                    } 
                }
        });
    },
    renderExploreOurProducts:function(){ 
        var blockName = "explore_our_products";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#exploreOurProducts_tmpl" ).link('#exploreOurProducts', {dataContent : responce});
                    } 
                }
        });
    },
    /*Our Products page webcontent end*/ 

    /*Pricing page webcontent start*/
    renderPricingBanner:function(){ 
        var blockName = "pricing_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#pricingBanner_tmpl" ).link('#pricingBanner', {dataContent : responce});
                    } 
                }
        });
    },
    renderPricingPlans:function(){ 
        var blockName = "pricing_plans";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#pricingPlans_tmpl" ).link('#pricingPlans', {dataContent : responce});
                    } 
                }
        });
    },
    renderWhyChooseUerp:function(){ 
        var blockName = "why_choose_uerp";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#whyChooseUerp_tmpl" ).link('#whyChooseUerp', {dataContent : responce});
                    } 
                }
        });
    },
    renderPricingIndustries:function(){ 
        var blockName = "pricing_industries";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#pricing_industries_tmpl" ).link('#pricing_industries', {dataContent : responce});
                    } 
                }
        });
    },
    renderPricingGetDemo:function(){
        var blockName = "pricing_get_a_demo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#pricingGetdemo_tmpl" ).link('#pricingGetdemo', {dataContent : responce});
                    } 
                }
        });
    },
    /*Pricing page webcontent end*/ 

    /*Partners page webcontent start*/ 
    renderPartnersBanner:function(){   
        var blockName = "partners_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#partnersBanner_tmpl" ).link('#partnersBanner', {dataContent : responce});
                    } 
                }
        });
    },
    renderUdyogChoosePartners:function(){
        var blockName = "udyog_choose_partners";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#udyogChoosePartners_tmpl" ).link('#udyogChoosePartners', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderPartnerPrograms:function(){
        var blockName = "partner_programs";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#partnerPrograms_tmpl" ).link('#partnerPrograms', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderWhyJoinUdyogPartner:function(){
        var blockName = "why_join_udyog_partner_program";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#whyJoinUdyogPartner_tmpl" ).link('#whyJoinUdyogPartner', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderPartnersTestimonials:function(){
        var blockName = "partners_testimonials";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#partnerTestimonials_tmpl" ).link('#partnerTestimonials', {dataContent : responce});
                        if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                            slickSlider.addSlider('testimonials', 2, 1, true, 2000, true, false, true, false, false);
                        } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                            slickSlider.addSlider('testimonials', 1, 1, true, 2000, true, false, true, false, false);
                        } else{
                            slickSlider.addSlider('testimonials', 3, 1, true, 2000, true, false, true, false, false);    
                        }
                    } 
                }
        });
    }, 
    renderPartnersGetDemo:function(){
        var blockName = "partners_getdemo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#partnersGetdemo_tmpl" ).link('#partnersGetdemo', {dataContent : responce});
                    } 
                }
        });
    }, 
    /*Partners page webcontent end*/

    /*About us page webcontent start*/ 
    renderAboutUsBanner:function(){   
        var blockName = "aboutus_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#aboutUsBanner_tmpl" ).link('#aboutUsBanner', {dataContent : responce});
                    } 
                }
        });
    },
    renderAboutUdyogSoft:function(){
        var blockName = "about_udyogsoftware";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#aboutUdyogSoft_tmpl" ).link('#aboutUdyogSoft', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderOurJourney:function(){
        var blockName = "our_journey";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#ourJourney_tmpl" ).link('#ourJourney', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderOurVisionMission:function(){
        var blockName = "our_vision_missions";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#ourVisionMission_tmpl" ).link('#ourVisionMission', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderTrustedPartner:function(){
        var blockName = "trusted_partners";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#trustedPartner_tmpl" ).link('#trustedPartner', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderOurCommitment:function(){
        var blockName = "our_commitement";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#ourCommitement_tmpl" ).link('#ourCommitement', {dataContent : responce});
                    } 
                }
        });
    }, 
    renderAboutusGetDemo:function(){
        var blockName = "aboutus_getdemo";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#aboutusGetdemo_tmpl" ).link('#aboutusGetdemo', {dataContent : responce});
                    } 
                }
        });
    }, 
    /*About us page webcontent end*/

    /*Get a Demo page webcontent start*/ 
    renderGetDemoBanner:function(){   
        var blockName = "get_a_demo_banner";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#getDemoBanner_tmpl" ).link('#getDemoBanner', {dataContent : responce});
                    } 
                }
        });
    },
    renderLiveDemoIncluded:function(){
        var blockName = "live_demo_included";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#liveDemoIncluded_tmpl" ).link('#liveDemoIncluded', {dataContent : responce});
                    } 
                }
        });
    },
    rendeGetDemoCustomers:function(){
        var blockName = "getademo_customers";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.status) {
                    if (responce.result.length>0) {
                        $.templates("#getDemo_customers_tmpl" ).link('#getDemo_customers', {dataContent : responce});
                    } 
                }
        });
    },
    /*Get a Demo page webcontent end*/ 

    renderblogBannerContent:function(){
        var blockName = "Blog Banner Content";
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId, blockName:blockName}, 
            function(responce) {
                if (responce.result.length>0) {
                    $.templates("#blog_BannerContent_tmpl" ).link('#blog_BannerContent', {dataContent : responce});
                    if(navigator.userAgent.toLowerCase().indexOf('ipad') > -1){
                    slickSlider.addSlider('BannerSlide', 1, 1, true, 2000, true, false, true, false, true);
                } else if(navigator.userAgent.toLowerCase().indexOf('mobile') > -1){
                    slickSlider.addSlider('BannerSlide', 1, 1, true, 2000, true, false, true, false, true);
                } else{
                    slickSlider.addSlider('BannerSlide', 1, 1, true, 2000, true, false, true, false, true);    
                    //slickSlider.addSlider(prepareContentObj.sectionId, settings.large, 1, true, 2000, true, false, true, false, true);
                }
                }
        });
    },
    renderWebContent: function() {
        var file = web_content_widget.getFileLocation(WEB_CONTENT_WIDGET.MAIN.fileName);
         $.get(file, null, function(tmplData) {
            web_content_widget.getAvailableWebContent(function(responce){
                if(responce.result.length > 0){
                    web_content_widget.getContentByType(responce, function(content){
                        web_content_widget.renderTypeWiseContent(tmplData, content);
                    });
                }    
            }); 
        }); 
    },

    renderTypeWiseContent:function(tmplData, contentObj){
        _.each(availableContentType, function(eachContent){
            if(!_.isEmpty(contentObj[eachContent])){
                var prepareContentObj = {};
                var prepareContentDiv = '<div id="webContent_'+ appUtil.replaceSplChars(eachContent.toLowerCase(), '_')+'">'+eachContent+'</div>'
                $('#' + appUtil.replaceSplChars(eachContent.toLowerCase(), '')).append(prepareContentDiv)
                prepareContentObj['contentTitle'] = eachContent;
                prepareContentObj['contents'] = contentObj[eachContent];
                prepareContentObj['contentTypeHeading'] = contentTypeHeading[eachContent];
                prepareContentObj['sectionId'] = "slickWebContent_" + appUtil.replaceSplChars(eachContent.toLowerCase(), '_');
                prepareContentObj['sliderForDesktop'] = false;
                $('head').append(tmplData);
                $.templates(WEB_CONTENT_WIDGET.MAIN.tmpl).link("#webContent_" + appUtil.replaceSplChars(eachContent.toLowerCase(), '_'), { responce: prepareContentObj});
                if(prepareContentObj.contentTitle != "SPECIAL COLLECTION"){
                    if(prepareContentObj.contents.length > 3){
                        if(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
                            slickSlider.addSlider(prepareContentObj.sectionId, 1, 1, true, 3000, true, false, true, false, true);    
                        }   
                    }else {
                        if(prepareContentObj.contents.length > 1){
                            if(/ipad/i.test(navigator.userAgent)){
                                slickSlider.addSlider(prepareContentObj.sectionId, 2, 1, true, 3000, true, false, true, false, true);    
                            }else if(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
                                slickSlider.addSlider(prepareContentObj.sectionId, 1, 1, true, 3000, true, false, true, false, true);
                            }
                        }
                    }
                }    
            }
        });
    },
    getAvailableWebContent:function(callback){
        serverCalls._req_jquery(appContextPath + '/web/content/getBlocksByBlockNameAndName.json', { storeId: storeId,orgId:orgId}, 
            function(responce) {
                if(callback)
                    callback(responce);
            });
    },
    getWebContentByTag:function(contentType){
        loader.startLoader();
        webContentSettings = customNewsContentWidget.custom_newscontent_widget; 
        webContentSettings.contentType = contentType ? contentType.toLowerCase() : 'news';
        if (webContentSettings.container == "") {
            webContentSettings.container = this.dynamicContainerIdByContentType(webContentSettings, webContentSettings.contentType); 
        }
        webContentSettings.appendToMainContainer = this.appendToContainer(webContentSettings, webContentSettings.contentType);
        webContentSettings.slickTo = 'slickToCustomWebContent_'+ webContentSettings.container;
        var file = web_content_widget.getFileLocation(WEB_CONTENT_WIDGET.MAIN.fileName);

        serverCalls._req_Ajax_Get(appContextPath + '/web/content/getAllNewsRooms.json', { page: 1, rows: 50 }, 
            function(response) {
                if (response.rows.length>0) {
                    webContentSettings.data = { contents: response.rows, webContentSettings: webContentSettings };
                    $.templates(webContentSettings.tmplId).link("#" + webContentSettings.container , webContentSettings.data);
                    var selecter = webContentSettings.slickTo;
                    if(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
                        slickSlider.addSlider(selecter, 1, 1, true, 2000, true, false, true, false, true);      
                    }else if(/ipad/i.test(navigator.userAgent)){
                        slickSlider.addSlider(selecter, 2, 1, true, 2000, true, false, true, false, true);      
                    }else{
                        slickSlider.addSlider(selecter, 3, 1, true, 2000, true, false, true, false, true);      
                    }
                    loader.stopLoader();
                }else{
                    loader.stopLoader();
                }
            loader.stopLoader();    
        });
    },
    appendToContainer:function(webContentSettings, tag){
        var x;
         if(tag){
             x = _.find(webContentSettings.containerArray, function(item) {
                 if(item.indexOf(tag.toLowerCase()) > -1){
                     return item;
                 }
             });
         }else{
             x = webContentSettings.containerArray[0]; 
         }
 
         return appUtil.replaceSplChars(x, '_');
     },
    getContentByType:function(availContent, sendContent){
        _.each(availableContentType, function(type){
            finalContentObj[type] = _.filter(availContent.result, function(data) { return data.blockName == type; });
        });  
        if(sendContent)
            sendContent(finalContentObj)
    },
    getFileLocation:function(name){
       return appContextPath + '/static/' + themeName + '/templates/' + name + '.jsp'; 
    },
    renderExclusiveCategoiresList:function(){

    }
};
var WEB_CONTENT_WIDGET = {
    MAIN: {
        fileName: 'web_content_widget',
        tmpl: "#web_content_widget_tmpl",
        model: null,
        container: ""
    }
};

var customNewsContentWidget = {
    "custom_newscontent_widget": {
        "displayToView" : 3,
        "title":"Industry Case Studies",
        "lazyLoad": "true",
        "contentType" : "",
        "container" :"recentBlogs",
        "displayType": "HorizontalSlider",
        "containerArray": ['news'],
        "enableGlobalCounter": true,
        "tmplId" : "#custom_news_content_tmpl",
        "fileName" : "web_content_widget",
        "model" : null

    }
};
var updatePassword={
		updatePassword:function(){
			if(updatePassword.passwordFormValid().form()){
				var oldPassword=$('#oldPassword').val();
				var newPassword=$('#newPassword').val();
				var confirmNewPassword=$("#confirmPassword").val();
				serverCalls._req_Ajax_Post(appContextPath + "/web/userRest/changePassword.json",{oldPassword:oldPassword,newPassword:newPassword,confirmPassword:confirmNewPassword},
						function(data){
					$('#oldPassword').val('');
					$('#newPassword').val('');
					$("#confirmPassword").val('');
					if(data.status){
						mmMessages.success(data.message);
					}else{
						mmMessages.error(data.message);
					}
					$('#newResult').html('');
					$('#newResult').parent().hide();
				});					
			}
		},
		passwordFormValid:function(){
			return $("#forgotpwd_div").validate({
				 onfocusout: function (element) {
				      //  $(element).valid();
				    },
				rules: { 
					oldPassword:{
						required:true,
						maxlength: 20
					},
					newPassword:{
						required: true,
		                nowhitespace: true,
		                minOneDigit: true,
		                minOneAlpha: true,
		                minOneSpeclChar: true,
		                minlength: 6,
		                maxlength: 20
					},
					confirmPassword: {
						required: true,
						equalTo : "#newPassword"
					},
				},
				messages : {
					oldPassword : {
					required :  "Password is required",
					maxlength : "Max 20 characters allowed for Password",
					minlength : "Min 8 characters is required for Password"
				},
				newPassword : {
					required: "New Password is required",
	                nowhitespace: "No whitespace is allowed",
	                minOneDigit: "Password should have atleast one digit",
	                minOneAlpha: "Password should have atleast one alphabet",
	                minOneSpeclChar: "Password should have atleast one special character",
	                minlength: "Password min length should be 6 and max length should be 20 characters",
	                maxlength: "Password min length should be 6 and max length should be 20 characters"
				},
				confirmPassword : {
					required :  "Confirm Password is required",
					equalTo:"Password and confirm passwords are different"
				}
			} 
		});
		},
}
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=n(1),a=(o(r),n(6)),u=o(a),c=n(7),s=o(c),f=n(8),d=o(f),l=n(9),p=o(l),m=n(10),b=o(m),v=n(11),y=o(v),g=n(14),h=o(g),w=[],k=!1,x={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},M=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},_=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?M():(x.disableMutationObserver||d.default.isSupported()||(console.info('\n      aos: MutationObserver is not supported on this browser,\n      code mutations observing has been disabled.\n      You may have to call "refreshHard()" by yourself.\n    '),x.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||d.default.ready("[data-aos]",O),w)};e.exports={init:_,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(f,t),M?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=O();return c(e)?d(e):void(h=setTimeout(f,a(e)))}function d(e){return h=void 0,_&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),o(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,k=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(s);return t=u(t)||0,i(n)&&(M=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(s);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return f;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?f:+e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s="Expected a function",f=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(f,t),M?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function s(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=j();return s(e)?d(e):void(h=setTimeout(f,u(e)))}function d(e){return h=void 0,_&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=s(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),i(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,O=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(M=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==f}function a(e){if("number"==typeof e)return e;if(r(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?s:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",s=NaN,f="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){var t=void 0,o=void 0,i=void 0;for(t=0;t<e.length;t+=1){if(o=e[t],o.dataset&&o.dataset.aos)return!0;if(i=o.children&&n(o.children))return!0}return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function i(){return!!o()}function r(e,t){var n=window.document,i=o(),r=new i(a);u=t,r.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function a(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),o=Array.prototype.slice.call(e.removedNodes),i=t.concat(o);if(n(i))return u()})}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){};t.default={isSupported:i,ready:r}},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,a=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,c=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=function(){function e(){n(this,e)}return i(e,[{key:"phone",value:function(){var e=o();return!(!r.test(e)&&!a.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=o();return!(!u.test(e)&&!c.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();t.default=new s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){var o=e.node.getAttribute("data-aos-once");t>e.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])});