';
var gplus_dummy_btn = ' ';
context.append('' + options.services.gplus.txt_info + ' ' + options.services.gplus.txt_gplus_off + ' ' + gplus_dummy_btn + '
');
var $container_gplus = $('li.gplus', context);
$('li.gplus div.gplusone img,li.gplus span.switch', context).live('click', function () {
if ($container_gplus.find('span.switch').hasClass('off')) {
$container_gplus.addClass('info_off');
$container_gplus.find('span.switch').addClass('on').removeClass('off').html(options.services.gplus.txt_gplus_on);
$container_gplus.find('img.gplus_one_dummy').replaceWith(gplus_code);
} else {
$container_gplus.removeClass('info_off');
$container_gplus.find('span.switch').addClass('off').removeClass('on').html(options.services.gplus.txt_gplus_off);
$container_gplus.find('.gplusone').html(gplus_dummy_btn);
}
});
}
//
// Der Info/Settings-Bereich wird eingebunden
//
context.append(' ');
// Info-Overlays mit leichter Verzoegerung einblenden
$('.help_info:not(.info_off)', context).live('mouseenter', function () {
var $info_wrapper = $(this);
var timeout_id = window.setTimeout(function () { $($info_wrapper).addClass('display'); }, 500);
$(this).data('timeout_id', timeout_id);
});
$('.help_info', context).live('mouseleave', function () {
var timeout_id = $(this).data('timeout_id');
window.clearTimeout(timeout_id);
if ($(this).hasClass('display')) {
$(this).removeClass('display');
}
});
var facebook_perma = (options.services.facebook.perma_option === 'on');
var twitter_perma = (options.services.twitter.perma_option === 'on');
var gplus_perma = (options.services.gplus.perma_option === 'on');
// Menue zum dauerhaften Einblenden der aktiven Dienste via Cookie einbinden
// Die IE7 wird hier ausgenommen, da er kein JSON kann und die Cookies hier ueber JSON-Struktur abgebildet werden
if (((facebook_on && facebook_perma)
|| (twitter_on && twitter_perma)
|| (gplus_on && gplus_perma))
&& (!$.browser.msie || ($.browser.msie && $.browser.version > 7.0))) {
// Cookies abrufen
var cookie_list = document.cookie.split(';');
var cookies = '{';
var i = 0;
for (; i < cookie_list.length; i += 1) {
var foo = cookie_list[i].split('=');
cookies += '"' + $.trim(foo[0]) + '":"' + $.trim(foo[1]) + '"';
if (i < cookie_list.length - 1) {
cookies += ',';
}
}
cookies += '}';
cookies = JSON.parse(cookies);
// Container definieren
var $container_settings_info = $('li.settings_info', context);
// Klasse entfernen, die das i-Icon alleine formatiert, da Perma-Optionen eingeblendet werden
$container_settings_info.find('.settings_info_menu').removeClass('perma_option_off');
// Perma-Optionen-Icon (.settings) und Formular (noch versteckt) einbinden
$container_settings_info.find('.settings_info_menu').append('Einstellungen ');
// Die Dienste mit und , sowie checked-Status laut Cookie, schreiben
var checked = ' checked="checked"';
if (facebook_on && facebook_perma) {
var perma_status_facebook = cookies.socialSharePrivacy_facebook === 'perma_on' ? checked : '';
$container_settings_info.find('form fieldset').append(
''
+ options.services.facebook.display_name + ' '
);
}
if (twitter_on && twitter_perma) {
var perma_status_twitter = cookies.socialSharePrivacy_twitter === 'perma_on' ? checked : '';
$container_settings_info.find('form fieldset').append(
''
+ options.services.twitter.display_name + ' '
);
}
if (gplus_on && gplus_perma) {
var perma_status_gplus = cookies.socialSharePrivacy_gplus === 'perma_on' ? checked : '';
$container_settings_info.find('form fieldset').append(
''
+ options.services.gplus.display_name + ' '
);
}
// Cursor auf Pointer setzen fuer das Zahnrad
$container_settings_info.find('span.settings').css('cursor', 'pointer');
// Einstellungs-Menue bei mouseover ein-/ausblenden
$($container_settings_info.find('span.settings'), context).live('mouseenter', function () {
var timeout_id = window.setTimeout(function () { $container_settings_info.find('.settings_info_menu').removeClass('off').addClass('on'); }, 500);
$(this).data('timeout_id', timeout_id);
});
$($container_settings_info, context).live('mouseleave', function () {
var timeout_id = $(this).data('timeout_id');
window.clearTimeout(timeout_id);
$container_settings_info.find('.settings_info_menu').removeClass('on').addClass('off');
});
// Klick-Interaktion auf um Dienste dauerhaft ein- oder auszuschalten (Cookie wird gesetzt oder geloescht)
$($container_settings_info.find('fieldset input')).live('click', function (event) {
var click = event.target.id;
var service = click.substr(click.lastIndexOf('_') + 1, click.length);
var cookie_name = 'socialSharePrivacy_' + service;
if ($('#' + event.target.id + ':checked').length) {
cookieSet(cookie_name, 'perma_on', options.cookie_expires, options.cookie_path, options.cookie_domain);
$('form fieldset label[for=' + click + ']', context).addClass('checked');
} else {
cookieDel(cookie_name, 'perma_on', options.cookie_path, options.cookie_domain);
$('form fieldset label[for=' + click + ']', context).removeClass('checked');
}
});
// Dienste automatisch einbinden, wenn entsprechendes Cookie vorhanden ist
if (facebook_on && facebook_perma && cookies.socialSharePrivacy_facebook === 'perma_on') {
$('li.facebook span.switch', context).click();
}
if (twitter_on && twitter_perma && cookies.socialSharePrivacy_twitter === 'perma_on') {
$('li.twitter span.switch', context).click();
}
if (gplus_on && gplus_perma && cookies.socialSharePrivacy_gplus === 'perma_on') {
$('li.gplus span.switch', context).click();
}
}
}); // this.each(function ()
}; // $.fn.socialSharePrivacy = function (settings) {
}(jQuery));
jQuery(document).ready(function($) {
if($('#socialshareprivacy').length > 0) {
$('#socialshareprivacy').socialSharePrivacy();
}
});
/* heise - socialshareprivacy - EOF */
/* new - 11.06.2014 - mouseworx */
$(document).ready(function() {
$("a[rel='info']").colorbox({opacity:0.65, initialWidth:200, initialHeight:200});
$("a[rel='lexikon']").colorbox({innerWidth:398, innerHeight:400,opacity:0.65, initialWidth:200, initialHeight:200});
$("a[rel='shipping']").colorbox({innerWidth:398, innerHeight:400,opacity:0.65, initialWidth:200, initialHeight:200});
$("a[rel='checkout']").colorbox({iframe:true, innerWidth:598, innerHeight:800,opacity:0.65, initialWidth:200, initialHeight:200});
$(".ship").colorbox({iframe:true, innerWidth:598, innerHeight:800, opacity:0.65, initialWidth:200, initialHeight:200});
});
function mwxQtyCheck(id,set,qty) {
var chk = set - qty;
if(qty > 0 && chk > 0) {
$.ajax({ url: 'http://www.gourmet-weinhandel.de/mwx_shipping.php',
type: 'post',
data: ({ 'id': id,
'qty': set,
'link': 'index.php',
'param': 'cPath=59&'
}),
success: function(code) {
$.colorbox({html:code, innerWidth:590, innerHeight:260, opacity:0.65, initialWidth:200, initialHeight:200});
},
error: function() {
/* alert('Something went wrong...'); */
}
});
}
}
/* new - 11.06.2014 - mouseworx - EOF */
// bof weinhandel.js
// bof jquery tooltip ########################################################################################################################################################
var jqueryTooltip = $('
');
$('body').append(jqueryTooltip);
$('!*[title^=""]').hover(function(e) {
var ae = $(this);
var title = ae.attr('title');
ae.attr('title', '');
ae.data('titleText', title);
jqueryTooltip.html(title);
var _t = e.pageY + 20;
var _l = e.pageX + 20;
jqueryTooltip.css({'top':_t, 'left':_l });
jqueryTooltip.show(0);
}, function() {
var ae = $(this);
jqueryTooltip.hide(0);
var title = ae.data('titleText');
ae.attr('title', title);
}).mousemove(function(e) {
var _t = e.pageY + 20;
var _l = e.pageX + 20;
jqueryTooltip.css({ 'top':_t, 'left':_l });
});
// eof jquery tooltip ########################################################################################################################################################
// bof jquery ratingstar #####################################################################################################################################################
(function(a) {
a.fn.xtcm_rating = function(p) {
var p=p||{};
var b=p&&p.rating_star_length?p.rating_star_length:"5";
var c=p&&p.rating_function_name?p.rating_function_name:"";
var e=p&&p.rating_initial_value?p.rating_initial_value:"0";
var d=p&&p.directory?p.directory:"images";
var f=e;
var g=a(this);
b=parseInt(b);
init();
g.next("ul").children("li").hover(function() {
$(this).parent().children("li").css('background-position','0px 0px');
var a=$(this).parent().children("li").index($(this));
$(this).parent().children("li").slice(0,a+1).css('background-position','0px -28px')
},function(){});
g.next("ul").children("li").click(function() {
var a=$(this).parent().children("li").index($(this));
f=a+1;
g.val(f);
if(c!="") {
eval(c+"("+g.val()+")")
}
});
g.next("ul").hover(function(){},function() {
if(f=="") {
$(this).children("li").slice(0,f).css('background-position','0px 0px')
} else {
$(this).children("li").css('background-position','0px 0px');
$(this).children("li").slice(0,f).css('background-position','0px -28px')
}
});
function init() {
$('
').insertAfter(g);
g.css("float","left");
var a=$("");
a.addClass("xtcm_rating");
for(var i=1;i<=b;i++) {
a.append(''+i+' ')
}
a.insertAfter(g);
if(e!="") {
f=e;
g.val(e);
g.next("ul").children("li").slice(0,f).css('background-position','0px -28px')
}
}
}
})(jQuery);
$(function() {
$("#rating_star").xtcm_rating( {
rating_star_length: '5',
rating_initial_value: '5',
rating_function_name: '',
directory: 'templates/gourmet/img/'
});
});
// eof jquery ratingstar #####################################################################################################################################################
// bof search suggest ########################################################################################################################################################
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
}
}
var searchReq = getXmlHttpRequestObject();
function searchSuggest() {
if (searchReq.readyState == 4 || searchReq.readyState == 0) {
var str = escape(document.getElementById('txtSearch').value);
searchReq.open("GET", 'searchSuggest.php?search=' + str, true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
}
}
function handleSearchSuggest() {
if (searchReq.readyState == 4) {
var ss = document.getElementById('search_suggest')
ss.innerHTML = '';
var str = searchReq.responseText.split("\n");
for(i=0; i < str.length - 1; i++) {
var suggest = '' + str[i] + '
';
ss.innerHTML += suggest;
}
if (i==0) {
ss.style.visibility = "hidden";
} else {
ss.style.visibility = "visible";
}
ss.innerHTML += '';
}
}
function suggestClose (div_value) {
document.getElementById('search_suggest').innerHTML = '';
document.getElementById('search_suggest').style.visibility = "hidden";
}
function suggestOver(div_value) {
div_value.className = 'suggest_link_over';
}
function suggestOut(div_value) {
div_value.className = 'suggest_link';
}
function setSearch(value) {
var newvalue = value.replace(/<.*?>/gi, '');
var Suche = newvalue.indexOf(" ");
var produktname = newvalue.substring(0,Suche);
document.getElementById('txtSearch').value = produktname;
document.getElementById('search_suggest').innerHTML = '';
document.getElementById('search_suggest').style.visibility = "hidden";
top.location.href = "advanced_search_result.php?keywords=" + produktname;
}
// eof search suggest ########################################################################################################################################################
// bof xt:commerce header.php ################################################################################################################################################
var selected;
var submitter = null;
function submitFunction() {
submitter = 1;
}
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
function selectRowEffect(object, buttonSelect) {
if (!selected) {
if (document.getElementById) {
selected = document.getElementById('defaultSelected');
} else {
selected = document.all['defaultSelected'];
}
}
if (selected)
selected.className = 'moduleRow';
object.className = 'moduleRowSelected';
selected = object;
// one button is not an array
if (document.getElementById('payment'[0])) {
document.getElementById('payment'[buttonSelect]).checked=true;
} else {
// document.getElementById('payment'[selected]).checked=true;
}
}
function rowOverEffect(object) {
if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}
function rowOutEffect(object) {
if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
function popupImageWindow(url) {
window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
// eof xt:commerce header.php ################################################################################################################################################
// eof weinhandel.js
//-->