﻿$(function() {
    $(".inp_txt, .inp_atxt").live("mouseover", function() { $(this).addClass("inp_txt_active") }).live("mouseout", function() { $(this).removeClass("inp_txt_active") });
});
 
 

 


(function($) {
    $.dk_loadhtml = function(html) {

        options = $.extend({}, $.dk_loadhtml.defaults, "");
        var ie6 = ($.browser.msie && $.browser.version < 7);
        var $body = $(document.body);
        var $window = $(window);
        var msgbox = '<div class="dk_loading" id="dk_loadingbox">';

        if (ie6) {
            msgbox += '	<div  id="dk_confimfade"><iframe frameborder="0"></iframe></div>';
        } else {
            msgbox += '	<div   id="dk_confimfade"></div>';
        }
        msgbox += '	<div  id="dk_loading"  > ';
        msgbox += '<div id="dk_confimmain"></div></div>';
        msgbox += '</div>';

        if ($("#dk_loadingbox")) {
            $("#dk_loadingbox").remove();
        }

        var $cbox = $(msgbox).appendTo($body);
        var $cmain = $cbox.children("#dk_loading");
        var $cfade = $cbox.children("#dk_confimfade");

        $cmain.find("#dk_confimmain").html(html);


        var positionConfim = function() {
            $cbox.css({
                position: (ie6) ? "absolute" : "fixed",
                height: $window.height(),
                width: "100%",
                top: (ie6) ? $window.scrollTop() : 0,
                left: 0,
                right: 0,
                bottom: 0
            });
            $cfade.css({
                position: (ie6) ? "absolute" : "fixed",
                height: $window.height(),
                width: "100%",
                background: "#000000",
                opacity: 0.7,
                top: 0,
                left: 0,
                right: 0,
                bottom: 0
            });
            if (ie6) {
                $cfade.find("iframe").css({
                    width: "100%",
                    height: "100%",
                    opacity: 0
                })
            };
            $cmain.css({
                position: "absolute",
                top: "50%",
                left: "50%",
                marginLeft: (($cmain.outerWidth() / 2) * -1),
                marginTop: (($cmain.outerHeight() / 2) * -1)
            });
        };



        var removeConfim = function(callCallback) {
            //ie6, remove the scroll event
            if (ie6) {
                $body.unbind('scroll', ie6scroll);
            }
            $cmain.hide(100)
            $window.unbind('resize', positionConfim);
            $cbox.hide(100, function() {
                $cfade.unbind();
                if (callCallback) {
                    options.callback();
                }
                $cbox.remove();
            });
        };

        positionConfim();
        var ie6scroll = function() {
            $cbox.css({ top: $window.scrollTop() });
        };

        var getKeyCode = function(e) {
            var key = (window.event) ? event.keyCode : e.which;
            return key;
        };

        positionConfim();



        if (ie6) {
            $window.scroll(ie6scroll);
        }

        $window.resize(positionConfim);

        $(document).keydown(function(event) {
            if (getKeyCode(event) == 27) { removeConfim() };
        });

        $cfade.show();

    };



})(jQuery);




(function($) {
    $.dk_dk_loadhtmlclose = function() {
        if ($("#dk_loadingbox")) {
            $("#dk_loadingbox").remove();
        }
    };
})(jQuery);







(function($) {
    $.fn.jqDrag = function(h) { return i(this, h, 'd'); };
    $.fn.jqResize = function(h) { return i(this, h, 'r'); };
    $.jqDnR = { dnr: {}, e: 0,
        drag: function(v) {
            if (M.k == 'd') E.css({ left: M.X + v.pageX - M.pX, top: M.Y + v.pageY - M.pY });
            return false;
        },
        stop: function() { E.css('opacity', M.o); $().unbind('mousemove', J.drag).unbind('mouseup', J.stop); }
    };
    var J = $.jqDnR, M = J.dnr, E = J.e,
i = function(e, h, k) {
    return e.each(function() {
        h = (h) ? $(h, e) : e;
        h.bind('mousedown', { e: e, k: k }, function(v) {
            var d = v.data, p = {}; E = d.e;
            if (E.css('position') != 'relative') { try { E.position(p); } catch (e) { } }
            M = { X: p.left || f('left') || 0, Y: p.top || f('top') || 0, pX: v.pageX, pY: v.pageY, k: d.k, o: E.css('opacity') };
            E.css({ opacity: 0.8 }); $().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop);
            return false;
        });
    });
},
f = function(k) { return k == "left" ? E.position().left : E.position().top };
})(jQuery);

 

