| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/members.hungarianhoneys.com/public_html/js/ |
Upload File : |
function CreateBookmarkLink()
{
title = document.title;
url = location.href;
if (window.sidebar)
{
window.sidebar.addPanel(title, url,"");
}
else if( window.external )
{
window.external.AddFavorite( url, title);
}
else if(window.opera && window.print)
{
alert("Your browser does not support adding bookmarks by clicking web links. Please bookmark this link manually.")
return true;
}
}
this.imagePreview = function(){
/* CONFIG */
c_top = "";
c_left = "";
c_right = "";
c_bottom = "";
currelem = null;
t_width = 0;
timeoutId1 = null;
timeoutId2 = null;
touchart = 0;
var ua = navigator.userAgent;
var isiPad = /iPad/i.test(ua) || /iPhone OS 3_1_2/i.test(ua) || /iPhone OS 3_2_2/i.test(ua);
var fingerC = 0;
// If we're on an iDevice, don't go to the URL directly,
// and rely on double-tap in order to follow through.
$(".elevpreview").bind("click", (function(e){
return (isiPad) ? false : true;
}));
// If anywhere on the screen is touched
// it should close any popup windows as long as
// The element touched isn't part of .elevpreview
$("body").bind("touchstart", (function(e){
if (touchart == 0)
{
if (timeoutId1 != null)
{
currelem = null;
window.clearTimeout(timeoutId1);
}
if (timeoutId2 != null)
{
hoverout(this);
window.clearTimeout(timeoutId2);
}
}
touchart = 0;
}));
// This handles what happens when clicking on the preview element
// on an iDevice
$(".elevpreview").bind("touchstart", (function(e){
touchart = 1;
fingerC = event.touches.length;
if (fingerC == 1)
{
if (timeoutId2 != null)
{
hoverout(this);
}
window.clearTimeout(timeoutId1);
window.clearTimeout(timeoutId2);
event.preventDefault();
if (currelem == $(this).attr("tooltip") )
{
document.location = $(this).attr("href");
}
else
{
onhover(e, this);
}
}
}));
/* END CONFIG */
$(".elevpreview").bind("touchcancel", (function(e){
event.preventDefault();
timeoutId1 = window.setTimeout(clearcurrelem, 300, true);
timeoutId2 = window.setTimeout(clearhover, 5000, true);
return false;
}));
$(".elevpreview").bind("touchend", (function(e){
if (event.touches.length == 0)
{
event.preventDefault();
timeoutId1 = window.setTimeout(clearcurrelem, 300, true);
timeoutId2 = window.setTimeout(clearhover, 5000, true);
}
}));
function clearcurrelem()
{
currelem = null;
}
function clearhover()
{
hoverout(this);
}
function onhover(e, ths)
{
ths.t = ths.title;
ths.title = "";
var txn = $(ths).attr('tooltip')
if ($(ths).attr('offset_top'))
{
c_top = parseInt($(ths).attr('offset_top'))
}
if ($(ths).attr('offset_bottom'))
{
c_bottom = parseInt($(ths).attr('offset_bottom'))
}
if ($(ths).attr('offset_left'))
{
c_left = parseInt($(ths).attr('offset_left'))
}
if ($(ths).attr('offset_right'))
{
c_right = parseInt($(ths).attr('offset_right'))
}
if ($(ths).attr('tooltip_width'))
{
t_width = parseInt($(ths).attr('tooltip_width'))
}
else
{
t_width = $("#preview").width();
}
var txt = "<p id='preview'>" + $("#"+txn).html() + "</p>"
$("body").append(txt);
position = $(ths).position();
pageY = position.top;
pageX = position.left;
if (c_bottom != "")
$("#preview").css("top",(pageY + c_bottom) + "px");
if (c_right != "")
$("#preview").css("left",(pageX + c_right) + "px");
if (c_left != "")
$("#preview").css("left",(pageX - c_left - t_width) + "px");
if (c_top != "")
$("#preview").css("top",(pageY - c_top - $("#preview").height()) + "px");
if (t_width != 0)
{
$("#preview").css("width", t_width + "px");
$("#preview").css("max-width", t_width + "px");
}
$("#preview").animate({opacity: "0.8"}, 1);
if (!isiPad)
{
$(".tabletlink").css("display", "none");
}
$("#preview").fadeIn("fast");
currelem = $(ths).attr("tooltip")
}
function hoverout(ths)
{
ths.title = ths.t;
$("#preview").remove();
}
$(".elevpreview").hover(function(e){
onhover(e, this);
},
function(){
hoverout(this);
});
};
var interv;
var ax = []
var idx = ""
this.stdthis = function(){
cnt = $('#'+idx).attr('cnt');
v = $('#'+idx).attr('v');
v = parseInt(v);
v = (v + 1) % cnt;
sr = ax[v]
$('#'+idx).attr('v', v);
$('#'+idx).attr('src', sr);
}
// Determines the image zoom level
// If iwidth and swidth aren't passed along, this is a general purpose
// combination of retina level * zoom level
// If iwidth and width are passed along, the zoom level
// for an individual image is calculated.
function pixelRatioZoom(iwidth, swidth)
{
zr = 1;
if (!!("undefined" != typeof document.documentElement.ontouchstart))
{
zr = screen.width / $(window).width();
}
var dpr = (window.devicePixelRatio) ? window.devicePixelRatio : 1;
var zm = NaN;
if (isNaN(zm))
{
try
{
zm = document.documentElement.clientWidth / window.innerWidth;
}
catch(e)
{
zm = NaN;
}
}
if (isNaN(zm))
{
try
{
zm = screen.deviceXDPI / screen.logicalXDPI
}
catch(e)
{
zm = NaN;
}
}
zm = (isNaN(zm)) ? 1 : zm;
ret = zm * dpr * zr;
if (typeof iwidth == "undefined" || iwidth == 0)
{
return ret;
}
if (typeof swidth == "undefined" || swidth == 0)
{
return ret;
}
// If the image display width and the actual image width are defined, factor that into image zoom.
return zm * dpr * zr * (iwidth / swidth);
}
// Given an image, calculate the zoom level for the image
// And subsequently, what suffix it recommends.
function getSuffixFileZoom(v)
{
var ret = {};
ret.zoom = pixelRatioZoom(v.width, $(v).attr("src0_1x_width"))
ret.suffix = "_1x";
ret.src="";
// Uncomment this if you want to disable retina images.
// Uncomment and change to 2.0 if you want to force retina images.
// ret.zoom = 1.0;
if (ret.zoom > 3.3 && ($(v).attr("src0_4x") != undefined))
{
ret.src = $(v).attr("src0_4x");
ret.suffix = "_4x"
}
else if (ret.zoom > 2.3 && ($(v).attr("src0_3x") != undefined))
{
ret.src = $(v).attr("src0_3x");
ret.suffix = "_3x"
}
else if (ret.zoom > 1.3 && ($(v).attr("src0_2x") != undefined))
{
ret.src = $(v).attr("src0_2x");
ret.suffix = "_2x"
}
else
{
if ($(v).attr("src0_1x") != undefined)
{
ret.src = $(v).attr("src0_1x");
}
else
{
ret.src = $(v).attr("src0");
}
}
return ret;
}
suffix = "_1x";
var zoom = pixelRatioZoom();
var z_w = NaN;
var z_h = NaN;
try
{
z_w = window.innerWidth;
z_h = window.innerHeight;
}
catch(e)
{
alert(e)
}
function szhandler(forcecalc)
{
var newzoom = pixelRatioZoom();
var z_nw = NaN;
var z_nh = NaN;
try
{
z_nw = window.innerWidth;
z_nh = window.innerHeight;
}
catch(e)
{
return;
}
if (isNaN(z_w) || isNaN(z_h) || isNaN(z_nw) || isNaN(z_nh))
{
return;
}
// If this is just scrolling, return
// If zooming or resizing, do not return.
if (typeof forcecalc == "boolean" && forcecalc)
{
}
else if ((z_w == z_nw) && (z_h == z_nh) && (newzoom == zoom))
{
return;
}
z_w = z_nw;
z_h = z_nh;
zoom = newzoom
$(".stdimage").each(function(index) {
o_img = $(this).attr("src");
var imageinfo = getSuffixFileZoom(this);
if (imageinfo.src != o_img)
{
imgx = new Image();
imgx.stor = this;
$(imgx)
.on('load', function () {
// console.log("Loaded " + this.src);
$(this.stor).attr("src", this.src)
})
// *finally*, set the src attribute of the new image to our image
.attr('src', imageinfo.src);
}
});
}
// zoom / scroll handler.
sch = 0;
if (sch == 0)
{
try
{
document.addEventListener("scroll", szhandler, true);
sch = 1;
}
catch(e) {}
}
if (sch == 0)
{
try
{
window.attachEvent ("onscroll", szhandler);
sch = 1;
}
catch(e) {}
}
$(window).resize(function() {
szhandler();
});
$( document ).ready(function() {
StdImageHandler();
});
this.StdImageHandler = function(){
imgs = [];
$(".stdimage").ready(function() {
$(".stdimage").each(function(index) {
if (!$(this).is(":visible"))
{
//alert("skpping: " + $(this).attr("src"));
return;
}
var imageinfo = getSuffixFileZoom(this);
imgx = new Image();
imgx.stor = this;
$(imgx)
.on('load', function () {
$(this.stor).attr("src", this.src)
})
// *finally*, set the src attribute of the new image to our image
.attr('src', imageinfo.src);
});
$(".stdimage").each(function(index) {
cnt = $(this).attr('cnt')
if (cnt < 2)
{
return;
}
// Test for touch device support.
var is_touch_device = function() {
var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');
var mq = function(query) {
return window.matchMedia(query).matches;
}
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
return true;
}
// include the 'heartz' as a way to have a non matching MQ to help terminate the join
// https://git.io/vznFH
var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');
return mq(query);
}
if (is_touch_device())
{
return;
}
var imageinfo = getSuffixFileZoom(this);
var suffix = imageinfo.suffix;
for(c=0; c < cnt; c++)
{
if ( $(this).attr('src' + c + suffix) != undefined )
{
itr = imgs.length;
imgs[itr] = new Image;
imgs[itr].src = $(this).attr('src' + c + suffix)
}
if ( $(this).attr('src' + c) != undefined )
{
itr = imgs.length;
imgs[itr] = new Image;
imgs[itr].src = $(this).attr('src' + c)
}
}
});
});
$(".stdimage").hover(function(e){
cnt = $(this).attr('cnt')
idx = $(this);
if (typeof cnt == "undefined" || cnt < 2)
{
return;
}
var imageinfo = getSuffixFileZoom(this);
var suffix = imageinfo.suffix;
v = $(this).attr('v')
v = parseInt(v);
v = (v + 1) % cnt;
ax = []
for(c=0; c < cnt; c++)
{
if ( $(this).attr('src' + c + suffix) != undefined )
{
ax[c] = $(this).attr('src' + c + suffix)
}
else
{
ax[c] = $(this).attr('src' + c)
}
}
$(this).attr('v', v);
$(this).attr('src', ax[v])
interv = setInterval("this.stdthis()", 800);
},
function(e){
cnt = $(this).attr('cnt')
if (typeof cnt == "undefined" || cnt < 2)
{
return;
}
var imageinfo = getSuffixFileZoom(this);
var suffix = imageinfo.suffix;
$(this).attr('v' ,0);
if ( $(this).attr('src0' + suffix) != undefined )
{
$(this).attr('src', $(this).attr('src0' + suffix))
}
else
{
$(this).attr('src', $(this).attr('src0'))
}
clearInterval(interv)
interv = 0;
idx = null;
});
}