Вход Регистрация
Файл: магазин/e-proger/js/send.js
Строк: 564
<?php
(function($) {
    $.fn.
tipTip = function(options) {
        var 
defaults = {
            
activation"hover",
            
keepAlivefalse,
            
maxWidth"350px",
            
edgeOffset8,
            
defaultPosition"bottom",
            
delay100,
            
fadeIn200,
            
fadeOut200,
            
attribute"title",
            
contentfalse,
            
enter: function() {},
            exit: function() {}
        };
        var 
opts = $.extend(defaultsoptions);
        if ($(
"#tiptip_holder").length <= 0) {
            var 
tiptip_holder = $('<div id="tiptip_holder" style="max-width:' opts.maxWidth ';"></div>');
            var 
tiptip_content = $('<div id="tiptip_content"></div>');
            var 
tiptip_arrow = $('<div id="tiptip_arrow"></div>');
            $(
"body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))
        } else {
            var 
tiptip_holder = $("#tiptip_holder");
            var 
tiptip_content = $("#tiptip_content");
            var 
tiptip_arrow = $("#tiptip_arrow")
        }
        return 
this.each(function() {
            var 
org_elem = $(this);
            if (
opts.content) {
                var 
org_title opts.content
            
} else {
                var 
org_title org_elem.attr(opts.attribute)
            }
            if (
org_title != "") {
                if (!
opts.content) {
                    
org_elem.removeAttr(opts.attribute)
                }
                var 
timeout false;
                if (
opts.activation == "hover") {
                    
org_elem.hover(function() {
                        
active_tiptip()
                    }, function() {
                        if (!
opts.keepAlive) {
                            
deactive_tiptip()
                        }
                    });
                    if (
opts.keepAlive) {
                        
tiptip_holder.hover(function() {}, function() {
                            
deactive_tiptip()
                        })
                    }
                } else if (
opts.activation == "focus") {
                    
org_elem.focus(function() {
                        
active_tiptip()
                    }).
blur(function() {
                        
deactive_tiptip()
                    })
                } else if (
opts.activation == "click") {
                    
org_elem.click(function() {
                        
active_tiptip();
                        return 
false
                    
}).hover(function() {}, function() {
                        if (!
opts.keepAlive) {
                            
deactive_tiptip()
                        }
                    });
                    if (
opts.keepAlive) {
                        
tiptip_holder.hover(function() {}, function() {
                            
deactive_tiptip()
                        })
                    }
                }

                function 
active_tiptip() {
                    
opts.enter.call(this);
                    
tiptip_content.html(org_title);
                    
tiptip_holder.hide().removeAttr("class").css("margin""0");
                    
tiptip_arrow.removeAttr("style");
                    var 
top parseInt(org_elem.offset()['top']);
                    var 
left parseInt(org_elem.offset()['left']);
                    var 
org_width parseInt(org_elem.outerWidth());
                    var 
org_height parseInt(org_elem.outerHeight());
                    var 
tip_w tiptip_holder.outerWidth();
                    var 
tip_h tiptip_holder.outerHeight();
                    var 
w_compare Math.round((org_width tip_w) / 2);
                    var 
h_compare Math.round((org_height tip_h) / 2);
                    var 
marg_left Math.round(left w_compare);
                    var 
marg_top Math.round(top org_height opts.edgeOffset);
                    var 
t_class "";
                    var 
arrow_top "";
                    var 
arrow_left Math.round(tip_w 12) / 2;
                    if (
opts.defaultPosition == "bottom") {
                        
t_class "_bottom"
                    
} else if (opts.defaultPosition == "top") {
                        
t_class "_top"
                    
} else if (opts.defaultPosition == "left") {
                        
t_class "_left"
                    
} else if (opts.defaultPosition == "right") {
                        
t_class "_right"
                    
}
                    var 
right_compare = (w_compare left) < parseInt($(window).scrollLeft());
                    var 
left_compare = (tip_w left) > parseInt($(window).width());
                    if ((
right_compare && w_compare 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w opts.edgeOffset 5))) {
                        
t_class "_right";
                        
arrow_top Math.round(tip_h 13) / 2;
                        
arrow_left = -12;
                        
marg_left Math.round(left org_width opts.edgeOffset);
                        
marg_top Math.round(top h_compare)
                    } else if ((
left_compare && w_compare 0) || (t_class == "_left" && !right_compare)) {
                        
t_class "_left";
                        
arrow_top Math.round(tip_h 13) / 2;
                        
arrow_left Math.round(tip_w);
                        
marg_left Math.round(left - (tip_w opts.edgeOffset 5));
                        
marg_top Math.round(top h_compare)
                    }
                    var 
top_compare = (top org_height opts.edgeOffset tip_h 8) > parseInt($(window).height() + $(window).scrollTop());
                    var 
bottom_compare = ((top org_height) - (opts.edgeOffset tip_h 8)) < 0;
                    if (
top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)) {
                        if (
t_class == "_top" || t_class == "_bottom") {
                            
t_class "_top"
                        
} else {
                            
t_class t_class "_top"
                        
}
                        
arrow_top tip_h;
                        
marg_top Math.round(top - (tip_h opts.edgeOffset))
                    } else if (
bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)) {
                        if (
t_class == "_top" || t_class == "_bottom") {
                            
t_class "_bottom"
                        
} else {
                            
t_class t_class "_bottom"
                        
}
                        
arrow_top = -12;
                        
marg_top Math.round(top org_height opts.edgeOffset)
                    }
                    if (
t_class == "_right_top" || t_class == "_left_top") {
                        
marg_top marg_top 5
                    
} else if (t_class == "_right_bottom" || t_class == "_left_bottom") {
                        
marg_top marg_top 5
                    
}
                    if (
t_class == "_left_top" || t_class == "_left_bottom") {
                        
marg_left marg_left 5
                    
}
                    
tiptip_arrow.css({
                        
"margin-left"arrow_left "px",
                        
"margin-top"arrow_top "px"
                    
});
                    
tiptip_holder.css({
                        
"margin-left"marg_left "px",
                        
"margin-top"marg_top "px"
                    
}).attr("class""tip" t_class);
                    if (
timeout) {
                        
clearTimeout(timeout)
                    }
                    
timeout setTimeout(function() {
                        
tiptip_holder.stop(truetrue).fadeIn(opts.fadeIn)
                    }, 
opts.delay)
                }

                function 
deactive_tiptip() {
                    
opts.exit.call(this);
                    if (
timeout) {
                        
clearTimeout(timeout)
                    }
                    
tiptip_holder.fadeOut(opts.fadeOut)
                }
            }
        })
    }
})(
jQuery);

$(
document).click(function(a) {
    $(
a.target).closest(".wrap_transfer, .maddm").length || ($(".wrap_transfer").remove(), $(a.target).closest(".walls_gift, .wrap_walls_gift").length || ($(".wrap_walls_gift").html("").css({
        
top0
    
}), a.stopPropagation()))
});
var 
reloadpage = {
    
leftprofiles: function() {
        $(
".leftprofiles").load("modules/profiles/leftprofiles.php");
        $(
"#tiptip_holder").css({
            
display"none"
        
})
    },
    
loadklink: function() {
        $(
".klink").load("modules/klink/klink.php");
        $(
"#tiptip_holder").css({
            
display"none"
        
})
    },
    
loadban2x3: function() {
        $(
".ban2x3").load("modules/banner200x300/rotator.php");
        $(
"#tiptip_holder").css({
            
display"none"
        
})
    },
    
loadtoppanel: function() {
        $(
".topmenu").load("modules/topmenu.php");
        $(
"#tiptip_holder").css({
            
display"none"
        
})
    },
    
rightprofiles: function(a) {
        $(
".right_menu").load("modules/rightmenu.php""type=" a);
        $(
"#tiptip_holder").css({
            
display"none"
        
})
    }
};

function 
delHistory(ab) {
    $.
post("ajax.php?func=delhistory", {
        
ida,
        
typeb
    
}, function(b) {
        
== && ($(".js_titleRemove").remove(), $("#del_" a).parent("div").remove())
    });
    return !
1
}
function 
showDialog(ab) {
            
settings.setClose(a);
            $(
"body").Qbox({
                
title"u041du043eu0432u043eu0435 u0441u043eu043eu0431u0449u0435u043du0438u0435",
                
width410,
                
minHeight45,
                
fadespeed300,
                
url"",
                
param"",
                
data'<div style="padding: 5px; margin:10px; text-align:center"><textarea class="val" id="msgtext" style="width:365px; height:100px; overflow: auto;"></textarea></div><div id="bot_panel"><div class="preloader"></div><a href="#" id="msgSend" onclick="Send(' ", '" ''); return false;" class="btn_box">u041eu0442u043fu0440u0430u0432u0438u0442u044c</a></div>'
            })
        }
        function Send(a, b) {
            var c = $("
#msgSend").attr("onclick");
            
$("#msgSend").attr("onclick""");
            $(
".preloader").css({
                
display"block"
            
});
            $.
post("ajax.php?func=newmsg", {
                
ida,
                
text: $("#msgtext").val(),
                
typeb
            
}, function(a) {
                
== box_close() : (== ? $("#msgtext").focus() : $(".body").Qnotify({
                    
texta,
                    
sound"error"
                
}), $(".preloader").css({
                    
display"none"
                
}), $("#msgSend").attr("onclick"c))
            });
            return !
1
        
}
        function 
Send_d(abc) {
            $(
".preload_msg").css({
                
display"block"
            
});
            $(
"#sendMsg").css({
                
display"none"
            
});
            $.
post("ajax.php?func=newmsg", {
                
ida,
                
textb,
                
typec
            
}, function(b) {
                
== ? ($("#msgtext").val(""), Page.Go("mread=" a"no")) : == ? ($(".preload_msg").css({
                    
display"none"
                
}), $("#sendMsg").css({
                    
display"inline-block"
                
}), $("#msgtext").val("").focus()) : ($(".body").Qnotify({
                    
textb,
                    
sound"error"
                
}), $(".preload_msg").css({
                    
display"none"
                
}), $("#sendMsg").css({
                    
display"inline-block"
                
}))
            });
            return !
1
        
}
        function 
Del_in(a) {
            $.
post("ajax.php?func=delmsgin", {
                
ida
            
}, function(b) {
                
== && ($("#del_" a).parents(".wrap_in_mess").remove(), $("#js_title_" a).remove())
            })
        }
        function 
Del_out(a) {
            $.
post("ajax.php?func=delmsgout", {
                
ida
            
}, function(b) {
                
== && ($("#del_" a).parents(".wrap_in_mess").remove(), $("#js_title_" a).remove())
            })
        }
        function 
Del_in_all(a) {
            $.
post("ajax.php?func=delmsginall", {
                
ida
            
}, function(a) {
                
== && (location.assign("msg=inbox"), reloadpage.leftprofiles())
            })
        }
        function 
Del_out_all(a) {
            $.
post("ajax.php?func=delmsgoutall", {
                
ida
            
}, function(a) {
                
== && location.assign("msg=outbox")
            })
        }



   
settings = {
        
setOpen: function(a) {
            $(
".setMenu").hide();
            $(
"#setMenu_" a).fadeIn(300)
        },
        
setClose: function(a) {
            $(
"#setMenu_" a).fadeOut(300)
        },
        
typerefOpen: function() {
            $(
".typeref").fadeIn(300)
        },
        
typerefClose: function(a) {
            $(
".typeref").fadeOut(300)
        },
        
privacyOpen: function(a) {
            $(
".pMenu").hide();
            $(
"#p_" a).fadeIn(300)
        },
        
privacyClose: function(a) {
            $(
"#p_" a).fadeOut(300)
        },
        
msg: function(a) {
            $.
post("ajax.php?func=messageaccess", {
                
typea
            
}, function(a) {
                
== && Page.Go("privacy")
            });
            return !
1
        
},
        
ShowBirthday: function(a) {
            $.
post("ajax.php?func=showbirthday", {
                
typea
            
}, function(a) {
                
== && Page.Go("privacy")
            });
            return !
1
        
},
        
Infoemail: function(a) {
            $.
post("ajax.php?func=infoemail", {
                
typea
            
}, function(a) {
                
== && Page.Go("privacy")
            });
            return !
1
        
},
        
Messvk: function(a) {
            $.
post("ajax.php?func=messvk", {
                
typea
            
}, function(a) {
                
== && Page.Go("privacy")
            });
            return !
1
        
},
        
WallsMessage: function(a) {
            $.
post("ajax.php?func=wallsmessageaccess", {
                
typea
            
}, function(a) {
                
== && Page.Go("privacy")
            });
            return !
1
        
}
    },
    
catalog = {
        
Show: function() {
            $(
"body").Qbox({
                
title"u0420u0435u043au043bu0430u043cu0430 u0432 u043au0430u0442u0430u043bu043eu0433u0435",
                
width500,
                
height280,
                
fadespeed300,
                
url"/modules/catalog/add.php",
                
param"",
                
data""
            
});
            return !
1
        
},
        
Send: function() {
            $(
".preloader").css({
                
display"block"
            
});
            var 
= $("#category_id").val();
            $.
post("ajax.php?func=addcatalog", {
                
title: $("#catalog_title").val(),
                
id: $("#category_id").val(),
                
url: $("#url").val(),
                
text: $("#text").val()
            }, function(
b) {
                
== ? ($(".body").Qnotify({
                    
text"u0420u0435u043au043bu0430u043cu0430 u0443u0441u043fu0435u0448u043du043e u0434u043eu0431u0430u0432u043bu0435u043du0430 u0432 u043au0430u0442u0430u043bu043eu0433!",
                    
sound"error"
                
}), box_close(), Page.Go("/catalog=" a)) : == ? ($(".preloader").css({
                    
display"none"
                
}), $("#catalog_title").focus()) : == ? ($(".preloader").css({
                    
display"none"
                
}), $("#catalog_title").focus()) : == ? ($(".preloader").css({
                    
display"none"
                
}), $("#url").focus()) : == && ($(".preloader").css({
                    
display"none"
                
}), $("#text").focus())
            });
            return !
1
        
}
    },
    
tasks = {
        
ShowComment: function(a) {
            $(
"body").Qbox({
                
title"u041au043eu043cu043cu0435u043du0442u0430u0440u0438u0438 u043a u0437u0430u0434u0430u043du0438u044e u2116" a,
                
width500,
                
height280,
                
fadespeed300,
                
url"/modules/tasks/comments.php",
                
param"id=" a,
                
data""
            
});
            return !
1
        
}
    };

function 
addCookie(abcd) {
    
setCookie(abc);
    
d;
    return !
1
}

function 
setCookie(abcdef) {
    
document.cookie "=" escape(b) + ("; expires=" "") + ("; path=" "") + ("; domain=" "") + ("; secure" "")
}

function 
windowHeight() {
    return 
"CSS1Compat" == document.compatMode document.documentElement.clientHeight document.body.clientHeight
};

function 
qbb(abc) {
    
textarea document.getElementById(c);
    if (
document.selection && document.selection.createRangetextarea.focus(), sel document.selection.createRange(), sel.text sel.text b;
    else if (
textarea.selectionStart || "0" == textarea.selectionStart) {
        
textarea.selectionStart;
        var 
textarea.selectionEnd;
        
textarea.value textarea.value.substring(0c) + textarea.value.substring(cd) + textarea.value.substring(dtextarea.value.length);
        
textarea.selectionStart textarea.selectionEnd a.length b.length
    
} else textarea.value += b;
    
textarea.focus()
};

var 
divIdnftitle = {
    
Show: function(ecdmgnp) {
        var 
document.getElementById(e).getBoundingClientRect(),
            
h0.1,
            
ldocument.getElementById("nftitle");
        if (
null != b) {
            if (
divId == e) return;
            
b.parentNode.removeChild(b)
        }
        
divId e;
        
document.createElement("div");
        
b.className "wrap-nftitle";
        
b.id "nftitle";
        
b.innerHTML '<div id="nftitle-out"><div id="nftitle-in"></div></div><div id="nftitle-title">' '</div><div id="nftitle-body">' "</div>";
        
document.body.appendChild(b);
        var 
document.getElementById("nftitle");
        
document.getElementById("nftitle-out");
        
document.getElementById("nftitle-in");
        
document.getElementById("nftitle-title");
        
document.getElementById("nftitle-body");
        
b.style.color "#335783";
        
b.style.fontWeight "bold";
        
b.style.padding "7px 10px";
        
b.style.background "#f2f2f2";
        
b.style.borderBottom "1px solid #dae1e8";
        
a.style.display "inline-block;";
        
parseInt(k.top a.offsetHeight g);
        
parseInt(k.left 20 n);
        
a.style.border "1px solid #ADBAC7";
        
a.style.position "absolute";
        
a.style.top "px";
        
a.style.left "px";
        
a.style.zIndex 50;
        
a.style.background "#ffffff";
        
a.style.opacity 0;
        
a.style.fontSize "10px";
        
a.style.fontFamily "Tahoma";
        
a.style.width m;
        
a.style.boxShadow "0 0 2px rgba(0,0,0,0.2)";
        
c.style.position "absolute";
        
c.style.bottom "-6px";
        
c.style.borderLeft "6px solid transparent";
        
c.style.borderRight "6px solid transparent";
        
c.style.borderTop "6px solid #ADBAC7";
        
c.style.zIndex 52;
        
c.style.left document.getElementById(e).offsetWidth 14 "px";
        
d.style.position "absolute";
        
d.style.top "-6px";
        
d.style.borderLeft "5px solid transparent";
        
d.style.borderRight "5px solid transparent";
        
d.style.borderTop "5px solid #ffffff";
        
d.style.zIndex 51;
        
d.style.left "-5px";
        
&& (setInterval(function() {
            
+= 0.1;
            
<= clearInterval(l) : (a.style.opacity fa.style.top 10 "px")
        }, 
25));
        
document.onclick = function(a) {
            for (var 
0document.getElementById("nftitle-body").childNodes.lengthb++)
                if (
a.target == document.getElementById("nftitle-body").childNodes[b] || "nftitle-title" == a.target.id || "nftitle-body" == a.target.id) return;
            
null != document.getElementById("nftitle") && document.getElementById("nftitle").parentNode.removeChild(document.getElementById("nftitle"))
        } : 
null != document.getElementById(e) && (document.getElementById(e).onmouseout = function() {
            
document.getElementById("nftitle").parentNode.removeChild(document.getElementById("nftitle"))
        })
    }
};

(function(
c) {
    
"function" === typeof define && define.amd define(["jquery"], c) : "object" === typeof exports module.exports c(jQuery)
})(function(
c) {
    function 
m(b) {
        var 
|| window.event,
            
= [].slice.call(arguments1),
            
0,
            
0,
            
0,
            
0,
            
0;
        
c.event.fix(a);
        
b.type "mousewheel";
        
a.wheelDelta && (a.wheelDelta);
        
a.detail && (= -a.detail);
        
a.deltaY && (= -a.deltaY);
        
a.deltaX && (a.deltaX= -e);
        
void 0 !== a.wheelDeltaY && (a.wheelDeltaY);
        
void 0 !== a.wheelDeltaX && (= -a.wheelDeltaX);
        
Math.abs(d);
        if (!
|| lf;
        
Math.max(Math.abs(h), Math.abs(e));
        if (!
|| kf;
        
"floor" "ceil";
        
Math[a](l);
        
Math[a](k);
        
Math[a](k);
        
g.unshift(bdeh);
        return (
c.event.dispatch || c.event.handle).apply(thisg)
    }
    var 
= ["wheel""mousewheel""DOMMouseScroll""MozMousePixelScroll"],
        
"onwheel" in document || <= document.documentMode ? ["wheel"] : ["mousewheel""DomMouseScroll""MozMousePixelScroll"],
        
lk;
    if (
c.event.fixHooks)
        for (var 
n.lengthp;) c.event.fixHooks[n[--p]] = c.event.mouseHooks;
    
c.event.special.mousewheel = {
        
setup: function() {
            if (
this.addEventListener)
                for (var 
g.lengthb;) this.addEventListener(g[--b], m, !1);
            else 
this.onmousewheel m
        
},
        
teardown: function() {
            if (
this.removeEventListener)
                for (var 
g.lengthb;) this.removeEventListener(g[--b], m, !1);
            else 
this.onmousewheel null
        
}
    };
    
c.fn.extend({
        
mousewheel: function(b) {
            return 
this.bind("mousewheel"b) : this.trigger("mousewheel")
        },
        
unmousewheel: function(b) {
            return 
this.unbind("mousewheel"b)
        }
    })
});

titlehtml = {
        
title: function(abcd) {
            
|| (= -5);
            $(
"body").append('<div id="js_title_' '" class="js_titleRemove"><div id="easyTooltip">' '</div><div class="tooltip"></div></div>');
            
xOffset = $("#" a).offset().left d;
            
yOffset = $("#" a).offset().top 32;
            $(
"#js_title_" a).css("position""absolute").css("top"yOffset "px").css("left"xOffset "px").css("display""none").fadeIn("fast");
            $(
"#" a).mouseout(function() {
                $(
".js_titleRemove").remove()
            })
        },
        
title_close: function(a) {
            $(
"#js_title_" a).remove()
        }
    }
?>
Онлайн: 4
Реклама