The requested content cannot be loaded.
Please try again later.
',
closeBtn : '').html(content).find(current.selector);
} else if (isQuery(content)) {
if (!content.data(placeholder)) {
content.data(placeholder, $('
').insertAfter( content ).hide() );
}
content = content.show().detach();
current.wrap.bind('onReset', function () {
if ($(this).find(content).length) {
content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
}
});
}
break;
case 'image':
content = current.tpl.image.replace('{href}', href);
break;
case 'swf':
content = '
';
break;
}
if (!(isQuery(content) && content.parent().is(current.inner))) {
current.inner.append( content );
}
// Give a chance for helpers or callbacks to update elements
F.trigger('beforeShow');
// Set scrolling before calculating dimensions
current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
// Set initial dimensions and start position
F._setDimension();
F.reposition();
F.isOpen = false;
F.coming = null;
F.bindEvents();
if (!F.isOpened) {
$('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();
} else if (previous.prevMethod) {
F.transitions[ previous.prevMethod ]();
}
F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();
F._preloadImages();
},
_setDimension: function () {
var viewport = F.getViewport(),
steps = 0,
canShrink = false,
canExpand = false,
wrap = F.wrap,
skin = F.skin,
inner = F.inner,
current = F.current,
width = current.width,
height = current.height,
minWidth = current.minWidth,
minHeight = current.minHeight,
maxWidth = current.maxWidth,
maxHeight = current.maxHeight,
scrolling = current.scrolling,
scrollOut = current.scrollOutside ? current.scrollbarWidth : 0,
margin = current.margin,
wMargin = getScalar(margin[1] + margin[3]),
hMargin = getScalar(margin[0] + margin[2]),
wPadding,
hPadding,
wSpace,
hSpace,
origWidth,
origHeight,
origMaxWidth,
origMaxHeight,
ratio,
width_,
height_,
maxWidth_,
maxHeight_,
iframe,
body;
// Reset dimensions so we could re-check actual size
wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');
wPadding = getScalar(skin.outerWidth(true) - skin.width());
hPadding = getScalar(skin.outerHeight(true) - skin.height());
// Any space between content and viewport (margin, padding, border, title)
wSpace = wMargin + wPadding;
hSpace = hMargin + hPadding;
origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width;
origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;
if (current.type === 'iframe') {
iframe = current.content;
if (current.autoHeight && iframe.data('ready') === 1) {
try {
if (iframe[0].contentWindow.document.location) {
inner.width( origWidth ).height(9999);
body = iframe.contents().find('body');
if (scrollOut) {
body.css('overflow-x', 'hidden');
}
origHeight = body.outerHeight(true);
}
} catch (e) {}
}
} else if (current.autoWidth || current.autoHeight) {
inner.addClass( 'fancybox-tmp' );
// Set width or height in case we need to calculate only one dimension
if (!current.autoWidth) {
inner.width( origWidth );
}
if (!current.autoHeight) {
inner.height( origHeight );
}
if (current.autoWidth) {
origWidth = inner.width();
}
if (current.autoHeight) {
origHeight = inner.height();
}
inner.removeClass( 'fancybox-tmp' );
}
width = getScalar( origWidth );
height = getScalar( origHeight );
ratio = origWidth / origHeight;
// Calculations for the content
minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);
minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);
// These will be used to determine if wrap can fit in the viewport
origMaxWidth = maxWidth;
origMaxHeight = maxHeight;
if (current.fitToView) {
maxWidth = Math.min(viewport.w - wSpace, maxWidth);
maxHeight = Math.min(viewport.h - hSpace, maxHeight);
}
maxWidth_ = viewport.w - wMargin;
maxHeight_ = viewport.h - hMargin;
if (current.aspectRatio) {
if (width > maxWidth) {
width = maxWidth;
height = getScalar(width / ratio);
}
if (height > maxHeight) {
height = maxHeight;
width = getScalar(height * ratio);
}
if (width < minWidth) {
width = minWidth;
height = getScalar(width / ratio);
}
if (height < minHeight) {
height = minHeight;
width = getScalar(height * ratio);
}
} else {
width = Math.max(minWidth, Math.min(width, maxWidth));
if (current.autoHeight && current.type !== 'iframe') {
inner.width( width );
height = inner.height();
}
height = Math.max(minHeight, Math.min(height, maxHeight));
}
// Try to fit inside viewport (including the title)
if (current.fitToView) {
inner.width( width ).height( height );
wrap.width( width + wPadding );
// Real wrap dimensions
width_ = wrap.width();
height_ = wrap.height();
if (current.aspectRatio) {
while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
if (steps++ > 19) {
break;
}
height = Math.max(minHeight, Math.min(maxHeight, height - 10));
width = getScalar(height * ratio);
if (width < minWidth) {
width = minWidth;
height = getScalar(width / ratio);
}
if (width > maxWidth) {
width = maxWidth;
height = getScalar(width / ratio);
}
inner.width( width ).height( height );
wrap.width( width + wPadding );
width_ = wrap.width();
height_ = wrap.height();
}
} else {
width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_)));
height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
}
}
if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
width += scrollOut;
}
inner.width( width ).height( height );
wrap.width( width + wPadding );
width_ = wrap.width();
height_ = wrap.height();
canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));
$.extend(current, {
dim : {
width : getValue( width_ ),
height : getValue( height_ )
},
origWidth : origWidth,
origHeight : origHeight,
canShrink : canShrink,
canExpand : canExpand,
wPadding : wPadding,
hPadding : hPadding,
wrapSpace : height_ - skin.outerHeight(true),
skinSpace : skin.height() - height
});
if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
inner.height('auto');
}
},
_getPosition: function (onlyAbsolute) {
var current = F.current,
viewport = F.getViewport(),
margin = current.margin,
width = F.wrap.width() + margin[1] + margin[3],
height = F.wrap.height() + margin[0] + margin[2],
rez = {
position: 'absolute',
top : margin[0],
left : margin[3]
};
if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
rez.position = 'fixed';
} else if (!current.locked) {
rez.top += viewport.y;
rez.left += viewport.x;
}
rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio)));
return rez;
},
_afterZoomIn: function () {
var current = F.current;
if (!current) {
return;
}
F.isOpen = F.isOpened = true;
F.wrap.css('overflow', 'visible').addClass('fancybox-opened');
F.update();
// Assign a click event
if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
e.preventDefault();
F[ current.closeClick ? 'close' : 'next' ]();
}
});
}
// Create a close button
if (current.closeBtn) {
$(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
e.preventDefault();
F.close();
});
}
// Create navigation arrows
if (current.arrows && F.group.length > 1) {
if (current.loop || current.index > 0) {
$(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
}
if (current.loop || current.index < F.group.length - 1) {
$(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
}
}
F.trigger('afterShow');
// Stop the slideshow if this is the last item
if (!current.loop && current.index === current.group.length - 1) {
F.play( false );
} else if (F.opts.autoPlay && !F.player.isActive) {
F.opts.autoPlay = false;
F.play();
}
},
_afterZoomOut: function ( obj ) {
obj = obj || F.current;
$('.fancybox-wrap').trigger('onReset').remove();
$.extend(F, {
group : {},
opts : {},
router : false,
current : null,
isActive : false,
isOpened : false,
isOpen : false,
isClosing : false,
wrap : null,
skin : null,
outer : null,
inner : null
});
F.trigger('afterClose', obj);
}
});
/*
* Default transitions
*/
F.transitions = {
getOrigPosition: function () {
var current = F.current,
element = current.element,
orig = current.orig,
pos = {},
width = 50,
height = 50,
hPadding = current.hPadding,
wPadding = current.wPadding,
viewport = F.getViewport();
if (!orig && current.isDom && element.is(':visible')) {
orig = element.find('img:first');
if (!orig.length) {
orig = element;
}
}
if (isQuery(orig)) {
pos = orig.offset();
if (orig.is('img')) {
width = orig.outerWidth();
height = orig.outerHeight();
}
} else {
pos.top = viewport.y + (viewport.h - height) * current.topRatio;
pos.left = viewport.x + (viewport.w - width) * current.leftRatio;
}
if (F.wrap.css('position') === 'fixed' || current.locked) {
pos.top -= viewport.y;
pos.left -= viewport.x;
}
pos = {
top : getValue(pos.top - hPadding * current.topRatio),
left : getValue(pos.left - wPadding * current.leftRatio),
width : getValue(width + wPadding),
height : getValue(height + hPadding)
};
return pos;
},
step: function (now, fx) {
var ratio,
padding,
value,
prop = fx.prop,
current = F.current,
wrapSpace = current.wrapSpace,
skinSpace = current.skinSpace;
if (prop === 'width' || prop === 'height') {
ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
if (F.isClosing) {
ratio = 1 - ratio;
}
padding = prop === 'width' ? current.wPadding : current.hPadding;
value = now - padding;
F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) );
F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
}
},
zoomIn: function () {
var current = F.current,
startPos = current.pos,
effect = current.openEffect,
elastic = effect === 'elastic',
endPos = $.extend({opacity : 1}, startPos);
// Remove "position" property that breaks older IE
delete endPos.position;
if (elastic) {
startPos = this.getOrigPosition();
if (current.openOpacity) {
startPos.opacity = 0.1;
}
} else if (effect === 'fade') {
startPos.opacity = 0.1;
}
F.wrap.css(startPos).animate(endPos, {
duration : effect === 'none' ? 0 : current.openSpeed,
easing : current.openEasing,
step : elastic ? this.step : null,
complete : F._afterZoomIn
});
},
zoomOut: function () {
var current = F.current,
effect = current.closeEffect,
elastic = effect === 'elastic',
endPos = {opacity : 0.1};
if (elastic) {
endPos = this.getOrigPosition();
if (current.closeOpacity) {
endPos.opacity = 0.1;
}
}
F.wrap.animate(endPos, {
duration : effect === 'none' ? 0 : current.closeSpeed,
easing : current.closeEasing,
step : elastic ? this.step : null,
complete : F._afterZoomOut
});
},
changeIn: function () {
var current = F.current,
effect = current.nextEffect,
startPos = current.pos,
endPos = { opacity : 1 },
direction = F.direction,
distance = 200,
field;
startPos.opacity = 0.1;
if (effect === 'elastic') {
field = direction === 'down' || direction === 'up' ? 'top' : 'left';
if (direction === 'down' || direction === 'right') {
startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
endPos[ field ] = '+=' + distance + 'px';
} else {
startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
endPos[ field ] = '-=' + distance + 'px';
}
}
// Workaround for http://bugs.jquery.com/ticket/12273
if (effect === 'none') {
F._afterZoomIn();
} else {
F.wrap.css(startPos).animate(endPos, {
duration : current.nextSpeed,
easing : current.nextEasing,
complete : F._afterZoomIn
});
}
},
changeOut: function () {
var previous = F.previous,
effect = previous.prevEffect,
endPos = { opacity : 0.1 },
direction = F.direction,
distance = 200;
if (effect === 'elastic') {
endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
}
previous.wrap.animate(endPos, {
duration : effect === 'none' ? 0 : previous.prevSpeed,
easing : previous.prevEasing,
complete : function () {
$(this).trigger('onReset').remove();
}
});
}
};
/*
* Overlay helper
*/
F.helpers.overlay = {
defaults : {
closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay
speedOut : 200, // duration of fadeOut animation
showEarly : true, // indicates if should be opened immediately or wait until the content is ready
css : {}, // custom CSS properties
locked : !isTouch, // if true, the content will be locked into overlay
fixed : true // if false, the overlay CSS position property will not be set to "fixed"
},
overlay : null, // current handle
fixed : false, // indicates if the overlay has position "fixed"
el : $('html'), // element that contains "the lock"
// Public methods
create : function(opts) {
opts = $.extend({}, this.defaults, opts);
if (this.overlay) {
this.close();
}
this.overlay = $('
').appendTo( F.coming ? F.coming.parent : opts.parent );
this.fixed = false;
if (opts.fixed && F.defaults.fixed) {
this.overlay.addClass('fancybox-overlay-fixed');
this.fixed = true;
}
},
open : function(opts) {
var that = this;
opts = $.extend({}, this.defaults, opts);
if (this.overlay) {
this.overlay.unbind('.overlay').width('auto').height('auto');
} else {
this.create(opts);
}
if (!this.fixed) {
W.bind('resize.overlay', $.proxy( this.update, this) );
this.update();
}
if (opts.closeClick) {
this.overlay.bind('click.overlay', function(e) {
if ($(e.target).hasClass('fancybox-overlay')) {
if (F.isActive) {
F.close();
} else {
that.close();
}
return false;
}
});
}
this.overlay.css( opts.css ).show();
},
close : function() {
var scrollV, scrollH;
W.unbind('resize.overlay');
if (this.el.hasClass('fancybox-lock')) {
$('.fancybox-margin').removeClass('fancybox-margin');
scrollV = W.scrollTop();
scrollH = W.scrollLeft();
this.el.removeClass('fancybox-lock');
W.scrollTop( scrollV ).scrollLeft( scrollH );
}
$('.fancybox-overlay').remove().hide();
$.extend(this, {
overlay : null,
fixed : false
});
},
// Private, callbacks
update : function () {
var width = '100%', offsetWidth;
// Reset width/height so it will not mess
this.overlay.width(width).height('100%');
// jQuery does not return reliable result for IE
if (IE) {
offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
if (D.width() > offsetWidth) {
width = D.width();
}
} else if (D.width() > W.width()) {
width = D.width();
}
this.overlay.width(width).height(D.height());
},
// This is where we can manipulate DOM, because later it would cause iframes to reload
onReady : function (opts, obj) {
var overlay = this.overlay;
$('.fancybox-overlay').stop(true, true);
if (!overlay) {
this.create(opts);
}
if (opts.locked && this.fixed && obj.fixed) {
if (!overlay) {
this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
}
obj.locked = this.overlay.append( obj.wrap );
obj.fixed = false;
}
if (opts.showEarly === true) {
this.beforeShow.apply(this, arguments);
}
},
beforeShow : function(opts, obj) {
var scrollV, scrollH;
if (obj.locked) {
if (this.margin !== false) {
$('*').filter(function(){
return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
}).addClass('fancybox-margin');
this.el.addClass('fancybox-margin');
}
scrollV = W.scrollTop();
scrollH = W.scrollLeft();
this.el.addClass('fancybox-lock');
W.scrollTop( scrollV ).scrollLeft( scrollH );
}
this.open(opts);
},
onUpdate : function() {
if (!this.fixed) {
this.update();
}
},
afterClose: function (opts) {
// Remove overlay if exists and fancyBox is not opening
// (e.g., it is not being open using afterClose callback)
//if (this.overlay && !F.isActive) {
if (this.overlay && !F.coming) {
this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
}
}
};
/*
* Title helper
*/
F.helpers.title = {
defaults : {
type : 'float', // 'float', 'inside', 'outside' or 'over',
position : 'bottom' // 'top' or 'bottom'
},
beforeShow: function (opts) {
var current = F.current,
text = current.title,
type = opts.type,
title,
target;
if ($.isFunction(text)) {
text = text.call(current.element, current);
}
if (!isString(text) || $.trim(text) === '') {
return;
}
title = $('
' + text + '
');
switch (type) {
case 'inside':
target = F.skin;
break;
case 'outside':
target = F.wrap;
break;
case 'over':
target = F.inner;
break;
default: // 'float'
target = F.skin;
title.appendTo('body');
if (IE) {
title.width( title.width() );
}
title.wrapInner('
');
//Increase bottom margin so this title will also fit into viewport
F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
break;
}
title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target);
}
};
// jQuery plugin initialization
$.fn.fancybox = function (options) {
var index,
that = $(this),
selector = this.selector || '',
run = function(e) {
var what = $(this).blur(), idx = index, relType, relVal;
if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
relType = options.groupAttr || 'data-fancybox-group';
relVal = what.attr(relType);
if (!relVal) {
relType = 'rel';
relVal = what.get(0)[ relType ];
}
if (relVal && relVal !== '' && relVal !== 'nofollow') {
what = selector.length ? $(selector) : that;
what = what.filter('[' + relType + '="' + relVal + '"]');
idx = what.index(this);
}
options.index = idx;
// Stop an event from bubbling if everything is fine
if (F.open(what, options) !== false) {
e.preventDefault();
}
}
};
options = options || {};
index = options.index || 0;
if (!selector || options.live === false) {
that.unbind('click.fb-start').bind('click.fb-start', run);
} else {
D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
}
this.filter('[data-fancybox-start=1]').trigger('click');
return this;
};
// Tests that need a body at doc ready
D.ready(function() {
var w1, w2;
if ( $.scrollbarWidth === undefined ) {
// http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
$.scrollbarWidth = function() {
var parent = $('
').appendTo('body'),
child = parent.children(),
width = child.innerWidth() - child.height( 99 ).innerWidth();
parent.remove();
return width;
};
}
if ( $.support.fixedPosition === undefined ) {
$.support.fixedPosition = (function() {
var elem = $('
').appendTo('body'),
fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );
elem.remove();
return fixed;
}());
}
$.extend(F.defaults, {
scrollbarWidth : $.scrollbarWidth(),
fixed : $.support.fixedPosition,
parent : $('body')
});
//Get real width of page scroll-bar
w1 = $(window).width();
H.addClass('fancybox-lock-test');
w2 = $(window).width();
H.removeClass('fancybox-lock-test');
$("").appendTo("head");
});
}(window, document, jQuery));
/*!
* Buttons helper for fancyBox
* version: 1.0.5 (Mon, 15 Oct 2012)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* buttons: {
* position : 'top'
* }
* }
* });
*
*/
(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;
//Add helper object
F.helpers.buttons = {
defaults : {
skipSingle : false, // disables if gallery contains single image
position : 'top', // 'top' or 'bottom'
tpl : '
'
},
list : null,
buttons: null,
beforeLoad: function (opts, obj) {
//Remove self if gallery do not have at least two items
if (opts.skipSingle && obj.group.length < 2) {
obj.helpers.buttons = false;
obj.closeBtn = true;
return;
}
//Increase top margin to give space for buttons
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
},
onPlayStart: function () {
if (this.buttons) {
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
}
},
onPlayEnd: function () {
if (this.buttons) {
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
}
},
afterShow: function (opts, obj) {
var buttons = this.buttons;
if (!buttons) {
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
buttons = {
prev : this.list.find('.btnPrev').click( F.prev ),
next : this.list.find('.btnNext').click( F.next ),
play : this.list.find('.btnPlay').click( F.play ),
toggle : this.list.find('.btnToggle').click( F.toggle ),
close : this.list.find('.btnClose').click( F.close )
}
}
//Prev
if (obj.index > 0 || obj.loop) {
buttons.prev.removeClass('btnDisabled');
} else {
buttons.prev.addClass('btnDisabled');
}
//Next / Play
if (obj.loop || obj.index < obj.group.length - 1) {
buttons.next.removeClass('btnDisabled');
buttons.play.removeClass('btnDisabled');
} else {
buttons.next.addClass('btnDisabled');
buttons.play.addClass('btnDisabled');
}
this.buttons = buttons;
this.onUpdate(opts, obj);
},
onUpdate: function (opts, obj) {
var toggle;
if (!this.buttons) {
return;
}
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
//Size toggle button
if (obj.canShrink) {
toggle.addClass('btnToggleOn');
} else if (!obj.canExpand) {
toggle.addClass('btnDisabled');
}
},
beforeClose: function () {
if (this.list) {
this.list.remove();
}
this.list = null;
this.buttons = null;
}
};
}(jQuery));
var AT_Main = {
getWidthBrowser : function() {
var myWidth;
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
}
else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
myWidth = document.documentElement.clientWidth;
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
myWidth = document.body.clientWidth;
}
return myWidth;
}
,checkLayout : function() {
if($("#checkLayout .visible-xs-block").css("display") == "block")
return 1;
else if($("#checkLayout .visible-sm-block").css("display") == "block")
return 2;
else if($("#checkLayout .visible-md-block").css("display") == "block")
return 3;
else if($("#checkLayout .visible-lg-block").css("display") == "block")
return 4;
}
,homeSlideshow : function(){
if($('.home-slideshow-wrapper').length){
$('.home-slideshow-wrapper').each(function(index,value){
var _delay_time = '';
if( parseInt(bc_configs.home_slideshow_auto_delay) > 0 ){
_delay_time = parseInt(bc_configs.home_slideshow_auto_delay);
}
var swiper = new Swiper('.swiper-container', {
autoplay: _delay_time
,pagination: '.swiper-pagination'
,paginationClickable: '.swiper-pagination'
,nextButton: '.swiper-button-next'
,prevButton: '.swiper-button-prev'
,spaceBetween: 30
,scrollbarDraggable: true
,effect: $(value).data('animation')
,setWrapperSize: false
,onImagesReady: function(swiper){
var slideH = $(swiper.container[0]).find('.swiper-slide > img').height(),
slideW = $(swiper.container[0]).find('.swiper-slide > img').width();
$(swiper.container[0]).find('.swiper-slide > img').css('visibility','hidden');
$(swiper.container[0]).find('.swiper-slide').each(function(){
var _this = $(this);
_this.find('.video-slide').show();
_this.find('.video-slide video').css({
left: '50%',
top: '50%',
transform: 'translate(-50%,-50%)'
});
});
}
});
});
}
}
,homeIE : function(){
if($('.home-slideshow-wrapper').length){
$('.home-slideshow-wrapper').each(function(index,value){
var _delay_time = '';
if( parseInt(bc_configs.home_slideshow_auto_delay) > 0 ){
_delay_time = parseInt(bc_configs.home_slideshow_auto_delay);
}
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination'
,paginationClickable: '.swiper-pagination'
,nextButton: '.swiper-button-next'
,prevButton: '.swiper-button-prev'
,spaceBetween: 30
,scrollbarDraggable: true
,effect: 'fade'
,setWrapperSize: true
,onImagesReady: function(swiper){
var slideH = $(swiper.container[0]).find('.swiper-slide > img').height(),
slideW = $(swiper.container[0]).find('.swiper-slide > img').width();
$(swiper.container[0]).find('.swiper-slide > img').css('visibility','hidden');
$(swiper.container[0]).find('.swiper-slide').each(function(){
var _this = $(this);
_this.find('.video-slide').show();
_this.find('.video-slide video').css({
left: '50%',
top: '50%',
transform: 'translate(-50%,-50%)'
});
});
}
});
});
}
}
,stickMenu : function() {
var enable_stick = $(".header-content").data('stick');
if(enable_stick){
var lastScroll = 0;
var header = $(".header-content");
var body_content = $("#body-content");
$(window).scroll(function() {
var st = $(this).scrollTop();
if (st > lastScroll) {
if (st > 100 ) {
header.addClass("header-fixed fadeIn animated");
body_content.addClass("has-header-fixed");
}
}
else {
if (st < 100) {
header.removeClass("header-fixed fadeIn animated");
body_content.removeClass("has-header-fixed");
}
}
lastScroll = st;
});
}
}
,toTopButton : function(){
var to_top_btn = $("#scroll-to-top");
if( 1 > to_top_btn.length ){
return;
}
$(window).on( 'scroll' , function() {
var b = $(this).scrollTop();
var c = $(this).height();
if (b > 100) {
var d = b + c / 2;
}
else {
var d = 1 ;
}
if (d < 1000 && d < c) {
$("#scroll-to-top").removeClass('on off').addClass('off');
} else {
$("#scroll-to-top").removeClass('on off').addClass('on');
}
});
to_top_btn.on( 'click',function (e) {
e.preventDefault();
$('body,html').animate({scrollTop:0},800,'swing');
});
}
,mailchipPopup : function(){
var expire = $("#mailchimp-popup").data('expires');
if (jQuery.cookie('mycookie')) {
//it hasn't been one days yet
}
else {
jQuery.fancybox(
$('#mailchimp-popup'),
{
'autoDimensions': false
,'width' : 730
,'height' : 390
,'autoSize' : false
,'transitionIn' : 'none'
,'transitionOut': 'none'
}
);
}
jQuery.cookie('mycookie', 'true', { expires: expire });
}
,effectNavigation : function(){
$(".horizontal-menu .navigation .navbar-collapse .main-nav>li").hover(function(e){
$(this).find('>.dropdown-menu, >.dropdown-menu li >.dropdown-menu').addClass("fadeInUp animated");
},function(e){
$(this).find('>.dropdown-menu, >.dropdown-menu li >.dropdown-menu').removeClass("fadeInUp animated");
});
$(".verticle-menu .navigation .navbar-collapse .main-nav>li").hover(function(e){
$(this).find('>.dropdown-menu, >.dropdown-menu li >.dropdown-menu').addClass("fadeInRight animated");
},function(e){
$(this).find('>.dropdown-menu, >.dropdown-menu li >.dropdown-menu').removeClass("fadeInRight animated");
});
$(".cart-target").hover(function(e){
$(this).find('>.dropdown-menu').addClass("fadeInUp animated");
},function(e){
$(this).find('>.dropdown-menu').removeClass("fadeInUp animated");
});
}
,fixNoScroll : function() {
var windowW = $(window).width();
$('#page-body, .header-content, #page-body .mobile-version').css("width", windowW + 'px');
}
,fixReturnScroll : function() {
$('#page-body, .header-content,#page-body .mobile-version').attr('style', '');
}
,fixButton : function(){
$(".product-wrapper .product-head").each(function(e){
if($(this).children().hasClass('wrapper-countdown')){
$(this).find('.product-button').addClass('fix');
}
});
}
,handleReviews: function() {
SPR.registerCallbacks(), SPR.initRatingHandler(), SPR.initDomEls(), SPR.loadProducts(), SPR.loadBadges();
}
,menuOnMobile : function(){
$('#page-body').on('click',function () {
$(".menu-mobile").removeClass("opened");
$("html,body").removeClass("menu-opened");
AT_Main.fixReturnScroll();
});
$(document).on('click','[data-toggle=offcanvas]',function(e){
e.stopPropagation();
AT_Main.fixNoScroll();
$(".menu-mobile").toggleClass("opened");
$("html,body").toggleClass("menu-opened")
});
$(".navbar .main-nav li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});
$(document).on('click','.mobile-version .menu-mobile .main-nav .expand',function(){
var e=$(this).parents(".dropdown").first();
if (e.hasClass("menu-mobile-open")) {
e.removeClass("menu-mobile-open");
$(this).find('.visible-xs').removeClass('fa-minus');
$(this).find('.visible-xs').addClass('fa-plus');
} else {
e.addClass("menu-mobile-open");
$(this).find('.visible-xs').removeClass('fa-plus');
$(this).find('.visible-xs').addClass('fa-minus');
}
})
}
,handleMenuMultiLine : function() {
var outItem = "";
var down = false;
var top = 0;
$(".navbar-collapse .main-nav > li").on("mousemove", function(e){
var target = $(e.currentTarget);
if( down && outItem != "") {
outItem.addClass("hold");
setTimeout(function(){
if(outItem != "")
outItem.removeClass("hold");
down = false;
outItem = "";
},500);
if( (outItem[0] == target[0]) || (outItem.offset().top == target.offset().top) )
{
outItem.removeClass("hold");
down = false;
outItem = "";
}
}
else {
outItem = "";
}
});
$(".navbar-collapse .main-nav >li").on("mouseout", function(e){
var target = $(e.currentTarget);
if( e.pageY >= target.offset().top + 50 ) { //move down
down = true;
}
if( target.hasClass("dropdown") ) { //target has child
if(outItem == "")
outItem = target;
}
});
}
,toggleFilterSidebar : function(){
$(document).on('click', '.filter-toggle', function(e) {
e.stopPropagation();
AT_Main.fixNoScroll();
$('.sbw-filter').toggleClass('opened');
$('html,body').toggleClass('filter-opened');
});
$(document).on('click', '#page-body', function(e) {
$('.sbw-filter').removeClass('opened');
$('html,body').removeClass('filter-opened');
});
}
,handleMap : function(){
if($().gMap){
if($('#page-contact-map').length){ // GMap in contact page
$('#page-contact-map').gMap({
zoom: 17
,scrollwheel: false
,maptype: 'TERRAIN'
,address: '4900 Fehérgyarmat, Szatmári út 21.'
});
}
}
}
,callPriceSlider: function() {
$_rmin=parseInt($('#range-slider').attr("data-price-min")) || 100;
$_rmax=parseInt($('#range-slider').attr("data-price-max")) || 100000;
$('#range-slider').slider({
range: true,
min: $_rmin,
max: $_rmax,
values: [$_rmin, $_rmax],
create: function() {
$("#amount").html($_rmin +" - "+$_rmax+" Ft");
},
slide: function (event, ui) {
$("#amount").html(ui.values[0] + " - " + ui.values[1]+" Ft");
var mi = ui.values[0];
var mx = ui.values[1];
filterSystem(mi, mx);
}
})
function filterSystem(minPrice, maxPrice) {
$(".cata-product .product-price-range").hide().filter(function () {
var price = parseInt($(this).data("price"), 10);
return price >= minPrice && price <= maxPrice;
}).show();
}
}
,dropdownFilter : function(){ // Show,hide advanced-filters in catalog page
$(document).on('click','.sb-filter .sbf-title>span',function(e){
e.stopPropagation();
$(this).toggleClass('none-active');
$(this).closest('.sb-filter').find('.advanced-filters').toggleClass('hide');
});
}
,toggleFooter : function(){
$(document).on('click', '.footer-block h3>span', function(e) {
$(this).closest('.footer-block').find('h3').toggleClass('opened');
$(this).closest('.footer-block').find('.list-links').slideToggle();
});
}
,fixTitle : function(){ // fix title a in filter
$(".rt a").attr("data-title", function() { return $(this).attr("title"); });
$(".rt a").removeAttr("title");
}
,filterCatalogReplace : function(){
var value = collectionUrl.substring(collectionUrl.lastIndexOf('/') + 1);
var val = value.substring(value.lastIndexOf('?'));
collectionUrl = collectionUrl.replace(value, '');
value = value.replace(val, '');
value = value.replace('#', '');
var value_arr = value.split('+');
var current_arr = [];
$('#'+filter_id+' li.active-filter').each( function() {
current_arr.push($(this).attr('data-handle'));
});
$('#'+filter_id+' li.active-filter').find('a').attr('title', '');
$('#'+filter_id+' li').removeClass('active-filter');
for(jQueryi = 0; jQueryi
Az Ön által választott termékek közül egy vagy több nincs raktáron.
';
$_Global_Confing.Shop.Lang["instore-delivery-title"]="Figyelem!"
$_Global_Confing.Shop.Lang["delivery-n"]='500.000 Ft fölötti rendelés esetén az utánvétes fizetést nem választhatja.';
$_Global_Confing.Shop.Lang["delivery-n-title"]='Utánvétes fizetés';
var bc_configs = {
currency : "true"
,money_format : "${{amount}}"
,home_slideshow_auto_delay : "7000"
,enable_image_blance : "true"
,image_blance_width : "290"
,image_blance_height : "290"
,enable_title_blance : "false"
};
$(window).resize(function() {
if(AT_Main.getWidthBrowser() < 1024){
if($('#top').hasClass('on')){
$('#top').prev().remove();
$('#top').removeClass('on').removeClass('animated');
}
}
AT_Main.fixReturnScroll();
if(AT_Main.checkLayout() != 1 && $('.menu-mobile').hasClass('opened')){
$("#page-body").trigger('click');
}
});
$(document).ready(function(){
$.ajaxSetup({cache:false});
if (bcMsieVersion.MsieVersion() == 0 ){
AT_Main.homeSlideshow();
}
else{
if (bcMsieVersion.MsieVersion() > 9 || !!navigator.userAgent.match(/Trident.*rv\:11\./)){
AT_Main.homeIE();
}
else{
$('#home-slideshow').owlCarousel({
nav : true
,dots : true
,items : 1
,navText : ['', '']
});
}
}
AT_Slider.init();
if($("#cookie-bar").length){
$(window).scroll(function(){
var T_=$(document).scrollTop();
if (T_>20){
$('.delivery-top-info.fixed').hide();
}
else if (T_==0){
$('.delivery-top-info.fixed').show();
}
});
}
if(typeof($.fn.modal)!="undefined"){
$.fn.modal.Constructor.prototype.enforceFocus = function () {};
}
$(document).on('show','.modal',function(){
$("body").append($(this));
});
$(window).on('load',function(){
if($.cookie("show-welcome")!=="1"){
$('#modal-1').modal('show');
$.cookie("show-welcome","1");
}
});
$(document).on("click",'.shop-profil-info',function(e){
e.returnValue=false;
if(e.preventDefault){e.preventDefault();}
$("#myModal").modal("show");
});
$(document).on("click",'#sf_send',function(e){
e.returnValue=false;
if(e.preventDefault){e.preventDefault();}
});
$(".head-search").on("click",'.ssub',function(e){
e.returnValue=false;
if(e.preventDefault){e.preventDefault();}
if($("#head-search").val()!=""){
document.location.href="/kereses/"+$("#head-search").val();
}
});
//cookie policy
$.cookieBar({
policyButton: false,fixed:true
});
function extractor(query) {
var result = /([^,]+)$/.exec(query);
if(result && result[1])
return result[1].trim();
return '';
}
$("#head-search").attr({"speech":"speech","x-webkit-speech":"x-webkit-speech"}).typeahead({
sorter: function (item) {
return item.sort();
},
matcher: function (item){
return item;
var tquery = extractor(this.query);
if(!tquery){return false;}
return ~item.toLowerCase().indexOf(tquery.toLowerCase());
},
highlighter: function (item) {
selectedState = $map[item];
var query = extractor(this.query);
var i=query.split(" ");
$.each(i,function(a,v){
if(v.length>=2){
item= item.replace(new RegExp('(' + v + ')', 'ig'), function ($1, match) {
return '' + match + '';
});
}
});
return((selectedState.img)?'':'')+
''+item+'
';
},
updater: function (item) {
selectedState = $map[item];
var u=$SelectedE.attr("data-other-fills");
if(u!==undefined){
c=JSON.parse([u]);
$.each(c, function(a, b){
$("#"+b.id+$bnum).val(selectedState[b.value+$bnum]);
});
}
if(typeof(selectedState.url)!="undefined" && selectedState.url!="" && selectedState.category==1){
location.href=selectedState.url;
//location.href='kereses/'+$SelectedE.val();
}
else if(typeof(selectedState.url)!="undefined" && selectedState.url!="" && selectedState.category==2){
location.href=selectedState.url;
}
return selectedState.minum;
}
})
.on('keyup', function(ev){
ev.stopPropagation();
ev.preventDefault();
$SelectedE=$(this);
var self = $(this);
self.data('typeahead').source = [];
$_EditedID_O=$(this).attr("data-sources-d");
if($_EditedID_O==""){c("nincs forrás beállítva");return false;}
if($.inArray(ev.keyCode,[40,38,9,13,27]) === -1 ){
if(!self.data('active') && self.val().length > 0){
self.data('active', true);
$.getJSON($_DOCUMENT_ROOT+'d-list.php',{
sl: $_EditedID_O,st:$(this).val()
}, function(data) {
$map={};
var resultList = data.map(function (item) {
var aItem = item.text;
$map[aItem]=item;
return aItem;
});
if(resultList){
self.data('typeahead').source=resultList;
self.trigger('keyup');
self.data('active', false);
}
});
}
}
});
$("#sf_send").click(function(e){
e.returnValue=false;
if(e.preventDefault){e.preventDefault();}
if($("#sf_message").val()=="" || $("#sf_email").val()=="" || $("#sf_phone").val()=="" || $("#sf_name").val()==""){
ShowNotify('error','Hiba','Kérem minden adatot adjon meg (Név, E-mail cím, Telefonszám, Üzenet tartalma)!');
return false;
}
$.ajax
({
type: "POST",
url: $_DOCUMENT_ROOT+'sendmail-to-retail.php',
dataType: 'json',
async: false,
data: {'m-content':$("#sf_message").val(),'m-email':$("#sf_email").val(),'m-mobil':$("#sf_phone").val(),'m-name':$("#sf_name").val()},
success: function (data) {
if(data.success=="true"){
ShowNotify('info','Üzenet','sikeresen továbbítva');
$("#sf_message").val("");$("#sf_email").val("");$("#sf_phone").val("");$("#sf_name").val("");
}
else{
ShowNotify('error','Üzenet','az üzenet továbbítása sikertelen, próbálja újra!');
}
}
});
});
//ping
$.serverObserver.enable({
url: "/ping",
frequency: 1000*60*2,
onServerOnline: function() {
// console.log('bejelentkezve');
},
onServerOffline: function() {
// console.log('nincs bejelentkezve');
}
});
if(!$("#print-p-p").length){
// popover
popOver();
if($("#head-search").length){
var language=window.navigator.userLanguage || window.navigator.language;
$("#head-search").attr("lang", language);
$("#head-search").bind("webkitspeechchange onspeechchange", function (e) {
var spokenText = $(this).val();
switch(spokenText){
case "kosár":
$(".cart-dialog-item").click();
return;
break;
case "pénztár":
location.href="/kosar";
return;
break;
case "elérhetőség":
location.href="/elerhetoseg";
return;
break;
case "le":
$("body").scrollTop(2000);
return;
break;
case "főoldal":
location.href="/";
return;
break;
default:
if(spokenText!=""){
document.location.href="/kereses/"+spokenText;
}
return;
break;
}
});
}
if(!$("#device-support").length){
$(".prod-add-cart.row").length && $('.prod-add-cart.row').scrollToFixed({
marginTop: 123,
preFixed: function(){$(this).css({'border':'5px solid #ccc',"background":"rgb(240, 240, 240)"});},
postFixed: function(){$(this).css({'border':'5px solid #fff',"background":"none"});}
});
$('.modal-info .modal-body').css({"height":"270px","width":"500px","overflow":"hidden","padding":"0px"});
$('.s-modal-body').css({"height":"auto","width":"calc(100% - 30px)","margin":"0px 0px 0px 10px","overflow":"auto"});
$('#product .rateit').length && $('#product .rateit').bind('rated reset', function (e) {
var ri = $(this);
var value = ri.rateit('value');
var productID = ri.data('productid');
ri.rateit('readonly', true);
$.ajax({
url: '/tmps/rateit.php',
data: { id: productID, value: value },
type: 'POST',
success: function (data) {
var a=parseInt($("#ratenum").text());
ShowNotify('info',"Értékelés!","köszönjük, hogy értékelte a terméket
",8000);
$("#ratenum").html(a+1);
},
error: function (jxhr, msg, err) {
ShowNotify('info',"Hiba!","Köszönjük, az értékelés nem sikerült. Próbálja meg kérsőbb!
",8000);
}
});
});
}
$("#myModal .s-bt-no").on('click',function(e){
e.returnValue=false;
if(e.preventDefault){e.preventDefault();}
$("#myModal").modal("hide");
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
});
$("#category-sort").change(function(){
location.href=$(this).val();
});
var navTabs = $('.nav-tabs a');
var hash = window.location.hash;
hash && navTabs.filter('[data-value="' + hash + '"]').tab('show');
navTabs.on('shown', function (e) {
var status = $(e.target).attr('data-value');
//window.location.hash = status;
});
$('.nav-tabs a').click(function (e) {
var scrollmem = $('body').scrollTop()+50;
window.history.pushState({}, this.hash.replace(/\#/g,''), this.hash.replace(/\#/g,'/'));
});
}
AT_Main.init();
translationTooltipsDisable();
});$.cookie.defaults = {path: '/', expires: 365};
$MT={};
$UserSelect=1;
$_hashchange=$routingplan="";
$.cookie.json=false;
var ae=1,JSonCookieArray={},CartLoaderID,CartJsonID,ae=1;
$_hashchange=$routingplan="";
$.cookie.json=false;
var JSonCookieArray={};
var CartLoaderID,CartJsonID;
var ShopCart={
"Cookie":{
"SaveCart":function(c){
/*if($("input[name=transRadiosPol]:checked").val()==1){*/
var a=$("#cart-form").serializeArray();
$.each(a,function(){
$.cookie(this.name,this.value);
});
setTimeout(function(){
$.get("tmps/cart-l-three.php?SC=1");
},10);
/*}*/
},
"Get":function(c){
if($.type($.cookie(c))=="undefined"){
return "";
}
},
"GetJson":function(c){
if($.type(c)!="undefined"){
if($.type($.cookie("ShopCartAll"))=="undefined"){
return "";
}
else{
JSonCookieArray=JSON.parse($.cookie("ShopCartAll"));
if($.type(JSonCookieArray.c)=="undefined"){
return "";
}
else {return JSonCookieArray.c;}
}
}
else{
if($.type($.cookie("ShopCartAll"))=="undefined"){
return "";
}
else{
return JSON.parse($.cookie("ShopCartAll"));
}
}
},
"Add":function(c,v){
$.cookie(c,v);
ShopCart.Cookie.ConvertToJson();
},
"AddJson":function(c,v){
JSonCookieArray=JSON.parse($.cookie("ShopCartAll"));
JSonCookieArray[c]=v;
JSonCookieArray=JSON.stringify(JSonCookieArray);
$.cookie("ShopCartAll",JSonCookieArray);
},
"RemoveOne":function(i){
if($.isArray(i)){
for(i_=0;i_<=i.length;i_++)
$.removeCookie($.trim(i[i_]));
}
else{
$.removeCookie($.trim(i));
}
},
"RemoveOneJson":function(c){
JSonCookieArray=JSON.parse($.cookie("ShopCartAll"));
var index=array.indexOf(c);
if(index>-1){
array.splice(index, 1);
}
JSonCookieArray=JSON.stringify(JSonCookieArray);
$.cookie("ShopCartAll",JSonCookieArray);
},
"RemoveAll":function(){
var cookies=document.cookie.split(";");
for(var i=0;i-1?cookie.substr(0,eqPos):cookie);
$.removeCookie(name);
}
return true;
},
"ConvertToJson":function(c){
window.clearInterval(CartJsonID);
CartJsonID=setInterval(function(){
$.cookie("ShopCartAll","");
var cookies=document.cookie.split(";");
for(var i=0;i-1?cookie.substr(0,eqPos):cookie);
var v=$.trim(eqPos>-1?cookie.substr(eqPos+1):cookie);
JSonCookieArray[n]=v;
}
JSonCookieArray=JSON.stringify(JSonCookieArray);
$.cookie("ShopCartAll",JSonCookieArray);
window.clearInterval(CartJsonID);
},3000);
}
},
"RemoveCartCookie":function(){
for(var i=0;i ',e);
div.insertAfter($(this));
$('#radio_'+index,e).unbind();
$('#radio_'+index,e).bind('click', function(){
$(this).parents(".c-db-l").find("u.i-mportant").not($(this).next("u.i-mportant")).removeClass("a-hover-bb");
$(this).parents(".c-db-l").find("label").removeClass("a-hover-b").end();
$(this).parents("label").addClass("a-hover-b");
var dState = $(this).data('state');
if (dState != 'on'){
$(this).next("u.i-mportant").addClass("a-hover-bb");
$(this).data('state', 'on');
$('.radio-btn',e).removeClass('on').data('state', 'off');
$(this).addClass('on').data('state', 'on');
$('.ui-radio',e).find('input[type=radio]').removeAttr('checked').prop("checked",false);
$(this).prev('.ui-radio').find('input[type=radio]').attr('checked', 'checked').prop("checked",true);
var ds=$(this).prev('.ui-radio').find('input[type=radio]').attr("data-delivery-store");
var dsid=$(this).prev('.ui-radio').find('input[type=radio]').attr("data-delivery-store-id");
var dpm=$(this).prev('.ui-radio').find('input[type=radio]').attr("data-payment");
if(ds!="undefined"){
$.cookie('delivery-store',ds);
$.cookie('delivery-store-id',dsid);
}
if(dpm!="undefined"){
$.cookie('payment-mode',dpm);
}
}
else if (dState=='on' && $(this).prev('.ui-radio').find('input[type=radio]').attr("data-one")=="true"){
$(this).data('state', 'off').addClass('off').removeClass('on');
$(this).prev('.ui-radio').find('input[type=radio]').removeAttr('checked').prop("checked",false);
}
});
$('#radio_'+index,e).bind('dblclick', function(){
$(this).data('state', 'off').addClass('off').removeClass('on');
$('.ui-radio',e).find('input[type=radio]').removeAttr('checked').prop("checked",false);
$('.transRadios:checked').attr("checked",false).prop("checked",false);
});
$(".transRadios[id=transRadiosPayment]").on(($.browser.msie && $.browser.version < 9) ? "propertychange click":"change click",function(){
if($(this).val()==2 && $(this).is(":checked")){
if($("#myModalQ:visible").length==0) {
ShopCart.LoadModal.StoreCOD();
}
}
});
});
$(".transRadios").not('.nocart').unbind();
$('#cart').not('.nocart').off('click','.transRadios:checked');
var dsmode=($.type($.cookie('delivery-mode'))=="undefined")?$.cookie('delivery-mode',"3"):'';
$('.transRadios').not('.nocart').on('click',function(){
$.cookie('delivery-mode',$(this).val());
ShopCart.Cookie.RemoveOne('payment-mode');
if($.cookie('delivery-mode')==1 || $.cookie('delivery-mode')==2){
ShopCart.RemoveCartCookie('date-city','date-city-s-day','date-city-s-day-id','shopper-place','free-days');
}
if($.cookie('delivery-mode')==1){
$.cookie('delivery-store',"4900 Fehérgyarmat Benczúr u. 71.");
$.cookie('delivery-store-id',1);
$.cookie('delivery-mode',1);
}
if($.cookie('delivery-mode')!=1){
ShopCart.RemovePdelivery();
}
// ShopCart.Cookie.ConvertToJson();
});
$(document).on(($.browser.msie && $.browser.version < 9) ? "propertychange" : "change",'.transRadios',function(){
$(this).parents("label").find(".radio-btn").trigger("click");
});
$('#myModalQ').on('click','.shopDeliveryPlace',function(){
var e=$(".shopDeliveryPlace:checked").parents(".cart-delivery-c.span7-e").find("#root-from").val();
$.cookie('delivery-shopper-place',e);
if($.cookie('delivery-shopper-place')!=""){
$(".transRadios:eq(1)").parents("label").find(".radio-btn").trigger("click");
ShopCart.RemovePdelivery();
}
});
popOver();
},
"LoadHash":function(e){
if(_params('termek-ellenorzese')==true){
ae=1;
}
else if(_params('vasarlas-lezarasa')==true){
ae=3;
}
else if(_params('koszonjuk')==true){
ae=4;
}
else{
ae=1;
}
return ae;
},
"InitCart":function(e){
popOver();
// c("load top cart in initCart");
ShopCart.LoadHash();
setTimeout(function(){
ShopCart.LoadCart(ae);
ShopCart.RefreshCart();
},10);
},
"TwoStep":function(e){
$.cookie("cart-shop-step",e);
if(e==2){
$(".carttwostep").addClass("active");
ShopCart.LoadCart(2);
var x=$(".carttwostep");
$("body").ScrollTo(x);
}
else if(e==3){
ShopCart.LoadCart(3);
var x=$(".carttwostep");
$("body").ScrollTo(x);
}
else{
$(".carttwostep").removeClass("active");
}
},
"ShopingClose":function(e){
var v=$(".transport input[type=radio]:checked").val();
switch(v){
case "1":
$.cookie('delivery-store',"4900 Fehérgyarmat Benczúr u. 71.");
$.cookie('delivery-store-id',1);
$.cookie('delivery-mode',1);
if($.type($.cookie("delivery-store"))=="undefined"){
ShowNotify('error','Vásárlás lezárása','Kérem, válassza ki az üzletet!',3000);
ShopCart.TwoStep(1);
}
else {
ShopCart.LoadCart(3);
}
return;
break;
case "2":
if($.type($.cookie("delivery-shopper-place"))=="undefined"){
ShowNotify('error','Vásárlás lezárása','Kérem, adja meg a címét!',4000);
ShopCart.TwoStep(1);
}
else {
ShopCart.LoadCart(3);
}
return;
break;
case "3":
ShopCart.LoadCart(3);
return;
break;
}
},
"PriceModeDef":function(e){
$("#product").find(".prod-prop-list li").each(function(index){
});
},
// price modif item props
"PriceMode":function(e){
if(!e.hasClass("label-important")){
e.parents("li").find(".pricemodl").not(e).each(function(index){
$(this).addClass("label-discount");
$(this).removeClass("label-important");
});
e.addClass("label-important");
e.removeClass("label-discount");
}
else{
e.addClass("label-discount");
e.removeClass("label-important");
}
InitPrice('',e);
},
"ScrollToTop":function(e){
$('html, body').animate({
scrollTop: $(".boxes-wrapper").offset().top
}, 2000);
},
// scroll to jscrollpane to element
"ScrollToJ":function(p,e){
if($(e).length){
var v=$(p).jScrollPane({autoReinitialise: true,mouseWheelSpeed :50});
var a=v.data('jsp');
var el=e;
a.scrollToElement(el,true,true);
e.addClass('s-e-select');
}
},
"RemovePdelivery":function(e){
ShopCart.RemoveCartCookie('store','store-id');
// $(".shop-s-n").html('