﻿var TIME_PER_PIXEL = 100;
var TIME_PER_PAGE = 3000;
var TIME_WAIT = 3000;
var HIGH_LIGHT_TIME = 1000;
var REFRESH_PAGE = 5;
var PAGE_SIZE = 20;

COMPANY_URL = 'javascript:void(0);';

$.fn.html2 = function(html, c) {
    c = c ? c : 'w';
    if (html != this.html() || !this.hasClass(c)) {
        var el = this;
        var color;
        switch (c) {
            case 'c':
                color = '#0000FF';
                break;
            case 'u':
                color = '#0000FF';
                break;
            case 'd':
                color = '#FF0000';
                break;
            case 'f':
                color = '#FF0000';
                break;
            default:
                color = '#000000';
                break;
        }

        el.css('background-color', color).css('color', '#FFFFFF');
        setTimeout(function() {
                el.css('background-color', '').css('color', '');
                el.removeClass('u d c f p').addClass(c);
                el.html(html);
            }, HIGH_LIGHT_TIME);
    }
};

//$.fn.html2 = function (html, c)
//{
//    if(html != this.html())
//    {
//        this.removeClass('u d c f p').addClass(c);
//        this.html(html); 
//        this.stop().dequeue().highlightFade({color: '#BBBBBB', speed: HIGH_LIGHT_TIME});
//    }
//};
